On 29.04.16 12:08 'Suresh Uppu' via Ansible Project wrote:

>     - name: installing python setuptools
>       become: yes
>       become_method: sudo
>       yum: name=python-setuptools  state=latest
>       when: ansible_os_family == "RedHat"
>       zypper: name=python-setuptools  state=latest
>       when: ansible_os_family == "SLES"
> 
> But getting compilation error.

I have not tested this, but maybe the error is caused by the fact,
that zypper module does not work/exist on RedHat and yum module does
not exist on SLES?

Split it into two tasks:

    - name: installing python setuptools on RedHat
      become: yes
      become_method: sudo
      yum: name=python-setuptools  state=latest
      when: ansible_os_family == "RedHat"

    - name: installing python setuptools on SLES
      become: yes
      become_method: sudo
      zypper: name=python-setuptools  state=latest
      when: ansible_os_family == "SLES"

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

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to