summaryrefslogtreecommitdiff
path: root/roles/common/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'roles/common/tasks')
-rw-r--r--roles/common/tasks/main.yaml22
1 files changed, 22 insertions, 0 deletions
diff --git a/roles/common/tasks/main.yaml b/roles/common/tasks/main.yaml
new file mode 100644
index 0000000..3bcffb7
--- /dev/null
+++ b/roles/common/tasks/main.yaml
@@ -0,0 +1,22 @@
+---
+# General setup for my hosts
+- name: Install common packages
+ apt: name={{ item }} state=present
+ with_items:
+ - htop
+ - mtr
+ - ntp
+ - strace
+ - tcpdump
+ - vim
+
+- name: Setup SSH access
+ authorized_key: user=root
+ exclusive=yes
+ key="{{ lookup('file', 'authorized_keys') }}"
+
+- name: Require Key for Login
+ lineinfile: dest=/etc/ssh/sshd_config
+ regexp=PasswordAuthentication
+ line="PasswordAuthentication no"
+ notify: restart ssh