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

Fixes #37942 - Adding ansible_check_mode option to Hammer Job Template Commands #31

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bnerickson
Copy link

@bnerickson bnerickson commented Oct 23, 2024

Overview of Changes

This PR adds the --ansible-check-mode option to hammer cli for Ansible Job Templates. See PR theforeman/foreman_ansible#742 for more information.

Implementation Considerations

Testing Steps

  1. Add the changes in Fixes #37942 - Adding Ansible Check Mode to Ansible Job Templates foreman_ansible#742 to your test environment.
  2. Export the "Ansible Roles - Ansible Default" Job Template.
hammer job-template export --name "Ansible Roles - Ansible Default" > job_template
  1. Create a new job template using the exported template with the --ansible-check-mode true argument:
# hammer job-template create --ansible-check-mode true --file job_template --name "Ansible Clone Attempt" --job-category "Ansible Playbook" --provider-type "Ansible"
Job template created
  1. Run an info command to verify the Ansible Check Mode Enabled flag is set on the new Job Template:
# hammer job-template info --id 249
ID:                         249
Name:                       Ansible Clone Attempt
Job Category:               Ansible Playbook
Provider:                   Ansible
Type:                       job_template
Ansible Callback Enabled:   no
Ansible Check Mode Enabled: yes
Description:

Inputs:

...

Checklists

  • I am familiar with the contributing guidelines.
  • I have added relevant tests for my changes.
  • I have updated the documentation accordingly.

Additional Notes

This PR is dependent on:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant