infrastructure icon indicating copy to clipboard operation
infrastructure copied to clipboard

infrastructure needs to support different OSes

Open atarkowska opened this issue 9 years ago • 2 comments

At the moment this repo only support CentOS7, what about Ubuntu and http://docs.ansible.com/ansible/apt_module.html? How this will be organized to support the same tasks for different OS? Do we need extra level of hierarchy?

atarkowska avatar Oct 02 '16 18:10 atarkowska

Probably not more hierarchy. I would assume we use the when: clause to perform certain actions only on given platforms (though 2.0 features like https://docs.ansible.com/ansible/package_module.html will help as well)

joshmoore avatar Oct 02 '16 20:10 joshmoore

You could split role/xxx/{tasks,vars,...}/main.yml and use - include: "{{ ansible_os_family }}.yml

manics avatar Oct 03 '16 08:10 manics