Fix variable name for dhcp-hosts file name

{{ hostname }} is not defined anywhere, and trying to use it results in
the following error:

  fatal: [node.example.com -> localhost] => One or more undefined variables: 'hostname' is undefined

The variable inventory_hostname is defined and is a reasonable name for
this file, so use that instead.

Change-Id: I6aebf7fd25c9fc279b42fab9414ede81c5afacf6
This commit is contained in:
Colleen Murphy 2015-11-13 10:59:14 -08:00
parent 452025f49f
commit 9cd51fda5f
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@
# things that are not directly accessible or reasonable
# to be inspected.
- name: "Setup DHCP for nodes."
template: src=dhcp-host.j2 dest=/etc/dnsmasq.d/bifrost.dhcp-hosts.d/{{ hostname }}
template: src=dhcp-host.j2 dest=/etc/dnsmasq.d/bifrost.dhcp-hosts.d/{{ inventory_hostname }}
delegate_to: localhost
when: inventory_dhcp | bool and instance_info is defined and instance_info | to_json != '{}'
- name: "Sending dnsmasq HUP"