Skip to content

Conversation

@jovial
Copy link
Contributor

@jovial jovial commented Feb 6, 2026

  • Tweaked ordering to fix various issues
  • Added additional tags so that you can resume if something goes wrong

- Tweaked ordering to fix various issues
- Added additional tags so that you can resume if something goes wrong
@jovial jovial requested a review from a team as a code owner February 6, 2026 18:30
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 refactors the Ubuntu upgrade playbook by reordering tasks and adding tags, which should make the process more robust and easier to resume on failure. The changes are logical, grouping repository cleanup tasks together. I've added a few suggestions to remove some minor redundancies introduced in the new code, such as an unnecessary loop and duplicate tags.

Comment on lines +164 to +169
ansible.builtin.blockinfile:
path: "{{ item }}"
state: absent
become: true
loop:
- /etc/apt/sources.list
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This task uses a loop with a single item, which is redundant. The task can be simplified by removing the loop and setting the path directly.

      ansible.builtin.blockinfile:
        path: /etc/apt/sources.list
        state: absent
      become: true

remote_src: true
become: true
when: hostvars[inventory_hostname].stackhpc_repos_enabled
tags: post
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The post tag is already applied to the entire play, so this tags definition is redundant and can be removed.

- sources.list.d/ubuntu.sources
become: true
when: hostvars[inventory_hostname].stackhpc_repos_enabled
tags: post
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The post tag is already applied to the entire play, so this tags definition is redundant and can be removed.

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.

1 participant