TripleO Ansible project repository. Contains playbooks for use with TripleO OpenStack deployments.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

65 lines
1.8 KiB

---
# 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: Collect facts
hosts: all
gather_facts: false
any_errors_fatal: true
tasks:
- name: Gather a minimal set of facts
setup:
gather_subset: '!all,min'
- name: Converge
hosts: localhost
connection: local
any_errors_fatal: true
tasks:
- name: Install openssl for file creation
package:
name: openssl
state: present
become: true
- name: Create test directories
file:
state: directory
path: "{{ item }}"
loop:
- "{{ test_src_dir }}"
- "{{ test_dst_dir }}"
- name: Create 1GB src test files with random content
shell: >-
openssl rand -out {{ item }} -base64 $(( 2**30 * 3/4 ))
args:
chdir: "{{ test_src_dir }}"
creates: "{{ item }}"
loop: "{{ test_src_files }}"
- name: Create empty dst test files with random content
file:
path: "{{ test_dst_dir }}/{{ item }}"
state: touch
loop: "{{ test_dst_files }}"
- include_role:
name: "tripleo_transfer"
vars:
tripleo_transfer_src_host: controller2
tripleo_transfer_src_dir: "{{ test_src_dir }}"
tripleo_transfer_dest_host: controller1
tripleo_transfer_dest_dir: "{{ test_dst_dir }}"