This repository has been archived by the owner on Jan 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
playbook-bare-metal.yml
73 lines (66 loc) · 2.02 KB
/
playbook-bare-metal.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
---
- name: Configure name resolution
hosts: bare_metal
gather_facts: true
roles:
- danielfdickinson.system_base_debian.network_hosts_file
- network_resolved
- name: Make second interface a bridge
hosts: bare_metal:&bridge_second_interface
roles:
- network_bridge_second_interface
- name: Add local ipv6 when no internet-ipv6 available
hosts: bare_metal:&local_ipv6
gather_facts: true
pre_tasks:
- name: Gather facts (primary interface may have changed)
ansible.builtin.setup:
roles:
- network_ipv6
vars:
local_ipv6_cidr: "{{ env_domain_addresses['bare_metal']['v6addr'] }}/{{ env_domain_addresses['bare_metal']['v6prefix'] }}"
local_ipv6_gateway: "{{ env_domain_addresses['bare_metal']['v6gateway'] }}"
- name: Setup additional storage
hosts: bare_metal:&storage_extra
roles:
- system_storage_extra
- name: Add base and hardware packages
hosts: bare_metal
gather_facts: true
pre_tasks:
- name: Gather facts (primary interface may have changed)
ansible.builtin.setup:
roles:
- danielfdickinson.system_base_debian.dfd_base_misc
- danielfdickinson.system_base_debian.ufw
- danielfdickinson.system_base_debian.fail2ban
- role: danielfdickinson.system_base_debian.firmware_install
firmware_extra:
- firmware-realtek
tasks:
- name: Ensure smartmontools is installed
become: yes
ansible.builtin.apt:
name:
- smartmontools
state: present
- name: Add libvirt and a user for remote libvirt access
hosts: bare_metal:&libvirtd_hosts
roles:
- service_libvirtd
- role: danielfdickinson.system_base_debian.user_add_other_base
new_base_homedir: "{{ admin_base_homedir }}"
new_user: "{{ libvirt_client_user}}"
new_user_ssh_key: "{{ libvirt_client_ssh_key }}"
new_users_groups:
- libvirt
- name: Add split libvirt pools on certain hosts
hosts: bare_metal:&libvirtd_split_pools
roles:
- service_libvirtd_pools
- name: Add NUT to local bare-metal
become: yes
hosts: bare_metal:&bare_metal_local
roles:
- maxhoesel.nut_netclient
...