I have a variable in variables.yml. In my ansible playbook, I would like to use that variable.But it starts with "/" character. Ansible throws the following error.
TASK [Display all variables/facts known for a host] ******************************************************************** fatal: [127.0.0.1]: FAILED! => {"msg": "template error while templating string: unexpected '/'. String: {{/forexcbm-r-0.0.1}}"}
When I remove "/" character from that variable, playbook is working properly.Is there anyway I can escape and use "/" character as variable prefix ? Thanks for your attention
set-prefix.yml
---
- name: Apigee Ansible Root
hosts: localhost
connection: local
become: true
vars_files:
- variables.yml
tasks:
- name: Display all variables/facts known for a host
debug:
var: "{{ proxy_base_path_prefix }}"
variables.yml
proxy_base_path_prefix: /forexcbm-r-0.0.1
proxy_base_path_prefix: "/forexcbm-r-0.0.1"
?? – Luv33preet