-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfw_ubuntu.yml
38 lines (33 loc) · 1.01 KB
/
fw_ubuntu.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
# Note: first time run requires the -Kk flag for SSH auth
---
- hosts: utat_fw
become: 'yes'
vars_files:
- vars/default.yml
vars:
ssh_local_ip_range: 10.0.0.0/16
tasks:
- name: Set up SSH
include_role:
name: ssh-config
vars:
install_fail2ban: false
passwordless_sudo: false
force_keys: false
- name: Install packages
include_role:
name: default-packages
vars:
sys_packages: "{{ default_sys_packages + ['ufw', 'qemu-guest-agent', 'build-essential', 'at', 'git', 'ser2net', 'stlink-tools' ] }}"
# https://github.com/ansible/ansible/issues/18917#issuecomment-520254763
- name: Create FW user
user:
name: firmware
update_password: "on_create"
password: "{{ 'defaultpassword' | password_hash('sha512', 'mysecretsalt') }}"
groups: 'sudo'
append: true
register: fw_user_create
- name: Force reset password
command: "chage -d 0 firmware"
when: fw_user_create.changed