Hi ,
We are using ansible playbook for new package installation .
How to maintain mutiple version of packages ( jdk1.6 , jdk1.6.1 and jdk1.6.2) .
We need to write new role like
role / jdk1.6
role / jdk1.6.1
role / jdk1.6.2
OR
Can we handle single role ? ( Is it possible )
role / jdk
Please let me know - which one is best ?
Thanks,
S.Sivakumar
I use role’s default/main.yml to set a version: variable, which can be overriden when calling the role.
See http://docs.ansible.com/playbooks_roles.html#roles and the following example of passing values to parameterized roles:
---
- hosts: webservers
roles:
- common
- { role: foo_app_instance, dir: '/opt/a', port: 5000 }
- { role: foo_app_instance, dir: '/opt/b', port: 5001 }