We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 97f0560 commit 5187b1dCopy full SHA for 5187b1d
1 file changed
ansible/consul-values.yml
@@ -17,5 +17,16 @@
17
with_items: "{{ consul_seed }}"
18
19
- name: get values from consul
20
- when: read-values is defined
21
- debug: todo
+ run_once: true
+ when: read_values is defined
22
+ uri:
23
+ method=GET
24
+ url=http://{{ ansible_default_ipv4.address }}:8500/v1/kv/{{ item.key }}
25
+ with_items: "{{ consul_seed }}"
26
+ register: values
27
+
28
+ - name: print values to screen
29
30
31
+ debug: msg='{{ item.item.key }}: {{ item.json[0].Value | b64decode }}'
32
+ with_items: "{{ values.results }}"
0 commit comments