Hello everyone,

I am quite new to Ansible, and I think it is much easier to use than e.
g. Puppet.

I have to make sure that software package A is installed on a host, if
software package B is not.

Since I use this role on SLES: is there any chance to use e.g. the
zypper modukle for that purpose?

Currently, I invoke a command to check if B is installed, and if it is
not, I call the zypper module to make sure A is installed:

=== snip ===
- name: query rubygem-facter
  command: rpm -q rubygem2.1-rubygem-facter
  ignore_errors: true
  register: ch_rpm2
  failed_when: ch_rpm2.rc > 1
  changed_when: false

- name: install facter
  zypper: name=facter state=present
  when: ch_rpm2|failed
=== pins ===

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

I can't simply install facter, since it is an older version. The attempt
to install facter on a host where rubygem2.1-rubygem-facter is already
installed causes an error, and I do not like avoidable errors in my
roles, they are often misleading ;)
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.

Regards,
Werner
-- 


-- 
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/f3387167-63cc-b406-02ad-310a5a7ec384%40ufz.de.
For more options, visit https://groups.google.com/d/optout.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to