diff --git a/roles/configuration/tasks/main.yml b/roles/configuration/tasks/main.yml index 928314e..2dc571f 100644 --- a/roles/configuration/tasks/main.yml +++ b/roles/configuration/tasks/main.yml @@ -1,19 +1,23 @@ --- - name: Include configuration tasks - ansible.builtin.include_tasks: "{{ configuration_task }}" + when: configuration_task.when | default(true) + ansible.builtin.include_tasks: "{{ configuration_task.file }}" loop: - - banner.yml - - fstab.yml - - locales.yml - - ssh.yml - - services.yml - - grub.yml - - encryption.yml - - bootloader.yml - - extras.yml - - network.yml - - users.yml - - sudo.yml - - selinux.yml + - file: banner.yml + - file: fstab.yml + - file: locales.yml + - file: ssh.yml + - file: services.yml + - file: grub.yml + - file: encryption.yml + when: "{{ system_cfg.luks.enabled | bool }}" + - file: bootloader.yml + - file: extras.yml + - file: network.yml + - file: users.yml + - file: sudo.yml + - file: selinux.yml + when: "{{ is_rhel | bool }}" loop_control: loop_var: configuration_task + label: "{{ configuration_task.file }}"