diff --git a/playbooks/roles/bifrost-ironic-install/tasks/bootstrap.yml b/playbooks/roles/bifrost-ironic-install/tasks/bootstrap.yml index 387459099..05197db12 100644 --- a/playbooks/roles/bifrost-ironic-install/tasks/bootstrap.yml +++ b/playbooks/roles/bifrost-ironic-install/tasks/bootstrap.yml @@ -13,6 +13,17 @@ # See the License for the specific language governing permissions and # limitations under the License. --- +- name: "Check that the provided interface is defined" + fail: + msg: > + Network interface {{ network_interface }} is not known to Ansible. + If you're testing Bifrost on virtual machines, do not forget to invoke + "bifrost-cli testenv" or use the "bifrost-create-vm-nodes" role first. + If you're using Bifrost on real bare metal, you have to provide the + network interface via the "network_interface" variable or the + --network-interface argument to "bifrost-cli install". + when: ('ansible_' + ans_network_interface) not in hostvars[inventory_hostname] + - name: "Fail if authentication configuration conflicts." fail: msg: > diff --git a/playbooks/roles/bifrost-ironic-install/tasks/install.yml b/playbooks/roles/bifrost-ironic-install/tasks/install.yml index 7464d5559..3a05828d6 100644 --- a/playbooks/roles/bifrost-ironic-install/tasks/install.yml +++ b/playbooks/roles/bifrost-ironic-install/tasks/install.yml @@ -13,17 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. --- -- name: "Check that the provided interface is defined" - fail: - msg: > - Network interface {{ network_interface }} is not known to Ansible. - If you're testing Bifrost on virtual machines, do not forget to invoke - "bifrost-cli testenv" or use the "bifrost-create-vm-nodes" role first. - If you're using Bifrost on real bare metal, you have to provide the - network interface via the "network_interface" variable or the - --network-interface argument to "bifrost-cli install". - when: ('ansible_' + ans_network_interface) not in hostvars[inventory_hostname] - - name: "Update Package Cache" apt: update_cache=yes when: ansible_os_family == 'Debian' diff --git a/playbooks/roles/bifrost-keystone-install/tasks/bootstrap.yml b/playbooks/roles/bifrost-keystone-install/tasks/bootstrap.yml index b3c80a4c8..4f9d6ca61 100644 --- a/playbooks/roles/bifrost-keystone-install/tasks/bootstrap.yml +++ b/playbooks/roles/bifrost-keystone-install/tasks/bootstrap.yml @@ -11,6 +11,17 @@ # See the License for the specific language governing permissions and # limitations under the License. --- +- name: "Check that the provided interface is defined" + fail: + msg: > + Network interface {{ network_interface }} is not known to Ansible. + If you're testing Bifrost on virtual machines, do not forget to invoke + "bifrost-cli testenv" or use the "bifrost-create-vm-nodes" role first. + If you're using Bifrost on real bare metal, you have to provide the + network interface via the "network_interface" variable or the + --network-interface argument to "bifrost-cli install". + when: ('ansible_' + ans_network_interface) not in hostvars[inventory_hostname] + # NOTE(TheJulia): There is significant commonality between this playbook # and the bifrost bootstrap process. - name: "Get uwsgi install location" diff --git a/playbooks/roles/bifrost-keystone-install/tasks/main.yml b/playbooks/roles/bifrost-keystone-install/tasks/main.yml index 8859b142e..4f901dadf 100644 --- a/playbooks/roles/bifrost-keystone-install/tasks/main.yml +++ b/playbooks/roles/bifrost-keystone-install/tasks/main.yml @@ -11,17 +11,6 @@ # See the License for the specific language governing permissions and # limitations under the License. --- -- name: "Check that the provided interface is defined" - fail: - msg: > - Network interface {{ network_interface }} is not known to Ansible. - If you're testing Bifrost on virtual machines, do not forget to invoke - "bifrost-cli testenv" or use the "bifrost-create-vm-nodes" role first. - If you're using Bifrost on real bare metal, you have to provide the - network interface via the "network_interface" variable or the - --network-interface argument to "bifrost-cli install". - when: ('ansible_' + ans_network_interface) not in hostvars[inventory_hostname] - # NOTE(cinerama) dummy-defaults.yml is an empty defaults file. We use it # here to ensure that with_first_found won't fail should we not have # defaults for a particular distribution, version, etc.