Merge branch 'downstream' into devel

This commit is contained in:
Ryan Petrello
2020-04-28 12:18:13 -04:00
34 changed files with 291 additions and 194 deletions

View File

@@ -2577,6 +2577,12 @@ class satellite6(PluginFileInjector):
def inventory_as_dict(self, inventory_update, private_data_dir):
ret = super(satellite6, self).inventory_as_dict(inventory_update, private_data_dir)
want_ansible_ssh_host = False
foreman_opts = inventory_update.source_vars_dict.copy()
for k, v in foreman_opts.items():
if k == 'satellite6_want_ansible_ssh_host' and isinstance(v, bool):
want_ansible_ssh_host = v
# Compatibility content
group_by_hostvar = {
"environment": {"prefix": "foreman_environment_",
@@ -2603,6 +2609,9 @@ class satellite6(PluginFileInjector):
ret['want_facts'] = True
ret['want_params'] = True
if want_ansible_ssh_host:
ret['compose'] = {'ansible_ssh_host': "foreman['ip6'] | default(foreman['ip'], true)"}
return ret