Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For Ansible Tower service include extra_vars needed to connect to our REST API #18005

Closed
mkanoor opened this issue Sep 20, 2018 · 2 comments
Closed

Comments

@mkanoor
Copy link
Contributor

mkanoor commented Sep 20, 2018

Our Ansible Tower Service doesn't pass in the extra vars necessary to connect to the REST API end point.

@job = job_class.create_job(job_template, job_options)

These extra vars are under the key manageiq

manageiq

  • api_token
  • api_url
  • user
  • group
  • X_MIQ_Group
  • service
  • request_task

The request_task allows us to access a task based on the RBAC request. A Task cannot be directly accessed it can only be accessed via the request

For Ansible Playbook service we pass in extra vars that allows us to connect to REST API

def manageiq_extra_vars(action)

Maybe we should have a mixin that allows both the tower and ansible playbook service to share the same code.

When run as an Automate Method we also pass in extra vars
https://github.com/ManageIQ/manageiq-automation_engine/blob/7d4752980d668d626177cabe63206381edd7f4aa/lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_playbook_method.rb#L112

All these 3 pieces of code that interact with either the tower or embedded ansible need to pass in extra vars.

@mkanoor
Copy link
Contributor Author

mkanoor commented Sep 20, 2018

@bzwei @tinaafitz
Please review this will allows us to share playbooks between embedded ansible and tower job templates using the same ext of extra vars

@gmcculloug
Copy link
Member

Briefly discussed with @lfu and she is going to look into solving this.

lfu added a commit to lfu/manageiq-automation_engine that referenced this issue Oct 4, 2018
lfu added a commit to lfu/manageiq-automation_engine that referenced this issue Oct 4, 2018
lfu added a commit to lfu/manageiq that referenced this issue Oct 4, 2018
lfu added a commit to lfu/manageiq that referenced this issue Oct 4, 2018
Refactor extra_vars support for ServiceAnsiblePlaybook.

ManageIQ#18005
lfu added a commit to lfu/manageiq that referenced this issue Oct 4, 2018
lfu added a commit to lfu/manageiq that referenced this issue Oct 10, 2018
Refactor extra_vars support for ServiceAnsiblePlaybook.

ManageIQ#18005
lfu added a commit to lfu/manageiq that referenced this issue Oct 10, 2018
lfu added a commit to lfu/manageiq-automation_engine that referenced this issue Oct 10, 2018
lfu added a commit to lfu/manageiq that referenced this issue Oct 15, 2018
Refactor extra_vars support for ServiceAnsiblePlaybook.

ManageIQ#18005
lfu added a commit to lfu/manageiq that referenced this issue Oct 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants