python-consul required for this module

1,167 views
Skip to first unread message

Zach Langer

unread,
Jun 16, 2016, 5:09:39 PM6/16/16
to Consul
I'm trying to use consul to start services with an ansible playbook(http://docs.ansible.com/ansible/consul_module.html). I know I have installed all the dependancies listed, yet when the simplest code is run:

  - name: register vault service with the local consul agent

    consul:

      service_name: vault

      service_port: 80

It returns an error: 

fatal: [default]: FAILED! => {"changed": false, "failed": true, "msg": "python-consul required for this module. see http://python-consul.readthedocs.org/en/latest/#installation"}

I've run the pip install python-consul command as illustrated in the suggested link many times.  How can I fix this, or is there another way to start a vault server with ansible?

David Adams

unread,
Jun 16, 2016, 6:40:30 PM6/16/16
to consu...@googlegroups.com
The error message is not clear but in this case, the "python-consul" module needs to be installed on the remote host. You can do that with a task like this:

    - name: Install python-consul module
      pip:
        name: python-consul
        state: present



--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/consul/issues
IRC: #consul on Freenode
---
You received this message because you are subscribed to the Google Groups "Consul" group.
To unsubscribe from this group and stop receiving emails from it, send an email to consul-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/consul-tool/fbf511b1-4ce4-445e-8a23-a132878fb718%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages