Skip to content

Conversation

@bbezak
Copy link
Member

@bbezak bbezak commented Nov 24, 2025

No description provided.

Signed-off-by: Bartosz Bezak <bartosz@stackhpc.com>
@bbezak bbezak requested a review from a team as a code owner November 24, 2025 14:37
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly fixes an issue when running the install-doca.yml playbook in check mode by adding check_mode: false to the task that retrieves the kernel version. This ensures that the kernel variable is registered even during a dry run. I have added one suggestion to further improve the task's idempotency reporting.

Comment on lines 8 to +11
ansible.builtin.command:
cmd: "uname -r"
register: kernel
check_mode: false
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

@bbezak bbezak merged commit e4d3c80 into stackhpc/2025.1 Nov 24, 2025
20 of 22 checks passed
@bbezak bbezak deleted the doca-check-diff branch November 24, 2025 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants