When I set an env variable from an ansible playbook like this:
- name: Setting variable
shell: echo $URL
environment:
URL: "{{ URL }}"
I would like this variable to be seen from the localhost but it's not the case:
echo $URL
gives nothing.
How can I make URL visible to the host OS ?
EDIT:
- I used register but it's not working as I expected
- I don't only want to verify if the variable is set, I want to use this environment variable from any other application in my host.