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
|
become: true
|
||||||
ansible.builtin.lineinfile:
|
ansible.builtin.lineinfile:
|
||||||
path: /etc/sudo.conf
|
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
|
state: present
|
||||||
validate: 'visudo -cf %s'
|
validate: 'visudo -cf %s'
|
||||||
|
|
||||||
@ -48,7 +48,22 @@
|
|||||||
state: present
|
state: present
|
||||||
name:
|
name:
|
||||||
- pmount
|
- 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:
|
always:
|
||||||
- name: Disable user to use sudo pacman without password
|
- name: Disable user to use sudo pacman without password
|
||||||
become: true
|
become: true
|
||||||
|
Loading…
Reference in New Issue
Block a user