Merge "bnr Configure ReaR to restore with ironic"

This commit is contained in:
Zuul 2021-11-12 22:22:05 +00:00 committed by Gerrit Code Review
commit 504971240d
1 changed files with 46 additions and 0 deletions

View File

@ -0,0 +1,46 @@
---
# 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