This commit is contained in:
2024-04-02 21:58:26 +02:00
parent 8a7c4f3724
commit 6a2fbcee07
9 changed files with 219 additions and 0 deletions

View File

@ -0,0 +1,23 @@
- hosts: all
become: yes
tasks:
# Deploy SSH Key
# --
- name: install public keys
ansible.posix.authorized_key:
user: "{{ lookup('env','USER') }}"
state: present
key: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"
# 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