Merge branch 'master' into 4.0-pre-not-stable

This commit is contained in:
Nico Schottelius 2014-01-22 00:45:12 +01:00
commit 0a3b5d33d9
16 changed files with 26 additions and 48 deletions

View file

@ -27,23 +27,11 @@ else
shell="" shell=""
fi fi
if [ -f "$__object/parameter/username" ]; then username="$(cat "$__object/parameter/username")"
username="$(cat "$__object/parameter/username")"
else
username="cdist"
fi
if [ -f "$__object/parameter/branch" ]; then branch="$(cat "$__object/parameter/branch")"
branch="$(cat "$__object/parameter/branch")"
else
branch="master"
fi
if [ -f "$__object/parameter/source" ]; then source="$(cat "$__object/parameter/source")"
source="$(cat "$__object/parameter/source")"
else
source="git://github.com/telmich/cdist.git"
fi
# Currently hardcoded - if anyone cares, make a parameter # Currently hardcoded - if anyone cares, make a parameter
# out of it # out of it

View file

@ -0,0 +1 @@
master

View file

@ -0,0 +1 @@
git://github.com/telmich/cdist.git

View file

@ -0,0 +1 @@
cdist

View file

@ -21,8 +21,8 @@
key="$__object_id" key="$__object_id"
[ -f "$__object/parameter/key" ] && key="$(cat "$__object/parameter/key")" [ -f "$__object/parameter/key" ] && key="$(cat "$__object/parameter/key")"
state_should=present
[ -f "$__object/parameter/state" ] && state_should="$(cat "$__object/parameter/state")" state_should="$(cat "$__object/parameter/state")"
file="$(cat "$__object/parameter/file")" file="$(cat "$__object/parameter/file")"
delimiter="$(cat "$__object/parameter/delimiter")" delimiter="$(cat "$__object/parameter/delimiter")"

View file

@ -19,8 +19,7 @@
# along with cdist. If not, see <http://www.gnu.org/licenses/>. # along with cdist. If not, see <http://www.gnu.org/licenses/>.
# #
state_should=present state_should="$(cat "$__object/parameter/state")"
[ -f "$__object/parameter/state" ] && state_should="$(cat "$__object/parameter/state")"
if [ "$state_should" = "present" -a ! -f "$__object/parameter/value" ]; then if [ "$state_should" = "present" -a ! -f "$__object/parameter/value" ]; then
echo "Missing required parameter 'value'" >&2 echo "Missing required parameter 'value'" >&2

View file

@ -0,0 +1 @@
present

View file

@ -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"

View file

@ -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"

View file

@ -0,0 +1 @@
qcow2

View file

@ -0,0 +1 @@
present

View file

@ -1 +1,2 @@
format format
state

View file

@ -45,11 +45,7 @@ else
id="$__object_id" id="$__object_id"
fi fi
if [ -f "$__object/parameter/state" ]; then state="$(cat "$__object/parameter/state")"
state="$(cat "$__object/parameter/state")"
else
state="present"
fi
repo_id="$(cat "$__object/explorer/repo_id")" repo_id="$(cat "$__object/explorer/repo_id")"

View file

@ -39,17 +39,8 @@ else
uri="$__object_id" uri="$__object_id"
fi fi
if [ -f "$__object/parameter/state" ]; then state_should="$(cat "$__object/parameter/state")"
state_should="$(cat "$__object/parameter/state")" stype="$(cat "$__object/parameter/type")"
else
state_should="present"
fi
if [ -f "$__object/parameter/type" ]; then
stype="$(cat "$__object/parameter/type")"
else
stype="ris"
fi
exp_uri="$(cat "$__object/explorer/service_uri")" exp_uri="$(cat "$__object/explorer/service_uri")"
exp_id="$(cat "$__object/explorer/service_id")" exp_id="$(cat "$__object/explorer/service_id")"

View file

@ -33,11 +33,7 @@ else
uri="$__object_id" uri="$__object_id"
fi fi
if [ -f "$__object/parameter/state" ]; then state_should="$(cat "$__object/parameter/state")"
state_should="$(cat "$__object/parameter/state")"
else
state_should="present"
fi
exp_uri="$(cat "$__object/explorer/service_uri")" exp_uri="$(cat "$__object/explorer/service_uri")"

View file

@ -13,7 +13,12 @@ Changelog
* Core: Add environment variable to select shell for executing scripts (Daniel Heule) * Core: Add environment variable to select shell for executing scripts (Daniel Heule)
* Explorer hostname: Return host name by using uname -n * Explorer hostname: Return host name by using uname -n
* New Type: __hostname (Steven Armstrong) * New Type: __hostname (Steven Armstrong)
* Type __cdist: Use default paremeters (Daniel Heule)
* Type __key_value: Use default paremeters (Daniel Heule)
* Type __line: Use printf instead of echo for printing user input * Type __line: Use printf instead of echo for printing user input
* Type __qemu_img: Use default paremeters (Daniel Heule)
* Type __zypper_repo: Use default paremeters (Daniel Heule)
* Type __zypper_service: Use default paremeters (Daniel Heule)
3.0.2: 2014-01-19 3.0.2: 2014-01-19
* Documentation: Document all messages sent by types (Daniel Heule) * Documentation: Document all messages sent by types (Daniel Heule)