From 95d2ebc15ba357fa322f319f595f92392f5b9def Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Harald=20Jens=C3=A5s?= Date: Fri, 29 Jan 2021 06:30:01 +0100 Subject: [PATCH] Add cli-overcloud-node-network-config Add cli playbook to apply network configuration using the tripleo_network_config Partial-Implements: blueprint network-data-v2-ports Depends-On: https://review.opendev.org/772787 Change-Id: Ib7a5d61c2757f2beb238332a4b1ca47a9fa8a565 --- .../cli-overcloud-node-network-config.yaml | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 tripleo_ansible/playbooks/cli-overcloud-node-network-config.yaml diff --git a/tripleo_ansible/playbooks/cli-overcloud-node-network-config.yaml b/tripleo_ansible/playbooks/cli-overcloud-node-network-config.yaml new file mode 100644 index 000000000..97ef7f5de --- /dev/null +++ b/tripleo_ansible/playbooks/cli-overcloud-node-network-config.yaml @@ -0,0 +1,43 @@ +--- +# Copyright 2021 Red Hat, Inc. +# All Rights Reserved. +# +# 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: Overcloud Node Network Config + hosts: allovercloud + any_errors_fatal: true + pre_tasks: + - name: Wait for provisioned nodes to boot + wait_for: + timeout: 600 + port: 22 + host: '{{ ansible_host }}' + search_regex: OpenSSH + delay: 10 + msg: Timeout waiting for provisioned nodes to become available + connection: local + roles: + - role: tripleo_network_config + vars: + # The conditions in tripleo_network_config role for when we want to + # apply the NetworkConfig are: + # 1. If the stack_action is CREATE + # 2. Or UPDATE is in the network_deployment_actions + # 3. Or the previous run of NetworkConfig failed. + # 4. Or it has never run + # + # Since we don't have stack_action in this case. Set the network + # config action to UPDATE here so that we only apply network + # configuration if 2, 3 or 4 evalueates to TRUE. + tripleo_network_config_action: UPDATE