Note
This plugin is part of the community.general collection.
To install it use: ansible-galaxy collection install community.general.
To use it in a playbook, specify: community.general.etcd.
| Parameter | Choices/Defaults | Configuration | Comments |
|---|---|---|---|
| _terms list / elements=string / required | the list of keys to lookup on the etcd server | ||
| url string | Default: "http://127.0.0.1:4001" | env:ANSIBLE_ETCD_URL | Environment variable with the url for the etcd server |
| validate_certs boolean |
| toggle checking that the ssl certificates are valid, you normally only want to turn this off with self-signed certs. | |
| version string | Default: "v1" | env:ANSIBLE_ETCD_VERSION | Environment variable with the etcd protocol version |
- name: "a value from a locally running etcd"
ansible.builtin.debug:
msg: "{{ lookup('community.general.etcd', 'foo/bar') }}"
- name: "values from multiple folders on a locally running etcd"
ansible.builtin.debug:
msg: "{{ lookup('community.general.etcd', 'foo', 'bar', 'baz') }}"
- name: "since Ansible 2.5 you can set server options inline"
ansible.builtin.debug:
msg: "{{ lookup('community.general.etcd', 'foo', version='v2', url='http://192.168.0.27:4001') }}"
Common return values are documented here, the following are the fields unique to this lookup:
| Key | Returned | Description |
|---|---|---|
| _raw list / elements=string | success | list of values associated with input keys |
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.10/collections/community/general/etcd_lookup.html