use hostanem module instead of template
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
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