-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathanu.yml
41 lines (32 loc) · 956 Bytes
/
anu.yml
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
- hosts: all
vars_files:
- vars/main.yml
vars_prompt:
- name: 'username'
prompt: 'username for the new user'
private: no
- name: 'password'
prompt: 'password for the new user'
private: yes
encrypt: sha512_crypt
confirm: yes
- name: 'user_ssh_public_key'
prompt: 'SSH public key for the new user'
private: no
roles:
- name: devsec.hardening.os_hardening
when: ansible_distribution == 'Ubuntu'
- name: devsec.hardening.ssh_hardening
when: ansible_distribution == 'Ubuntu'
tasks:
- name: Set timezone to UTC
community.general.timezone:
name: Etc/UTC
when: ansible_distribution == 'Ubuntu'
- name: 'ANU: Configure and enable UFW'
import_tasks: tasks/ufw.yml
when: ansible_distribution == 'Ubuntu'
- name: 'ANU: Create user'
import_tasks: tasks/create_user.yml
when: ansible_distribution == 'Ubuntu'