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

8049-expose execution node var for playbook #13418

Merged
merged 3 commits into from
Mar 17, 2023

Conversation

lucas-benedito
Copy link
Contributor

SUMMARY

Feature Overview
Expose the Execution Node name as a variable for playbooks(awx_execution_node).

Background, and strategic fit
Customers running jobs in Ansible Tower use the ansible_hostname as an identifier for external applications requests (i.e.: Splunk, Service Now, etc ). In the Ansible Automation platform, that value is the container hostname which is now known to the customer and is not useful.

(Optional) Use Cases

  • delegate the job to the specific cluster node
  • define an identifier for external services such as Splunk, Service Now, etc.
ISSUE TYPE
  • New or Enhanced Feature
COMPONENT NAME
  • CLI
AWX VERSION
2.3

@john-westcott-iv john-westcott-iv added the community pull request Applied to community based pull requests for filtering label Jan 20, 2023
@TheRealHaoLiu
Copy link
Member

just out of curiosity what is 8049 in reference to?

@TheRealHaoLiu
Copy link
Member

is this a reference to a JIRA issue? if so are you able to see the Automation Controller Project? please edit Jira issue field in the project

@lucas-benedito
Copy link
Contributor Author

@TheRealHaoLiu yes, that is the Jira issue, i will update the field accordingly. Thanks for the feedback

@ffirg
Copy link

ffirg commented Feb 2, 2023

This one might be better served once constructed inventory has landed and we can then make better use of hostvars etc

@fosterseth
Copy link
Member

we may wish to update our functional test to assert the execution node is passed in

def test_job_metavars(self):

Can you update the PR for that?

@fosterseth
Copy link
Member

comfirmed that execution node is injected into the extra vars, here is the extravars file in the private data dir

bash-5.1$ tail -n 1 extravars 
!unsafe 'tower_execution_node': !unsafe 'awx_1'

@fosterseth fosterseth merged commit 7deddab into ansible:devel Mar 17, 2023
@lucas-benedito lucas-benedito deleted the expose_variable_exec_node branch March 28, 2023 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community pull request Applied to community based pull requests for filtering community component:api
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants