OSX 10.10.3 check uri httplib2 not found

49 views
Skip to first unread message

Anatol

unread,
Jul 6, 2015, 7:54:35 AM7/6/15
to ansible...@googlegroups.com
Hi,

I´m trying to test an URL status Code:

    # Check that you can connect (GET) to a page and it returns a status 200
   
- uri: url=http://www.example.com


   
# Check that a page returns a status 200
   
- action: uri url=http://www.example.com return_content=yes
     
register: webpage
      delegate_to
: 127.0.0.1
    - action: fail
      when: "'illustrative' not in webpage.content"

I´ve installed httplib2 with


sudo pip install httplib2


but it fails with :

failed: [staging] => {"failed": true}
msg
: httplib2 is not installed
FATAL
: all hosts have already failed -- aborting


I quess ansible is not using the right python path. How can I solve this?



cheers,


– anatol



Brian Coca

unread,
Jul 6, 2015, 9:04:36 AM7/6/15
to ansible...@googlegroups.com
set ansible_python_interpreter to point to the correct python for that host
> --
> 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/f835ef99-65d7-4772-9a28-1c0cec7af38b%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Brian Coca

Anatol

unread,
Jul 6, 2015, 12:15:59 PM7/6/15
to ansible...@googlegroups.com
Can you advise me how to do that in OSX?

Brian Coca

unread,
Jul 6, 2015, 12:27:49 PM7/6/15
to ansible...@googlegroups.com
not really, I don't use OS X. But plenty of others using OS X should be able to.

--
Brian Coca

Anatol

unread,
Jul 6, 2015, 4:45:54 PM7/6/15
to ansible...@googlegroups.com
ok thanks, I´m new to python + ansible and would not have asked if google had brought up something useful.
Reply all
Reply to author
Forward
0 new messages