mirror of https://github.com/kewlfft/ansible-aur
readme
parent
af6fa288cb
commit
96c930aa1a
17
README.md
17
README.md
|
@ -68,10 +68,15 @@ Use it in a task, as in the following examples:
|
||||||
While Ansible expects to SSH as root, AUR helpers do not allow executing operations as root, they all fail with "you cannot perform this operation as root". It is therefore recommended to create a user, that we will call for example *aur_builder*, that has no need for password with pacman in sudoers.
|
While Ansible expects to SSH as root, AUR helpers do not allow executing operations as root, they all fail with "you cannot perform this operation as root". It is therefore recommended to create a user, that we will call for example *aur_builder*, that has no need for password with pacman in sudoers.
|
||||||
This can be done in Ansible with the following actions:
|
This can be done in Ansible with the following actions:
|
||||||
```
|
```
|
||||||
- user: name=aur_builder group=wheel
|
- user:
|
||||||
|
name: aur_builder
|
||||||
- copy:
|
group: wheel
|
||||||
dest: /etc/sudoers.d/11-install-aur_builder
|
shell: /usr/bin/nologin
|
||||||
content: 'aur_builder ALL=(ALL) NOPASSWD: /usr/bin/pacman'
|
home: /home/aur_builder
|
||||||
validate: visudo -cf %s
|
- lineinfile:
|
||||||
|
path: /etc/sudoers.d/11-install-aur_builder
|
||||||
|
regexp: '^aur_builder'
|
||||||
|
line: 'aur_builder ALL=(ALL) NOPASSWD: /usr/bin/pacman'
|
||||||
|
create: yes
|
||||||
|
validate: 'visudo -cf %s'
|
||||||
```
|
```
|
Loading…
Reference in New Issue