salt.states.icinga2 module

Icinga2 state

New in version 2017.7.0.

depends
  • Icinga2 Python module

configuration

See salt.modules.icinga2 for setup instructions.

The icinga2 module is used to execute commands. Its output may be stored in a file or in a grain.

command_id:
  icinga2.generate_ticket:
    - name: domain.tld
    - output:  "/tmp/query_id.txt"
salt.states.icinga2.generate_cert(name)

Generate an icinga2 certificate and key on the client.

name

The domain name for which this certificate and key will be generated

salt.states.icinga2.generate_ticket(name, output=None, grain=None, key=None, overwrite=True)

Generate an icinga2 ticket on the master.

name

The domain name for which this ticket will be generated

output

grain: output in a grain other: the file to store results None: output to the result comment (default)

grain:

grain to store the output (need output=grain)

key:

the specified grain will be treated as a dictionary, the result of this state will be stored under the specified key.

overwrite:

The file or grain will be overwritten if it already exists (default)

salt.states.icinga2.node_setup(name, master, ticket)

Setup the icinga2 node.

name

The domain name for which this certificate will be saved

master

Icinga2 master node for which this certificate will be saved

ticket

Authentication ticket generated on icinga2 master

salt.states.icinga2.request_cert(name, master, ticket, port='5665')

Request CA certificate from master icinga2 node.

name

The domain name for which this certificate will be saved

master

Icinga2 master node for which this certificate will be saved

ticket

Authentication ticket generated on icinga2 master

port

Icinga2 port, defaults to 5665

salt.states.icinga2.save_cert(name, master)

Save the certificate on master icinga2 node.

name

The domain name for which this certificate will be saved

master

Icinga2 master node for which this certificate will be saved