initial deployment

This commit is contained in:
xcad2k
2021-06-11 15:01:45 +02:00
parent 7e7cbc3d4a
commit 0ea81cf7c2
9 changed files with 166 additions and 0 deletions

View File

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