Small improvement to consul kv role

This commit is contained in:
IamTheFij 2022-06-28 12:08:23 -07:00
parent ce09177479
commit 41343a6d2c

View File

@ -60,18 +60,14 @@
# pointing to 127.0.0.1 and possibly restart Docker and Nomad # pointing to 127.0.0.1 and possibly restart Docker and Nomad
- name: Add values - name: Add values
delegate_to: localhost
run_once: true
block: block:
- name: Install python-consul - name: Install python-consul
pip: pip:
name: python-consul name: python-consul
extra_args: --index-url https://pypi.org/simple extra_args: --index-url https://pypi.org/simple
- name: Add a value to Consul
consul_kv:
host: "{{ inventory_hostname }}"
key: ansible_test
value: Hello from Ansible!
- name: Set hostname - name: Set hostname
consul_kv: consul_kv:
host: "{{ inventory_hostname }}" host: "{{ inventory_hostname }}"
@ -79,9 +75,6 @@
# TODO: propogate this through via Consul and Nomad templates rather than Terraform # TODO: propogate this through via Consul and Nomad templates rather than Terraform
value: dev.homelab value: dev.homelab
delegate_to: localhost
run_once: true
- name: Setup Vault cluster - name: Setup Vault cluster
hosts: vault_instances hosts: vault_instances