vn-ansible/linux-config-hosts.yaml

20 lines
483 B
YAML
Raw Normal View History

2024-02-14 14:51:54 +00:00
---
- hosts: '{{ ip_addr }}'
become: yes
become_method: sudo
gather_facts: yes
tasks:
2024-02-14 17:21:46 +00:00
- name: "[CONFIG HOSTS FILE] Comprobando si es necesario configurar hosts file "
debug:
msg: "No es necesario configurar hosts file en la máquina"
when: hosts_enabled is not defined or not hosts_enabled
2024-02-14 14:51:54 +00:00
- name: "[CONFIG HOSTS FILE] Configure hosts file"
import_role:
name: config-hosts
when: hosts_enabled is defined and hosts_enabled
2024-02-15 16:51:09 +00:00