fix(hostname): avoid duplicating the hosts in /etc/hosts

Because the `blockinfile` module from ansible expects the `marker`
string to include `{mark}` case-sensetive, the entire block was
duplicated with each run.
This commit is contained in:
transcaffeine 2021-02-05 09:12:04 +01:00
parent 67affeb0e0
commit 750a95b8f1
No known key found for this signature in database
GPG key ID: 03624C433676E465

View file

@ -19,7 +19,7 @@
{% for host in hostname_hosts %}
{{ host.ip }} {{ host.fqdn }} {{ host.alias | default([]) | join(" ") }}
{% endfor %}
marker: "# {MARK} ANSIBLE MANAGED BLOCK"
marker: "# {mark} ANSIBLE MANAGED BLOCK"
- name: Set hostname via hostnamectl to avoid a reboot
command: