Skip to content

Commit f23399c

Browse files
committed
Move repo additions to happen before do-release-upgrade
Moves the addition of new Ubuntu repositories to directly before the call to do-release-upgrade. This ensures that any any failures after that point are only due to the upgrade itself, and not due to missing mounts (such as /tmp not being mounted).
1 parent 9c85c3d commit f23399c

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

etc/kayobe/ansible/maintenance/ubuntu-upgrade.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,18 +54,7 @@
5454
become: true
5555
when: file_status.stat.exists
5656

57-
# NOTE: We cannot use apt_repository here because definitions must exist within the standard repos.list
58-
- name: Ensure Noble repo definitions exist in sources.list
59-
ansible.builtin.blockinfile:
60-
path: /etc/apt/sources.list
61-
block: |
62-
deb {{ stackhpc_repo_ubuntu_noble_url }} noble main restricted universe multiverse
63-
deb {{ stackhpc_repo_ubuntu_noble_url }} noble-updates main restricted universe multiverse
64-
deb {{ stackhpc_repo_ubuntu_noble_url }} noble-backports main restricted universe multiverse
65-
deb {{ stackhpc_repo_ubuntu_noble_security_url }} noble-security main restricted universe multiverse
66-
become: true
67-
68-
- name: Enusre /tmp is mounted with exec
57+
- name: Ensure /tmp is mounted with exec
6958
ansible.posix.mount:
7059
path: /tmp
7160
opts: exec
@@ -81,6 +70,17 @@
8170
become: true
8271
when: inventory_hostname in groups['ceph']
8372

73+
# NOTE: We cannot use apt_repository here because definitions must exist within the standard repos.list
74+
- name: Ensure Noble repo definitions exist in sources.list
75+
ansible.builtin.blockinfile:
76+
path: /etc/apt/sources.list
77+
block: |
78+
deb {{ stackhpc_repo_ubuntu_noble_url }} noble main restricted universe multiverse
79+
deb {{ stackhpc_repo_ubuntu_noble_url }} noble-updates main restricted universe multiverse
80+
deb {{ stackhpc_repo_ubuntu_noble_url }} noble-backports main restricted universe multiverse
81+
deb {{ stackhpc_repo_ubuntu_noble_security_url }} noble-security main restricted universe multiverse
82+
become: true
83+
8484
- name: Upgrade hosts from Ubuntu Jammy 22.04 to Noble 24.04
8585
hosts: overcloud:infra-vms:seed:seed-hypervisor
8686
vars:

0 commit comments

Comments
 (0)