23531b28c4
There are use cases where it's useful to be able to explicitly
exclude files from a transfer request. For example when syncing galera
database, we don't want to copy coredumps, local galera state file...
Add the ability to explicitly include or exclude files by specifying
a list of files or wildcard-based patterns.
Also make the default transfer options configurable, to best suit
transfer use cases.
Related-Bug: #1925260
Change-Id: I1e88907db0bb26d52c92cb996eb56767e06b3874
(cherry picked from commit 6f75fd1723
)
77 lines
1.5 KiB
YAML
77 lines
1.5 KiB
YAML
---
|
|
driver:
|
|
name: delegated
|
|
options:
|
|
managed: false
|
|
login_cmd_template: >-
|
|
ssh
|
|
-o UserKnownHostsFile=/dev/null
|
|
-o StrictHostKeyChecking=no
|
|
-o Compression=no
|
|
-o TCPKeepAlive=yes
|
|
-o VerifyHostKeyDNS=no
|
|
-o ForwardX11=no
|
|
-o ForwardAgent=no
|
|
{instance}
|
|
ansible_connection_options:
|
|
ansible_connection: ssh
|
|
|
|
log: true
|
|
|
|
platforms:
|
|
- name: controller1
|
|
- name: controller2
|
|
|
|
provisioner:
|
|
name: ansible
|
|
config_options:
|
|
defaults:
|
|
fact_caching: jsonfile
|
|
fact_caching_connection: /tmp/molecule/facts
|
|
inventory:
|
|
hosts:
|
|
all:
|
|
hosts:
|
|
controller1:
|
|
ansible_host: 127.0.0.2
|
|
controller2:
|
|
ansible_host: 127.0.0.3
|
|
vars:
|
|
test_src_dir: "/tmp/src_files"
|
|
test_src_files:
|
|
- testfile1
|
|
- testfile2
|
|
- testfile3
|
|
test_dst_dir: "/tmp/dst_files"
|
|
test_dst_files:
|
|
- testfile4
|
|
- testfile5
|
|
- testfile6
|
|
test2_src_dir: "/tmp/src_files_2"
|
|
test2_dst_dir: "/tmp/dst_files_2"
|
|
test2_src_files:
|
|
- transferred
|
|
test2_exclude_src_files:
|
|
- skip1
|
|
- skip2
|
|
- donotcopy
|
|
test2_include_pattern:
|
|
- transferred
|
|
test2_exclude_pattern:
|
|
- 'skip*'
|
|
- donotcopy
|
|
|
|
log: true
|
|
env:
|
|
ANSIBLE_STDOUT_CALLBACK: yaml
|
|
|
|
scenario:
|
|
test_sequence:
|
|
- cleanup
|
|
- converge
|
|
- verify
|
|
- cleanup
|
|
|
|
verifier:
|
|
name: ansible
|