use hostanem module instead of template
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Robert Kaussow 2020-11-23 21:42:14 +01:00
parent 1b17be5802
commit 5189b87321
No known key found for this signature in database
GPG Key ID: 65362AE74AF98B61
2 changed files with 3 additions and 11 deletions

View File

@ -1,13 +1,9 @@
---
- block:
- name: Set hostname
template:
src: etc/hostname.j2
dest: /etc/hostname
owner: root
group: root
mode: 0644
register: hostname_result
hostname:
name: "{{ network_hostname }}"
when: network_hostname
notify: __host_reboot
- name: Set hosts file
@ -17,7 +13,6 @@
owner: root
group: root
mode: 0644
register: hosts_result
notify: __host_reboot
- name: Add network interface configuration

View File

@ -1,3 +0,0 @@
{% if network_hostname is defined %}
{{ network_hostname }}
{% endif %}