-
Notifications
You must be signed in to change notification settings - Fork 897
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
Add manageiq to the extra_var before launching a job #14354
Conversation
@gmcculloug @mkanoor please review |
@miq-bot add_label providers/ansible_tower |
'MIQ_URL' => MiqRegion.my_region.remote_ws_url, | ||
'MIQ_TOKEN' => Api::UserTokenService.new.generate_token(evm_owner.userid, 'api'), | ||
'MIQ_SERVICE' => id, | ||
'MIQ_REQUESTOR' => evm_owner.userid, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bzwei This should also be the slug
{ | ||
'MIQ_URL' => MiqRegion.my_region.remote_ws_url, | ||
'MIQ_TOKEN' => Api::UserTokenService.new.generate_token(evm_owner.userid, 'api'), | ||
'MIQ_SERVICE' => id, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bzwei
This should use the slug on the service object
Should we all also add Service Action which will come in handy when the same playbook is used for Provisioning, Reconfig and Retirement
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggested using id
until we get url slug support in PR #14344. I would hold off merging this until then, but it gives us something to work with.
67bb517
to
6dffdb8
Compare
@miq-bot remove_label wip |
'miq_token' => Api::UserTokenService.new.generate_token(evm_owner.userid, 'api'), | ||
'miq_service' => href_slug, | ||
'miq_requestor' => evm_owner.href_slug, | ||
'miq_request_task' => miq_request_task.href_slug |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bzwei would miq_request_task be present when doing retirement?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure. We can try it out.
6dffdb8
to
632e05b
Compare
'miq_url' => MiqRegion.my_region.remote_ws_url, | ||
'miq_token' => Api::UserTokenService.new.generate_token(evm_owner.userid, 'api'), | ||
'miq_service' => href_slug, | ||
'miq_requestor' => evm_owner.href_slug |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since these are already under the 'manageiq' key I would say we can drop the miq_
prefix.
Suggested key names:
api_url
api_token
service
user
Open to other suggestions.
632e05b
to
31383b0
Compare
Checked commit bzwei@31383b0 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
👍 |
Expose selected manageiq data to playbook through
extra_vars
https://www.pivotaltracker.com/story/show/141706117