From 0a3b2703149d02b97915831d39b66d1d8b1feb6a Mon Sep 17 00:00:00 2001 From: Peter Mikus Date: Thu, 9 Jan 2025 11:15:07 +0100 Subject: fix(infra): New AWS images Signed-off-by: Peter Mikus Change-Id: Ib50df500ef28ceb40d9f9d8d05e31a16b484fa93 --- fdio.infra.ansible/roles/aws/tasks/main.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'fdio.infra.ansible') diff --git a/fdio.infra.ansible/roles/aws/tasks/main.yaml b/fdio.infra.ansible/roles/aws/tasks/main.yaml index 47b8c10135..d6304f8bc7 100644 --- a/fdio.infra.ansible/roles/aws/tasks/main.yaml +++ b/fdio.infra.ansible/roles/aws/tasks/main.yaml @@ -79,6 +79,14 @@ tags: - conf-ssh +- name: "Enable Password Less sudo" + ansible.builtin.lineinfile: + dest: "/etc/ssh/sshd_config" + regexp: "^#PermitRootLogin prohibit-password" + line: "PermitRootLogin yes" + tags: + - conf-ssh + - name: "Recursively Delete Other Configs" ansible.builtin.file: path: "/etc/ssh/sshd_config.d" @@ -170,3 +178,12 @@ validate: "/usr/sbin/visudo -cf %s" tags: - aws-sudoers + +- name: "sudoers nopasswd" + ansible.builtin.lineinfile: + path: "/etc/sudoers" + state: "present" + line: "%testuser ALL=(ALL) NOPASSWD: ALL" + validate: "/usr/sbin/visudo -cf %s" + tags: + - aws-sudoers \ No newline at end of file -- cgit 1.2.3-korg