Allow passwordless sudo
This commit is contained in:
parent
30b52f9fb9
commit
93c0101ca4
|
@ -10,9 +10,17 @@
|
|||
state: present
|
||||
loop: "{{ users }}"
|
||||
|
||||
- name: Add ssh authorized_keys
|
||||
- name: Add SSH keys to users
|
||||
ansible.posix.authorized_key:
|
||||
user: "{{ item.name }}"
|
||||
key: "{{ item.ssh_keys | join('\n') }}"
|
||||
exclusive: true
|
||||
loop: "{{ users }}"
|
||||
|
||||
- name: Allow passwordless sudo to 'sudo' group
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/sudoers
|
||||
regexp: '^%sudo ALL='
|
||||
line: '%sudo ALL=(ALL:ALL) NOPASSWD: ALL'
|
||||
validate: /usr/sbin/visudo -cf %s
|
||||
state: present
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# vim: ft=yaml.ansible
|
||||
# code: language=ansible
|
||||
---
|
||||
- name: Restart Docker daemon
|
||||
- name: Reload Docker daemon
|
||||
ansible.builtin.service:
|
||||
name: docker
|
||||
state: reloaded
|
||||
|
|
|
@ -36,11 +36,11 @@
|
|||
enabled: true
|
||||
state: started
|
||||
|
||||
- name: Configure cron job to prune unused Docker data weekly
|
||||
- name: Configure cron job to prune unused Docker data daily
|
||||
ansible.builtin.cron:
|
||||
name: Prune unused Docker data
|
||||
cron_file: ansible_docker_prune
|
||||
job: 'docker system prune -fa && docker volume prune -fa'
|
||||
special_time: weekly
|
||||
special_time: daily
|
||||
user: root
|
||||
state: present
|
||||
|
|
Loading…
Reference in a new issue