cambios conditionals

This commit is contained in:
Ruben Blanco 2024-02-20 15:58:29 +01:00
parent 0e7711221c
commit 11692f99d7
1 changed files with 99 additions and 10 deletions

View File

@ -15,51 +15,140 @@
- name: "[CONFIG ROOT USER] Configure SSH root user" - name: "[CONFIG ROOT USER] Configure SSH root user"
import_role: import_role:
name: config-root-user name: config-root-user
# tags: config-root-user_config when: root_user_enabled is defined and root_user_enabled
tags: config-root-user_config
- name: "[CONFIG BASE DEBIAN OS] Configure debian os" - name: "[CONFIG HOSTNAME] Configure hostname"
import_role: import_role:
name: config-base-debian-os name: config-hostname
when: hostname_enabled is defined and hostname_enabled
tags: config-hostname_config
- name: "[CONFIG HOSTS FILE] Configure hosts file"
import_role:
name: config-hosts
when: hosts_enabled is defined and hosts_enabled
tags: config-hosts_config_config
- name: "[CONFIG RESOLV FILE] Configure resolv file"
import_role:
name: config-resolv
when: resolv_enabled is defined and resolv_enabled
tags: config-resolv_config
# - name: "[CONFIG BASE DEBIAN OS] Configure debian os"
# import_role:
# name: config-base-debian-os
# tags: config-base-debian-os_config # tags: config-base-debian-os_config
- name: "[CONFIG UPDATE] Config update"
import_role:
name: config-update-and-upgrade-packages
when: update_enabled is defined and update_enabled
tags: config-update-and-upgrade-packages_config
- name: "[CONFIG INSTALL PACKAGES] Install packages"
import_role:
name: config-install-packages
when: packages_enabled is defined and packages_enabled
tags: config-install-packages_config
- name: "[CONFIG RELAYHOST SMTP] Config relayhost smtp"
import_role:
name: config-relayhost-smtp
when: relay_host_enabled is defined and relay_host_enabled
tags: config-relayhost-smtp_config
- name: "[CONFIG CENTRALIZED AUTH] Config centralized auth"
import_role:
name: config-centralized-auth
when: centralized_auth_enabled is defined and centralized_auth_enabled
tags: config-centralized-auth_config
- name: "[CONFIG SUDOERS] Config sudoers"
import_role:
name: config-sudoers
when: sudoers_enabled is defined and sudoers_enabled
tags: config-sudoers_config
- name: "[CONFIG SECURE GRUB] configure secure grub"
import_role:
name: config-secure-grub
when: secure_grub_enabled is defined and secure_grub_enabled
tags: config-secure-grub_config
- name: "[CONFIG VIM OPTIONS] Config vim options"
import_role:
name: config-vim-options
when: vim_options_enabled is defined and vim_options_enabled
tags: config-vim-options_config
- name: "[CONFIG MOTD] Config motd"
import_role:
name: config-motd
when: motd_enabled is defined and motd_enabled
tags: config-motd_config
# - name: "[CONFIG HOT PLUG] Install and configure hot plug"
# import_role:
# name: config-hot-plug
# when: hot_plug_enabled is defined and hot_plug_enabled
# tags: config-hot-plug_config
- name: "[CONFIG LOCALES] Set locales" - name: "[CONFIG LOCALES] Set locales"
import_role: import_role:
name: config-locales name: config-locales
when: locales_enabled is defined and locales_enabled
tags: config-locales_config
- name: "[CONFIG TZDATA] Set timezone" - name: "[CONFIG TZDATA] Set timezone"
import_role: import_role:
name: config-tzdata name: config-tzdata
when: tzdata_enabled is defined and tzdata_enabled
tags: config-tzdata_config
- name: "[CONFIG REPO VN] Add-repos-vn" - name: "[CONFIG REPO VN] Add-repos-vn"
import_role: import_role:
name: config-repo-vn name: config-repo-vn
# tags: config-repo-vn_config when: repo_vn_enabled is defined and repo_vn_enabled
tags: config-repo-vn_config
- name: "[CONFIG FAIL2BAN] Install and configure fail2ban service" - name: "[CONFIG FAIL2BAN] Install and configure fail2ban service"
import_role: import_role:
name: config-fail2ban name: config-fail2ban
# tags: config-fail2ban_config when: fail2ban_enabled is defined and fail2ban_enabled
tags: config-fail2ban_config
- name: "[CONFIG NAGIOS NRPE] Install and configure nagios nrpe service" - name: "[CONFIG NAGIOS NRPE] Install and configure nagios nrpe service"
import_role: import_role:
name: config-nagios-nrpe name: config-nagios-nrpe
# tags: config-nagios-nrpe_config when: nagios_nrpe_enabled is defined and nagios_nrpe_enabled
tags: config-nagios-nrpe_config
- name: "[CONFIG SERVER TYPE] Install guest side" # - name: "[CONFIG SERVER TYPE] Install guest side"
import_role: # import_role:
name: config-server-type # name: config-server-type
# when: server_type_enabled is defined and server_type_enabled
# tags: config-server-type_config # tags: config-server-type_config
# NO HACE FALTA , PROXMOX CT utiliza ntp client de proxmox # NO HACE FALTA , PROXMOX CT utiliza ntp client de proxmox
# - name: "[CONFIG NTP] Install and configure ntp" # - name: "[CONFIG NTP] Install and configure ntp"
# import_role: # import_role:
# name: config-ntp # name: config-ntp
# when: ntp_enabled is defined and ntp_enabled
# tags: config-ntp_config # tags: config-ntp_config
# - name: "[CONFIG AUTOFS HOMES] Install and configure AUTOFS HOMES"
# import_role:
# name: config-autofs-homes
# when: autofs_homes_enabled is defined and autofs_homes_enabled
# tags: config-autofs-homes_config
- name: "[CONFIG ZABBIX AGENT] Install and configure ZABBIX AGENT" - name: "[CONFIG ZABBIX AGENT] Install and configure ZABBIX AGENT"
import_role: import_role:
name: config-zabbix-agent name: config-zabbix-agent
# tags: config-zabbix-agent_config when: zabbix_agent_enabled is defined and zabbix_agent_enabled
tags: config-zabbix-agent_config
#handlers: #handlers:
# - include_tasks: roles/{{ item }}/handlers/main.yaml # - include_tasks: roles/{{ item }}/handlers/main.yaml