mirror of
https://gitlab.sectorq.eu/jaydee/ansible.git
synced 2025-01-24 04:49:26 +00:00
23 lines
482 B
YAML
23 lines
482 B
YAML
|
- hosts: "{{ hosts }}"
|
||
|
|
||
|
become: yes
|
||
|
tasks:
|
||
|
|
||
|
# Deploy SSH Key
|
||
|
# --
|
||
|
- name: install public keys
|
||
|
ansible.posix.authorized_key:
|
||
|
user: "{{ user }}"
|
||
|
state: present
|
||
|
key: "{{ lookup('file', new_ssh_key_file) }}"
|
||
|
|
||
|
|
||
|
# Set all sudoers to no password
|
||
|
# --
|
||
|
- name: change sudoers file
|
||
|
lineinfile:
|
||
|
path: /etc/sudoers
|
||
|
state: present
|
||
|
regexp: '^%sudo'
|
||
|
line: '%sudo ALL=(ALL) NOPASSWD: ALL'
|
||
|
validate: /usr/sbin/visudo -cf %s
|