forked from ungleich-public/cdist
__postgres_role: check if state parameter exists before reading it
This commit is contained in:
parent
dc39099730
commit
48b6344645
1 changed files with 2 additions and 2 deletions
|
@ -20,8 +20,8 @@
|
||||||
|
|
||||||
name="$__object_id"
|
name="$__object_id"
|
||||||
state_is="$(cat "$__object/explorer/state")"
|
state_is="$(cat "$__object/explorer/state")"
|
||||||
state_should="$(cat "$__object/parameter/state")"
|
state_should="present"
|
||||||
[ ! "$state_should" ] && state_should="present"
|
[ -f "$__object/parameter/state" ] && state_should="$(cat "$__object/parameter/state")"
|
||||||
|
|
||||||
[ "$state_is" = "$state_should" ] && exit 0
|
[ "$state_is" = "$state_should" ] && exit 0
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue