Merge "Remove cli-config-download-export.yaml"
commit
f6630e9432
|
@ -1,56 +0,0 @@
|
|||
---
|
||||
# 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.
|
||||
|
||||
- name: Config Download Export
|
||||
connection: "{{ (tripleo_target_host is defined) | ternary('ssh', 'local') }}"
|
||||
hosts: "{{ tripleo_target_host | default('localhost') }}"
|
||||
remote_user: "{{ tripleo_target_user | default(lookup('env', 'USER')) }}"
|
||||
gather_facts: "{{ (tripleo_target_host is defined) | ternary(true, false) }}"
|
||||
any_errors_fatal: true
|
||||
vars:
|
||||
plan: overcloud
|
||||
config_type: null
|
||||
preserve_config: true
|
||||
|
||||
pre_tasks:
|
||||
- name: Set config_dir
|
||||
set_fact:
|
||||
config_dir: "{{ lookup('env', 'HOME') ~ '/tripleo-config' }}"
|
||||
when: config_dir is not defined
|
||||
|
||||
- name: set work_dir
|
||||
set_fact:
|
||||
work_dir: "{{ config_dir ~ '/' ~ plan }}"
|
||||
|
||||
tasks:
|
||||
|
||||
- name: Clean work_dir
|
||||
file:
|
||||
path: "{{ work_dir }}"
|
||||
state: absent
|
||||
when: not preserve_config | bool
|
||||
|
||||
- name: Create config dir if does not exist
|
||||
file:
|
||||
path: "{{ work_dir }}"
|
||||
state: directory
|
||||
|
||||
- name: Get config
|
||||
tripleo_config_download:
|
||||
plan: "{{ plan }}"
|
||||
config_type: "{{ config_type }}"
|
||||
work_dir: "{{ work_dir }}"
|
||||
download: true
|
Loading…
Reference in New Issue