mirror of
https://github.com/ansible-collections/hetzner.hcloud
synced 2024-12-12 21:42:35 +00:00
26 lines
664 B
Bash
26 lines
664 B
Bash
|
#!/usr/bin/env bash
|
||
|
|
||
|
# Sync the integration test files from the template to all the integrations targets.
|
||
|
|
||
|
integration_targets="tests/integration/targets/hcloud_"
|
||
|
integration_common="tests/integration/common"
|
||
|
|
||
|
# banner
|
||
|
banner() {
|
||
|
echo "#"
|
||
|
echo "# DO NOT EDIT THIS FILE! Please edit the files in $integration_common instead."
|
||
|
echo "#"
|
||
|
}
|
||
|
|
||
|
# copy_file <src> <dest>
|
||
|
copy_file() {
|
||
|
mkdir -p "$(dirname "$2")"
|
||
|
banner > "$2"
|
||
|
cat "$1" >> "$2"
|
||
|
}
|
||
|
|
||
|
for target in "$integration_targets"*; do
|
||
|
copy_file "$integration_common"/defaults/main/common.yml "$target"/defaults/main/common.yml
|
||
|
copy_file "$integration_common"/tasks/main.yml "$target"/tasks/main.yml
|
||
|
done
|