ansible – how to define var's value depending on ansible_facts – CentOS
I'm writing an ansible playbook for installing jdk. The logic is to use version 8 if the system is "Ubuntu", but 1.8.0 if it is "CentOS". following is my code: - hosts: all vars: - java_open_jdk_version_major: 8 when: ansible_distribution ==…