Primi passaggi testati OK.
This commit is contained in:
parent
a8529d4f72
commit
a05c2d997d
4 changed files with 20 additions and 11 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue