toansible: Start adding pacman.conf
This commit is contained in:
parent
2b616af8fd
commit
65f71bbbba
2 changed files with 17 additions and 0 deletions
|
@ -5,3 +5,4 @@
|
|||
- base
|
||||
- neovim
|
||||
- ssh-agent
|
||||
- pacman.conf
|
||||
|
|
16
roles/pacman.conf/tasks/main.yml
Normal file
16
roles/pacman.conf/tasks/main.yml
Normal 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
|
Loading…
Add table
Reference in a new issue