ansible.builtin.etcd3 (v2.6.0) — module

Set or delete key value pairs from an etcd3 cluster

| "added in version" 2.5 of ansible.builtin"

Authors: Jean-Philippe Evrard (@evrardjp)

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.6.0

Description

Sets or deletes values in etcd3 cluster using its v3 api.

Needs python etcd3 lib to work


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Store a value "bar" under the key "foo" for a cluster located "http://localhost:2379"
- etcd3:
    key: "foo"
    value: "baz3"
    host: "localhost"
    port: 2379
    state: "present"

Inputs

    
key:
    description:
    - the key where the information is stored in the cluster
    required: true

host:
    default: localhost
    description:
    - the IP address of the cluster

port:
    default: 2379
    description:
    - the port number used to connect to the cluster

state:
    description:
    - the state of the value for the key.
    - can be present or absent
    required: true

value:
    description:
    - the information stored
    required: true

Outputs

key:
  description: The key that was queried
  returned: always
  type: str
old_value:
  description: The previous value in the cluster
  returned: always
  type: str