Primi passaggi testati OK.

This commit is contained in:
Emiliano Vavassori 2025-07-13 21:19:35 +02:00
parent a8529d4f72
commit a05c2d997d
4 changed files with 20 additions and 11 deletions

View file

@ -2,9 +2,11 @@
# Sistemiamo un po' di impostazioni legate al dominio
- name: Impostazione del dominio
ansible.builtin.file:
ansible.builtin.lineinfile:
path: /etc/domainname
content: |
state: present
create: true
line: |-
{{ domain }}
owner: root
group: root
@ -19,4 +21,4 @@
- name: Verifichiamo che tutto sia in ordine
ansible.builtin.command: hostname -f
register: returned_fqdn
failed_when: returned_fqdn.stdout != "{{ ansible_hostname }}.{{ domain }}"
failed_when: returned_fqdn.stdout|trim != ansible_hostname + '.' + domain