salt.states.zookeeper

depends

kazoo

configuration

See salt.modules.zookeeper for setup instructions.

ACLS

For more information about acls, please checkout the kazoo documentation.

http://kazoo.readthedocs.io/en/latest/api/security.html#kazoo.security.make_digest_acl

The following options can be included in the acl dictionary:

param username

Username to use for the ACL.

param password

A plain-text password to hash.

param write

Write permission.

type write

bool

param create

Create permission.

type create

bool

param delete

Delete permission.

type delete

bool

param admin

Admin permission.

type admin

bool

param all

All permissions.

type all

bool

salt.states.zookeeper.absent(name, version=- 1, recursive=False, profile=None, hosts=None, scheme=None, username=None, password=None, default_acl=None)

Make sure znode is absent

name

path to znode

version

Specify the version which should be deleted Default: -1 (always match)

recursive

Boolean to indicate if children should be recursively deleted Default: False

profile

Configured Zookeeper profile to authenticate with (Default: None)

hosts

Lists of Zookeeper Hosts (Default: '127.0.0.1:2181)

scheme

Scheme to authenticate with (Default: 'digest')

username

Username to authenticate (Default: None)

password

Password to authenticate (Default: None)

default_acl

Default acls to assign if a node is created in this connection (Default: None)

delete znode:
  zookeeper.absent:
    - name: /test
    - recursive: True

salt.states.zookeeper.acls(name, acls, version=- 1, profile=None, hosts=None, scheme=None, username=None, password=None, default_acl=None)

Update acls on a znode

name

path to znode

acls

list of acl dictionaries to set on znode

version

Specify the version which should be deleted Default: -1 (always match)

profile

Configured Zookeeper profile to authenticate with (Default: None)

hosts

Lists of Zookeeper Hosts (Default: '127.0.0.1:2181)

scheme

Scheme to authenticate with (Default: 'digest')

username

Username to authenticate (Default: None)

password

Password to authenticate (Default: None)

default_acl

Default acls to assign if a node is created in this connection (Default: None)

update acls:
  zookeeper.acls:
    - name: /test/name
    - acls:
      - username: daniel
        password: test
        all: True
      - username: gtmanfred
        password: test
        all: True

salt.states.zookeeper.present(name, value, acls=None, ephemeral=False, sequence=False, makepath=False, version=- 1, profile=None, hosts=None, scheme=None, username=None, password=None, default_acl=None)

Make sure znode is present in the correct state with the correct acls

name

path to znode

value

value znode should be set to

acls

list of acl dictionaries to set on znode (make sure the ones salt is connected with are included) Default: None

ephemeral

Boolean to indicate if ephemeral znode should be created Default: False

sequence

Boolean to indicate if znode path is suffixed with a unique index Default: False

makepath

Boolean to indicate if the parent paths should be created Default: False

version

For updating, specify the version which should be updated Default: -1 (always match)

profile

Configured Zookeeper profile to authenticate with (Default: None)

hosts

Lists of Zookeeper Hosts (Default: '127.0.0.1:2181)

scheme

Scheme to authenticate with (Default: 'digest')

username

Username to authenticate (Default: None)

password

Password to authenticate (Default: None)

default_acl

Default acls to assign if a node is created in this connection (Default: None)

add znode:
  zookeeper.present:
    - name: /test/name
    - value: gtmanfred
    - makepath: True

update znode:
  zookeeper.present:
    - name: /test/name
    - value: daniel
    - acls:
      - username: daniel
        password: test
        read: true
      - username: gtmanfred
        password: test
        read: true
        write: true
        create: true
        delete: true
        admin: true
    - makepath: True

© 2021 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltproject.io/en/latest/ref/states/all/salt.states.zookeeper.html