Add support for tags

This commit is contained in:
rockstable 2022-12-10 20:09:47 +01:00
parent d2f5548a57
commit 29568f5a05
1 changed files with 59 additions and 78 deletions

View File

@ -20,111 +20,92 @@
- debug_hostvars - debug_hostvars
- name: "Configure operating system" - name: "Configure operating system"
include_tasks: import_tasks: os.yml
file: os.yml tags:
apply: - os
tags: - ansible_nopasswd
- os
- ansible_nopasswd
- name: "Configure networking" - name: "Configure networking"
include_tasks: import_tasks: network.yml
file: network.yml tags:
apply: - network
tags:
- network
- name: "Configure package management" - name: "Configure package management"
include_tasks: import_tasks: package_mgmt.yml
file: package_mgmt.yml tags:
apply: - package_mgmt
tags:
- package_mgmt.yml - name: "Configure zsh"
import_tasks: zsh.yml
tags:
- zsh
- name: "Setup apt proxy cache" - name: "Setup apt proxy cache"
include_tasks: import_tasks: apt-cacher-ng.yml
file: apt-cacher-ng.yml tags:
apply: - apt-cacher-ng
tags:
- apt-cacher-ng.yml
- name: "Configure a time server" - name: "Configure a time server"
include_tasks: import_tasks: time-server.yml
file: time-server.yml tags:
apply: - time-server
tags:
- time-server.yml
- name: "Configure the web server" - name: "Configure the web server"
include_tasks: import_tasks: nginx.yml
file: nginx.yml tags:
apply: - nginx
tags:
- nginx
- name: "Configure the tftp server" - name: "Configure the tftp server"
include_tasks: import_tasks: tftpd-hpa.yml
file: tftpd-hpa.yml tags:
apply: - tftpd-hpa
tags:
- tftpd-hpa.yml
- name: "Configure dns server" - name: "Configure dns server"
include_tasks: import_tasks: unbound.yml
file: unbound.yml tags:
apply: - unbound
tags:
- unbound
- name: "Configure dhcp" - name: "Configure dhcp"
include_tasks: import_tasks: isc-dhcp-server.yml
file: isc-dhcp-server.yml tags:
apply: - dhcp
tags: - isc-dhcp-server
- dhcp
### RUN ALL SO FAR NOTIFIED HANDLERS NOW ### RUN ALL SO FAR NOTIFIED HANDLERS NOW
- name: "######## Flush handlers ########" - name: "######## Flush handlers ########"
ansible.builtin.meta: flush_handlers ansible.builtin.meta: flush_handlers
- name: "Prepare FAI" - name: "Prepare FAI"
include_tasks: import_tasks: fai-prepare.yml
file: fai-prepare.yml tags:
apply: - fai_prepare
tags:
- fai_prepare
- name: "Configure FAI" - name: "Configure '{{ fai_dir_etc }}'"
include_tasks: import_tasks: fai-etc-dir.yml
file: fai-configure.yml tags:
apply: - fai_etc_dir
tags: - fai_nfsroot
- fai_configure
- name: "Transfer FAI profiles" - name: "Configure '{{ fai_dir_config }}'"
include_tasks: import_tasks: fai-config-dir.yml
file: fai-profiles.yml tags:
apply: - fai_config_dir
tags:
- fai_profiles ### RUN ALL SO FAR NOTIFIED HANDLERS NOW
- name: "######## Flush handlers ########"
ansible.builtin.meta: flush_handlers
- name: "Create FAI nfsroot" - name: "Create FAI nfsroot"
include_tasks: import_tasks: fai-nfsroot.yml
file: fai-nfsroot.yml tags:
apply: - fai_nfsroot
tags:
- fai_nfsroot
- name: "Configure FAI PXE" - name: "Configure FAI PXE"
include_tasks: import_tasks: fai-pxe.yml
file: fai-pxe.yml tags:
apply: - fai_pxe
tags:
- fai_pxe
- name: "Configure FAI iPXE" - name: "Configure FAI iPXE"
include_tasks: import_tasks: fai-ipxe.yml
file: fai-ipxe.yml tags:
apply: - fai_ipxe
tags:
- fai_ipxe