toansible: Start adding pacman.conf

This commit is contained in:
flyingscorpio@arch-desktop 2022-02-21 21:18:33 +01:00
parent 2b616af8fd
commit 65f71bbbba
2 changed files with 17 additions and 0 deletions

View file

@ -5,3 +5,4 @@
- base
- neovim
- ssh-agent
- pacman.conf

View file

@ -0,0 +1,16 @@
---
- 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
copy:
src: /etc/pacman.conf
dest: /etc/pacman.conf.backup
remote_src: yes
when: not pacmanconf.stat.exists