Last active
November 9, 2017 15:41
-
-
Save mkrizek/29f8c5b4882819601578c1bb3cfa53ef to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
TMP_DIR=tmp_include_roles_repro | |
mkdir -p $TMP_DIR/roles/{x,y}/tasks | |
cat > $TMP_DIR/playbook.yml << EOF | |
- hosts: localhost | |
tasks: | |
- set_fact: | |
role_name_in_fact: "x" | |
- name: role name stored in a fact | |
include_role: | |
name: "{{ role_name_in_fact }}" | |
EOF | |
ansible-playbook $TMP_DIR/playbook.yml -vvv | |
rm -rf $TMP_DIR/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment