--- - name: "Error if variable baremetal_csv_file is not defined" fail: msg="baremetal_csv_file must be defined for this playbook to execute, please pass option '-e baremetal_csv_file='" when: baremetal_csv_file is not defined - name: "Validate that CSV file exists" stat: path={{ baremetal_csv_file }} register: test_baremetal_csv_file - name: "Error if file does not exist." fail: msg="The variable defined for baremetal_csv_file is not to a file. Please define a file and try again." when: test_baremetal_csv_file.stat.isreg == false - name: "If testing, enroll virtual machines." include: virtual_enroll.yaml when: testing == "true" - name: "If no ipmi_bridging value set, or a value of no exists, execute standard sequence." include: standard_enroll.yaml 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 != "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 != "true" and (ipmi_bridging is defined and ipmi_bridging == "dual")