Cleanup node deployment task playbook

As a follow-up to I71517146a197e39ed8ff2205e4234685d95331ad
this commit updates the conditional statements to explictly
indicate that the required state is true to improve
readability.

Additionally, revised lines related to DHCP templates to
multi-line format.

Change-Id: I919ef77a424266519a2590781284066c6f0f688b
This commit is contained in:
Julia Kreger 2016-01-17 15:02:26 -05:00
parent 5553ccab81
commit 268692f0e2

View File

@ -23,12 +23,22 @@
auth: None
when: noauth_mode | bool == true
- name: "Setup DHCP for nodes."
template: src=dhcp-host.j2 dest=/etc/dnsmasq.d/bifrost.dhcp-hosts.d/{{ inventory_hostname }} owner=root group=root mode=0644
template:
src: dhcp-host.j2
dest: "/etc/dnsmasq.d/bifrost.dhcp-hosts.d/{{ inventory_hostname }}"
owner: root
group: root
mode: 0644
delegate_to: localhost
when: inventory_dhcp | bool
become: yes
- name: "Setup DNS address for nodes."
template: src=dns-address.j2 dest=/etc/dnsmasq.d/host_record_{{ inventory_hostname }} owner=root group=root mode=0644
template:
src: dns-address.j2
dest: "/etc/dnsmasq.d/host_record_{{ inventory_hostname }}"
owner: root
group: root
mode: 0644
delegate_to: localhost
when: inventory_dns | bool
become: yes
@ -37,7 +47,7 @@
# Ansible's reloaded state does not pass through to the init script.
command: killall -HUP dnsmasq
become: yes
when: (inventory_dhcp | bool) or (inventory_dns | bool)
when: (inventory_dhcp | bool == true) or (inventory_dns | bool == true)
- name: "Deploy to hardware - Using custom instance_info."
os_ironic_node:
auth_type: "{{ auth_type | default(omit) }}"