forked from ungleich-public/cdist
parameter default handling in __qemu_img type corrected
This commit is contained in:
parent
92e67182a6
commit
02c3fe4988
5 changed files with 7 additions and 8 deletions
|
@ -2,8 +2,7 @@
|
||||||
# State: absent is handled by manifest - we need only to do stuff if image is
|
# State: absent is handled by manifest - we need only to do stuff if image is
|
||||||
# not existing and state != absent
|
# not existing and state != absent
|
||||||
#
|
#
|
||||||
state="present"
|
state="$(cat "$__object/parameter/state")"
|
||||||
[ -f "$__object/parameter/state" ] && state="$(cat "$__object/parameter/state")"
|
|
||||||
[ "$state" = "absent" ] && exit 0
|
[ "$state" = "absent" ] && exit 0
|
||||||
|
|
||||||
exists="$(cat "$__object/explorer/exists")"
|
exists="$(cat "$__object/explorer/exists")"
|
||||||
|
@ -13,8 +12,7 @@ exists="$(cat "$__object/explorer/exists")"
|
||||||
# Still there? Create image
|
# Still there? Create image
|
||||||
#
|
#
|
||||||
|
|
||||||
format=qcow2
|
format="$(cat "$__object/parameter/format")"
|
||||||
[ -f "$__object/parameter/format" ] && format="$(cat "$__object/parameter/format")"
|
|
||||||
size="$(cat "$__object/parameter/size")"
|
size="$(cat "$__object/parameter/size")"
|
||||||
diskimage="/$__object_id"
|
diskimage="/$__object_id"
|
||||||
|
|
||||||
|
|
|
@ -2,10 +2,8 @@
|
||||||
# Default settings
|
# Default settings
|
||||||
#
|
#
|
||||||
|
|
||||||
format=qcow2
|
format="$(cat "$__object/parameter/format")"
|
||||||
state=present
|
state="$(cat "$__object/parameter/state")"
|
||||||
[ -f "$__object/parameter/format" ] && format="$(cat "$__object/parameter/format")"
|
|
||||||
[ -f "$__object/parameter/state" ] && state="$(cat "$__object/parameter/state")"
|
|
||||||
|
|
||||||
diskimage="/$__object_id"
|
diskimage="/$__object_id"
|
||||||
|
|
||||||
|
|
1
cdist/conf/type/__qemu_img/parameter/default/format
Normal file
1
cdist/conf/type/__qemu_img/parameter/default/format
Normal file
|
@ -0,0 +1 @@
|
||||||
|
qcow2
|
1
cdist/conf/type/__qemu_img/parameter/default/state
Normal file
1
cdist/conf/type/__qemu_img/parameter/default/state
Normal file
|
@ -0,0 +1 @@
|
||||||
|
present
|
|
@ -1 +1,2 @@
|
||||||
format
|
format
|
||||||
|
state
|
||||||
|
|
Loading…
Reference in a new issue