fix(bootstrap): replace brittle sed with ansible.builtin.replace for ubuntu universe repo
This commit is contained in:
@@ -51,9 +51,10 @@
|
||||
changed_when: bootstrap_ubuntu_base_result.rc == 0
|
||||
|
||||
- name: Enable universe repository
|
||||
ansible.builtin.command: "{{ chroot_command }} sed -i '1s|$| universe|' /etc/apt/sources.list"
|
||||
register: bootstrap_ubuntu_repo_result
|
||||
changed_when: bootstrap_ubuntu_repo_result.rc == 0
|
||||
ansible.builtin.replace:
|
||||
path: /mnt/etc/apt/sources.list
|
||||
regexp: '^(deb\s+\S+\s+\S+\s+main)$'
|
||||
replace: '\1 universe'
|
||||
|
||||
- name: Update package lists
|
||||
ansible.builtin.command: "{{ chroot_command }} apt update"
|
||||
|
||||
Reference in New Issue
Block a user