system-config/playbooks/roles/set_hostname/templates/mailname.j2
Ricardo Carrillo Cruz be31fead2f Create set_hostname role and playbook
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
2016-02-24 01:17:47 +01:00

2 lines
42 B
Django/Jinja

{{ inventory_hostname.split('.', 1)[0] }}