From b6e4266aa56dae4c5762ff74860aa402b44c803c Mon Sep 17 00:00:00 2001 From: John R Barker Date: Thu, 8 Jun 2017 12:55:25 +0100 Subject: [PATCH] 2.3bug25396 2 (#25486) Don't fail when creating a Foreman organization fixes(#25299) --- CHANGELOG.md | 1 + lib/ansible/modules/remote_management/foreman/foreman.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e73d0ec7afe..2c89d32b7d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ Ansible Changes By Release * Fix so ansilbe-galaxy install --force with unversioned roles will once again overwrite old versions. * Fix for RabbitMQ 3.6.7 endpoint return code changing. +* Fix for Foreman organization creation ## 2.3.1 "Ramble On" - 2017-06-01 diff --git a/lib/ansible/modules/remote_management/foreman/foreman.py b/lib/ansible/modules/remote_management/foreman/foreman.py index 67fe77fc7f6..4a6105406de 100644 --- a/lib/ansible/modules/remote_management/foreman/foreman.py +++ b/lib/ansible/modules/remote_management/foreman/foreman.py @@ -93,7 +93,7 @@ class NailGun(object): if len(response) == 1: return response[0] else: - self._module.fail_json(msg="No Content View found for %s" % name) + return None def organization(self, params): name = params['name']