ba4e9908ac
Using the local connection will always return immediately, but the intent is to wait for the inventory node to have a fully successful ssh connection Change-Id: Ie763082f79754107031bd93578697e1a35fe11d0 Closes-Bug: 1970400
88 lines
2.2 KiB
YAML
88 lines
2.2 KiB
YAML
---
|
|
# 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 Grow Volumes
|
|
hosts: allovercloud
|
|
any_errors_fatal: true
|
|
gather_facts: false
|
|
vars:
|
|
role_growvols_args:
|
|
default:
|
|
/=8GB
|
|
/tmp=1GB
|
|
/var/log=10GB
|
|
/var/log/audit=2GB
|
|
/home=1GB
|
|
/var=100%
|
|
Controller:
|
|
/=8GB
|
|
/tmp=1GB
|
|
/var/log=10GB
|
|
/var/log/audit=2GB
|
|
/home=1GB
|
|
/var=90%
|
|
/srv=10%
|
|
ObjectStorage:
|
|
/=8GB
|
|
/tmp=1GB
|
|
/var/log=10GB
|
|
/var/log/audit=2GB
|
|
/home=1GB
|
|
/var=10%
|
|
/srv=90%
|
|
|
|
pre_tasks:
|
|
- name: Wait for provisioned nodes to boot
|
|
wait_for_connection:
|
|
timeout: 600
|
|
delay: 10
|
|
|
|
tasks:
|
|
|
|
- name: Set growvols_args
|
|
set_fact:
|
|
growvols_args: "{{ role_growvols_args[tripleo_role_name] | default(role_growvols_args['default']) }}"
|
|
when: growvols_args is not defined
|
|
|
|
- name: Output growvols_args
|
|
debug:
|
|
var: growvols_args
|
|
|
|
- name: Find the growvols utility
|
|
shell: >
|
|
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
|
|
which growvols
|
|
failed_when: false
|
|
become: true
|
|
register: find_growvols
|
|
|
|
- name: Stopping playbook when no growvols utility is found
|
|
meta: end_play
|
|
when: find_growvols.rc != 0
|
|
|
|
- name: Setting growvols path
|
|
set_fact:
|
|
growvols_path: "{{ find_growvols.stdout_lines[0] }}"
|
|
|
|
- name: "Running {{ growvols_path }} {{growvols_args}}"
|
|
shell: "{{ growvols_path }} --yes {{growvols_args}}"
|
|
become: true
|
|
register: run_growvols
|
|
|
|
- name: Output of growvols stdout
|
|
debug:
|
|
var: run_growvols.stdout
|