I have used the following variable in ansible playbook as shown below.
---
- hosts: hosts
vars:
vers: 18.7
I am trying to access the value of vers using $ under tasks as shown below
tasks:
- name: COpy war file
copy:
src: /etc/puppet/warrepo/japp-$ver.war
dest: /data/dist/app/
But looks like it is not working . Please suggest how to access the value of the variable.