From 5013d74f46b939dd12400bdafc1c7e6286a3a8fe Mon Sep 17 00:00:00 2001 From: Sean Sullivan Date: Wed, 10 Feb 2021 08:42:06 -0600 Subject: [PATCH 1/5] Remove required field in doc new name is not a required field, removing that designation from the docs. --- awx_collection/plugins/modules/tower_instance_group.py | 1 - 1 file changed, 1 deletion(-) diff --git a/awx_collection/plugins/modules/tower_instance_group.py b/awx_collection/plugins/modules/tower_instance_group.py index 076610f7c0..f32b60aebf 100644 --- a/awx_collection/plugins/modules/tower_instance_group.py +++ b/awx_collection/plugins/modules/tower_instance_group.py @@ -31,7 +31,6 @@ options: new_name: description: - Setting this option will change the existing name (looked up via the name field. - required: True type: str credential: description: From 16aa73fc2ce14c6e45bad2f02d306960abea80da Mon Sep 17 00:00:00 2001 From: Sean Sullivan Date: Wed, 10 Feb 2021 08:47:51 -0600 Subject: [PATCH 2/5] Update inventory source req fields As per the gui, and testing, source is a required field. --- awx_collection/plugins/modules/tower_inventory_source.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/awx_collection/plugins/modules/tower_inventory_source.py b/awx_collection/plugins/modules/tower_inventory_source.py index 5945d411d8..dca97133e6 100644 --- a/awx_collection/plugins/modules/tower_inventory_source.py +++ b/awx_collection/plugins/modules/tower_inventory_source.py @@ -45,6 +45,7 @@ options: - The source to use for this group. choices: [ "scm", "ec2", "gce", "azure_rm", "vmware", "satellite6", "openstack", "rhv", "tower", "custom" ] type: str + required: True source_path: description: - For an SCM based inventory source, the source path points to the file within the repo to use as an inventory. @@ -165,7 +166,7 @@ def main(): # source=dict(choices=["scm", "ec2", "gce", "azure_rm", "vmware", "satellite6", - "openstack", "rhv", "tower", "custom"]), + "openstack", "rhv", "tower", "custom"], required=True), source_path=dict(), source_script=dict(), source_vars=dict(type='dict'), From d4f86e89993844b77df0a9b7a9263bff797a0bc6 Mon Sep 17 00:00:00 2001 From: sean-m-sullivan Date: Wed, 10 Feb 2021 15:45:17 -0600 Subject: [PATCH 3/5] update test --- awx_collection/test/awx/test_inventory_source.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx_collection/test/awx/test_inventory_source.py b/awx_collection/test/awx/test_inventory_source.py index 3e65feaddb..fa01b16ddb 100644 --- a/awx_collection/test/awx/test_inventory_source.py +++ b/awx_collection/test/awx/test_inventory_source.py @@ -169,7 +169,7 @@ def test_falsy_value(run_module, admin_user, base_inventory): result = run_module('tower_inventory_source', dict( name='falsy-test', inventory=base_inventory.name, - # source='ec2', + source='ec2', update_on_launch=False ), admin_user) From 2b664d6958d196232dd29590ae12b655c12d19fb Mon Sep 17 00:00:00 2001 From: sean-m-sullivan Date: Thu, 11 Feb 2021 12:28:55 -0600 Subject: [PATCH 4/5] add default --- awx_collection/plugins/modules/tower_inventory_source.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx_collection/plugins/modules/tower_inventory_source.py b/awx_collection/plugins/modules/tower_inventory_source.py index dca97133e6..9f98fb3135 100644 --- a/awx_collection/plugins/modules/tower_inventory_source.py +++ b/awx_collection/plugins/modules/tower_inventory_source.py @@ -166,7 +166,7 @@ def main(): # source=dict(choices=["scm", "ec2", "gce", "azure_rm", "vmware", "satellite6", - "openstack", "rhv", "tower", "custom"], required=True), + "openstack", "rhv", "tower", "custom"], required=True, default='scm'), source_path=dict(), source_script=dict(), source_vars=dict(type='dict'), From d83771f082dc6879bf2b3cedc264e05a7ce2a1d6 Mon Sep 17 00:00:00 2001 From: sean-m-sullivan Date: Fri, 12 Feb 2021 08:35:27 -0600 Subject: [PATCH 5/5] revert changes --- awx_collection/plugins/modules/tower_inventory_source.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/awx_collection/plugins/modules/tower_inventory_source.py b/awx_collection/plugins/modules/tower_inventory_source.py index 9f98fb3135..5945d411d8 100644 --- a/awx_collection/plugins/modules/tower_inventory_source.py +++ b/awx_collection/plugins/modules/tower_inventory_source.py @@ -45,7 +45,6 @@ options: - The source to use for this group. choices: [ "scm", "ec2", "gce", "azure_rm", "vmware", "satellite6", "openstack", "rhv", "tower", "custom" ] type: str - required: True source_path: description: - For an SCM based inventory source, the source path points to the file within the repo to use as an inventory. @@ -166,7 +165,7 @@ def main(): # source=dict(choices=["scm", "ec2", "gce", "azure_rm", "vmware", "satellite6", - "openstack", "rhv", "tower", "custom"], required=True, default='scm'), + "openstack", "rhv", "tower", "custom"]), source_path=dict(), source_script=dict(), source_vars=dict(type='dict'),