add parameter to run curl in insecure mode: thanks Thorsten!
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
parent
a231898397
commit
f9cac131c9
3 changed files with 13 additions and 2 deletions
|
@ -22,8 +22,11 @@ uri="$(cat "$__object/parameter/uri" 2>/dev/null \
|
|||
|| echo "$__object_id")"
|
||||
target="$(cat "$__object/parameter/target")"
|
||||
|
||||
|
||||
[ "$__debug" = "yes" ] && curl="curl" || curl="curl -s"
|
||||
[ "$__debug" = "yes" ] && tar="tar -xvzp" || tar="tar -xzp"
|
||||
|
||||
if [ -f "$__object/parameter/insecure" ] ; then
|
||||
curl="$curl -k"
|
||||
fi
|
||||
|
||||
echo "$curl '$uri' | $tar -C '$target'"
|
||||
|
|
|
@ -30,6 +30,12 @@ target::
|
|||
where to unpack the tarball to. Defaults to /target.
|
||||
|
||||
|
||||
BOOLEAN PARAMETERS
|
||||
------------------
|
||||
insecure::
|
||||
run curl in insecure mode so it does not check the servers ssl certificate
|
||||
|
||||
|
||||
EXAMPLES
|
||||
--------
|
||||
|
||||
|
@ -37,6 +43,7 @@ EXAMPLES
|
|||
__install_stage --uri tftp:///path/to/stage.tgz
|
||||
__install_stage --uri http://path/to/stage.tgz --target /mnt/foobar
|
||||
__install_stage --uri file:///path/to/stage.tgz --target /target
|
||||
__install_stage --uri https://path/to/stage.tgz --target /mnt/foobar --insecure
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
@ -47,5 +54,5 @@ SEE ALSO
|
|||
|
||||
COPYING
|
||||
-------
|
||||
Copyright \(C) 2011 Steven Armstrong. Free use of this software is
|
||||
Copyright \(C) 2011 - 2013 Steven Armstrong. Free use of this software is
|
||||
granted under the terms of the GNU General Public License version 3 (GPLv3).
|
||||
|
|
1
cdist/conf/type/__install_stage/parameter/boolean
Normal file
1
cdist/conf/type/__install_stage/parameter/boolean
Normal file
|
@ -0,0 +1 @@
|
|||
insecure
|
Loading…
Reference in a new issue