On 03.06.16 11:06 Werner Flamme wrote:

> Is there any more ansible-style way to get this done?

I would be interested in this, too.

> OTOH, not each system can fulfill the dependencies for
> rubygem2.1-rubygem-facter - like Ruby 2.1. SLES 11 does not have this as
> standard, and its annoying to add it here, because it almost always
> causes troubles with the ruby-based software on the host.

If this is somehow OS-version related (SLE11 no, SLE12 yes, ...), you
could simply use a group_vars file with a variable, and use that to
check and/or install:

group_vars/SLE11.yml:

facter_package: facter

group_vars/SLE12.yml:

facter_package: rubygem2.1-rubygem-facter

Role/Playbook/Task/...:

- name: install whatever fits
  zypper: name="{{facter_package }}" state=present

Johannes

-- 
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/5751B4AE.1050309%40ojkastl.de.
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to