restructure explorer
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
3d556d0448
commit
d171ad5e64
5 changed files with 16 additions and 19 deletions
3
ROADMAP
3
ROADMAP
|
@ -5,7 +5,8 @@ x Define how to get information from clients
|
|||
x Create configuration tree from manifest
|
||||
x write binaries, which create the tree when called from manifest (cdist_tree_wrapper)
|
||||
x Define configuration paths (doc/internal/config-layout)
|
||||
- Write at least one type
|
||||
- redo explorers (see manpage)
|
||||
/ Write at least one type
|
||||
- Parse configuration tree / generate code to be executed on client
|
||||
- types?
|
||||
- can/may types modify tree?
|
||||
|
|
|
@ -23,13 +23,13 @@
|
|||
|
||||
. cdist-config
|
||||
|
||||
[ $# -eq 1 ] || __cdist_usage "target_host"
|
||||
[ $# -eq 1 ] || __cdist_usage "<target host>"
|
||||
|
||||
set -e
|
||||
|
||||
# Internal variables, usable by
|
||||
export __cdist_target_host="$1"
|
||||
export __cdist_intern_deploy_host="$(cdist_explore_hostname)"
|
||||
export __cdist_source_host="$(cdist_explore_hostname)"
|
||||
|
||||
. cdist-build "$__cdist_intern_target_host"
|
||||
. cdist-remote-exec "$__cdist_intern_target_host"
|
||||
|
|
|
@ -19,7 +19,4 @@
|
|||
#
|
||||
#
|
||||
|
||||
cdist_explore_hostname()
|
||||
{
|
||||
hostname
|
||||
}
|
||||
hostname
|
||||
|
|
|
@ -22,18 +22,14 @@
|
|||
#
|
||||
#
|
||||
|
||||
cdist_explore_os()
|
||||
{
|
||||
# Ubuntu is also Debian, thus return if Ubuntu was found
|
||||
if grep -q ^DISTRIB_ID=Ubuntu /etc/lsb-release 2>/dev/null; then
|
||||
echo ubuntu
|
||||
return
|
||||
fi
|
||||
# Ubuntu is also Debian, thus return if Ubuntu was found
|
||||
if grep -q ^DISTRIB_ID=Ubuntu /etc/lsb-release 2>/dev/null; then
|
||||
echo ubuntu
|
||||
exit 0
|
||||
fi
|
||||
|
||||
[ -f /etc/arch-release ] && echo archlinux
|
||||
[ -f /etc/arch-release ] && echo archlinux
|
||||
|
||||
[ -f /etc/debian_version ] && echo debian
|
||||
[ -f /etc/debian_version ] && echo debian
|
||||
|
||||
[ -f /etc/redhat-release ] && echo redhat
|
||||
|
||||
}
|
||||
[ -f /etc/redhat-release ] && echo redhat
|
||||
|
|
|
@ -23,6 +23,9 @@ In case of significant errors, the shell script may exit
|
|||
non-zero and return an error message on stderr, which
|
||||
will cause the cdist run to abort.
|
||||
|
||||
Explorers can reuse other explorers on the target system
|
||||
by calling $__cdist_explorer_path/<explorer_name>.
|
||||
|
||||
SEE ALSO
|
||||
--------
|
||||
cdist(7)
|
||||
|
|
Loading…
Reference in a new issue