Skip to content

feat: Reduce "changed" strings in output - #927

Open
strugee wants to merge 1 commit into
nginx:mainfrom
strugee:quiet-asserts
Open

feat: Reduce "changed" strings in output#927
strugee wants to merge 1 commit into
nginx:mainfrom
strugee:quiet-asserts

Conversation

@strugee

@strugee strugee commented Feb 16, 2026

Copy link
Copy Markdown

Proposed changes

The impetus for this change is that having the string "changed" in the output makes it annoying to run check mode and then do a find for "changed" to figure out what a real run would modify.

Notice that, while the success_msg is no longer printed on success, the assertion failure formatting is still similar to what's printed before (though I would argue it's not great already... fail_msg doesn't really print right). IMO given the fact that Ansible prints task names, the success_msg isn't really adding much here, so this behavior seems ok.

Before:

[snipped]
TASK [nginxinc.nginx : Validate Ansible/Jinja2 version, Ansible collections, role variables, and supported distributions] ***************************************************
included: /var/home/alex/.ansible/roles/nginxinc.nginx/tasks/validate/validate.yml for dokku.host.seagl.org

TASK [nginxinc.nginx : Verify you are using a supported Ansible version on your Ansible host] *******************************************************************************
fatal: [dokku.host.seagl.org -> localhost]: FAILED! => {
    "assertion": "ansible_version['full'] is version('2.18', '<')",
    "changed": false,
    "evaluated_to": false,
    "msg": "(True | ternary('Ansible 2.18.11 is not yet supported. Please downgrade to a supported Ansible release', 'Ansible 2.18.11 has reached End of Life (EoL). Please upgrade to a supported Ansible release.') Check the README for more details."
}
...ignoring

TASK [nginxinc.nginx : Extract the version of Jinja2 installed on your Ansible host] ****************************************************************************************
ok: [dokku.host.seagl.org -> localhost]

TASK [nginxinc.nginx : Verify that you are using a supported Jinja2 version on your Ansible host] ***************************************************************************
ok: [dokku.host.seagl.org -> localhost] => {
    "changed": false,
    "msg": "Jinja2 3.1.6 is supported."
}

TASK [nginxinc.nginx : Extract the list of Ansible collections installed on your Ansible host] ******************************************************************************
ok: [dokku.host.seagl.org -> localhost]

TASK [nginxinc.nginx : Verify that the 'community.general' Ansible collection is installed on your Ansible host] ************************************************************
ok: [dokku.host.seagl.org -> localhost] => {
    "changed": false,
    "msg": "The 'community.general' Ansible collection is installed."
}

TASK [nginxinc.nginx : Verify that the 'ansible.posix' Ansible collection is installed on your Ansible host] ****************************************************************
skipping: [dokku.host.seagl.org]

TASK [nginxinc.nginx : Verify that the 'community.crypto' Ansible collection is installed on your Ansible host] *************************************************************
skipping: [dokku.host.seagl.org]

TASK [nginxinc.nginx : Verify that 'nginx_setup' parameter is a valid value] ************************************************************************************************
ok: [dokku.host.seagl.org -> localhost] => {
    "changed": false,
    "msg": "The value you used for 'nginx_setup', install, is valid."
}

TASK [nginxinc.nginx : Verify that 'nginx_branch' parameter is a valid value] ***********************************************************************************************
ok: [dokku.host.seagl.org -> localhost] => {
    "changed": false,
    "msg": "The value you used for 'nginx_branch', mainline, is valid."
}

TASK [nginxinc.nginx : Verify that 'nginx_install_from' parameter is a valid value] *****************************************************************************************
ok: [dokku.host.seagl.org -> localhost] => {
    "changed": false,
    "msg": "The value you used for 'nginx_install_from', nginx_repository is valid."
}

TASK [nginxinc.nginx : Verify whether you are using a supported NGINX distribution] *****************************************************************************************
ok: [dokku.host.seagl.org] => {
    "changed": false,
    "msg": "Your distribution, Ubuntu 24.04 (x86_64), is supported by NGINX Open Source."
}

TASK [nginxinc.nginx : Verify that you are installing a supported NGINX dynamic module] *************************************************************************************
skipping: [dokku.host.seagl.org]

[snipped]

After:

[snipped]
TASK [nginxinc.nginx : Validate Ansible/Jinja2 version, Ansible collections, role variables, and supported distributions] ***************************************************
included: /var/home/alex/.ansible/roles/nginxinc.nginx/tasks/validate/validate.yml for dokku.host.seagl.org

TASK [nginxinc.nginx : Verify you are using a supported Ansible version on your Ansible host] *******************************************************************************
fatal: [dokku.host.seagl.org -> localhost]: FAILED! => {"assertion": "ansible_version['full'] is version('2.18', '<')", "changed": false, "evaluated_to": false, "msg": "(True | ternary('Ansible 2.18.11 is not yet supported. Please downgrade to a supported Ansible release', 'Ansible 2.18.11 has reached End of Life (EoL). Please upgrade to a supported Ansible release.') Check the README for more details."}
...ignoring

TASK [nginxinc.nginx : Extract the version of Jinja2 installed on your Ansible host] ****************************************************************************************
ok: [dokku.host.seagl.org -> localhost]

TASK [nginxinc.nginx : Verify that you are using a supported Jinja2 version on your Ansible host] ***************************************************************************
ok: [dokku.host.seagl.org -> localhost]

TASK [nginxinc.nginx : Extract the list of Ansible collections installed on your Ansible host] ******************************************************************************
ok: [dokku.host.seagl.org -> localhost]

TASK [nginxinc.nginx : Verify that the 'community.general' Ansible collection is installed on your Ansible host] ************************************************************
ok: [dokku.host.seagl.org -> localhost]

TASK [nginxinc.nginx : Verify that the 'ansible.posix' Ansible collection is installed on your Ansible host] ****************************************************************
skipping: [dokku.host.seagl.org]

TASK [nginxinc.nginx : Verify that the 'community.crypto' Ansible collection is installed on your Ansible host] *************************************************************
skipping: [dokku.host.seagl.org]

TASK [nginxinc.nginx : Verify that 'nginx_setup' parameter is a valid value] ************************************************************************************************
ok: [dokku.host.seagl.org -> localhost]

TASK [nginxinc.nginx : Verify that 'nginx_branch' parameter is a valid value] ***********************************************************************************************
ok: [dokku.host.seagl.org -> localhost]

TASK [nginxinc.nginx : Verify that 'nginx_install_from' parameter is a valid value] *****************************************************************************************
ok: [dokku.host.seagl.org -> localhost]

TASK [nginxinc.nginx : Verify whether you are using a supported NGINX distribution] *****************************************************************************************
ok: [dokku.host.seagl.org]

TASK [nginxinc.nginx : Verify that you are installing a supported NGINX dynamic module] *************************************************************************************
skipping: [dokku.host.seagl.org]

[snipped]

Additional notes

I didn't run Molecule locally because this seemed so trivial that I figured I'd let CI take that job. Also, I did not adjust CHANGELOG.md because I was confused, see #926. Happy to amend the patch though, to add a changelog entry.

Checklist

Before creating a PR, run through this checklist and mark each as complete:

The impetus for this change is that having the string "changed" in the
output makes it annoying to run check mode and then do a find for
"changed" to figure out what a real run would modify.
@strugee
strugee requested a review from a team as a code owner February 16, 2026 00:07
@github-actions github-actions Bot added the enhancement Enhance/improve an existing feature label Feb 16, 2026
@github-actions

github-actions Bot commented Feb 16, 2026

Copy link
Copy Markdown

✅ All required contributors have signed the F5 CLA for this PR. Thank you!
Posted by the CLA Assistant Lite bot.

@strugee

strugee commented Feb 16, 2026

Copy link
Copy Markdown
Author

I have hereby read the F5 CLA and agree to its terms

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

Labels

enhancement Enhance/improve an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant