diff --git a/ROADMAP b/ROADMAP index bb42930a..5e1f1d65 100644 --- a/ROADMAP +++ b/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? diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index 0cd73fdb..02e0a3a0 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -23,13 +23,13 @@ . cdist-config -[ $# -eq 1 ] || __cdist_usage "target_host" +[ $# -eq 1 ] || __cdist_usage "" 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" diff --git a/conf/explorer/hostname b/conf/explorer/hostname index dbc0df1b..49e0d2cc 100755 --- a/conf/explorer/hostname +++ b/conf/explorer/hostname @@ -19,7 +19,4 @@ # # -cdist_explore_hostname() -{ - hostname -} +hostname diff --git a/conf/explorer/os b/conf/explorer/os index 76c3f896..d460cab3 100755 --- a/conf/explorer/os +++ b/conf/explorer/os @@ -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 diff --git a/doc/man/cdist-explorer.text b/doc/man/cdist-explorer.text index a0b1d63a..45022f31 100644 --- a/doc/man/cdist-explorer.text +++ b/doc/man/cdist-explorer.text @@ -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/. + SEE ALSO -------- cdist(7)