ansible-collection-hetzner-.../scripts/integration-test-files.sh
Jonas L 933a16249b
feat: remove hcloud_ prefix from all modules names (#390)
##### SUMMARY

This simplifies the name of the modules from
`hetzner.hcloud.hcloud_firewall` to `hetzner.hcloud.firewall`. While
maintaining backward compatibility with the old names.

Further changes such as updating the test or the documentation will be
done in a future PR to maintain the git history when squashing the PRs.

##### ISSUE TYPE

- Feature Pull Request
2023-11-20 13:21:23 +01:00

28 lines
726 B
Bash
Executable file

#!/usr/bin/env bash
# Sync the integration test files from the template to all the integrations targets.
integration_targets="tests/integration/targets/"
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
if [[ "$(basename "$target")" = setup_* ]]; then
continue
fi
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