]> git.phdru.name Git - ansible.git/blob - playbooks/debian/roles/sudo/tasks/main.yml
Feat(apt): Add option `cache_valid_time: 3600`
[ansible.git] / playbooks / debian / roles / sudo / tasks / main.yml
1 - name: Install sudo
2   become: true
3   apt:
4     cache_valid_time: 3600
5     install_recommends: no
6     name: sudo
7     state: latest
8     update_cache: yes
9
10 - name: Add user phd to group sudo
11   become: true
12   user:
13     name: phd
14     append: yes
15     groups: sudo
16
17 - name: Allow passwordless operations for phd
18   become: true
19   copy:
20     content: 'phd       ALL=(ALL:ALL) NOPASSWD: ALL'
21     dest: /etc/sudoers.d/phd
22     owner: root
23     group: sudo
24     mode: 0640