summaryrefslogtreecommitdiffstats
path: root/doc/server/plugins/trigger.txt
blob: 065bc5ad21f7f8e50a9e11b859689d638dc94ce8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
.. -*- mode: rst -*-

.. _server-plugins-trigger:

=======
Trigger
=======

Trigger is a plugin that calls external scripts when clients are
configured.

Setup
=====

::

    mkdir /var/lib/bcfg2/Trigger
    echo "#!/bin/sh\necho $1\n" > /var/lib/bcfg2/Trigger/test.sh
    chmod +x /var/lib/bcfg2/Trigger/test.sh

Use cases
=========

#. Completing network builds (ie resetting from the build target to the boot pxe target)
#. Integration with external systems

Trigger Arguments
=================

Triggers are run with a series of arguments.

#. client hostname
#. -p
#. client profile
#. -g
#. group1:group2:..:groupN (all client groups)