# salt.sdb.etcd_db

etcd Database Module

maintainer:

  SaltStack

maturity:

  New

depends:

  python-etcd or etcd3-py

platform:

  all

Added in version 2015.5.0.

This module allows access to the etcd database using an `sdb://` URI. This package is located at `https://pypi.python.org/pypi/python-etcd`.

Like all sdb modules, the etcd module requires a configuration profile to be configured in either the minion or master configuration file. This profile requires very little. In the example:

    myetcd:
      driver: etcd
      etcd.host: 127.0.0.1
      etcd.port: 2379

The `driver` refers to the etcd module, `etcd.host` refers to the host that is hosting the etcd database and `etcd.port` refers to the port on that host.

In order to choose whether to use etcd API v2 or v3, you can put the following configuration option in the same place as your etcd configuration. This option defaults to true, meaning you will use v2 unless you specify otherwise.

    etcd.require_v2: True

    password: sdb://myetcd/mypassword

salt.sdb.etcd_db.delete(key, service=None, profile=None)

  Get a value from the etcd service

salt.sdb.etcd_db.get(key, service=None, profile=None)

  Get a value from the etcd service

salt.sdb.etcd_db.set_(key, value, service=None, profile=None)

  Set a key/value pair in the etcd service