Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ops/cli/inventory.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def get_inventory_hosts(self, args):
return self.ansible_inventory.get_hosts(limit)

def get_host_facts(self, host, indent="\t"):
vars = self.ansible_inventory.get_vars(host)
vars = host.get_vars()
vars = {unicode(key): var for key, var in vars.items()} # the yaml dumper doesn't handle mixed keys encoding
ret = yaml.dump(vars, indent=4, allow_unicode=True, default_flow_style=False, Dumper=AnsibleDumper)
ret = "\n".join([indent + line for line in ret.split("\n")])
Expand Down
3 changes: 1 addition & 2 deletions src/ops/cli/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ def run(self, args):
remote_hosts.append('{}--{}'.format(bastion, remote.pattern))
else:
for host in hosts:
vars = self.ansible_inventory.get_vars(host)
ssh_host = vars.get('ansible_ssh_host') or host
ssh_host = host.get_vars().get('ansible_ssh_host') or host
remote_hosts.append(ssh_host)

for ssh_host in remote_hosts:
Expand Down