ansible yum module can not be used

106 views
Skip to first unread message

Fe Zheng

unread,
Sep 25, 2014, 10:00:20 PM9/25/14
to ansible...@googlegroups.com
hi 
    I faced a problem when use ansible module yum.
    my hosts file /etc/ansible/hosts add  
    eg:10.255.22.102 ansible_python_interpreter=/usr/local/python2.7/bin/python
    this new interpreter is python2.7 
    when i came back to use yum
    
    - name: yum install ntp 
    action: yum name=ntp state=present
    sudo: yes
    tags: ntpd
    when: ansible_distribution != 'Suse' 

   problem appear 

   
  task failed to parsed 
  no module named yum 
 
  how to solve ,please help 

Michael DeHaan

unread,
Sep 26, 2014, 8:01:34 AM9/26/14
to ansible...@googlegroups.com
Please paste text rather than include screenshots on this mailing list.  It's far easier for everyone reading it.

Thanks!

It sounds like you might have set ansible_python_interpreter to point at a non-system python, or perhaps are running locally against a virtualenv, where yum isn't available.  I'd suggest not doing these things, as you need to access the system python installed yum to proceed.



--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/08b4b3c8-d672-48c9-9ecf-4da6b392a004%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages