use hostanem module instead of template
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
1b17be5802
commit
5189b87321
@ -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
|
||||
|
@ -1,3 +0,0 @@
|
||||
{% if network_hostname is defined %}
|
||||
{{ network_hostname }}
|
||||
{% endif %}
|
Loading…
Reference in New Issue
Block a user