vn-ansible/linux-config-hostname.yaml

19 lines
487 B
YAML
Raw Normal View History

2024-02-12 12:03:22 +00:00
---
- hosts: '{{ ip_addr }}'
become: yes
become_method: sudo
gather_facts: yes
tasks:
2024-02-14 17:19:50 +00:00
- name: "[CONFIG HOSTNAME] Comprobando si es necesario configurar hostname "
debug:
msg: "No es necesario configurar hostname en la máquina"
when: hostname_enabled is not defined or not hostname_enabled
2024-02-12 12:03:22 +00:00
- name: "[CONFIG HOSTNAME] Configure hostname"
import_role:
name: config-hostname
when: hostname_enabled is defined and hostname_enabled