2019-01-16 19:39:03 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -eux
|
|
|
|
|
|
|
|
# test no dupes when dependencies in b and c point to a in roles:
|
|
|
|
[ "$(ansible-playbook no_dupes.yml -i ../../inventory --tags inroles "$@" | grep -c '"msg": "A"')" = "1" ]
|
|
|
|
[ "$(ansible-playbook no_dupes.yml -i ../../inventory --tags acrossroles "$@" | grep -c '"msg": "A"')" = "1" ]
|
|
|
|
|
|
|
|
# but still dupe across plays
|
|
|
|
[ "$(ansible-playbook no_dupes.yml -i ../../inventory "$@" | grep -c '"msg": "A"')" = "2" ]
|
|
|
|
|
|
|
|
# include/import can execute another instance of role
|
|
|
|
[ "$(ansible-playbook allowed_dupes.yml -i ../../inventory --tags importrole "$@" | grep -c '"msg": "A"')" = "2" ]
|
|
|
|
[ "$(ansible-playbook allowed_dupes.yml -i ../../inventory --tags includerole "$@" | grep -c '"msg": "A"')" = "2" ]
|
2021-02-11 16:07:20 +01:00
|
|
|
|
|
|
|
|
|
|
|
# ensure role data is merged correctly
|
|
|
|
ansible-playbook data_integrity.yml -i ../../inventory "$@"
|