Skip to content

Conversation

@bnerickson
Copy link
Contributor

@bnerickson bnerickson commented Mar 31, 2025

Overview of Changes

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

Implementation Considerations

Testing Steps

  1. Add the changes in Fixes #38335 - Adding Ansible Diff Mode to Ansible Job Templates foreman_ansible#764 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-diff-mode true argument:
# hammer job-template create --ansible-diff-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 Diff Mode Enabled flag is set on the new Job Template:
# hammer job-template info --id 260
ID:                         260
Name:                       Ansible Clone Attempt
Job Category:               Ansible Playbook
Provider:                   Ansible
Type:                       job_template
Ansible Callback Enabled:   no
Ansible Check Mode Enabled: no
Ansible Diff 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