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

119 lines
2.1 KiB
YAML

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