Hello: I'm trying to dynamically set which vault I'm using (don't want my test environment to use real passwords!).
So I set up this in a play book that I'm doing an import_playbook from a different directory. If vault_file is set from the ansible-playbook command line, this works. If I set the vault_file from a group vars file from the calling playbook's dir, vault_file doesn't exist from for the vars_files a statement's viewpoint. If I set it in a fact vault_file also doesn't exist from the vars_files viewpoint. But oddly enough, if I debug vault_file in the debug role, it prints out correctly in all three cases. Bug, or feature? And how do I work around this? --- # # Sets up Docker networks # - name: Setup the networks hosts: dockerhosts vars_files: - demoVars.yml - "{{ vault_file }}" roles: - role: debug - role: network_setup options: internal: "{{ networks.internal }}" external: "{{ networks.external }}" nginx: "{{ networks.nginx }}" tags: - setup - standalone - app_test ---- importing file ---- - name: create facts used to compose variables later in this playbook hosts: dockerhosts vars: esTmpDir: "/tmp/es" roles: - role: unitenv_setup tags: - app_test - import_playbook: ../../../deployment/playbooks/network.yml -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/5ac6e30f-d83b-4206-b92b-7adac8aabc59%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.