From 2d3db48f10479d58b4b2ee386a383a6e74421af7 Mon Sep 17 00:00:00 2001 From: Julia Kreger Date: Fri, 13 Mar 2015 16:36:50 -0400 Subject: [PATCH] Logic fixes for roles changes to node enrollment step --- enroll.yaml | 3 +-- roles/ironic-enroll/defaults/main.yml | 2 +- roles/ironic-enroll/tasks/main.yml | 8 ++++---- roles/ironic-enroll/vars/main.yml | 1 - 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/enroll.yaml b/enroll.yaml index d40d9f54d..9677e6b63 100644 --- a/enroll.yaml +++ b/enroll.yaml @@ -6,5 +6,4 @@ gather_facts: yes roles: - role: ironic-enroll - baremetal_csv_file: "{{ baremetal_csv_file }}" - ipmi_bridging: "{{ ipmi_bridging|default('no') }}" + baremetal_csv_file: "{{ baremetal_csv_file | mandatory }}" diff --git a/roles/ironic-enroll/defaults/main.yml b/roles/ironic-enroll/defaults/main.yml index 18bbc2f19..84d6f12e0 100644 --- a/roles/ironic-enroll/defaults/main.yml +++ b/roles/ironic-enroll/defaults/main.yml @@ -1,2 +1,2 @@ --- -# defaults file for ironic-enroll +ipmi_bridging: "no" diff --git a/roles/ironic-enroll/tasks/main.yml b/roles/ironic-enroll/tasks/main.yml index 0789eb076..8bb6be221 100644 --- a/roles/ironic-enroll/tasks/main.yml +++ b/roles/ironic-enroll/tasks/main.yml @@ -10,13 +10,13 @@ when: test_baremetal_csv_file.stat.isreg == false - name: "If testing, enroll virtual machines." include: virtual_enroll.yaml - when: testing == true + when: testing == "true" - name: "If no ipmi_bridging value set, or a value of no exists, execute standard sequence." include: standard_enroll.yaml - when: testing == false and (ipmi_bridging is not defined or ipmi_bridging == "no") + when: (ipmi_bridging != "single" and ipmi_bridging != "dual") and (testing != "true") - name: "If ipmi_bridging is set to single, execute single bridge enrollment sequence.." include: ipmi_bridging_single_enroll.yaml - when: testing == false and (ipmi_bridging is defined and ipmi_bridging == "single") + when: testing != "true" and (ipmi_bridging is defined and ipmi_bridging == "single") - name: "If ipmi_bridging is set to single, execute dual bridge enrollment sequence.." include: ipmi_bridging_dual_enroll.yaml - when: testing == false and (ipmi_bridging is defined and ipmi_bridging == "dual") + when: testing != "true" and (ipmi_bridging is defined and ipmi_bridging == "dual") diff --git a/roles/ironic-enroll/vars/main.yml b/roles/ironic-enroll/vars/main.yml index 3d7bdbcb3..e742b5e59 100644 --- a/roles/ironic-enroll/vars/main.yml +++ b/roles/ironic-enroll/vars/main.yml @@ -1,3 +1,2 @@ --- # vars file for ironic-enroll -ipmi_bridging: no