summaryrefslogtreecommitdiff
path: root/roles/common/tasks/main.yaml
blob: 3bcffb78a2430575460fdf410e2d70f1012ecea5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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