From b0fb6e2072d6454eaf3fc22a5204b48b4cc8a888 Mon Sep 17 00:00:00 2001 From: Telles Nobrega Date: Tue, 29 Oct 2019 16:17:45 -0300 Subject: [PATCH] Adding setup_rear and setup_nfs task Adding the tasks to install and configure ReaR and install and configure NFS.. Change-Id: I960e45f2162f8e1257f952a14e7f876468aa8fca --- .../backup-and-restore/tasks/setup_nfs.yml | 36 +++++++++++++++++++ .../backup-and-restore/tasks/setup_rear.yml | 36 +++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 tripleo_ansible/roles/backup-and-restore/tasks/setup_nfs.yml create mode 100644 tripleo_ansible/roles/backup-and-restore/tasks/setup_rear.yml diff --git a/tripleo_ansible/roles/backup-and-restore/tasks/setup_nfs.yml b/tripleo_ansible/roles/backup-and-restore/tasks/setup_nfs.yml new file mode 100644 index 000000000..9af256748 --- /dev/null +++ b/tripleo_ansible/roles/backup-and-restore/tasks/setup_nfs.yml @@ -0,0 +1,36 @@ +--- +# Copyright 2019 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. + + +# "backup-and-restore" will search for and load any operating system variable file + +# found within the "vars/" path. If no OS files are found the task will skip. +- name: Gather variables for each operating system + include_vars: "{{ item }}" + with_first_found: + - skip: true + files: + - "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml" + - "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml" + - "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml" + - "{{ ansible_distribution | lower }}.yml" + - "{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}.yml" + - "{{ ansible_os_family | lower }}.yml" + tags: + - always + +- name: Setup NFS + import_tasks: ../setup_nfs/tasks/main.yml diff --git a/tripleo_ansible/roles/backup-and-restore/tasks/setup_rear.yml b/tripleo_ansible/roles/backup-and-restore/tasks/setup_rear.yml new file mode 100644 index 000000000..abbf8dbdf --- /dev/null +++ b/tripleo_ansible/roles/backup-and-restore/tasks/setup_rear.yml @@ -0,0 +1,36 @@ +--- +# Copyright 2019 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. + + +# "backup-and-restore" will search for and load any operating system variable file + +# found within the "vars/" path. If no OS files are found the task will skip. +- name: Gather variables for each operating system + include_vars: "{{ item }}" + with_first_found: + - skip: true + files: + - "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml" + - "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml" + - "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml" + - "{{ ansible_distribution | lower }}.yml" + - "{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}.yml" + - "{{ ansible_os_family | lower }}.yml" + tags: + - always + +- name: Setup ReaR + import_tasks: ../setup_rear/tasks/main.yml