mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-17 21:41:47 -05:00
Add ability to append suffix to host names for Cloudforms Inventory
Allows for use of a suffix that will be appended to host names returned from Cloudforms API if that suffix is not present. For example with a suffix of 'example.org', the following results would be shown for a particular Cloudforms host name: someexample -> someexample.example.org someexample.example.org -> someexample.example.org The main use-case for this is, when one Inventory Source is returning names that have a FQDN name whilst others are returning a shortname, to ensure that the hosts in an inventory aren't effectively duplicated.
This commit is contained in:
@@ -1756,7 +1756,7 @@ class RunInventoryUpdate(BaseTask):
|
||||
cp.set(section, 'ssl_verify', "false")
|
||||
|
||||
cloudforms_opts = dict(inventory_update.source_vars_dict.items())
|
||||
for opt in ['version', 'purge_actions', 'clean_group_keys', 'nest_tags']:
|
||||
for opt in ['version', 'purge_actions', 'clean_group_keys', 'nest_tags', 'suffix']:
|
||||
if opt in cloudforms_opts:
|
||||
cp.set(section, opt, cloudforms_opts[opt])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user