Use block in file instead

This commit is contained in:
exu 2024-10-06 19:24:37 +02:00
parent 78b597e894
commit e6000fc044

View File

@ -3,16 +3,12 @@
become: yes
tasks:
- name: Enable multilib repository
ansible.builtin.lineinfile:
ansible.builtin.blockinfile:
path: /etc/pacman.conf
search_string: "#[multilib]"
line: "[multilib]"
- name: Enable multilib repository (2)
ansible.builtin.lineinfile:
path: /etc/pacman.conf
search_string: "#Include = /etc/pacman.d/mirrorlist"
line: Include = /etc/pacman.d/mirrorlist
prepend_newline: true
block: |
[multilib]
Include = /etc/pacman.d/mirrorlist
- name: Install official packages
community.general.pacman: