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

[Closed] Fix handling of inventory and credential options for tower_job_launch #41497

Closed
wants to merge 4 commits into from
Closed

Conversation

saito-hideki
Copy link
Member

SUMMARY
ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME
  • tower_job_launch.py
ANSIBLE VERSION
Devel
ADDITIONAL INFORMATION

None

- Fixed issue #25017,#37567
- Add example for prompt on launch

Signed-off-by: Hideki Saito <saito@fgrep.org>
@ansibot
Copy link
Contributor

ansibot commented Jun 13, 2018

@ansibot ansibot added affects_2.7 This issue/PR affects Ansible v2.7 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Jun 13, 2018
@AlanCoding
Copy link
Member

Tests are still running as of now, but after they pass...

shipit

@ansibot ansibot removed the needs_triage Needs a first human triage before being processed. label Jun 13, 2018
@ryanpetrello
Copy link
Contributor

ryanpetrello commented Jun 18, 2018

It might be nice to add an integration test for this that proves that it works.

You could update this playbook to make another Job Template that specified ask_credential and ask_inventory. Then you could ensure that launching worked when they were specified (as in your inline doc example at https://github.com/ansible/ansible/pull/41497/files#diff-cac7a45d6726902b2eeb5134bc1492f7R71):

https://docs.ansible.com/ansible/latest/modules/tower_job_template_module.html#tower-job-template-module
https://github.com/ansible/ansible/blob/devel/test/integration/targets/tower_job_launch/tasks/main.yml

- launch job template without credential and inventory information

Signed-off-by: Hideki Saito <saito@fgrep.org>
@ansibot ansibot added the test This PR relates to tests. label Jun 22, 2018
@saito-hideki
Copy link
Member Author

@AlanCoding @ryanpetrello Thank you for your review! I have added the integration test for this fix :)

@ryanpetrello
Copy link
Contributor

@saito-hideki

You could update this playbook to make another Job Template that specified ask_credential and ask_inventory.

I don't see where the integration test is actually trying this.

…ential

Signed-off-by: Hideki Saito <saito@fgrep.org>
@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. labels Jun 26, 2018
@mattclay
Copy link
Member

CI failure in integration tests: https://app.shippable.com/github/ansible/ansible/runs/71456/66/tests

@mattclay mattclay added the ci_verified Changes made in this PR are causing tests to fail. label Jun 27, 2018
@saito-hideki saito-hideki changed the title Fix handling of inventory and credential options for tower_job_launch [WIP] Fix handling of inventory and credential options for tower_job_launch Jun 30, 2018
@ansibot ansibot added the WIP This issue/PR is a work in progress. Nevertheless it was shared for getting input from peers. label Jun 30, 2018
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Jul 8, 2018
@ansibot ansibot added the needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html label Aug 9, 2018
@perzizzle
Copy link

I see a handful of related issues that around tower_job_launch requiring a credential and inventory to be specified. Is someone still working on this fix?

I also noticed only the name for a credential/inventory work. You cannot reference by id. I can submit a doc update if this expected.

@AlanCoding
Copy link
Member

The practice in tower-cli is that we will attempt to turn it into an integer, and if that fails, treat it as the name. The tower modules go their own way on this, doing the related lookups itself, so the implementation could differ module-by-module unfortunately.

If you have ideas about the direction the modules should go in for related lookups, let us know.

@perzizzle
Copy link

@AlanCoding That seems like a reasonable approach. I don't mind taking a look at the tower modules to see if there's a simple fix. Otherwise a doc update seems to be in order.

@ansibot ansibot removed the support:community This issue/PR relates to code supported by the Ansible community. label Sep 16, 2018
@ansibot ansibot added support:community This issue/PR relates to code supported by the Ansible community. and removed support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Oct 10, 2018
@dagwieers dagwieers added the tower Tower community label Feb 8, 2019
@ansibot ansibot added the web_infrastructure Web-infrastructure category label Feb 16, 2019
@ansibot
Copy link
Contributor

ansibot commented Mar 12, 2019

@saito-hideki
Copy link
Member Author

Closing this PR and crated new PR #54967 based of current "devel"

@saito-hideki saito-hideki changed the title [WIP] Fix handling of inventory and credential options for tower_job_launch [Closed] Fix handling of inventory and credential options for tower_job_launch Apr 8, 2019
@ansible ansible locked and limited conversation to collaborators Jul 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.7 This issue/PR affects Ansible v2.7 bug This issue/PR relates to a bug. ci_verified Changes made in this PR are causing tests to fail. module This issue/PR relates to a module. needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. support:community This issue/PR relates to code supported by the Ansible community. test This PR relates to tests. tower Tower community web_infrastructure Web-infrastructure category WIP This issue/PR is a work in progress. Nevertheless it was shared for getting input from peers.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants