From 8fba0ab1996ac13917041f3a2c796d82181e4cda Mon Sep 17 00:00:00 2001 From: arsenicks Date: Fri, 22 Feb 2019 03:27:34 -0500 Subject: [PATCH] Backport into 2.7 Katello: Added product to the dict choices (#49776) * Added product to the dict choices. Following issue 48594 where product is not a recognised choice: https://github.com/ansible/ansible/issues/48594 * fixed doc added - product to the doc * split line 549 to correct ci test splitting line 549 * Create 49776-product_fix_katello_foreman_module.yaml changelog fragment creation (cherry picked from commit d3fcdae4add16aa66a09e816f4028492fedfd101) --- .../fragments/49776-product_fix_katello_foreman_module.yaml | 2 ++ lib/ansible/modules/remote_management/foreman/katello.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/49776-product_fix_katello_foreman_module.yaml diff --git a/changelogs/fragments/49776-product_fix_katello_foreman_module.yaml b/changelogs/fragments/49776-product_fix_katello_foreman_module.yaml new file mode 100644 index 00000000000..e107ffcbdc9 --- /dev/null +++ b/changelogs/fragments/49776-product_fix_katello_foreman_module.yaml @@ -0,0 +1,2 @@ +bugfixes: +- "remote_management foreman - Fixed issue where it was impossible to createdelete a product because product was missing in dict choices ( https://github.com/ansible/ansible/issues/48594 )" diff --git a/lib/ansible/modules/remote_management/foreman/katello.py b/lib/ansible/modules/remote_management/foreman/katello.py index e91c22dfbf1..da680539e21 100644 --- a/lib/ansible/modules/remote_management/foreman/katello.py +++ b/lib/ansible/modules/remote_management/foreman/katello.py @@ -49,6 +49,7 @@ options: - content_view - lifecycle_environment - activation_key + - product required: true action: @@ -541,7 +542,8 @@ def main(): username=dict(type='str', required=True, no_log=True), password=dict(type='str', required=True, no_log=True), entity=dict(type='str', required=True, - choices=['repository', 'manifest', 'repository_set', 'sync_plan', 'content_view', 'lifecycle_environment', 'activation_key']), + choices=['repository', 'manifest', 'repository_set', 'sync_plan', + 'content_view', 'lifecycle_environment', 'activation_key', 'product']), action=dict(type='str', choices=['sync', 'publish', 'promote']), verify_ssl=dict(type='bool', default=False), task_timeout=dict(type='int', default=1000),