# Copyright (c) 2015 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. --- - 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")