community / community.general / 1.3.11 / lookup / etcd get info from an etcd server Authors: Jan-Piet Mens (@jpmens)community.general.etcd (1.3.11) — lookup
Install with ansible-galaxy collection install community.general:==1.3.11
collections: - name: community.general version: 1.3.11
Retrieves data from an etcd server
- 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') }}"
url: default: http://127.0.0.1:4001 description: - Environment variable with the url for the etcd server env: - name: ANSIBLE_ETCD_URL _terms: description: - the list of keys to lookup on the etcd server elements: string required: true type: list version: default: v1 description: - Environment variable with the etcd protocol version env: - name: ANSIBLE_ETCD_VERSION validate_certs: default: true description: - toggle checking that the ssl certificates are valid, you normally only want to turn this off with self-signed certs. type: boolean
_raw: description: - list of values associated with input keys elements: string type: list