diff options
Diffstat (limited to 'fdio.infra.ansible/roles')
-rw-r--r-- | fdio.infra.ansible/roles/aws/tasks/main.yaml | 17 |
1 files changed, 17 insertions, 0 deletions
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 |