summaryrefslogtreecommitdiff
path: root/roles/common/tasks/main.yaml
blob: e39e0c2cc77900b102759aeaa9055a20d02aeb9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
---
- name: Ensure apt is recent
  shell: apt-get update

# 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