aboutsummaryrefslogtreecommitdiffstats
path: root/fdio.infra.ansible/roles/aws/tasks/main.yaml
diff options
context:
space:
mode:
authorPeter Mikus <peter.mikus@protonmail.ch>2025-01-09 11:15:07 +0100
committerPeter Mikus <peter.mikus@protonmail.ch>2025-01-09 10:22:52 +0000
commit5c6ff56dad4f9c0bc4c5008dfebe3c2ef3df35fc (patch)
tree3fd3aa0c949b86b27df2b2b32f1d7c855d9e3d4d /fdio.infra.ansible/roles/aws/tasks/main.yaml
parent53002dda470a2f63dfbe79dd52ce9bedc2597b35 (diff)
fix(infra): New AWS images
Signed-off-by: Peter Mikus <peter.mikus@protonmail.ch> Change-Id: Ib50df500ef28ceb40d9f9d8d05e31a16b484fa93 (cherry picked from commit 0a3b2703149d02b97915831d39b66d1d8b1feb6a)
Diffstat (limited to 'fdio.infra.ansible/roles/aws/tasks/main.yaml')
-rw-r--r--fdio.infra.ansible/roles/aws/tasks/main.yaml17
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