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