diff --git a/roles/config-hostname/tasks/main.yaml b/roles/config-hostname/tasks/main.yaml index d93d446..3b874ce 100644 --- a/roles/config-hostname/tasks/main.yaml +++ b/roles/config-hostname/tasks/main.yaml @@ -14,7 +14,7 @@ lineinfile: dest: /etc/hosts regexp: '^127\.0\.1\.1\tplantilladebian12\.verdnatura\.es\tplantilladebian12' - line: '127.0.1.1 "{{ name_hostname }}".verdnatura.es "{{ name_hostname }}"' + line: '127.0.1.1 {{ name_hostname }}.verdnatura.es {{ name_hostname }}' # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # https://docs.ansible.com/ansible/latest/collections/ansible/builtin/hostname_module.html#ansible-collections-ansible-builtin-hostname-module # https://docs.ansible.com/ansible/latest/collections/ansible/builtin/replace_module.html#ansible-collections-ansible-builtin-replace-module