tripleo-ansible/tripleo_ansible/playbooks/cli-overcloud-conf-ironic.yaml
Juan Badia Payno 0ecaf57cdc bnr Configure ReaR to restore with ironic
This playbook configure Rear on the overcloud controllers
to do the restoration with PXE and use the undercloud ironic.

The data will be backed up on the tripleo_backup_and_restore_server

Change-Id: I958439e017efa45f316750a61fd7dfdee5afdc8e
2021-11-03 20:17:15 +01:00

47 lines
1.8 KiB
YAML

---
# Copyright 2021 Red Hat, Inc.
#
# 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: Get undercloud data
hosts: Undercloud
tasks:
- name: Get networking
setup:
gather_subset: network
tags:
- bar_setup_rear
- name: TripleO Ironic ReaR installation and configuration on Overcloud
hosts: "{{ tripleo_backup_and_restore_overcloud_prepare_ironic | default('Controller') }}"
remote_user: "{{ tripleo_target_user | default(lookup('env', 'USER')) }}"
become: true
vars:
tripleo_backup_and_restore_pxe_output_url: "nfs://{{ hostvars['undercloud']['ansible_facts']['br_ctlplane']['ipv4']['address'] }}{{ tripleo_backup_and_restore_ironic_images_path }}"
tripleo_backup_and_restore_local_config:
OUTPUT: PXE
OUTPUT_PREFIX_PXE: "{{ tripleo_backup_and_restore_hostname.stdout }}"
BACKUP: NETFS
PXE_RECOVER_MODE: '"unattended"'
PXE_CREATE_LINKS: '"IP"'
USE_STATIC_NETWORKING: y
PXE_CONFIG_GRUB_STYLE: y
KERNEL_CMDLINE: '"unattended"'
POST_RECOVERY_SCRIPT: poweroff
USER_INPUT_TIMEOUT: "10"
PXE_TFTP_URL: "{{ tripleo_backup_and_restore_pxe_output_url }}"
BACKUP_URL: "{{ tripleo_backup_and_restore_backup_url }}"
PXE_CONFIG_URL: "{{ tripleo_backup_and_restore_pxe_output_url }}/pxelinux.cfg"
roles:
- role: backup_and_restore