summaryrefslogtreecommitdiff
path: root/roles/common/tasks/main.yaml
blob: 73b50392d50297ce8d81ce0dc6a8a1a52bb645a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
---
# General setup for my hosts
- name: Install common packages
  apt: name={{ item }} state=present update_cache=yes
  with_items:
    - git
    - 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