From af66612e6014bea48458125cda72d73c51bc3c20 Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Tue, 25 Aug 2015 19:23:43 +0200 Subject: Initial commit --- roles/common/tasks/main.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 roles/common/tasks/main.yaml (limited to 'roles/common/tasks') 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 -- cgit v1.2.1