Browse Source

restructure explorer

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
1.0
Nico Schottelius 12 years ago
parent
commit
d171ad5e64
  1. 3
      ROADMAP
  2. 4
      bin/cdist-deploy-to
  3. 5
      conf/explorer/hostname
  4. 20
      conf/explorer/os
  5. 3
      doc/man/cdist-explorer.text

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?

4
bin/cdist-deploy-to

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

5
conf/explorer/hostname

@ -19,7 +19,4 @@
#
#
cdist_explore_hostname()
{
hostname
}
hostname

20
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

3
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/<explorer_name>.
SEE ALSO
--------
cdist(7)

Loading…
Cancel
Save