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