According to http://docs.ansible.com/ansible/playbooks_variables.html " the when conditional can also be used with variables"
However here is my issue with it on ansible-1.9.2-1.
I'm setting a vars_prompt for version number.
When running through it, i'm specifying Version 11.
- name: "version_no"
prompt: "What version of oracle are we setting? 11 or 12. 11 is default"
default: "11"
private: no
Then an associated variable called lib_dir_version based on the version entered.
vars:
lib_dir_version: "11.2"
when: "{{version_no}} == 11"
lib_dir_version: "12.1"
when: "{{version_no}} == 12"
However the above always only takes 12.1 as the return when i Echo Out.
tasks:
- name: "Echo dir version"
shell: echo "My lib dir version is {{ lib_dir_version }}."
FROM messages on host.
args=echo "My lib dir version is 12.1." removes=None NO_LOG=None shell=True warn=True
Why cant i figure this out?
Whats wrong with my syntax?
Chris