feat: add pacman hook for recompiling xmonad
This commit is contained in:
parent
0749a6750e
commit
4f53845c92
9
roles/xmonad/files/recompile_xmonad.hook
Normal file
9
roles/xmonad/files/recompile_xmonad.hook
Normal file
@ -0,0 +1,9 @@
|
||||
[Trigger]
|
||||
Operation = Upgrade
|
||||
Type = Package
|
||||
Target = xmonad
|
||||
|
||||
[Action]
|
||||
Description = Recompiling xmonad...
|
||||
When = PostTransaction
|
||||
Exec = /usr/bin/sudo -u max /usr/bin/xmonad --recompile
|
@ -38,7 +38,7 @@
|
||||
become: true
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/sudo.conf
|
||||
line: 'max ALL=(ALL) NOPASSWD: /usr/bin/pacman'
|
||||
line: 'max ALL=(ALL) NOPASSWD: /usr/bin/pacman, /usr/bin/mkdir, /usr/bin/cp'
|
||||
state: present
|
||||
validate: 'visudo -cf %s'
|
||||
|
||||
@ -48,7 +48,22 @@
|
||||
state: present
|
||||
name:
|
||||
- pmount
|
||||
- advmvcp
|
||||
- advcpmv
|
||||
|
||||
- name: Create pacman hook directory
|
||||
become: true
|
||||
ansible.builtin.file:
|
||||
path: /etc/pacman.d/hooks
|
||||
state: directory
|
||||
mode: '0755'
|
||||
|
||||
- name: Copy over xmonad pacman hook
|
||||
become: true
|
||||
ansible.builtin.copy:
|
||||
src: recompile_xmonad.hook
|
||||
dest: /etc/pacman.d/recompile_xmonad.hook
|
||||
mode: '0644'
|
||||
|
||||
always:
|
||||
- name: Disable user to use sudo pacman without password
|
||||
become: true
|
||||
|
Loading…
Reference in New Issue
Block a user