Skip to content

Instantly share code, notes, and snippets.

@mkrizek
Created February 26, 2018 13:42
Show Gist options
  • Save mkrizek/9772ec5d598f32a369b580e0936c751a to your computer and use it in GitHub Desktop.
Save mkrizek/9772ec5d598f32a369b580e0936c751a to your computer and use it in GitHub Desktop.
repro-36028
#!/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