Signed-off-by: David Galloway <david.galloway@ibm.com>
state: restarted
# There's an issue with ansible<=2.9 and our custom built kernels (5.8 as of this commit) where the service and systemd modules don't have backwards compatibility with init scripts
ignore_errors: "{{ 'ceph' in ansible_kernel }}"
+
+- name: apt update
+ ansible.builtin.apt:
+ update_cache: yes
state: present
when:
- ansible_distribution_major_version|int >= 24
+
+# Outbound port 80 traffic is blocked in Sepia
+- name: Find apt source list files
+ ansible.builtin.find:
+ paths:
+ - /etc/apt
+ - /etc/apt/sources.list.d
+ patterns:
+ - sources.list
+ - "*.list"
+ file_type: file
+ register: apt_source_files
+
+- name: Replace http with https in apt sources
+ ansible.builtin.replace:
+ path: "{{ item.path }}"
+ regexp: '(^\s*deb(?:-src)?\s+)(http://)'
+ replace: '\1https://'
+ backup: yes
+ loop: "{{ apt_source_files.files }}"
+ notify: apt update