-
Notifications
You must be signed in to change notification settings - Fork 749
Only run dconf when there is an actual change in previous tasks for dconf gnome ansible remediations #13933
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
Only run dconf when there is an actual change in previous tasks for dconf gnome ansible remediations #13933
Conversation
Skipping CI for Draft Pull Request. |
|
||
- name: Dconf Update | ||
ansible.builtin.command: dconf update | ||
when: result_ini.changed or result_lineinfile.changed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that a more idiomatic way is to use something is changed
instead of something.changed
. Ansible uses the is
form across the documentation, eg. https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_conditionals.html#conditions-based-on-registered-variables
line: '/org/gnome/login-screen/banner-message-enable' | ||
create: yes | ||
register: result_lineinfile | ||
changed_when: result_lineinfile.changed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My opinion is that the changed_when
line is superfluous in this task and can be harmlessly removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have confirmed that it can be removed.
value: "true" | ||
create: yes | ||
no_extra_spaces: yes | ||
register: result_ini |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tried to run a per-rule playbook for this rule against a RHEL 9 VM and I confirm that it's idempotent successfully.
@ggbecker you might have old head, try to rebase the PR on the top of the latest masster barch |
/packit retest-failed |
a684723
to
273d0de
Compare
273d0de
to
7ff41a4
Compare
@jan-cerny I have rebased and applied your suggestions. |
@ggbecker please rebase on the latest upstream master branch, the error should now be fixed in master |
7ff41a4
to
23b8179
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have run a per-rule playbook for rule dconf_gnome_banner-enabled against a RHEL 9 VM and I confirm that it's idempotent successfully. Then, I run automatus TSs locally and they passed.
@ggbecker: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
/retest |
Description: