blob: 3a0a6b251f12c520d2d013d7b1b52a6b217fc6d4 [file] [log] [blame]
---
# ============LICENSE_START=======================================================
# Copyright (C) 2019 The Nordix Foundation. 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.
#
# SPDX-License-Identifier: Apache-2.0
# ============LICENSE_END=========================================================
- name: Get IPs of master nodes
shell: "openstack stack output show {{ stack_name }} master_ip -c output_value -f json"
register: stack_output_master_ip
- name: Get IPs of worker nodes
shell: "openstack stack output show {{ stack_name }} worker_ip -c output_value -f json"
register: stack_output_worker_ip
- name: Register IPs of master and worker nodes
set_fact:
master_ip: "{{ stack_output_master_ip.stdout }}"
worker_ip: "{{ stack_output_worker_ip.stdout }}"
- name: Generate kubespray inventory
template:
src: inventory_kubespray.ini.j2
dest: "{{ config_path }}/inventory.ini"
# vim: set ts=2 sw=2 expandtab: