add state parameter
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
This commit is contained in:
parent
32b4989a6c
commit
05bc235b54
4 changed files with 13 additions and 3 deletions
10
man.text
10
man.text
|
@ -1,5 +1,5 @@
|
|||
cdist-type__ungleich_staff_ssh_access(7)
|
||||
=================================================
|
||||
=========================================
|
||||
ungleich GmbH <cdist--@--ungleich.ch>
|
||||
|
||||
|
||||
|
@ -17,8 +17,14 @@ EXAMPLES
|
|||
--------
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
# Grant access to root
|
||||
__ungleich_staff_ssh_access root
|
||||
__ungleich_staff_ssh_access anotheruser
|
||||
|
||||
# More explicitly
|
||||
__ungleich_staff_ssh_access anotheruser --state present
|
||||
|
||||
# Remove access for ungleich staff
|
||||
__ungleich_staff_ssh_access root --state absent
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
|
4
manifest
4
manifest
|
@ -20,6 +20,8 @@
|
|||
|
||||
|
||||
user="$__object_id"
|
||||
state=$(cat "$__object/parameter/state")
|
||||
|
||||
|
||||
################################################################################
|
||||
# not at ungleich GmbH (anymore)
|
||||
|
@ -46,4 +48,4 @@ for key in dave nico tobias; do
|
|||
done
|
||||
|
||||
__ssh_authorized_keys "ungleich-staff-$user" \
|
||||
--owner "$user" --state present "$@"
|
||||
--owner "$user" --state "$state" "$@"
|
||||
|
|
1
parameter/default/state
Normal file
1
parameter/default/state
Normal file
|
@ -0,0 +1 @@
|
|||
present
|
1
parameter/optional
Normal file
1
parameter/optional
Normal file
|
@ -0,0 +1 @@
|
|||
state
|
Loading…
Reference in a new issue