Hello,
I am editing some playbooks that should be able to install software
across different distrubutions. Since Ansible 2.0 there is the
OS-independent package manager module; however, actual package names
vary across distrubutions: e.g., the `/usr/bin/ssh` command comes from
package `openssh-clients` in Fedora but `openssh-client` on
Debian/Ubuntu.
The only solution I can think of is to define a variable that maps
distro + some arbitrary SW name to the actual package name (pseudocode)::
vars:
- provides:
- ssh:
- RedHat: openssh-clients
- Debian: openssh-client
tasks:
- name: Install SSH client
package:
name={{ provides['ssh'][ansible_os_family] }}
Are there better / more clever solutions out there? Or is such a list
of corresponding packages already available and maintained?
Thanks for any hint!
Riccardo
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/loom.20160418T164053-985%40post.gmane.org.
For more options, visit https://groups.google.com/d/optout.