Bug 1468193 - [RFE] Retirement playbook for an Ansible playbook service runs on the incorrect host
[RFE] Retirement playbook for an Ansible playbook service runs on the incorre...
Status: NEW
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate (Show other bugs)
5.8.0
Unspecified Unspecified
high Severity high
: GA
: cfme-future
Assigned To: Greg McCullough
Dave Johnson
ansible:retirement:playbook
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-06 05:21 EDT by Peter McGowan
Modified: 2017-07-27 04:20 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Peter McGowan 2017-07-06 05:21:44 EDT
Description of problem:
An Ansible Playbook service template can be created that contains a retirement playbook. The service template contains a default 'hosts' element (this is a mandatory field that must be completed when the service catalog item is created). The service can however also use a service dialog that allows the 'hosts' field to be overriden at order time.

When the ordered service (in "My Services") is retired, the retirement playbook runs on the host defined in the service template, rather than the host specified in the service dialog that the provisioning playbook was run on.

Version-Release number of selected component (if applicable):
5.8.0.17

How reproducible:
Every time


Steps to Reproduce:
1. Create a service of type Ansible playbook. In the 'Provisioning' tab, specify a suitable repository, playbook and machine credential. Leave the Cloud Type as '<choose>'.
2. In the 'Provisioning' tab, add the value 'localhost' to the 'Hosts' element.
3. In the 'Dialog' element, check 'Create New' and give a name for a new dialog
4. In the 'Retirement' tab, specify a suitable repository, playbook and machine credential. Leave the Cloud Type as '<choose>'.
5. In the 'Retirement' tab, add the value 'localhost' to the 'Hosts' element.
6. Click 'Add' to save the catalog item
7. From the 'Service Catalogs' accordion, order the new service. When the dialog appears, select a suitable machine credential, and a different hostname or IP address to the one that was specified when the service template was created.
8. Wait for the service to run successfully.
9. Retire the service.  

Actual results:
The error "fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "module_stderr": "sudo: effective uid is not 0, is sudo installed setuid root?
", "module_stdout": "", "msg": "MODULE FAILURE"}"  The retirement playbook was run on localhost.

Expected results:
The retirement playbook should run on the same host or IP address that was specified in the service dialog when the service was ordered, and this overrides the default value defined when the service is created.

Additional info:

Note You need to log in before you can comment on or make changes to this bug.