diff options
author | Christian Franke <nobody@nowhere.ws> | 2015-08-25 19:23:43 +0200 |
---|---|---|
committer | Christian Franke <nobody@nowhere.ws> | 2015-08-25 19:23:43 +0200 |
commit | af66612e6014bea48458125cda72d73c51bc3c20 (patch) | |
tree | 49cee76d579149a9fd800225303ee31be79cf3eb /roles/common |
Initial commit
Diffstat (limited to 'roles/common')
-rw-r--r-- | roles/common/files/authorized_keys | 2 | ||||
-rw-r--r-- | roles/common/handlers/main.yaml | 6 | ||||
-rw-r--r-- | roles/common/tasks/main.yaml | 22 |
3 files changed, 30 insertions, 0 deletions
diff --git a/roles/common/files/authorized_keys b/roles/common/files/authorized_keys new file mode 100644 index 0000000..d5e26d8 --- /dev/null +++ b/roles/common/files/authorized_keys @@ -0,0 +1,2 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAgEAldmZ6RY1mcFslBGBg93L97BFcSu/KJPg9NplhctDxGRPQn3LtrkSHdjzMQ9w97lPJxCec32ZlCLBNABYIbvQOHQXvPXuKaHoAjT1wysLRzSOM4iMCevjKsU9ry22kYm1mox7VSMJzDwBRqSI0iKJERezIeJLV+0kFzwKreEU27uTt4vzC65es6wLhygSc1bckaA3OIeiQAgLXr+nKzO0AWULTQOKL37RIUzSstWGcIrlKKb25riKTzJ/VMSVl3WkRAXdpy4AwZNBQ8NyKiB5BvSKe8lQf2ChXHg1xtQzvVEyOHTU3o9y20f+yD/oPT1LST2ZlLd/hBYXBB+L+xfQpv3XETtJBKBNeKNv6+7bWanHh39hIVvQSRJvhTwN2cn8QeqeuwMs8i4HRWUYKJs4bQBTf6SWE21Q1mbddVhD8hPQN5cDdfZsTaugSQ8/KYvCkP/+BvvYG/hS0lsMoLn18CEx/E1XYfQ3FN+OjIk9DVh/rMJBPc5/RKkqVFfyu/JlHfY8SIqiES3XcYoNQPVf/E5nAiCOh9lazwBuGnP1gP5GDuQR0xkVxrpV0Pv//RX8HnyxOHNAZWYZBhRUFkMJP5DHypCckCGD/uM6A9if75IGafC+E0ymgmOsHanhXtuH/JLI8VUQr38i7tk/hAwKvny6JSu0xioKwWflzal319U= nihilus@home +ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAgEA16LUBnVTkVJsvvo9/5Gl6ppyCwmVGsApUp4u8/UcCtkXEXue+FSRbEP8uUGeaSMvHbyJ+gsCL9ZImUVRr6+w3OFI1EKJMQGLdl5LnV/O4pbdRn2xhiE1VU2oipxnp6u4VHN47I0J01h3WMjsZMtxs7li2UsBlcM4+EVHzgDnbF0gw/3BddfC23wQDDhe4+gfSCUc8NMbTj0jIfIaW1O0TYj8DebLWoszDHHOxwCfJXXWo31IffeQLoOtEIwswfvgzADVT4+W3GeY2pghg2gCSnVEtkPj4kBh813Lf+yn0aG5RAp29vfe+aIjJXVyvblqX2t/TyQ2qaefNHIa3WG3msCwVMwgYIX1pS2YNw2dAm3XRXiyvlRyjERlQtt6TOWWzWDeOc4eKgxFxxYI/nsVbOxdtUapMUiGZUHN3WZ00cPGionvmtoDat5hBs+79iKrfO1BjR9p3YjfYVa7JMtQg4OAcNABjW20XT1X7UMR3qE5KkwlSb+SFRjv04kKzZRAC34Czq9sLC3Eh/skGZAp66LmABq4239RqFdQL6Ou6IjvsLuPtKHsu7IA1WeZbBg2OUEjCPhUNZQrUf7e+Pd4rZ3HKOdzrouy9DZ4rN7wpBW37cmiEqFEIyYMHIZ7buFwniLjsbM1UEfuISaCoJmeBXgHISqkbgGd5qCbPML/vhk= nihilus@mobile diff --git a/roles/common/handlers/main.yaml b/roles/common/handlers/main.yaml new file mode 100644 index 0000000..c5d467a --- /dev/null +++ b/roles/common/handlers/main.yaml @@ -0,0 +1,6 @@ +--- +- name: restart ssh + service: name=ssh state=restarted + +- name: Reload systemd daemons + shell: systemctl daemon-reload 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 |