feat: add alpine support for hostname management
This commit is contained in:
parent
63dd50010d
commit
12d9be68cd
3 changed files with 14 additions and 14 deletions
|
|
@ -4,10 +4,10 @@
|
|||
- name: "set hostname"
|
||||
ansible.builtin.hostname:
|
||||
name: "{{ set_hostname | default(inventory_hostname_short) }}"
|
||||
use: "{{ hostname_use_method }}"
|
||||
use: "{{ hostname_use_method | default(hostname_method_map[ansible_os_family]) }}"
|
||||
tags: "hostname"
|
||||
|
||||
# manage /etc/hosts file
|
||||
# manage /etc/hosts
|
||||
- name: "manage /etc/hosts file for hostname"
|
||||
ansible.builtin.lineinfile:
|
||||
path: "/etc/hosts"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue