From ba0cbdddc4778ae8e6060c7bd5ff24dab53c7326 Mon Sep 17 00:00:00 2001 From: Juan Badia Payno Date: Fri, 8 Oct 2021 09:06:09 +0200 Subject: [PATCH] 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 (cherry picked from commit 0ecaf57cdc08b699a146808a4cd546794167791c) --- .../playbooks/cli-overcloud-conf-ironic.yaml | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 tripleo_ansible/playbooks/cli-overcloud-conf-ironic.yaml diff --git a/tripleo_ansible/playbooks/cli-overcloud-conf-ironic.yaml b/tripleo_ansible/playbooks/cli-overcloud-conf-ironic.yaml new file mode 100644 index 000000000..a42e41e63 --- /dev/null +++ b/tripleo_ansible/playbooks/cli-overcloud-conf-ironic.yaml @@ -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