
Turns out we have had many issues with random servers having wrong hostname and /etc/hosts info. This playbook/role allows to configure that by passing -e "target=<hostname>" as ansible-playbook parameter. Change-Id: I73939ebc65211a840bb41370c22b111112389716
8 lines
124 B
YAML
8 lines
124 B
YAML
---
|
|
# file: set_hostnames.yml
|
|
- hosts: "{{ target }}"
|
|
gather_facts: no
|
|
user: root
|
|
roles:
|
|
- { role: set_hostname }
|