toansible: Don't backup pacman.conf manually

This commit is contained in:
flyingscorpio@clevo 2022-02-22 13:02:09 +01:00
parent 7e04f656eb
commit b77022e0d3

View file

@ -3,19 +3,6 @@
- fail:
when: ansible_distribution != 'Archlinux'
- name: Check if pacman.conf is backed up # don't overwrite backup
stat:
path: /etc/pacman.conf.backup
register: pacmanconf
- name: Backup pacman.conf
become: true
copy:
src: /etc/pacman.conf
dest: /etc/pacman.conf.backup
remote_src: yes
when: not pacmanconf.stat.exists
- name: Set confs for pacman
become: true
block:
@ -24,23 +11,28 @@
path: /etc/pacman.conf
regexp: "#HookDir"
replace: HookDir
backup: true
- name: Set Color
replace:
path: /etc/pacman.conf
regexp: "#Color"
replace: Color
backup: true
- name: Set TotalDownload
replace:
path: /etc/pacman.conf
regexp: "#TotalDownload"
replace: TotalDownload
backup: true
- name: Set CheckSpace
replace:
path: /etc/pacman.conf
regexp: "#CheckSpace"
replace: CheckSpace
backup: true
- name: Set VerbosePkgLists
replace:
path: /etc/pacman.conf
regexp: "#VerbosePkgLists"
replace: VerbosePkgLists
backup: true