Created
December 15, 2015 23:05
-
-
Save kaidokert/f0bbbab39f83df2396cd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{%- set fqdn = grains['id'] %} | |
{%- set internal_ip = grains['ip4_interfaces']['eth0'][0] %} | |
hostname-match: | |
file.managed: | |
- name: /etc/hostname | |
- contents: {{ fqdn }} | |
primary_ip_in_host_file: | |
host.present: | |
- ip: {{ internal_ip }} | |
- names: | |
- {{ fqdn }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment