ansible / awx

AWX provides a web-based user interface, REST API, and task engine built on top of Ansible. It is one of the upstream projects for Red Hat Ansible Automation Platform.
Other
14.01k stars 3.42k forks source link

Support diff mode in awx.awx.* modules #14903

Open keilr opened 8 months ago

keilr commented 8 months ago

Please confirm the following

Feature type

New Feature

Feature Summary

During the playbook development process, we heavily use the --check and --diff modes to verify what will be changed on the controller before applying the configuration. However, as the awx.awx.* modules do not yet support the diff mode, the playbook output is not helpful during a dry run.

Select the relevant components

Steps to reproduce

n/a

Current results

n/a

Sugested feature result

show diff output

Additional information

We use infra.controller_configuration collection to configure all AWX resources (GitOps). Therefore, a dry run with proper diff output would be very helpful in detecting issues that may potentially destroy the entire AWX instance.

fosterseth commented 6 months ago

@sean-m-sullivan do have some opinions on diff mode support? I realize check mode probably doesn't work very well across all awx modules, but diff (without check) probably has a better chance of being consistent and useful

sean-m-sullivan commented 5 months ago

I think a diff mode might be possible by reading the the api and determining if there is a change, and could be useful as well. it depends on how we want to do it, but could compare new fields to existing fields dict where they match in most modules.

keilr commented 5 months ago

@sean-m-sullivan @fosterseth please have a look to my PR: https://github.com/ansible/awx/pull/15118

We are using this in our custom Ansible EE and it works perfectly.