Created
February 26, 2018 13:42
-
-
Save mkrizek/9772ec5d598f32a369b580e0936c751a to your computer and use it in GitHub Desktop.
repro-36028
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DIR=tmp_36028 | |
mkdir -p $DIR/roles/{my_role,my_role2}/{tasks,library} | |
cat > $DIR/playbook.yml << EOF | |
- hosts: localhost | |
gather_facts: no | |
roles: | |
- my_role | |
- my_role2 | |
EOF | |
cat > $DIR/roles/my_role/library/ping.py << EOF | |
#!/usr/bin/python | |
print('{"failed": false, "msg": "MODULE IN ROLE"}') | |
EOF | |
cat > $DIR/roles/my_role/tasks/main << EOF | |
- ping: | |
EOF | |
cat > $DIR/roles/my_role2/library/ping.py << EOF | |
#!/usr/bin/python | |
print('{"failed": false, "msg": "MODULE IN ROLE2"}') | |
EOF | |
cat > $DIR/roles/my_role2/tasks/main << EOF | |
- ping: | |
EOF | |
cat > $DIR/inventory << EOF | |
EOF | |
ansible-playbook -i $DIR/inventory $DIR/playbook.yml -v | |
rm -rf $DIR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment