Description of problem: Currently when running an Ansible play book we get the manageiq object delivered. But it is missing the href of the group that launched the job. This will allow us to assign group ownership to the VMs and resources after provisioning. If not we can only guess that the user's group that launched the job is the current group which if the user launches the job and group context switches to another group the VM and resources will be assigned to the wrong group. Version-Release number of selected component (if applicable): 5.8.1.5 How reproducible: 100% Here is what the payload looks like now: TASK [ec2_basic_preprovision : logging manageiq object] ************************ ok: [localhost] => { "manageiq": { "action": "Provision", "api_token": "c03805d2bd18752fdbb40aee6bac3c3d", "api_url": "https://10.9.61.254", "service": "services/12000000000030", "user": "users/12000000000001" } } What we need is output that would like like this: TASK [ec2_basic_preprovision : logging manageiq object] ************************ ok: [localhost] => { "manageiq": { "action": "Provision", "api_token": "c03805d2bd18752fdbb40aee6bac3c3d", "api_url": "https://10.9.61.254", "service": "services/12000000000030", "user": "users/12000000000001", "group": "groups/12000000000002", } }
Lucy - The object references are passed as part of the manageiq_extra_vars. See https://github.com/ManageIQ/manageiq/blob/master/app/models/service_ansible_playbook.rb#L63
https://github.com/ManageIQ/manageiq/pull/15787
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/5b763962bf5abf07bddbcf0818a61760e9642419 commit 5b763962bf5abf07bddbcf0818a61760e9642419 Author: Lucy Fu <lufu> AuthorDate: Thu Aug 10 14:10:40 2017 -0400 Commit: Lucy Fu <lufu> CommitDate: Thu Aug 10 14:10:49 2017 -0400 Add group in manageiq payload for ansible automation. Need to catch the group that the user is in when the job is launched in a multiple groups context. https://bugzilla.redhat.com/show_bug.cgi?id=1480019 app/models/service_ansible_playbook.rb | 1 + spec/models/service_ansible_playbook_spec.rb | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-)
Fixed and verified in 5.9.0.2.20171010190026_0413a06. Group id is presented in manage iq payload.