Update cli playbooks with new pattern
This change updates our cli playbooks with a new high-level pattern which will ensure we're able to run commands both locally and remotely. Change-Id: I309d52eb424a73bd04af167a2a7411ba3bf35674 Signed-off-by: Kevin Carter <kecarter@redhat.com>
This commit is contained in:
parent
10f1ab7ab9
commit
b3f7318047
|
@ -15,8 +15,11 @@
|
|||
# under the License.
|
||||
|
||||
- name: Baremetal Introspection for multiple Ironic Nodes
|
||||
connection: local
|
||||
hosts: localhost
|
||||
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:
|
||||
run_validations: false
|
||||
concurrency: 20
|
||||
|
|
|
@ -14,8 +14,12 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
- connection: local
|
||||
hosts: localhost
|
||||
- name: Overcloud Delete
|
||||
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
|
||||
pre_tasks:
|
||||
- name: Check for required inputs
|
||||
fail:
|
||||
|
|
|
@ -15,8 +15,11 @@
|
|||
# under the License.
|
||||
#
|
||||
- name: Overcloud Node Provide
|
||||
connection: local
|
||||
hosts: localhost
|
||||
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
|
||||
pre_tasks:
|
||||
- name: Check for required inputs
|
||||
fail:
|
||||
|
|
|
@ -14,12 +14,13 @@
|
|||
# under the License.
|
||||
|
||||
- name: TripleO Undercloud backup workflows
|
||||
hosts: undercloud
|
||||
gather_facts: false
|
||||
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
|
||||
max_fail_percentage: 0
|
||||
vars:
|
||||
sources_path: '/home/stack/'
|
||||
sources_path: "{{ lookup('env', 'HOME') }}"
|
||||
handlers:
|
||||
# Perform some cleanup
|
||||
- name: cleanup the backup
|
||||
|
@ -92,7 +93,7 @@
|
|||
become: true
|
||||
shell: |
|
||||
tar --xattrs --ignore-failed-read -C / -cf {{ fs_path }} {{ sources_path }}
|
||||
chown stack. {{ fs_path }}
|
||||
chown {{ lookup('env', 'USER') }} {{ fs_path }}
|
||||
|
||||
- name: compress all the files in tar.gz
|
||||
archive:
|
||||
|
|
Loading…
Reference in New Issue