From 268692f0e2d475b7f14395c975a21e05b45ca347 Mon Sep 17 00:00:00 2001 From: Julia Kreger Date: Sun, 17 Jan 2016 15:02:26 -0500 Subject: [PATCH] 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 --- .../bifrost-deploy-nodes-dynamic/tasks/main.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/playbooks/roles/bifrost-deploy-nodes-dynamic/tasks/main.yml b/playbooks/roles/bifrost-deploy-nodes-dynamic/tasks/main.yml index 9b7a79fea..9288e3e63 100644 --- a/playbooks/roles/bifrost-deploy-nodes-dynamic/tasks/main.yml +++ b/playbooks/roles/bifrost-deploy-nodes-dynamic/tasks/main.yml @@ -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) }}"