Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions etc/kayobe/ansible/tools/install-doca.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
ansible.builtin.command:
cmd: "uname -r"
register: kernel
check_mode: false
Comment on lines 8 to +11
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

While check_mode: false correctly ensures this task runs during a dry run, the command module reports a change on every execution by default. Since this task only retrieves information and doesn't alter the system state, it's good practice to also add changed_when: false. This will make the playbook's output clearer by not reporting a change for this read-only operation, improving idempotency reporting.

      ansible.builtin.command:
        cmd: "uname -r"
      register: kernel
      check_mode: false
      changed_when: false


- name: Install kernel repo
ansible.builtin.dnf:
Expand Down
Loading