Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save zeitounator/cd84d2708aed38d4305970e64d7371fb to your computer and use it in GitHub Desktop.
Save zeitounator/cd84d2708aed38d4305970e64d7371fb to your computer and use it in GitHub Desktop.
$ pwd
/tmp/so_reproduce
$ cat playbook.yml
---
- hosts: localhost
gather_facts: false
tasks:
- name: Debug our external var
ansible.builtin.debug:
var: cml_lab_file
$ ansible-playbook playbook.yml -e cml_lab_file="{{ lookup('env', 'PWD') }}/../toto/pipo.yml"
PLAY [localhost] *******************************************************************************************************************************************************************************************
TASK [Debug our external var] ******************************************************************************************************************************************************************************
ok: [localhost] => {
"cml_lab_file": "/tmp/so_reproduce/../toto/pipo.yml"
}
PLAY RECAP *************************************************************************************************************************************************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment