Ansible - Only do action if on specific distribution (Debian, Ubuntu, CentOS or RHEL) or distribution version (ubuntu precise, ubuntu trusty)

, par  Raymii.org , popularité : 2%

This Ansible playbook example helps you execute actions only if you are on a certain distribution. You might have a mixed environment with CentOS and Debian and when using Ansible to execute actions on nodes you don’t need to run Yum on Debian, or Apt on CentOS. Some package names are different and such, so this helps you with an only if statement to select a specific distribution. As a bonus, you also get an only_if for specific distribution versions, like Ubuntu precise (12.04 LTS) or Ubuntu trusty (14.04 LTS).

HTML - 1.6 kio

Voir en ligne : https://raymii.org/s/tutorials/Ansi...

Sites favoris Tous les sites

84 sites référencés dans ce secteur