summaryrefslogtreecommitdiff
path: root/roles/common/tasks
diff options
context:
space:
mode:
authorChristian Franke <nobody@nowhere.ws>2015-08-25 19:23:43 +0200
committerChristian Franke <nobody@nowhere.ws>2015-08-25 19:23:43 +0200
commitaf66612e6014bea48458125cda72d73c51bc3c20 (patch)
tree49cee76d579149a9fd800225303ee31be79cf3eb /roles/common/tasks
Initial commit
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