ansible-install-server/roles/fai/tasks/main.yml

119 lines
2.1 KiB
YAML
Raw Normal View History

2020-08-26 10:10:36 +00:00
---
# tasks file for fai
2022-12-07 13:52:06 +00:00
- name: "Fail if 'dhcp_interface' is undefined"
2022-12-07 22:46:27 +00:00
ansible.builtin.fail:
msg: |
Please specify the NIC serving FAI
in variable 'dhcp_interface' (e.g. eth1)
when:
- not dhcp_interface is defined
2022-12-07 13:52:06 +00:00
- name: "Check packages"
package_facts:
manager: auto
- name: "Debug host_vars"
2022-12-07 22:46:27 +00:00
ansible.builtin.debug:
2022-12-07 13:52:06 +00:00
var: hostvars
verbosity: 1
tags:
- debug_hostvars
- name: "Configure operating system"
2022-12-10 19:09:47 +00:00
import_tasks: os.yml
tags:
- os
- ansible_nopasswd
2022-12-07 13:52:06 +00:00
- name: "Configure networking"
2022-12-10 19:09:47 +00:00
import_tasks: network.yml
tags:
- network
2022-12-07 13:52:06 +00:00
- name: "Configure package management"
2022-12-10 19:09:47 +00:00
import_tasks: package_mgmt.yml
tags:
- package_mgmt
- name: "Configure zsh"
import_tasks: zsh.yml
tags:
- zsh
2022-12-07 13:52:06 +00:00
- name: "Setup apt proxy cache"
2022-12-10 19:09:47 +00:00
import_tasks: apt-cacher-ng.yml
tags:
- apt-cacher-ng
2020-10-14 22:20:05 +00:00
- name: "Configure a time server"
2022-12-10 19:09:47 +00:00
import_tasks: time-server.yml
tags:
- time-server
2020-10-14 22:20:05 +00:00
2022-12-07 13:52:06 +00:00
- name: "Configure the web server"
2022-12-10 19:09:47 +00:00
import_tasks: nginx.yml
tags:
- nginx
2020-10-14 22:20:05 +00:00
2022-12-07 13:52:06 +00:00
- name: "Configure the tftp server"
2022-12-10 19:09:47 +00:00
import_tasks: tftpd-hpa.yml
tags:
- tftpd-hpa
2020-10-14 22:20:05 +00:00
- name: "Configure dns server"
2022-12-10 19:09:47 +00:00
import_tasks: unbound.yml
tags:
- unbound
2022-12-07 13:52:06 +00:00
- name: "Configure dhcp"
2022-12-10 19:09:47 +00:00
import_tasks: isc-dhcp-server.yml
tags:
- dhcp
- isc-dhcp-server
2022-12-07 13:52:06 +00:00
### RUN ALL SO FAR NOTIFIED HANDLERS NOW
- name: "######## Flush handlers ########"
ansible.builtin.meta: flush_handlers
- name: "Prepare FAI"
2022-12-10 19:09:47 +00:00
import_tasks: fai-prepare.yml
tags:
- fai
2022-12-10 19:09:47 +00:00
- fai_prepare
- name: "Configure '{{ fai_dir_etc }}'"
import_tasks: fai-etc-dir.yml
tags:
- fai
2022-12-10 19:09:47 +00:00
- fai_etc_dir
- fai_nfsroot
- name: "Configure '{{ fai_dir_config }}'"
import_tasks: fai-config-dir.yml
tags:
- fai
2022-12-10 19:09:47 +00:00
- fai_config_dir
### RUN ALL SO FAR NOTIFIED HANDLERS NOW
- name: "######## Flush handlers ########"
ansible.builtin.meta: flush_handlers
2022-12-07 20:52:49 +00:00
- name: "Create FAI nfsroot"
2022-12-10 19:09:47 +00:00
import_tasks: fai-nfsroot.yml
tags:
- fai
2022-12-10 19:09:47 +00:00
- fai_nfsroot
2022-12-07 13:52:06 +00:00
- name: "Configure FAI PXE"
2022-12-10 19:09:47 +00:00
import_tasks: fai-pxe.yml
tags:
- fai
2022-12-10 19:09:47 +00:00
- fai_pxe
2022-12-10 22:34:59 +00:00
- fai_ipxe
2022-12-07 13:52:06 +00:00
- name: "Configure FAI iPXE"
2022-12-10 19:09:47 +00:00
import_tasks: fai-ipxe.yml
tags:
- fai
2022-12-10 19:09:47 +00:00
- fai_ipxe