From f2f6328a142f35c4a5df6fb31b2981ddd883a439 Mon Sep 17 00:00:00 2001 From: jaydee Date: Sun, 2 Jun 2024 23:19:34 +0200 Subject: [PATCH] bitwarden --- playbooks/distrib_ssh_keys.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 playbooks/distrib_ssh_keys.yml diff --git a/playbooks/distrib_ssh_keys.yml b/playbooks/distrib_ssh_keys.yml new file mode 100644 index 0000000..01c3573 --- /dev/null +++ b/playbooks/distrib_ssh_keys.yml @@ -0,0 +1,23 @@ +- 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 \ No newline at end of file