diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 45c10d7b..00000000 --- a/.gitattributes +++ /dev/null @@ -1,8 +0,0 @@ -.gitignore export-ignore -.gitattributes export-ignore -.gitkeep export-ignore -docs/speeches export-ignore -docs/video export-ignore -docs/src/man7 export-ignore -bin/build-helper export-ignore -README-maintainers export-ignore diff --git a/.gitignore b/.gitignore index 4b80b425..10d98990 100644 --- a/.gitignore +++ b/.gitignore @@ -1,61 +1,15 @@ # -vim -# Swap -[._]*.s[a-v][a-z] -[._]*.sw[a-p] -[._]s[a-rt-v][a-z] -[._]ss[a-gi-z] -[._]sw[a-p] - -# Session -Session.vim - -# Temporary -.netrwhist -*~ -*.tmp -# Auto-generated tag files -tags -# Persistent undo -[._]*.un~ +.*.swp # Ignore generated manpages -docs/src/.marker -docs/src/man1/*.1 -docs/src/man7/*.7 -docs/src/man7/cdist-type__*.rst -docs/src/cdist-reference.rst +doc/man/.marker +doc/man/man1/*.1 +doc/man/man7/*.7 +doc/man/man*/*.html +doc/man/man*/*.xml +doc/man/man7/cdist-type__*.text +doc/man/man7/cdist-reference.text +doc/man/man*/docbook-xsl.css -# Ignore cdist cache for version control -/cache/ - -# Ignore inventory basedir -cdist/inventory/ - -# Python: cache, distutils, distribution in general -__pycache__/ -*.pyc -MANIFEST -dist/ -cdist/version.py -cdist.egg-info/ - -# sphinx build dirs, cache -_build/ -docs/dist - -# Ignore temp files used for signing -cdist-*.tar -cdist-*.tar.gz -cdist-*.tar.gz.asc - -# Packaging: Archlinux -/PKGBUILD -/cdist-*.pkg.tar.xz -/cdist-*.tar.gz -/pkg -/src -build -.lock-* -.git-current-branch -.lock* -.pypi-release +# Ignore cache for version control +cache/ diff --git a/BUG b/BUG new file mode 100644 index 00000000..9d57ee49 --- /dev/null +++ b/BUG @@ -0,0 +1 @@ +See core/__cdist_object_run. diff --git a/HACKERS_README b/HACKERS_README new file mode 100755 index 00000000..ad3fe3fd --- /dev/null +++ b/HACKERS_README @@ -0,0 +1,40 @@ +cat << eof + +Hey hackers, + +this README is for you, for those who want to dig into cdist, hack it or try +to get a deeper understanding. Please read doc/man/man7/cdist-hacker.text. + +I hope you have a lot of fun with cdist, because it was also a lot of fun to +develop it! + + -- Nico, 20110324 + +## Running cdist when developing + +This file is suitable for execution and saving the objects and +explorers from cdist. I usually do it like this: + + % ./HACKERS_README + +################################################################################ +eof + +set -x +# Tell the user what we do, so this script makes sense during execution + +# prepare use (only from top level directory) +export PATH="$(pwd -P)/bin:$PATH" +export __cdist_conf_dir="$(pwd -P)/conf" + +# Allow user to supply hostname +target="${1:-localhost}" + +# And use hostname as basedir (dangerous, but hackers know what they do) +export __cdist_local_base_dir="/tmp/$target" + +# Run the real script +cdist-deploy-to "$target" + +# Display results +find "${__cdist_local_base_dir}" diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index a675f446..00000000 --- a/MANIFEST.in +++ /dev/null @@ -1,3 +0,0 @@ -include docs/changelog -recursive-include docs/gfx *.png *.text -recursive-include docs *.text *.html *.1 *.7 diff --git a/Makefile b/Makefile deleted file mode 100644 index fa3327d1..00000000 --- a/Makefile +++ /dev/null @@ -1,134 +0,0 @@ -# -# 2013 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -.PHONY: help -help: - @echo "Please use \`make ' where is one of" - @echo "man build only man user documentation" - @echo "html build only html user documentation" - @echo "docs build both man and html user documentation" - @echo "dotman build man pages for types in your ~/.cdist directory" - @echo "speeches build speeches pdf files" - @echo "install install in the system site-packages directory" - @echo "install-user install in the user site-packages directory" - @echo "docs-clean clean documentation" - @echo "clean clean" - -DOCS_SRC_DIR=./docs/src -SPEECHDIR=./docs/speeches -TYPEDIR=./cdist/conf/type - -SPHINXM=make -C $(DOCS_SRC_DIR) man -SPHINXH=make -C $(DOCS_SRC_DIR) html -SPHINXC=make -C $(DOCS_SRC_DIR) clean - -################################################################################ -# Manpages -# -MAN7DSTDIR=$(DOCS_SRC_DIR)/man7 - -# Manpages #1: Types -# Use shell / ls to get complete list - $(TYPEDIR)/*/man.rst does not work -# Using ls does not work if no file with given pattern exist, so use wildcard -MANTYPESRC=$(wildcard $(TYPEDIR)/*/man.rst) -MANTYPEPREFIX=$(subst $(TYPEDIR)/,$(MAN7DSTDIR)/cdist-type,$(MANTYPESRC)) -MANTYPES=$(subst /man.rst,.rst,$(MANTYPEPREFIX)) - -# Link manpage: do not create man.html but correct named file -$(MAN7DSTDIR)/cdist-type%.rst: $(TYPEDIR)/%/man.rst - mkdir -p $(MAN7DSTDIR) - ln -sf "../../../$^" $@ - -# Manpages #2: reference -DOCSREF=$(MAN7DSTDIR)/cdist-reference.rst -DOCSREFSH=$(DOCS_SRC_DIR)/cdist-reference.rst.sh - -$(DOCSREF): $(DOCSREFSH) - $(DOCSREFSH) - -version: - @[ -f "cdist/version.py" ] || { \ - printf "Missing 'cdist/version.py', please generate it first.\n" && exit 1; \ - } - -# Manpages #3: generic part -man: version $(MANTYPES) $(DOCSREF) - $(SPHINXM) - -html: version $(MANTYPES) $(DOCSREF) - $(SPHINXH) - -docs: man html - -docs-clean: - $(SPHINXC) - -# Manpages: .cdist Types -DOT_CDIST_PATH=${HOME}/.cdist -DOTMAN7DSTDIR=$(MAN7DSTDIR) -DOTTYPEDIR=$(DOT_CDIST_PATH)/type -DOTMANTYPESRC=$(wildcard $(DOTTYPEDIR)/*/man.rst) -DOTMANTYPEPREFIX=$(subst $(DOTTYPEDIR)/,$(DOTMAN7DSTDIR)/cdist-type,$(DOTMANTYPESRC)) -DOTMANTYPES=$(subst /man.rst,.rst,$(DOTMANTYPEPREFIX)) - -# Link manpage: do not create man.html but correct named file -$(DOTMAN7DSTDIR)/cdist-type%.rst: $(DOTTYPEDIR)/%/man.rst - ln -sf "$^" $@ - -dotman: version $(DOTMANTYPES) - $(SPHINXM) - -################################################################################ -# Speeches -# -SPEECHESOURCES=$(SPEECHDIR)/*.tex -SPEECHES=$(SPEECHESOURCES:.tex=.pdf) - -# Create speeches and ensure Toc is up-to-date -$(SPEECHDIR)/%.pdf: $(SPEECHDIR)/%.tex - pdflatex -output-directory $(SPEECHDIR) $^ - pdflatex -output-directory $(SPEECHDIR) $^ - pdflatex -output-directory $(SPEECHDIR) $^ - -speeches: $(SPEECHES) - -################################################################################ -# Misc -# -clean: docs-clean - rm -f $(DOCS_SRC_DIR)/cdist-reference.rst - - find "$(DOCS_SRC_DIR)" -mindepth 2 -type l \ - | xargs rm -f - - find * -name __pycache__ | xargs rm -rf - - # distutils - rm -rf ./build - -################################################################################ -# install -# - -install: - python3 setup.py install - -install-user: - python3 setup.py install --user diff --git a/PKGBUILD.in b/PKGBUILD.in deleted file mode 100755 index c0188e68..00000000 --- a/PKGBUILD.in +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh - -version="$1" -outfile=${0%.in} - -cat << eof > "${outfile}" -pkgname=cdist -pkgver=$version -pkgrel=1 -pkgdesc='A Usable Configuration Management System"' -arch=('any') -url='https://www.cdi.st/' -license=('GPL3') -depends=('python>=3.2.0') -source=("http://pypi.python.org/packages/source/c/cdist/cdist-\${pkgver}.tar.gz") - -package() { - cd cdist-\${pkgver} - python3 setup.py build install --root="\${pkgdir}" - find "\$pkgdir" -type d -exec chmod 0755 {} \; - find "\$pkgdir" -type f -exec chmod a+r {} \; -} -eof - -makepkg -g >> "${outfile}" - -# Fix this issue: -# error: failed to upload cdist-3.1.6-1.src.tar.gz: Error - all files must have permissions of 644 or 755. -chmod a+r "${outfile}" diff --git a/README b/README index caf2dac8..295b9152 100644 --- a/README +++ b/README @@ -1,7 +1,240 @@ -cdist ------ +[[!meta title="cdist - usable configuration management"]] + + + .. . .x+=:. s + dF @88> z` ^% :8 + '88bu. %8P . origin/ + + # Stay on a specific version + version=1.7 + git checkout -b $version origin/$version + +### Mirrors + + * git://github.com/telmich/cdist.git ([github](https://github.com/telmich/cdist)) + * git://git.sans.ethz.ch/cdist ([sans](http://git.sans.ethz.ch/?p=cdist;a=summary)) + +## Update + +To upgrade cdist in the current branch use + + git pull + + # Also update the manpages + ./build.sh man + export MANPATH=$MANPATH:$(pwd -P)/doc/man + +If you stay on a version branche (i.e. 1.0, 1.1., ...), nothing should break. +The master branch on the other hand is the development branch and may not be +working, break your setup or eat the tree in your garden. + +### Upgrading from 1.6 to 1.7 + +* If you used the global explorer **hardware_type**, you need to change + your code to use **machine** instead. + +### Upgrading from 1.5 to 1.6 + +* If you used **\_\_package_apt --preseed**, you need to use the new + type **\_\_debconf_set_selections** instead. +* The **\_\_package** types accepted either --state deinstalled or + --state uninstaaled. Starting with 1.6, it was made consistently + to --state removed. + +### Upgrading from 1.3 to 1.5 + +No incompatiblities. + +### Upgrading from 1.2 to 1.3 + +Rename **gencode** of every type to **gencode-remote**. + +### Upgrading from 1.1 to 1.2 + +No incompatiblities. + +### Upgrading from 1.0 to 1.1 + +In 1.1 the type **\_\_file** was split into **\_\_directory**, **\_\_file** and +**\_\_link**. The parameter **--type** was removed from **\_\_file**. Thus you +need to replace **\_\_file** calls in your manifests: + + * Remove --type from all \_\_file calls + * If type was symlink, use \_\_link and --type symbolic + * If type was directory, use \_\_directory + + +## Support + +### IRC + +You can join the development ***IRC channel*** +[#cstar on irc.freenode.org](irc://irc.freenode.org/#cstar). + +### Mailing list + +Bug reports, questions, patches, etc. should be send to the +[cdist mailing list](http://l.schottelius.org/mailman/listinfo/cdist). + +### Commercial support + +You can request commercial support for cdist from +[my company](http://firma.schottelius.org/english/). + +## Used by + +If you're using cdist, feel free to send a report to the mailing list. +Interesting information are for instance + + * Which services do you manage? + * How many machines do you manage? + * What are the pros/cons you see in cdist? + * General comments/critics + +### Nico Schottelius, Systems Group ETH Zurich and privately + +Yes, I'm actually eating my own dogfood and currently managing + + * [plone](http://plone.org/) (cms) + * [moinmoin](http://moinmo.in/) (wiki) + * [apache](http://httpd.apache.org/) (webserver) + * [kerberos (mit)](http://web.mit.edu/kerberos/) (authentication) + * [nss-pam-ldapd](http://arthurdejong.org/nss-pam-ldapd/) (authentication) + * [ircd-hybrid](http://www.ircd-hybrid.org/) (chat) + * [stunnel](http://stunnel.mirt.net/) (SSL tunnel) + * [mercurial-server](http://www.lshift.net/mercurial-server.html) (version control) + * [xfce](http://www.xfce.org/) (lightweight desktop environment) + * [slim](http://slim.berlios.de/) (graphical login manager for X11) + +with cdist on more than **60** production machines of the +[Systems Group](http://www.systems.ethz.ch) at the +[ETH Zurich](http://www.ethz.ch) as well at home. + +### Steven Armstrong, CBRG ETH Zurich + +The CBRG is managing most of their compute clusters with cdist. -cdist is a usable configuration management system. -For the web documentation have a look at https://www.cdi.st/ -or at docs/src for reStructuredText manual. diff --git a/README-maintainers b/README-maintainers deleted file mode 100644 index af57f475..00000000 --- a/README-maintainers +++ /dev/null @@ -1,4 +0,0 @@ -Maintainers should use ./bin/build-helper script. - -Makefile is intended for end users. It can be used for non-maintaining -targets that can be run from pure source (without git repository). diff --git a/bin/build-helper b/bin/build-helper deleted file mode 100755 index 9a776491..00000000 --- a/bin/build-helper +++ /dev/null @@ -1,550 +0,0 @@ -#!/bin/sh -# -# 2011-2013 Nico Schottelius (nico-cdist at schottelius.org) -# 2016-2019 Darko Poljak (darko.poljak at gmail.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# This file contains the heavy lifting found usually in the Makefile. -# - -usage() { - printf "usage: %s TARGET [TARGET-ARGS...] - Available targets: - changelog-changes - changelog-version - check-date - check-unittest - ml-release - archlinux-release - pypi-release - release-git-tag - sign-git-release - release - test - test-remote - pycodestyle - pep8 - check-pycodestyle - shellcheck-global-explorers - shellcheck-type-explorers - shellcheck-manifests - shellcheck-local-gencodes - shellcheck-remote-gencodes - shellcheck-scripts - shellcheck-gencodes - shellcheck-types - shellcheck - shellcheck-type-files - shellcheck-with-files - shellcheck-build-helper - check-shellcheck - version-branch - version - target-version - clean - distclean\n" "$1" -} - -basename="${0##*/}" - -if [ $# -lt 1 ] -then - usage "${basename}" - exit 1 -fi - -option=$1; shift - -SHELLCHECKCMD="shellcheck -s sh -f gcc -x" -# Skip SC2154 for variables starting with __ since such variables are cdist -# environment variables. -SHELLCHECK_SKIP=': __.*is referenced but not assigned.*\[SC2154\]' - -# Change to checkout directory -basedir="${0%/*}/../" -cd "$basedir" - -case "$option" in - changelog-changes) - if [ "$#" -eq 1 ]; then - start=$1 - else - start="[[:digit:]]" - fi - - end="[[:digit:]]" - - awk -F: "BEGIN { start=0 } - { - if(start == 0) { - if (\$0 ~ /^$start/) { - start = 1 - } - } else { - if (\$0 ~ /^$end/) { - exit - } else { - print \$0 - } - } - }" "$basedir/docs/changelog" - ;; - - changelog-version) - # get version from changelog - grep '^[[:digit:]]' "$basedir/docs/changelog" | head -n1 | sed 's/:.*//' - ;; - - check-date) - # verify date in changelog is today - date_today="$(date +%Y-%m-%d)" - date_changelog=$(grep '^[[:digit:]]' "$basedir/docs/changelog" | head -n1 | sed 's/.*: //') - - if [ "$date_today" != "$date_changelog" ]; then - printf "Date in changelog is not today\n" - printf "Changelog date: %s\n" "${date_changelog}" - exit 1 - fi - ;; - - check-unittest) - "$0" test - ;; - - ml-release) - if [ $# -ne 1 ]; then - printf "%s ml-release version\n" "$0" >&2 - exit 1 - fi - - version=$1; shift - - ( - cat << eof -Subject: cdist $version has been released - -Hello .*, - -cdist $version has been released with the following changes: - -eof - - "$0" changelog-changes "$version" - cat << eof - -eof - ) > mailinglist.tmp - ;; - - archlinux-release) - if [ $# -ne 1 ]; then - printf "%s archlinux-release version\n" "$0" >&2 - exit 1 - fi - version=$1; shift - - ARCHLINUXTAR="cdist-${version}-1.src.tar.gz" - ./PKGBUILD.in "${version}" - umask 022 - mkaurball - burp -c system "${ARCHLINUXTAR}" - ;; - - pypi-release) - # Ensure that pypi release has the right version - "$0" version - - make docs-clean - make docs - python3 setup.py sdist upload - ;; - - release-git-tag) - target_version=$($0 changelog-version) - if git rev-parse --verify "refs/tags/${target_version}" 2>/dev/null; then - printf "Tag for %s exists, aborting\n" "${target_version}" - exit 1 - fi - printf "Enter tag description for %s: " "${target_version}" - read -r tagmessage - - # setup for signed tags: - # gpg --fulL-gen-key - # gpg --list-secret-keys --keyid-format LONG - # git config --local user.signingkey - # for exporting pub key: - # gpg --armor --export > pubkey.asc - # gpg --output pubkey.gpg --export - # show tag with signature - # git show - # verify tag signature - # git tag -v - # - # gpg verify signature - # gpg --verify - # gpg --no-default-keyring --keyring --verify - # Ensure gpg-agent is running. - GPG_TTY=$(tty) - export GPG_TTY - gpg-agent - - git tag -s "$target_version" -m "$tagmessage" - git push --tags - ;; - - sign-git-release) - if [ $# -lt 2 ] - then - printf "usage: %s sign-git-release TAG TOKEN [ARCHIVE]\n" "$0" - printf " if ARCHIVE is not specified then it is created\n" - exit 1 - fi - tag="$1" - if ! git rev-parse -q --verify "${tag}" >/dev/null 2>&1 - then - printf "Tag \"%s\" not found.\n" "${tag}" - exit 1 - fi - token="$2" - if [ $# -gt 2 ] - then - archivename="$3" - else - archivename="cdist-${tag}.tar" - git archive --prefix="cdist-${tag}/" -o "${archivename}" "${tag}" \ - || exit 1 - # make sure target version is generated - "$0" target-version - tar -x -f "${archivename}" || exit 1 - cp cdist/version.py "cdist-${tag}/cdist/version.py" || exit 1 - tar -c -f "${archivename}" "cdist-${tag}/" || exit 1 - rm -r -f "cdist-${tag}/" - gzip "${archivename}" || exit 1 - archivename="${archivename}.gz" - fi - gpg --armor --detach-sign "${archivename}" || exit 1 - - project="ungleich-public%2Fcdist" - sed_cmd='s/^.*"markdown":"\([^"]*\)".*$/\1/' - - # upload archive - response_archive=$(curl -f -X POST \ - --http1.1 \ - -H "PRIVATE-TOKEN: ${token}" \ - -F "file=@${archivename}" \ - "https://code.ungleich.ch/api/v4/projects/${project}/uploads" \ - | sed "${sed_cmd}") || exit 1 - - # upload archive signature - response_archive_sig=$(curl -f -X POST \ - --http1.1 \ - -H "PRIVATE-TOKEN: ${token}" \ - -F "file=@${archivename}.asc" \ - "https://code.ungleich.ch/api/v4/projects/${project}/uploads" \ - | sed "${sed_cmd}") || exit 1 - - # make release - changelog=$("$0" changelog-changes "$1" | sed 's/^[[:space:]]*//') - release_notes=$( - printf "%s\n\n%s\n\n**Changelog**\n\n%s\n" \ - "${response_archive}" "${response_archive_sig}" "${changelog}" - ) - curl -f -X POST \ - -H "PRIVATE-TOKEN: ${token}" \ - -F "description=${release_notes}" \ - "https://code.ungleich.ch/api/v4/projects/${project}/repository/tags/${tag}/release" \ - || exit 1 - - # remove generated files (archive and asc) - if [ $# -eq 2 ] - then - rm -f "${archivename}" - fi - rm -f "${archivename}.asc" - ;; - - release) - set -e - target_version=$($0 changelog-version) - target_branch=$($0 version-branch) - - printf "Beginning release process for %s\n" "${target_version}" - - # First check everything is sane - "$0" check-date - "$0" check-unittest - "$0" check-pycodestyle - "$0" check-shellcheck - - # Generate version file to be included in packaging - "$0" target-version - - # Ensure the git status is clean, else abort - if ! git diff-index --name-only --exit-code HEAD ; then - printf "Unclean tree, see files above, aborting.\n" - exit 1 - fi - - # Ensure we are on the master branch - masterbranch=yes - if [ "$(git rev-parse --abbrev-ref HEAD)" != "master" ]; then - printf "Releases are happening from the master branch, aborting.\n" - - printf "Enter the magic word to release anyway:" - read -r magicword - - if [ "$magicword" = "iknowwhatido" ]; then - masterbranch=no - else - exit 1 - fi - fi - - if [ "$masterbranch" = yes ]; then - # Ensure version branch exists - if ! git rev-parse --verify "refs/heads/${target_branch}" 2>/dev/null; then - git branch "$target_branch" - fi - - # Merge master branch into version branch - git checkout "$target_branch" - git merge master - fi - - # Verify that after the merge everything works - "$0" check-date - "$0" check-unittest - - # Generate documentation (man and html) - # First, clean old generated docs - make docs-clean - make docs - - ############################################################# - # Everything green, let's do the release - - # Tag the current commit - "$0" release-git-tag - - # Also merge back the version branch - if [ "$masterbranch" = yes ]; then - git checkout master - git merge "$target_branch" - fi - - # Publish git changes - # if you want to have mirror locally then uncomment this and comment below - # git push --mirror - git push - # push also new branch and set up tracking - git push -u origin "${target_branch}" - # fi - - # Create and publish package for pypi - "$0" pypi-release - - # sign git tag - printf "Enter upstream repository authentication token: " - read -r token - "$0" sign-git-release "${target_version}" "${token}" - - # Announce change on ML - "$0" ml-release "${target_version}" - - cat << eof -Manual steps post release: - - cdist-web - - send mail body generated in mailinglist.tmp and inform Dmitry for deb - - twitter -eof - ;; - - test) - if [ ! -f "cdist/version.py" ] - then - printf "cdist/version.py is missing, generate it first.\n" - exit 1 - fi - - PYTHONPATH="$(pwd -P)" - export PYTHONPATH - - if [ $# -lt 1 ]; then - python3 -m cdist.test - else - python3 -m unittest "$@" - fi - ;; - - test-remote) - if [ ! -f "cdist/version.py" ] - then - printf "cdist/version.py is missing, generate it first.\n" - exit 1 - fi - - PYTHONPATH="$(pwd -P)" - export PYTHONPATH - - python3 -m cdist.test.exec.remote - ;; - - pycodestyle|pep8) - pycodestyle "${basedir}" "${basedir}/scripts/cdist" | less - ;; - - check-pycodestyle) - "$0" pycodestyle - printf "\\nPlease review pycodestyle report.\\n" - while true - do - printf "Continue (yes/no)?\n" - any= - read -r any - case "$any" in - yes) - break - ;; - no) - exit 1 - ;; - *) - printf "Please answer with 'yes' or 'no' explicitly.\n" - ;; - esac - done - ;; - - shellcheck-global-explorers) - find cdist/conf/explorer -type f -exec ${SHELLCHECKCMD} {} + | grep -v "${SHELLCHECK_SKIP}" || exit 0 - ;; - - shellcheck-type-explorers) - find cdist/conf/type -type f -path "*/explorer/*" -exec ${SHELLCHECKCMD} {} + | grep -v "${SHELLCHECK_SKIP}" || exit 0 - ;; - - shellcheck-manifests) - find cdist/conf/type -type f -name manifest -exec ${SHELLCHECKCMD} {} + | grep -v "${SHELLCHECK_SKIP}" || exit 0 - ;; - - shellcheck-local-gencodes) - find cdist/conf/type -type f -name gencode-local -exec ${SHELLCHECKCMD} {} + | grep -v "${SHELLCHECK_SKIP}" || exit 0 - ;; - - shellcheck-remote-gencodes) - find cdist/conf/type -type f -name gencode-remote -exec ${SHELLCHECKCMD} {} + | grep -v "${SHELLCHECK_SKIP}" || exit 0 - ;; - - shellcheck-scripts) - ${SHELLCHECKCMD} scripts/cdist-dump scripts/cdist-new-type || exit 0 - ;; - - shellcheck-gencodes) - "$0" shellcheck-local-gencodes - "$0" shellcheck-remote-gencodes - ;; - - shellcheck-types) - "$0" shellcheck-type-explorers - "$0" shellcheck-manifests - "$0" shellcheck-gencodes - ;; - - shellcheck) - "$0" shellcheck-global-explorers - "$0" shellcheck-types - "$0" shellcheck-scripts - ;; - - shellcheck-type-files) - find cdist/conf/type -type f -path "*/files/*" -exec ${SHELLCHECKCMD} {} + | grep -v "${SHELLCHECK_SKIP}" || exit 0 - ;; - - shellcheck-with-files) - "$0" shellcheck - "$0" shellcheck-type-files - ;; - - shellcheck-build-helper) - ${SHELLCHECKCMD} ./bin/build-helper - ;; - - check-shellcheck) - "$0" shellcheck - printf "\\nPlease review shellcheck report.\\n" - while true - do - printf "Continue (yes/no)?\n" - any= - read -r any - case "$any" in - yes) - break - ;; - no) - exit 1 - ;; - *) - printf "Please answer with 'yes' or 'no' explicitly.\n" - ;; - esac - done - ;; - - version-branch) - "$0" changelog-version | cut -d. -f '1,2' - ;; - - version) - printf "VERSION = \"%s\"\n" "$(git describe)" > cdist/version.py - ;; - - target-version) - target_version=$($0 changelog-version) - printf "VERSION = \"%s\"\n" "${target_version}" > cdist/version.py - ;; - - clean) - make clean - - # Archlinux - rm -f cdist-*.pkg.tar.xz cdist-*.tar.gz - rm -rf pkg/ src/ - - rm -f MANIFEST PKGBUILD - rm -rf dist/ - - # Signed release - rm -f cdist-*.tar.gz - rm -f cdist-*.tar.gz.asc - - # Temp files - rm -f ./*.tmp - ;; - - distclean) - "$0" clean - rm -f cdist/version.py - ;; - *) - printf "Unknown target: '%s'.\n" "${option}" >&2 - usage "${basename}" - exit 1 - ;; - -esac diff --git a/bin/cdist-config b/bin/cdist-config new file mode 100644 index 00000000..b15d1f3e --- /dev/null +++ b/bin/cdist-config @@ -0,0 +1,355 @@ +#!/bin/sh +# +# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# + +__cdist_version="1.8.0" + +# +# Enable debugging: +# +# __cdist_debug unset -> no debug +# __cdist_debug = 1 -> debug via __cdist_echo +# __cdist_debug = 2 -> debug via set -x +# + +: ${__cdist_debug:=0} +[ "$__cdist_debug" = 2 ] && set -x + +# Fail if something bogus is going on +set -u + +################################################################################ +# cconf standard vars prefixed with cdist + +__cdist_pwd="$(pwd -P)" +__cdist_mydir="${0%/*}"; +__cdist_abs_mydir="$(cd "$__cdist_mydir" && pwd -P)" +__cdist_myname=${0##*/}; +__cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" + +################################################################################ +# Names / Constants +# +# Most values can be overriden from outside, so you can +# customise paths as you like (for distributors, geeks and hackers) +# + +: ${__cdist_name_bin:=bin} +: ${__cdist_name_cache:=cache} +: ${__cdist_name_code:=code} +: ${__cdist_name_conf_dir:=conf} +: ${__cdist_name_core_dir:=core} +: ${__cdist_name_dot_cdist:=.cdist} +: ${__cdist_name_explorer:=explorer} +: ${__cdist_name_gencode:=gencode} +: ${__cdist_name_gencode_local:=local} +: ${__cdist_name_gencode_remote:=remote} +: ${__cdist_name_global:=global} +: ${__cdist_name_host:=host} +: ${__cdist_name_init:=init} +: ${__cdist_name_manifest:=manifest} +: ${__cdist_name_object:=object} +: ${__cdist_name_object_finished:=done} +: ${__cdist_name_object_prepared:=prepared} +: ${__cdist_name_object_id:=object_id} +: ${__cdist_name_object_source:=source} +: ${__cdist_name_objects_created:=.objects_created} +: ${__cdist_name_out_dir:=out} +: ${__cdist_name_parameter:=parameter} +: ${__cdist_name_parameter_required:=required} +: ${__cdist_name_parameter_optional:=optional} +: ${__cdist_name_require:=require} +: ${__cdist_name_self:=self} +: ${__cdist_name_singleton:=singleton} +: ${__cdist_name_target_host:=target_host} +: ${__cdist_name_target_user:=target_user} +: ${__cdist_name_type:=type} +: ${__cdist_name_type_bin:=type_bin} +: ${__cdist_name_type_explorer:=type_explorer} +: ${__cdist_name_type_explorer_pushed:=.explorer_pushed} + +# Used for IDs: Allow everything not starting with - and . +: ${__cdist_sane_regexp:=[^-\.].*} + +# Default remote user +: ${__cdist_remote_user:=root} + + +################################################################################ +# Exported variable names (usable for non core) +# +: ${__cdist_name_var_explorer:=__$__cdist_name_explorer} +: ${__cdist_name_var_type_explorer:=__$__cdist_name_type_explorer} +: ${__cdist_name_var_global:=__$__cdist_name_global} +: ${__cdist_name_var_manifest:=__$__cdist_name_manifest} +: ${__cdist_name_var_target_host:=__$__cdist_name_target_host} +: ${__cdist_name_var_target_user:=__$__cdist_name_target_user} +: ${__cdist_name_var_object:=__$__cdist_name_object} +: ${__cdist_name_var_object_id:=__$__cdist_name_object_id} +: ${__cdist_name_var_self:=__$__cdist_name_self} +: ${__cdist_name_var_type:=__$__cdist_name_type} + + +################################################################################ +# Tempfiles +# +: ${__cdist_tmp_base_dir=/tmp} +__cdist_tmp_dir=$(mktemp -d "$__cdist_tmp_base_dir/cdist.XXXXXXXXXXXX") +__cdist_tmp_file=$(mktemp "$__cdist_tmp_dir/cdist.XXXXXXXXXXXX") + +################################################################################ +# Local Base +# +: ${__cdist_local_base_dir:=$__cdist_tmp_dir} + +# Cache may *NOT* be below __cdist_local_base_dir! +: ${__cdist_local_base_cache_dir:=$__cdist_abs_mydir/../$__cdist_name_cache} + +: ${__cdist_conf_dir:="$(cd "$__cdist_abs_mydir/../conf" && pwd -P)"} +: ${__cdist_core_dir:="$(cd "$__cdist_abs_mydir/../$__cdist_name_core_dir" && pwd -P)"} + +: ${__cdist_explorer_dir:=$__cdist_conf_dir/$__cdist_name_explorer} +: ${__cdist_manifest_dir:=$__cdist_conf_dir/$__cdist_name_manifest} +: ${__cdist_manifest_init:=$__cdist_manifest_dir/$__cdist_name_init} +: ${__cdist_type_dir:=$__cdist_conf_dir/$__cdist_name_type} + +################################################################################ +# Local output +# +: ${__cdist_out_dir:=$__cdist_local_base_dir/$__cdist_name_out_dir} +: ${__cdist_out_explorer_dir:=$__cdist_out_dir/$__cdist_name_explorer} +: ${__cdist_out_object_dir:=$__cdist_out_dir/$__cdist_name_object} +: ${__cdist_out_type_dir:=$__cdist_out_dir/$__cdist_name_type} +: ${__cdist_out_type_bin_dir:=$__cdist_out_dir/$__cdist_name_type_bin} + +: ${__cdist_objects_created:=$__cdist_out_object_dir/$__cdist_name_objects_created} + +################################################################################ +# Remote base +# +: ${__cdist_remote_base_dir:=/var/lib/cdist} +: ${__cdist_remote_bin_dir:=$__cdist_remote_base_dir/$__cdist_name_bin} +: ${__cdist_remote_conf_dir:=$__cdist_remote_base_dir/$__cdist_name_conf_dir} +: ${__cdist_remote_core_dir:=$__cdist_remote_base_dir/$__cdist_name_core_dir} + +: ${__cdist_remote_explorer_dir:=$__cdist_remote_conf_dir/$__cdist_name_explorer} +: ${__cdist_remote_type_dir:=$__cdist_remote_conf_dir/$__cdist_name_type} + +################################################################################ +# Remote output +# +: ${__cdist_remote_out_dir:=$__cdist_remote_base_dir/$__cdist_name_out_dir} +: ${__cdist_remote_out_explorer_dir:=$__cdist_remote_out_dir/$__cdist_name_explorer} +: ${__cdist_remote_out_object_dir:=$__cdist_remote_out_dir/$__cdist_name_object} + + +################################################################################ +# Internal functions +# + +# *NEW* Load functions from library +for __cdist_lib in $__cdist_core_dir/*; do + # echo Loading $__cdist_lib ... + . "$__cdist_lib" +done + + +################################################################################ +# Cache +# +__cdist_cache_dir() +{ + cd "${__cdist_local_base_cache_dir}" && pwd -P +} + +__cdist_host_cache_dir() +{ + echo "$(__cdist_cache_dir)/$1" +} + +################################################################################ +# Object +# + +__cdist_object_code() +{ + echo "$(__cdist_object_dir "$1")/${__cdist_name_code}-$2" +} + +__cdist_object_prepared() +{ + echo "$(__cdist_object_dir "$1")/${__cdist_name_object_prepared}" +} + +__cdist_object_finished() +{ + echo "$(__cdist_object_dir "$1")/${__cdist_name_object_finished}" +} + +__cdist_object_dir() +{ + echo "$(__cdist_object_base_dir "$1")/${__cdist_name_dot_cdist}" +} + +__cdist_object_base_dir() +{ + echo "${__cdist_out_object_dir}/$1" +} + +__cdist_object_id_from_object() +{ + echo "${1#*/}" +} + +__cdist_object_parameter_dir() +{ + echo "$(__cdist_object_dir "$1")/${__cdist_name_parameter}" +} + +__cdist_object_require() +{ + echo "$(__cdist_object_dir "$1")/${__cdist_name_require}" +} + +__cdist_object_source_name() +{ + echo "$1/${__cdist_name_object_source}" +} + +__cdist_object_source() +{ + cat "$(__cdist_object_source_name "$1")" +} + +__cdist_object_source_add() +{ + echo "$__cdist_manifest" >> "$(__cdist_object_source_name "$1")" +} + +__cdist_object_type_explorer_dir() +{ + echo "$(__cdist_object_dir "$1")/${__cdist_name_explorer}" +} + +################################################################################ +# Remote +# + +__cdist_remote_object_base_dir() +{ + echo "${__cdist_remote_out_object_dir}/$1" +} + +__cdist_remote_object_dir() +{ + echo "$(__cdist_remote_object_base_dir "$1")/${__cdist_name_dot_cdist}" +} + +__cdist_remote_object_code() +{ + # FIXME: this should probably be __cdist_name_CODE_remote instead, although + # they have the same name always + echo "$(__cdist_remote_object_dir "$1")/${__cdist_name_code}-${__cdist_name_gencode_remote}" +} + +__cdist_remote_object_parameter_dir() +{ + echo "$(__cdist_remote_object_dir "$1")/${__cdist_name_parameter}" +} + +__cdist_remote_object_type_explorer_dir() +{ + echo "$(__cdist_remote_object_dir "$1")/${__cdist_name_explorer}" +} + + +__cdist_remote_type_explorer_dir() +{ + echo "${__cdist_remote_type_dir}/$1/${__cdist_name_explorer}" +} + + +################################################################################ +# Traps +# + +# Remove tempfiles at normal exit +trap __cdist_tmp_removal EXIT + + +################################################################################ +# Type +# +__cdist_type_dir() +{ + echo "${__cdist_type_dir}/$1" +} + +__cdist_type_explorer_dir() +{ + echo "${__cdist_type_dir}/$1/${__cdist_name_explorer}" +} + +__cdist_type_from_object() +{ + echo "${1%%/*}" +} + +__cdist_type_explorer_pushed() +{ + [ -f "${__cdist_out_type_dir}/${__cdist_name_type_explorer_pushed}" ] \ + && grep -q "$1" "${__cdist_out_type_dir}/${__cdist_name_type_explorer_pushed}" +} + +__cdist_type_explorer_pushed_add() +{ + [ -d "$__cdist_out_type_dir" ] || mkdir "$__cdist_out_type_dir" + echo "$1" >> "${__cdist_out_type_dir}/${__cdist_name_type_explorer_pushed}" +} + +__cdist_type_gencode() +{ + echo "${__cdist_type_dir}/$1/${__cdist_name_gencode}-$2" +} + +__cdist_type_manifest() +{ + echo "${__cdist_type_dir}/$1/${__cdist_name_manifest}" +} + +__cdist_type_parameter_dir() +{ + echo "$(__cdist_type_dir "$1")/${__cdist_name_parameter}" +} + +__cdist_type_parameter_optional() +{ + echo "$(__cdist_type_parameter_dir "$1")/$__cdist_name_parameter_optional" +} + +__cdist_type_parameter_required() +{ + echo "$(__cdist_type_parameter_dir "$1")/$__cdist_name_parameter_required" +} + +__cdist_type_singleton() +{ + echo "${__cdist_type_dir}/$1/${__cdist_name_singleton}" +} diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to new file mode 100755 index 00000000..49c8a6fc --- /dev/null +++ b/bin/cdist-deploy-to @@ -0,0 +1,63 @@ +#!/bin/sh +# +# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# +# Deploy configuration to a host +# + +. cdist-config +[ $# -eq 1 ] || __cdist_usage "" +set -eu + +# Kill children on interrupt - only in interactive scripts +trap __cdist_kill_on_interrupt INT TERM + +__cdist_target_host="$1" + +# Make target host available for non-core +export $__cdist_name_var_target_host="$__cdist_target_host" +export $__cdist_name_var_target_user="$__cdist_remote_user" + +# Export variables for core, which others do not reset +export __cdist_local_base_dir +export __cdist_core_dir + +__cdist_echo info "cdist $__cdist_version: Configuring $__cdist_target_host " + +################################################################################ +# See cdist-stages(7) +# + +# Prepare local and remote directories +__cdist_init_deploy "$__cdist_target_host" + +# Transfer cdist executables +__cdist_echo info "Transferring cdist binaries/functions to the target host " +__cdist_dir push "${__cdist_abs_mydir}" "${__cdist_remote_bin_dir}" +__cdist_dir push "${__cdist_core_dir}" "${__cdist_remote_core_dir}" + +__cdist_explorer_run_global +__cdist_manifest_run_init +__cdist_object_all __cdist_object_prepare +__cdist_object_all __cdist_object_run +unset __cdist_object_self + +__cdist_cache + +__cdist_echo info "cdist $__cdist_version: Successfully finished run" diff --git a/bin/cdist-env b/bin/cdist-env new file mode 100755 index 00000000..2aac5e6b --- /dev/null +++ b/bin/cdist-env @@ -0,0 +1,33 @@ +#!/bin/sh +# +# 2011 Nico Schottelius (nico-cdist at schottelius.org) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# +# Setup environment for use with cdist - must be standalone! +# + +export PATH="$(cd "${0%/*}" && pwd -P):$PATH" +export MANPATH="$(cd "${0%/*}/../doc/man" && pwd -P):$MANPATH" + +if [ "$(echo ${SHELL##*/} | grep 'csh$')" ]; then + echo setenv PATH $PATH \; + echo setenv MANPATH $MANPATH +else + echo export PATH=$PATH + echo export MANPATH=$MANPATH +fi diff --git a/bin/cdist-mass-deploy b/bin/cdist-mass-deploy new file mode 100755 index 00000000..c2b6d6a5 --- /dev/null +++ b/bin/cdist-mass-deploy @@ -0,0 +1,75 @@ +#!/bin/sh +# +# 2011 Nico Schottelius (nico-cdist at schottelius.org) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# +# Deploy configuration to many hosts +# + +. cdist-config +[ $# -ge 1 ] || __cdist_usage "[-p] [target host ]" +set -u + +# Kill children on interrupt - only in interactive scripts +trap __cdist_kill_on_interrupt INT TERM + +filter() +{ + awk -v host=$1 '{ print "[" host "] " $0 }' +} + +parallel="" +if [ "$1" = "-p" ]; then + parallel=yes + shift +fi + +i=0 +while [ $# -gt 0 ]; do + if [ "$parallel" ]; then + cdist-deploy-to "$1" 2>&1 | filter "$1" & + # Record pid and host for use later + i=$((i+1)) + eval pid_$i=$! + eval host_$i=\$1 + else + cdist-deploy-to "$1" 2>&1 | filter "$1" + fi + shift +done + +e=0 +if [ "$parallel" ]; then + __cdist_echo info "Waiting for cdist-deploy-to jobs to finish" + while [ "$i" -gt 0 ]; do + eval pid=\$pid_$i + wait "$pid" + if [ $? -ne 0 ]; then + e=$((e+1)) + eval e_host_$e=\$host_$i + fi + i=$((i-1)) + done +fi + +# Display all failed hosts after all runs are done, so the sysadmin gets them +while [ "$e" -gt 0 ]; do + eval host=\$host_$e + __cdist_echo error "Configuration of host $host failed." + e=$((e-1)) +done diff --git a/bin/cdist-quickstart b/bin/cdist-quickstart new file mode 100755 index 00000000..4d89180c --- /dev/null +++ b/bin/cdist-quickstart @@ -0,0 +1,310 @@ +#!/bin/sh +# +# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# +# Give the user an introduction into cdist +# + +. cdist-config +set -eu + +banner="cdist-quickstart>" +continue="Press enter to continue or ctrl-c to abort." +create_continue="Press enter to create the described files/directories" + +__prompt() +{ + echo -n "$banner" "$@" + read answer +} + +################################################################################ +# Intro of quickstart +# +cat << eof +$banner cdist version $__cdist_version + +Welcome to the interactive guide to cdist! +This is the interactive tutorial and beginners help for cdist and here's +our schedule: + + - Stages: How cdist operates + - Explorer: Explore facts of the target host + - Manifest: Map configurations to hosts + - Types: Bundled functionality + - Deploy a configuration to the local host! + +eof +__prompt "$continue" + +################################################################################ +# Stages +# +cat << eof + +To deploy configurations to a host, you call + + cdist-deploy-to + +which makes calls to other scripts, which realise the so called "stages". +Usually you'll not notice this, but in case you want to debug or hack cdist, +you can run each stage on its own. Besides that, you just need to remember +that the command cdist-deploy-to is the main cdist command. + +See also: + + Source of cdist-deploy-to(1), cdist-stages(7) + +eof +__prompt "$continue" + +################################################################################ +# Explorer +# +cat << eof + +The first thing cdist always does is running different explorers on the +target host. The explorers can be found in the directory + + ${__cdist_explorer_dir} + +An explorer is executed on the target host and its output is saved to a file. +You can use these files later to decide what or how to configure the host. + +For a demonstration, we'll call the OS explorer locally now, but remember: +This is only for demonstration, normally it is run on the target host. +The os explorer will which either displays the detected operating system or +nothing if it does not know your OS. + +See also: + + cdist-explorer(7) + +eof +explorer="${__cdist_explorer_dir}/os" + +__prompt "Press enter to execute $explorer" + +set -x +"$explorer" +set +x + +################################################################################ +# Manifest +# +cat << eof + +The initial manifest is the entry point for cdist to find out, what you would +like to have configured. It is located at + + ${__cdist_manifest_init} + +And can be as simple as + +-------------------------------------------------------------------------------- +__file /etc/cdist-configured --type file +-------------------------------------------------------------------------------- + +See also: + + cdist-manifest(7) + +eof +__prompt "$continue" + +cat << eof + +Let's take a deeper look at the initial manifest to understand what it means: + + __file /etc/cdist-configured --type file + | | | \\ + | | The parameter type \\ With the value file + | | + | | + | | This is the object id + | + __file is a so called "type" + + +This essentially looks like a standard command executed in the shell. +eof +__prompt "$continue" + +cat << eof + +And that's exactly true. Manifests are shell snippets that can use +types as commands with arguments. cdist prepends a special path +that contain links to the cdist-type-emulator, to \$PATH, so you +can use your types as a command. + +This is also the reason why types should always be prefixed with +"__", to prevent collisions with existing binaries. + +The object id is unique per type and used to prevent you from creating +the same object twice. + +Parameters are type specific and are always specified as --parameter . + +See also: + + cdist-type-build-emulation(1), cdist-type-emulator(1) + +eof +__prompt "$continue" + +################################################################################ +# Types +# +cat << eof + +Types are bundled functionality and are the main component of cdist. +If you want to have a feature x, you write the type __x. Types are stored in + + ${__cdist_type_dir} + +And cdist ships with some types already! + +See also: + + cdist-type(7) + +eof +__prompt "Press enter to see available types" + +set -x +ls ${__cdist_type_dir} +set +x + +cat << eof + +Types consist of the following parts: + + - ${__cdist_name_parameter} (${__cdist_name_parameter_required}/${__cdist_name_parameter_optional} + - ${__cdist_name_manifest} + - ${__cdist_name_explorer} + - ${__cdist_name_gencode} + +eof +__prompt "$continue" + + +cat << eof + +Every type must have a directory named ${__cdist_name_parameter}, which +contains required or optional parameters (in newline seperated files). + +If an object of a specific type was created in the initial manifest, +the manifest of the type is run and may create other objects. + +A type may have ${__cdist_name_explorer}, which are very similar to the +${__cdist_name_explorer} seen above, but with a different purpose: +They are specific to the type and are not relevant for other types. + +You may use them for instance to find out details on the target host, +so you can decide what to do on the target host eventually. + +After the ${__cdist_name_manifest} and the ${__cdist_name_explorer} of +a type have been run, ${__cdist_name_gencode} is executed, which creates +code to be executed on the target on stdout. + +eof +__prompt "$continue" + +################################################################################ +# Deployment +# + +cat << eof + +Now you've got some basic knowledge about cdist, let's configure your a host! + +Ensure that you have a ssh server running on the host and that you can login as root. + +eof + +__prompt "Enter hostname or press enter for localhost: " + +if [ "$answer" ]; then + host="$answer" +else + host="localhost" +fi + +manifestinit="conf/manifest/init" +cat << eof + +I'll know setup $manifestinit, containing the following code: + +-------------------------------------------------------------------------------- +# Every machine becomes a marker, so sysadmins know that automatic +# configurations are happening +__file /etc/cdist-configured + +case "\$__target_host" in + $host) + __link /tmp/cdist-testfile --source /etc/cdist-configured --type symbolic + __addifnosuchline /tmp/cdist-welcome --line "Welcome to cdist" + ;; +esac +-------------------------------------------------------------------------------- + +WARNING: This will overwrite ${manifestinit}. + +eof + +cat > "$__cdist_abs_mydir/../$manifestinit" << eof + +# Every machine becomes a marker, so sysadmins know that automatic +# configurations are happening +__file /etc/cdist-configured + +case "\$__target_host" in + $host) + __link /tmp/cdist-testfile --source /etc/cdist-configured --type symbolic + __addifnosuchline /tmp/cdist-welcome --line "Welcome to cdist" + ;; +esac + +eof + +chmod u+x "$__cdist_abs_mydir/../$manifestinit" + +cmd="cdist-deploy-to $host" + +__prompt "Press enter to run \"$cmd\"" + +# No quotes, we need field splitting +$cmd + +################################################################################ +# End +# + +cat << eof + + +-------------------------------------------------------------------------------- +That's it, this is the end of the cdist-quickstart. + +I hope you've got some impression on how cdist works, here are again some +pointers on where to continue to read: + +cdist(7), cdist-deploy-to(1), cdist-type(7), cdist-stages(7) + +eof diff --git a/bin/cdist-type-emulator b/bin/cdist-type-emulator new file mode 100755 index 00000000..8ff190ad --- /dev/null +++ b/bin/cdist-type-emulator @@ -0,0 +1,182 @@ +#!/bin/sh +# +# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# +# Wrapper script that generates cconfig from arguments +# +# This script will be called everytime the manifest decides to create +# a new type +# + +. cdist-config +set -u + +################################################################################ +# Prepare object and type +# + +__cdist_type="$__cdist_myname" + +# Find out whether type is a singleton or regular type +if [ -f "$(__cdist_type_singleton "$__cdist_type")" ]; then + __cdist_object_id="$__cdist_name_singleton" +else + [ $# -ge 1 ] || __cdist_usage " " + __cdist_object_id="$1"; shift +fi + +# Verify object id +__cdist_object_id_sane=$(echo "$__cdist_object_id" | grep "^${__cdist_sane_regexp}\$") +if [ -z "$__cdist_object_id_sane" ]; then + __cdist_usage "Insane object id, ${__cdist_object_id}." +fi + +# Prevent double slash if id begins with / +if [ "$(echo $__cdist_object_id | grep "^/")" ]; then + __cdist_object_self="${__cdist_type}${__cdist_object_id}" +else + __cdist_object_self="${__cdist_type}/${__cdist_object_id}" +fi +################################################################################ +# Internal quirks +# + +# Append id for error messages +__cdist_myname="$__cdist_myname ($__cdist_object_id)" + +################################################################################ +# Create object in tmpdir first +# + +# Save original destination +__cdist_out_object_dir_orig="$__cdist_out_object_dir" + +# Store to tmp now +__cdist_out_object_dir="$__cdist_tmp_dir" + +__cdist_new_object_dir="$(__cdist_object_dir "$__cdist_object_self")" + +# Initialise object +mkdir -p "${__cdist_new_object_dir}" + +# Record parameter +__cdist_parameter_dir="$(__cdist_object_parameter_dir "$__cdist_object_self")" +mkdir -p "${__cdist_parameter_dir}" + +while [ $# -gt 0 ]; do + opt="$1"; shift + + echo "$opt" | grep -q "^--${__cdist_sane_regexp}\$" || \ + __cdist_usage "Provide sane options" + + opt_file="${opt#--}" + + [ $# -ge 1 ] || __cdist_usage "Missing value for $opt" + + value="$1"; shift + + echo "${value}" > "${__cdist_parameter_dir}/${opt_file}" +done + +# Record requirements +# it's fine, if it's not set +set +u +for requirement in $require; do + echo $requirement >> "$(__cdist_object_require "$__cdist_object_self")" + __cdist_echo info "Recording requirement $requirement" +done +set -u + +################################################################################ +# Check newly created object +# + +# +# Ensure required parameters are given +# +if [ -f "$(__cdist_type_parameter_required "$__cdist_type")" ]; then + while read required; do + if [ ! -f "${__cdist_parameter_dir}/${required}" ]; then + __cdist_usage "Missing required parameter $required" + fi + done < "$(__cdist_type_parameter_required "$__cdist_type")" +fi + +# +# Ensure that only optional or required parameters are given +# + +if [ -f "$(__cdist_type_parameter_optional "$__cdist_type")" ]; then + cat "$(__cdist_type_parameter_optional "$__cdist_type")" > \ + "$__cdist_tmp_file" +fi + +if [ -f "$(__cdist_type_parameter_required "$__cdist_type")" ]; then + cat "$(__cdist_type_parameter_required "$__cdist_type")" >> \ + "$__cdist_tmp_file" +fi + +cd "$__cdist_parameter_dir" +for parameter in $(ls -1); do + is_valid=$(grep "^$parameter\$" "$__cdist_tmp_file") + + [ "$is_valid" ] || __cdist_usage "Unknown parameter $parameter" +done + +################################################################################ +# Merge object +# +# Restore original destination +__cdist_out_object_dir="$__cdist_out_object_dir_orig" + +__cdist_object_dir="$(__cdist_object_dir "$__cdist_object_self")" + +# +# If the object already exists and is exactly the same, merge it. Otherwise fail. +# +if [ -e "${__cdist_object_dir}" ]; then + # Allow diff to fail + set +e + diff -ru "${__cdist_new_object_dir}/${__cdist_name_parameter}" \ + "${__cdist_object_dir}/${__cdist_name_parameter}" \ + > "$__cdist_tmp_file"; ret=$? + set -e + + if [ "$ret" != 0 ]; then + # Go to standard error + exec >&2 + echo "${__cdist_object_self} already exists differently." + echo "Recorded source(s):" + __cdist_object_source "${__cdist_object_dir}" + echo "Differences:" + cat "$__cdist_tmp_file" + __cdist_exit_err "Aborting due to object conflict." + fi +else + # + # Move object into tree: + # Create full path minus .cdist and move .cdist + # + __cdist_new_object_base_dir="$(__cdist_object_base_dir "$__cdist_object_self")" + mkdir -p "$__cdist_new_object_base_dir" + mv "$__cdist_new_object_dir" "$__cdist_new_object_base_dir" +fi + +# Add "I was here message" +__cdist_object_source_add "${__cdist_object_dir}" diff --git a/bin/cdist-type-template b/bin/cdist-type-template new file mode 100755 index 00000000..6d8a3f15 --- /dev/null +++ b/bin/cdist-type-template @@ -0,0 +1,83 @@ +#!/bin/sh +# +# 2011 Nico Schottelius (nico-cdist at schottelius.org) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# +# Create a new type from scratch +# + +. cdist-config +[ $# -eq 1 ] || __cdist_usage "" +set -eu + +__cdist_type="$1"; shift +__cdist_my_type_dir="$(__cdist_type_dir "$__cdist_type")" + +if [ -d "$__cdist_my_type_dir" ]; then + __cdist_usage "Type $__cdist_type already exists" +fi + +echo "Creating type $__cdist_type in $__cdist_my_type_dir ..." +# Base +mkdir -p "$__cdist_my_type_dir" + +# Parameter +mkdir -p "$(__cdist_type_parameter_dir "$__cdist_type")" +touch "$(__cdist_type_parameter_dir "$__cdist_type")/${__cdist_name_parameter_required}" +touch "$(__cdist_type_parameter_dir "$__cdist_type")/${__cdist_name_parameter_optional}" + +# Manifest +cat "$__cdist_abs_mydir/../doc/dev/header" - << eof > "$__cdist_my_type_dir/${__cdist_name_manifest}" + +# +# This is the manifest, which can be used to create other objects like this: +# __file /path/to/destination --source /from/where/ +# +# To tell cdist to make use of it, you need to make it executable (chmod +x) +# +# + +eof + +# Gencode remote +cat "$__cdist_abs_mydir/../doc/dev/header" - << eof > "$(__cdist_type_dir "$__cdist_type")/${__cdist_name_gencode}-${__cdist_name_gencode_remote}" + +# +# This file should generate code on stdout, which will be collected by cdist +# and run on the target. +# +# To tell cdist to make use of it, you need to make it executable (chmod +x) +# +# + +eof + +cat "$__cdist_abs_mydir/../doc/dev/header" - << eof > "$(__cdist_type_dir "$__cdist_type")/${__cdist_name_gencode}-${__cdist_name_gencode_local}" + +# +# This file should generate code on stdout, which will be collected by cdist +# and run on the same machine cdist-deploy-to is executed. +# +# To tell cdist to make use of it, you need to make it executable (chmod +x) +# +# + +eof + +# Explorer +mkdir -p "$__cdist_my_type_dir/${__cdist_name_explorer}" diff --git a/build.sh b/build.sh new file mode 100755 index 00000000..a6897d49 --- /dev/null +++ b/build.sh @@ -0,0 +1,139 @@ +#!/bin/sh +# +# 2011 Nico Schottelius (nico-cdist at schottelius.org) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# +# Push a directory to a target, both sides have the same name (i.e. explorers) +# or +# Pull a directory from a target, both sides have the same name (i.e. explorers) +# + +# exit on any error +#set -e + +# Manpage and HTML +A2XM="a2x -f manpage --no-xmllint" +A2XH="a2x -f xhtml --no-xmllint" + +# Developer webbase +WEBDIR=$HOME/niconetz +WEBBASE=software/cdist +WEBPAGE=${WEBBASE}.mdwn + +# Documentation +MANDIR=doc/man +MAN1DSTDIR=${MANDIR}/man1 +MAN7DSTDIR=${MANDIR}/man7 +SPEECHESDIR=doc/speeches + +case "$1" in + man) + set -e + "$0" mangen + "$0" mantype + "$0" manbuild + ;; + + manbuild) + trap abort INT + abort() { + kill 0 + } + for section in 1 7; do + for src in ${MANDIR}/man${section}/*.text; do + manpage="${src%.text}.$section" + if [ ! -f "$manpage" -o "$manpage" -ot "$src" ]; then + echo "Compiling man page for $src" + $A2XM "$src" + fi + htmlpage="${src%.text}.html" + if [ ! -f "$htmlpage" -o "$htmlpage" -ot "$src" ]; then + echo "Compiling html page for $src" + $A2XH "$src" + fi + done + done + ;; + + mantype) + for mansrc in conf/type/*/man.text; do + dst="$(echo $mansrc | sed -e 's;conf/;cdist-;' -e 's;/;;' -e 's;/man;;' -e 's;^;doc/man/man7/;')" + ln -sf "../../../$mansrc" "$dst" + done + ;; + + mangen) + ${MANDIR}/cdist-reference.text.sh + ;; + + release) + "$0" clean && "$0" man && "$0" web + ;; + + speeches) + cd "$SPEECHESDIR" + for speech in *tex; do + pdflatex "$speech" + pdflatex "$speech" + pdflatex "$speech" + done + ;; + + web) + cp README ${WEBDIR}/${WEBPAGE} + rm -rf ${WEBDIR}/${WEBBASE}/man && mkdir ${WEBDIR}/${WEBBASE}/man + rm -rf ${WEBDIR}/${WEBBASE}/speeches && mkdir ${WEBDIR}/${WEBBASE}/speeches + + cp ${MAN1DSTDIR}/*.html ${MAN7DSTDIR}/*.html ${WEBDIR}/${WEBBASE}/man + cp ${SPEECHESDIR}/*.pdf ${WEBDIR}/${WEBBASE}/speeches + + git describe > ${WEBDIR}/${WEBBASE}/man/VERSION + cd ${WEBDIR} && git add ${WEBBASE} + cd ${WEBDIR} && git commit -m "cdist update" ${WEBBASE} ${WEBPAGE} + cd ${WEBDIR} && make pub + ;; + + p|pu|pub) + git push --mirror + git push --mirror github + ;; + + clean) + rm -f ${MAN7DSTDIR}/cdist-reference.text + find "${MANDIR}" -mindepth 2 -type l \ + -o -name "*.1" \ + -o -name "*.7" \ + -o -name "*.html" \ + -o -name "*.xml" \ + | xargs rm -f + ;; + + *) + echo '' + echo 'Welcome to cdist!' + echo '' + echo 'Here are the possible targets:' + echo '' + echo ' man: Build manpages (requires Asciidoc)' + echo ' clean: Remove build stuff' + echo '' + echo '' + echo "Unknown target, \"$1\"" >&2 + exit 1 + ;; +esac diff --git a/cdist/__init__.py b/cdist/__init__.py deleted file mode 100644 index c673b3ba..00000000 --- a/cdist/__init__.py +++ /dev/null @@ -1,271 +0,0 @@ -# -*- coding: utf-8 -*- -# -# 2010-2015 Nico Schottelius (nico-cdist at schottelius.org) -# 2012-2017 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -import os -import hashlib - -import cdist.log -import cdist.version - -VERSION = cdist.version.VERSION - -BANNER = """ - .. . .x+=:. s - dF @88> z` ^% :8 - '88bu. %8P . 0: - output = [] - label_begin = name + ":" + header_name - output.append(label_begin) - output.append('\n') - output.append('-' * len(label_begin)) - output.append('\n') - with open(path, 'r') as fd: - output.append(fd.read()) - output.append('\n') - result[name].append(''.join(output)) - except UnicodeError as ue: - result[name].append(('Cannot output {}:{} due to: {}.\n' - 'You can try to read the error file "{}"' - ' yourself.').format( - name, header_name, ue, path)) - return result - - def _stderr(self): - return self._stdpath(self.stderr_paths, 'stderr') - - def _stdout(self): - return self._stdpath(self.stdout_paths, 'stdout') - - def _update_dict_list(self, target, source): - for x in source: - if x not in target: - target[x] = [] - target[x].extend(source[x]) - - @property - def std_streams(self): - std_dict = {} - self._update_dict_list(std_dict, self._stdout()) - self._update_dict_list(std_dict, self._stderr()) - return std_dict - - def __str__(self): - output = [] - output.append(self.message) - output.append('\n\n') - header = "Error processing " + self.entity_name - under_header = '=' * len(header) - output.append(header) - output.append('\n') - output.append(under_header) - output.append('\n') - for param_name, param_value in self.entity_params: - output.append(param_name + ': ' + str(param_value)) - output.append('\n') - output.append('\n') - for x in self.std_streams: - output.append(''.join(self.std_streams[x])) - return ''.join(output) - - -class CdistObjectError(CdistEntityError): - """Something went wrong while working on a specific cdist object""" - def __init__(self, cdist_object, subject=''): - params = [ - ('name', cdist_object.name, ), - ('path', cdist_object.absolute_path, ), - ('source', " ".join(cdist_object.source), ), - ('type', os.path.realpath( - cdist_object.cdist_type.absolute_path), ), - ] - stderr_paths = [] - for stderr_name in os.listdir(cdist_object.stderr_path): - stderr_path = os.path.join(cdist_object.stderr_path, - stderr_name) - stderr_paths.append((stderr_name, stderr_path, )) - stdout_paths = [] - for stdout_name in os.listdir(cdist_object.stdout_path): - stdout_path = os.path.join(cdist_object.stdout_path, - stdout_name) - stdout_paths.append((stdout_name, stdout_path, )) - super().__init__("object '{}'".format(cdist_object.name), - params, stdout_paths, stderr_paths, subject) - - -class CdistObjectExplorerError(CdistEntityError): - """ - Something went wrong while working on a specific - cdist object explorer - """ - def __init__(self, cdist_object, explorer_name, explorer_path, - stderr_path, subject=''): - params = [ - ('object name', cdist_object.name, ), - ('object path', cdist_object.absolute_path, ), - ('object source', " ".join(cdist_object.source), ), - ('object type', os.path.realpath( - cdist_object.cdist_type.absolute_path), ), - ('explorer name', explorer_name, ), - ('explorer path', explorer_path, ), - ] - stdout_paths = [] - stderr_paths = [ - ('remote', stderr_path, ), - ] - super().__init__("explorer '{}' of object '{}'".format( - explorer_name, cdist_object.name), params, stdout_paths, - stderr_paths, subject) - - -class InitialManifestError(CdistEntityError): - """Something went wrong while executing initial manifest""" - def __init__(self, initial_manifest, stdout_path, stderr_path, subject=''): - params = [ - ('path', initial_manifest, ), - ] - stdout_paths = [ - ('init', stdout_path, ), - ] - stderr_paths = [ - ('init', stderr_path, ), - ] - super().__init__('initial manifest', params, stdout_paths, - stderr_paths, subject) - - -class GlobalExplorerError(CdistEntityError): - """Something went wrong while executing global explorer""" - def __init__(self, name, path, stderr_path, subject=''): - params = [ - ('name', name, ), - ('path', path, ), - ] - stderr_paths = [ - ('remote', stderr_path, ), - ] - super().__init__("global explorer '{}'".format(name), - params, [], stderr_paths, subject) - - -def file_to_list(filename): - """Return list from \n seperated file""" - if os.path.isfile(filename): - file_fd = open(filename, "r") - lines = file_fd.readlines() - file_fd.close() - - # Remove \n from all lines - lines = map(lambda s: s.strip(), lines) - else: - lines = [] - - return lines - - -def str_hash(s): - """Return hash of string s""" - if isinstance(s, str): - return hashlib.md5(s.encode('utf-8')).hexdigest() - else: - raise Error("Param should be string") - - -def home_dir(): - if 'HOME' in os.environ: - home = os.environ['HOME'] - if home: - rv = os.path.join(home, ".cdist") - else: - rv = None - else: - rv = None - return rv diff --git a/cdist/argparse.py b/cdist/argparse.py deleted file mode 100644 index 421d1b54..00000000 --- a/cdist/argparse.py +++ /dev/null @@ -1,468 +0,0 @@ -import argparse -import cdist -import multiprocessing -import logging -import collections -import functools -import cdist.configuration - - -# set of beta sub-commands -BETA_COMMANDS = set(('install', 'inventory', )) -# set of beta arguments for sub-commands -BETA_ARGS = { - 'config': set(('tag', 'all_tagged_hosts', 'use_archiving', )), -} -EPILOG = "Get cdist at https://code.ungleich.ch/ungleich-public/cdist" -# Parser others can reuse -parser = None - - -_verbosity_level_off = -2 -_verbosity_level = { - _verbosity_level_off: logging.OFF, - -1: logging.ERROR, - 0: logging.WARNING, - 1: logging.INFO, - 2: logging.VERBOSE, - 3: logging.DEBUG, - 4: logging.TRACE, -} - - -# Generate verbosity level constants: -# VERBOSE_OFF, VERBOSE_ERROR, VERBOSE_WARNING, VERBOSE_INFO, VERBOSE_VERBOSE, -# VERBOSE_DEBUG, VERBOSE_TRACE. -this_globals = globals() -for level in _verbosity_level: - const = 'VERBOSE_' + logging.getLevelName(_verbosity_level[level]) - this_globals[const] = level - - -# All verbosity levels above 4 are TRACE. -_verbosity_level = collections.defaultdict( - lambda: logging.TRACE, _verbosity_level) - - -def add_beta_command(cmd): - BETA_COMMANDS.add(cmd) - - -def add_beta_arg(cmd, arg): - if cmd in BETA_ARGS: - if arg not in BETA_ARGS[cmd]: - BETA_ARGS[cmd].append(arg) - else: - BETA_ARGS[cmd] = set((arg, )) - - -def check_beta(args_dict): - if 'beta' not in args_dict: - args_dict['beta'] = False - # Check only if beta is not enabled: if beta option is specified then - # raise error. - if not args_dict['beta']: - cmd = args_dict['command'] - # first check if command is beta - if cmd in BETA_COMMANDS: - raise cdist.CdistBetaRequired(cmd) - # then check if some command's argument is beta - if cmd in BETA_ARGS: - for arg in BETA_ARGS[cmd]: - if arg in args_dict and args_dict[arg]: - raise cdist.CdistBetaRequired(cmd, arg) - - -def check_lower_bounded_int(value, lower_bound, name): - try: - val = int(value) - except ValueError: - raise argparse.ArgumentTypeError( - "{} is invalid int value".format(value)) - if val < lower_bound: - raise argparse.ArgumentTypeError( - "{} is invalid {} value".format(val, name)) - return val - - -def get_parsers(): - global parser - - # Construct parser others can reuse - if parser: - return parser - else: - parser = {} - # Options _all_ parsers have in common - parser['loglevel'] = argparse.ArgumentParser(add_help=False) - parser['loglevel'].add_argument( - '-l', '--log-level', metavar='LOGLEVEL', - type=functools.partial(check_lower_bounded_int, lower_bound=-1, - name="log level"), - help=('Set the specified verbosity level. ' - 'The levels, in order from the lowest to the highest, are: ' - 'ERROR (-1), WARNING (0), INFO (1), VERBOSE (2), DEBUG (3) ' - 'TRACE (4 or higher). If used along with -v then -v ' - 'increases last set value and -l overwrites last set ' - 'value.'), - action='store', dest='verbose', required=False) - parser['loglevel'].add_argument( - '-q', '--quiet', - help='Quiet mode: disables logging, including WARNING and ERROR.', - action='store_true', default=False) - parser['loglevel'].add_argument( - '-v', '--verbose', - help=('Increase the verbosity level. Every instance of -v ' - 'increments the verbosity level by one. Its default value ' - 'is 0 which includes ERROR and WARNING levels. ' - 'The levels, in order from the lowest to the highest, are: ' - 'ERROR (-1), WARNING (0), INFO (1), VERBOSE (2), DEBUG (3) ' - 'TRACE (4 or higher). If used along with -l then -l ' - 'overwrites last set value and -v increases last set ' - 'value.'), - action='count', default=None) - - parser['beta'] = argparse.ArgumentParser(add_help=False) - parser['beta'].add_argument( - '-b', '--beta', - help=('Enable beta functionality. '), - action='store_true', dest='beta', default=None) - - # Main subcommand parser - parser['main'] = argparse.ArgumentParser( - description='cdist ' + cdist.VERSION) - parser['main'].add_argument( - '-V', '--version', help='Show version.', action='version', - version='%(prog)s ' + cdist.VERSION) - parser['sub'] = parser['main'].add_subparsers( - title="Commands", dest="command") - - # Banner - parser['banner'] = parser['sub'].add_parser( - 'banner', parents=[parser['loglevel']]) - parser['banner'].set_defaults(func=cdist.banner.banner) - - parser['inventory_common'] = argparse.ArgumentParser(add_help=False) - parser['inventory_common'].add_argument( - '-I', '--inventory', - help=('Use specified custom inventory directory. ' - 'Inventory directory is set up by the following rules: ' - 'if cdist configuration resolves this value then specified ' - 'directory is used, ' - 'if HOME env var is set then ~/.cdist/inventory is ' - 'used, otherwise distribution inventory directory is used.'), - dest="inventory_dir", required=False) - - parser['common'] = argparse.ArgumentParser(add_help=False) - parser['common'].add_argument( - '-g', '--config-file', - help=('Use specified custom configuration file.'), - dest="config_file", required=False) - - # Config - parser['config_main'] = argparse.ArgumentParser(add_help=False) - parser['config_main'].add_argument( - '-4', '--force-ipv4', - help=('Force to use IPv4 addresses only. No influence for custom' - ' remote commands.'), - action='store_const', dest='force_ipv', const=4) - parser['config_main'].add_argument( - '-6', '--force-ipv6', - help=('Force to use IPv6 addresses only. No influence for custom' - ' remote commands.'), - action='store_const', dest='force_ipv', const=6) - parser['config_main'].add_argument( - '-C', '--cache-path-pattern', - help=('Specify custom cache path pattern. If ' - 'it is not set then default hostdir is used.'), - dest='cache_path_pattern', - default=None) - parser['config_main'].add_argument( - '-c', '--conf-dir', - help=('Add configuration directory (can be repeated, ' - 'last one wins).'), action='append') - parser['config_main'].add_argument( - '-i', '--initial-manifest', - help='Path to a cdist manifest or \'-\' to read from stdin.', - dest='manifest', required=False) - parser['config_main'].add_argument( - '-j', '--jobs', nargs='?', - type=functools.partial(check_lower_bounded_int, lower_bound=1, - name="positive int"), - help=('Operate in parallel in specified maximum number of jobs. ' - 'Global explorers, object prepare and object run are ' - 'supported. Without argument CPU count is used by default. '), - action='store', dest='jobs', - const=multiprocessing.cpu_count()) - parser['config_main'].add_argument( - '-n', '--dry-run', - help='Do not execute code.', action='store_true') - parser['config_main'].add_argument( - '-o', '--out-dir', - help='Directory to save cdist output in.', dest="out_path") - parser['config_main'].add_argument( - '-P', '--timestamp', - help=('Timestamp log messages with the current local date and time ' - 'in the format: YYYYMMDDHHMMSS.us.'), - action='store_true', dest='timestamp') - parser['config_main'].add_argument( - '-R', '--use-archiving', nargs='?', - choices=('tar', 'tgz', 'tbz2', 'txz',), - help=('Operate by using archiving with compression where ' - 'appropriate. Supported values are: tar - tar archive, ' - 'tgz - gzip tar archive (the default), ' - 'tbz2 - bzip2 tar archive and txz - lzma tar archive. ' - 'Currently in beta.'), - action='store', dest='use_archiving', - const='tgz') - - # remote-copy and remote-exec defaults are environment variables - # if set; if not then None - these will be futher handled after - # parsing to determine implementation default - parser['config_main'].add_argument( - '-r', '--remote-out-dir', - help='Directory to save cdist output in on the target host.', - dest="remote_out_path") - parser['config_main'].add_argument( - '--remote-copy', - help='Command to use for remote copy (should behave like scp).', - action='store', dest='remote_copy', - default=None) - parser['config_main'].add_argument( - '--remote-exec', - help=('Command to use for remote execution ' - '(should behave like ssh).'), - action='store', dest='remote_exec', - default=None) - parser['config_main'].add_argument( - '-S', '--disable-saving-output-streams', - help='Disable saving output streams.', - action='store_false', dest='save_output_streams', default=True) - - # Config - parser['config_args'] = argparse.ArgumentParser(add_help=False) - parser['config_args'].add_argument( - '-A', '--all-tagged', - help=('Use all hosts present in tags db. Currently in beta.'), - action="store_true", dest="all_tagged_hosts", default=False) - parser['config_args'].add_argument( - '-a', '--all', - help=('List hosts that have all specified tags, ' - 'if -t/--tag is specified.'), - action="store_true", dest="has_all_tags", default=False) - parser['config_args'].add_argument( - '-f', '--file', - help=('Read specified file for a list of additional hosts to ' - 'operate on or if \'-\' is given, read stdin (one host per ' - 'line). If no host or host file is specified then, by ' - 'default, read hosts from stdin.'), - dest='hostfile', required=False) - parser['config_args'].add_argument( - '-p', '--parallel', nargs='?', metavar='HOST_MAX', - type=functools.partial(check_lower_bounded_int, lower_bound=1, - name="positive int"), - help=('Operate on multiple hosts in parallel for specified maximum ' - 'hosts at a time. Without argument CPU count is used by ' - 'default.'), - action='store', dest='parallel', - const=multiprocessing.cpu_count()) - parser['config_args'].add_argument( - '-s', '--sequential', - help='Operate on multiple hosts sequentially (default).', - action='store_const', dest='parallel', const=0) - parser['config_args'].add_argument( - '-t', '--tag', - help=('Host is specified by tag, not hostname/address; ' - 'list all hosts that contain any of specified tags. ' - 'Currently in beta.'), - dest='tag', required=False, action="store_true", default=False) - parser['config_args'].add_argument( - 'host', nargs='*', help='Host(s) to operate on.') - parser['config'] = parser['sub'].add_parser( - 'config', parents=[parser['loglevel'], parser['beta'], - parser['common'], - parser['config_main'], - parser['inventory_common'], - parser['config_args']]) - parser['config'].set_defaults(func=cdist.config.Config.commandline) - - # Install - parser['install'] = parser['sub'].add_parser('install', add_help=False, - parents=[parser['config']]) - parser['install'].set_defaults(func=cdist.install.Install.commandline) - - # Inventory - parser['inventory'] = parser['sub'].add_parser('inventory') - parser['invsub'] = parser['inventory'].add_subparsers( - title="Inventory commands", dest="subcommand") - - parser['add-host'] = parser['invsub'].add_parser( - 'add-host', parents=[parser['loglevel'], parser['beta'], - parser['common'], - parser['inventory_common']]) - parser['add-host'].add_argument( - 'host', nargs='*', help='Host(s) to add.') - parser['add-host'].add_argument( - '-f', '--file', - help=('Read additional hosts to add from specified file ' - 'or from stdin if \'-\' (each host on separate line). ' - 'If no host or host file is specified then, by default, ' - 'read from stdin.'), - dest='hostfile', required=False) - - parser['add-tag'] = parser['invsub'].add_parser( - 'add-tag', parents=[parser['loglevel'], parser['beta'], - parser['common'], - parser['inventory_common']]) - parser['add-tag'].add_argument( - 'host', nargs='*', - help='List of host(s) for which tags are added.') - parser['add-tag'].add_argument( - '-f', '--file', - help=('Read additional hosts to add tags from specified file ' - 'or from stdin if \'-\' (each host on separate line). ' - 'If no host or host file is specified then, by default, ' - 'read from stdin. If no tags/tagfile nor hosts/hostfile' - ' are specified then tags are read from stdin and are' - ' added to all hosts.'), - dest='hostfile', required=False) - parser['add-tag'].add_argument( - '-T', '--tag-file', - help=('Read additional tags to add from specified file ' - 'or from stdin if \'-\' (each tag on separate line). ' - 'If no tag or tag file is specified then, by default, ' - 'read from stdin. If no tags/tagfile nor hosts/hostfile' - ' are specified then tags are read from stdin and are' - ' added to all hosts.'), - dest='tagfile', required=False) - parser['add-tag'].add_argument( - '-t', '--taglist', - help=("Tag list to be added for specified host(s), comma separated" - " values."), - dest="taglist", required=False) - - parser['del-host'] = parser['invsub'].add_parser( - 'del-host', parents=[parser['loglevel'], parser['beta'], - parser['common'], - parser['inventory_common']]) - parser['del-host'].add_argument( - 'host', nargs='*', help='Host(s) to delete.') - parser['del-host'].add_argument( - '-a', '--all', help=('Delete all hosts.'), - dest='all', required=False, action="store_true", default=False) - parser['del-host'].add_argument( - '-f', '--file', - help=('Read additional hosts to delete from specified file ' - 'or from stdin if \'-\' (each host on separate line). ' - 'If no host or host file is specified then, by default, ' - 'read from stdin.'), - dest='hostfile', required=False) - - parser['del-tag'] = parser['invsub'].add_parser( - 'del-tag', parents=[parser['loglevel'], parser['beta'], - parser['common'], - parser['inventory_common']]) - parser['del-tag'].add_argument( - 'host', nargs='*', - help='List of host(s) for which tags are deleted.') - parser['del-tag'].add_argument( - '-a', '--all', - help=('Delete all tags for specified host(s).'), - dest='all', required=False, action="store_true", default=False) - parser['del-tag'].add_argument( - '-f', '--file', - help=('Read additional hosts to delete tags for from specified ' - 'file or from stdin if \'-\' (each host on separate line). ' - 'If no host or host file is specified then, by default, ' - 'read from stdin. If no tags/tagfile nor hosts/hostfile' - ' are specified then tags are read from stdin and are' - ' deleted from all hosts.'), - dest='hostfile', required=False) - parser['del-tag'].add_argument( - '-T', '--tag-file', - help=('Read additional tags from specified file ' - 'or from stdin if \'-\' (each tag on separate line). ' - 'If no tag or tag file is specified then, by default, ' - 'read from stdin. If no tags/tagfile nor' - ' hosts/hostfile are specified then tags are read from' - ' stdin and are added to all hosts.'), - dest='tagfile', required=False) - parser['del-tag'].add_argument( - '-t', '--taglist', - help=("Tag list to be deleted for specified host(s), " - "comma separated values."), - dest="taglist", required=False) - - parser['list'] = parser['invsub'].add_parser( - 'list', parents=[parser['loglevel'], parser['beta'], - parser['common'], - parser['inventory_common']]) - parser['list'].add_argument( - 'host', nargs='*', help='Host(s) to list.') - parser['list'].add_argument( - '-a', '--all', - help=('List hosts that have all specified tags, ' - 'if -t/--tag is specified.'), - action="store_true", dest="has_all_tags", default=False) - parser['list'].add_argument( - '-f', '--file', - help=('Read additional hosts to list from specified file ' - 'or from stdin if \'-\' (each host on separate line). ' - 'If no host or host file is specified then, by default, ' - 'list all.'), dest='hostfile', required=False) - parser['list'].add_argument( - '-H', '--host-only', help=('Suppress tags listing.'), - action="store_true", dest="list_only_host", default=False) - parser['list'].add_argument( - '-t', '--tag', - help=('Host is specified by tag, not hostname/address; ' - 'list all hosts that contain any of specified tags.'), - action="store_true", default=False) - - parser['inventory'].set_defaults( - func=cdist.inventory.Inventory.commandline) - - # Shell - parser['shell'] = parser['sub'].add_parser( - 'shell', parents=[parser['loglevel']]) - parser['shell'].add_argument( - '-s', '--shell', - help=('Select shell to use, defaults to current shell. Used shell' - ' should be POSIX compatible shell.')) - parser['shell'].set_defaults(func=cdist.shell.Shell.commandline) - - for p in parser: - parser[p].epilog = EPILOG - - return parser - - -def handle_loglevel(args): - if hasattr(args, 'quiet') and args.quiet: - args.verbose = _verbosity_level_off - - logging.root.setLevel(_verbosity_level[args.verbose]) - - -def parse_and_configure(argv, singleton=True): - parser = get_parsers() - parser_args = parser['main'].parse_args(argv) - try: - cfg = cdist.configuration.Configuration(parser_args, - singleton=singleton) - args = cfg.get_args() - except ValueError as e: - raise cdist.Error(str(e)) - # Loglevels are handled globally in here - handle_loglevel(args) - - log = logging.getLogger("cdist") - - log.verbose("version %s" % cdist.VERSION) - log.trace('command line args: {}'.format(cfg.command_line_args)) - log.trace('configuration: {}'.format(cfg.get_config())) - log.trace('configured args: {}'.format(args)) - - check_beta(vars(args)) - - return parser, cfg diff --git a/cdist/autil.py b/cdist/autil.py deleted file mode 100644 index d16d147e..00000000 --- a/cdist/autil.py +++ /dev/null @@ -1,71 +0,0 @@ -# -*- coding: utf-8 -*- -# -# 2017 Darko Poljak (darko.poljak at gmail.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - - -import cdist -import tarfile -import os -import glob -import tempfile - - -_ARCHIVING_MODES = { - 'tar': '', - 'tgz': 'gz', - 'tbz2': 'bz2', - 'txz': 'xz', -} - - -_UNARCHIVE_OPT = { - 'tar': None, - 'tgz': '-z', - 'tbz2': '-j', - 'txz': '-J', -} - - -# Archiving will be enabled if directory contains more than FILES_LIMIT files. -FILES_LIMIT = 1 - - -def get_extract_option(mode): - return _UNARCHIVE_OPT[mode] - - -def tar(source, mode="tgz"): - if mode not in _ARCHIVING_MODES: - raise cdist.Error("Unsupported archiving mode {}.".format(mode)) - - files = glob.glob1(source, '*') - fcnt = len(files) - if fcnt <= FILES_LIMIT: - return None, fcnt - - tarmode = 'w:{}'.format(_ARCHIVING_MODES[mode]) - _, tarpath = tempfile.mkstemp(suffix='.' + mode) - with tarfile.open(tarpath, tarmode, dereference=True) as tar: - if os.path.isdir(source): - for f in files: - tar.add(os.path.join(source, f), arcname=f) - else: - tar.add(source) - return tarpath, fcnt diff --git a/cdist/banner.py b/cdist/banner.py deleted file mode 100644 index da4dea5d..00000000 --- a/cdist/banner.py +++ /dev/null @@ -1,30 +0,0 @@ -# -*- coding: utf-8 -*- -# -# 2011-2012 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -import logging -import cdist - -log = logging.getLogger(__name__) - - -def banner(args): - """Guess what :-)""" - print(cdist.BANNER) diff --git a/cdist/conf/explorer/cpu_cores b/cdist/conf/explorer/cpu_cores deleted file mode 100755 index a52bddac..00000000 --- a/cdist/conf/explorer/cpu_cores +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/sh -# -# 2014 Daniel Heule (hda at sfs.biz) -# 2014 Thomas Oettli (otho at sfs.biz) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -# FIXME: other system types (not linux ...) - -os=$("$__explorer/os") -case "$os" in - "macosx") - sysctl -n hw.physicalcpu - ;; - - "openbsd") - sysctl -n hw.ncpuonline - ;; - - *) - if [ -r /proc/cpuinfo ]; then - cores="$(grep "core id" /proc/cpuinfo | sort | uniq | wc -l)" - if [ "${cores}" -eq 0 ]; then - cores="1" - fi - echo "$cores" - fi - ;; -esac diff --git a/cdist/conf/explorer/cpu_sockets b/cdist/conf/explorer/cpu_sockets deleted file mode 100755 index a32e2f00..00000000 --- a/cdist/conf/explorer/cpu_sockets +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh -# -# 2014 Daniel Heule (hda at sfs.biz) -# 2014 Thomas Oettli (otho at sfs.biz) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -# FIXME: other system types (not linux ...) - -os=$("$__explorer/os") -case "$os" in - "macosx") - system_profiler SPHardwareDataType | grep "Number of Processors" | awk -F': ' '{print $2}' - ;; - - *) - if [ -r /proc/cpuinfo ]; then - sockets="$(grep "physical id" /proc/cpuinfo | sort -u | wc -l)" - if [ "${sockets}" -eq 0 ]; then - sockets="$(grep -c "processor" /proc/cpuinfo)" - fi - echo "${sockets}" - fi - ;; -esac diff --git a/cdist/conf/explorer/disks b/cdist/conf/explorer/disks deleted file mode 100755 index 87a6b5c6..00000000 --- a/cdist/conf/explorer/disks +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh - -uname_s="$(uname -s)" - -case "${uname_s}" in - FreeBSD) - sysctl -n kern.disks - ;; - OpenBSD|NetBSD) - sysctl -n hw.disknames | grep -Eo '[lsw]d[0-9]+' | xargs - ;; - Linux) - if command -v lsblk > /dev/null - then - # exclude ram disks, floppies and cdroms - # https://www.kernel.org/doc/Documentation/admin-guide/devices.txt - lsblk -e 1,2,11 -dno name | xargs - else - printf "Don't know how to list disks for %s operating system without lsblk, if you can please submit a patch\n" "${uname_s}" >&2 - fi - ;; - *) - printf "Don't know how to list disks for %s operating system, if you can please submit a patch\n" "${uname_s}" >&2 - ;; -esac - -exit 0 diff --git a/cdist/conf/explorer/hostname b/cdist/conf/explorer/hostname deleted file mode 100755 index 7715c6b0..00000000 --- a/cdist/conf/explorer/hostname +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -# -# 2010-2014 Nico Schottelius (nico-cdist at schottelius.org) -# 2012 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -if command -v uname >/dev/null; then - uname -n -fi diff --git a/cdist/conf/explorer/init b/cdist/conf/explorer/init deleted file mode 100755 index a8a7857e..00000000 --- a/cdist/conf/explorer/init +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh -# -# 2016 Daniel Heule (hda at sfs.biz) -# Copyright 2017, Philippe Gregoire -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Returns the process name of pid 1 ( normaly the init system ) -# for example at linux this value is "init" or "systemd" in most cases -# - -uname_s="$(uname -s)" - -case "$uname_s" in - Linux) - (pgrep -P0 -l | awk '/^1[ \t]/ {print $2;}') || true - ;; - FreeBSD|OpenBSD) - ps -o comm= -p 1 || true - ;; - *) - # return a empty string as unknown value - echo "" - ;; -esac diff --git a/cdist/conf/explorer/interfaces b/cdist/conf/explorer/interfaces deleted file mode 100755 index 55287971..00000000 --- a/cdist/conf/explorer/interfaces +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -e -# -# 2019 Ander Punnar (ander-at-kvlt-dot-ee) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -if command -v ip > /dev/null -then - ip -o link show | sed -n 's/^[0-9]\+: \(.\+\): <.*/\1/p' - -elif command -v ifconfig > /dev/null -then - ifconfig -a \ - | sed -n -E 's/^(.*)(:[[:space:]]*flags=|Link encap).*/\1/p' \ - | sort -u -fi diff --git a/cdist/conf/explorer/is-freebsd-jail b/cdist/conf/explorer/is-freebsd-jail deleted file mode 100755 index 010917f5..00000000 --- a/cdist/conf/explorer/is-freebsd-jail +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -sysctl -n security.jail.jailed 2>/dev/null | grep "1" || true diff --git a/cdist/conf/explorer/kernel_name b/cdist/conf/explorer/kernel_name deleted file mode 100755 index 1f9cfca4..00000000 --- a/cdist/conf/explorer/kernel_name +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -uname -s diff --git a/cdist/conf/explorer/lsb_codename b/cdist/conf/explorer/lsb_codename deleted file mode 100755 index 26bb8e3d..00000000 --- a/cdist/conf/explorer/lsb_codename +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh -# -# 2011 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -set +e -case "$("$__explorer/os")" in - openwrt) - # shellcheck disable=SC1091 - (. /etc/openwrt_release && echo "$DISTRIB_CODENAME") - ;; - *) - lsb_release=$(command -v lsb_release) - if [ -x "$lsb_release" ]; then - $lsb_release --short --codename - fi - ;; -esac diff --git a/cdist/conf/explorer/lsb_description b/cdist/conf/explorer/lsb_description deleted file mode 100755 index b1009627..00000000 --- a/cdist/conf/explorer/lsb_description +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh -# -# 2011 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -set +e -case "$("$__explorer/os")" in - openwrt) - # shellcheck disable=SC1091 - (. /etc/openwrt_release && echo "$DISTRIB_DESCRIPTION") - ;; - *) - lsb_release=$(command -v lsb_release) - if [ -x "$lsb_release" ]; then - $lsb_release --short --description - fi - ;; -esac diff --git a/cdist/conf/explorer/lsb_id b/cdist/conf/explorer/lsb_id deleted file mode 100755 index 82ff9977..00000000 --- a/cdist/conf/explorer/lsb_id +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh -# -# 2011 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -set +e -case "$("$__explorer/os")" in - openwrt) - # shellcheck disable=SC1091 - (. /etc/openwrt_release && echo "$DISTRIB_ID") - ;; - *) - lsb_release=$(command -v lsb_release) - if [ -x "$lsb_release" ]; then - $lsb_release --short --id - fi - ;; -esac diff --git a/cdist/conf/explorer/lsb_release b/cdist/conf/explorer/lsb_release deleted file mode 100755 index 5ebfff1a..00000000 --- a/cdist/conf/explorer/lsb_release +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh -# -# 2011 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -set +e -case "$("$__explorer/os")" in - openwrt) - # shellcheck disable=SC1091 - (. /etc/openwrt_release && echo "$DISTRIB_RELEASE") - ;; - *) - lsb_release=$(command -v lsb_release) - if [ -x "$lsb_release" ]; then - $lsb_release --short --release - fi - ;; -esac diff --git a/cdist/conf/explorer/machine_type b/cdist/conf/explorer/machine_type deleted file mode 100755 index bb21f69c..00000000 --- a/cdist/conf/explorer/machine_type +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/sh -# -# 2014 Daniel Heule (hda at sfs.biz) -# 2014 Thomas Oettli (otho at sfs.biz) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -# FIXME: other system types (not linux ...) - -if [ -d "/proc/vz" ] && [ ! -d "/proc/bc" ]; then - echo openvz - exit -fi - -if [ -e "/proc/1/environ" ] && - tr '\000' '\n' < "/proc/1/environ" | grep -Eiq '^container='; then - echo lxc - exit -fi - -if [ -r /proc/cpuinfo ]; then - # this should only exist on virtual guest machines, - # tested on vmware, xen, kvm - if grep -q "hypervisor" /proc/cpuinfo; then - # this file is aviable in xen guest systems - if [ -r /sys/hypervisor/type ]; then - if grep -q -i "xen" /sys/hypervisor/type; then - echo virtual_by_xen - exit - fi - else - if [ -r /sys/class/dmi/id/product_name ]; then - if grep -q -i 'vmware' /sys/class/dmi/id/product_name; then - echo "virtual_by_vmware" - exit - elif grep -q -i 'bochs' /sys/class/dmi/id/product_name; then - echo "virtual_by_kvm" - exit - elif grep -q -i 'virtualbox' /sys/class/dmi/id/product_name; then - echo "virtual_by_virtualbox" - exit - fi - fi - - if [ -r /sys/class/dmi/id/sys_vendor ]; then - if grep -q -i 'qemu' /sys/class/dmi/id/sys_vendor; then - echo "virtual_by_kvm" - exit - fi - fi - - if [ -r /sys/class/dmi/id/chassis_vendor ]; then - if grep -q -i 'qemu' /sys/class/dmi/id/chassis_vendor; then - echo "virtual_by_kvm" - exit - fi - fi - fi - echo "virtual_by_unknown" - else - echo "physical" - fi -else - echo "unknown" -fi diff --git a/cdist/conf/explorer/memory b/cdist/conf/explorer/memory deleted file mode 100755 index 4e3efff8..00000000 --- a/cdist/conf/explorer/memory +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh -# -# 2014 Daniel Heule (hda at sfs.biz) -# 2014 Thomas Oettli (otho at sfs.biz) -# Copyright 2017, Philippe Gregoire -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -# FIXME: other system types (not linux ...) - -os=$("$__explorer/os") -case "$os" in - "macosx") - echo "$(sysctl -n hw.memsize)/1024" | bc - ;; - - "openbsd") - echo "$(sysctl -n hw.physmem) / 1048576" | bc - ;; - - *) - if [ -r /proc/meminfo ]; then - grep "MemTotal:" /proc/meminfo | awk '{print $2}' - fi - ;; -esac diff --git a/cdist/conf/explorer/os b/cdist/conf/explorer/os deleted file mode 100755 index d522300c..00000000 --- a/cdist/conf/explorer/os +++ /dev/null @@ -1,153 +0,0 @@ -#!/bin/sh -# -# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org) -# Copyright 2017, Philippe Gregoire -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# All os variables are lower case. Keep this file in alphabetical -# order by os variable except in cases where order otherwise matters, -# in which case keep the primary os and its derivatives together in -# a block (see Debian and Redhat examples below). -# - -if grep -q ^Amazon /etc/system-release 2>/dev/null; then - echo amazon - exit 0 -fi - -if [ -f /etc/arch-release ]; then - echo archlinux - exit 0 -fi - -if [ -f /etc/cdist-preos ]; then - echo cdist-preos - exit 0 -fi - -if [ -d /gnu/store ]; then - echo guixsd - exit 0 -fi - -### Debian and derivatives -if grep -q ^DISTRIB_ID=Ubuntu /etc/lsb-release 2>/dev/null; then - echo ubuntu - exit 0 -fi - -# devuan ascii has both devuan_version and debian_version, so we need to check devuan_version first! -if [ -f /etc/devuan_version ]; then - echo devuan - exit 0 -fi - -if [ -f /etc/debian_version ]; then - echo debian - exit 0 -fi - -### - -if [ -f /etc/gentoo-release ]; then - echo gentoo - exit 0 -fi - -if [ -f /etc/openwrt_version ]; then - echo openwrt - exit 0 -fi - -if [ -f /etc/owl-release ]; then - echo owl - exit 0 -fi - -### Redhat and derivatives -if grep -q ^Scientific /etc/redhat-release 2>/dev/null; then - echo scientific - exit 0 -fi - -if grep -q ^CentOS /etc/redhat-release 2>/dev/null; then - echo centos - exit 0 -fi - -if grep -q ^Fedora /etc/redhat-release 2>/dev/null; then - echo fedora - exit 0 -fi - -if grep -q ^Mitel /etc/redhat-release 2>/dev/null; then - echo mitel - exit 0 -fi - -if [ -f /etc/redhat-release ]; then - echo redhat - exit 0 -fi -### - -if [ -f /etc/SuSE-release ]; then - echo suse - exit 0 -fi - -if [ -f /etc/slackware-version ]; then - echo slackware - exit 0 -fi - -uname_s="$(uname -s)" - -# Assume there is no tr on the client -> do lower case ourselves -case "$uname_s" in - Darwin) - echo macosx - exit 0 - ;; - NetBSD) - echo netbsd - exit 0 - ;; - FreeBSD) - echo freebsd - exit 0 - ;; - OpenBSD) - echo openbsd - exit 0 - ;; - SunOS) - echo solaris - exit 0 - ;; -esac - -if [ -f /etc/os-release ]; then - # already lowercase, according to: - # https://www.freedesktop.org/software/systemd/man/os-release.html - awk -F= '/^ID=/ {print $2;}' /etc/os-release - exit 0 -fi - -echo "Unknown OS" >&2 -exit 1 diff --git a/cdist/conf/explorer/os_version b/cdist/conf/explorer/os_version deleted file mode 100755 index 4c41695b..00000000 --- a/cdist/conf/explorer/os_version +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/sh -# -# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# All os variables are lower case -# -# - -case "$("$__explorer/os")" in - amazon) - cat /etc/system-release - ;; - archlinux) - # empty, but well... - cat /etc/arch-release - ;; - debian) - cat /etc/debian_version - ;; - devuan) - cat /etc/devuan_version - ;; - fedora) - cat /etc/fedora-release - ;; - gentoo) - cat /etc/gentoo-release - ;; - macosx) - sw_vers -productVersion - ;; - *bsd|solaris) - uname -r - ;; - openwrt) - cat /etc/openwrt_version - ;; - owl) - cat /etc/owl-release - ;; - redhat|centos|mitel|scientific) - cat /etc/redhat-release - ;; - slackware) - cat /etc/slackware-version - ;; - suse) - if [ -f /etc/os-release ]; then - cat /etc/os-release - else - cat /etc/SuSE-release - fi - ;; - ubuntu) - lsb_release -sr - ;; -esac diff --git a/cdist/conf/manifest/sample-from-distribution b/cdist/conf/manifest/sample-from-distribution deleted file mode 100755 index 56d52cf5..00000000 --- a/cdist/conf/manifest/sample-from-distribution +++ /dev/null @@ -1,62 +0,0 @@ -## # -## # Sample manifest from cdist distribution -## # -## -## # Every machine becomes a marker, so sysadmins know that automatic -## # configurations are happening -## __file /etc/cdist-configured -## __cdistmarker -## -## case "$__target_host" in -## # Everybody has this -## localhost) -## require="__file/etc/cdist-configured" __link /tmp/cdist-testfile \ -## --source /etc/cdist-configured --type symbolic -## require="__directory/tmp/cdist-test-dir" __file /tmp/cdist-test-dir/test-file \ -## --mode 0750 --owner nobody --group root -## __directory /tmp/cdist-test-dir --mode 4777 -## -## require="__file/etc/cdist-configured __link/tmp/cdist-testfile" \ -## __file /tmp/cdist-another-testfile -## -## ;; -## -## # -## # Use an alias in /etc/hosts for localhost to use these hosts: -## # -## # 127.0.0.1 localhost.localdomain localhost cdist-archlinux -## # -## cdist-archlinux) -## # This is the specific package type for pacman -## __package_pacman zsh --state installed -## -## # The __package type autoselect the right type based on the os -## __package vim --state installed -## -## # If the type is a singleton, it does not take an object id -## __issue -## ;; -## # This is how it would look like on gentoo -## cdist-gentoo) -## # Same stuff for gentoo -## __package tree --state installed -## ;; -## -## cdist-debian) -## __package_apt atop --state installed -## __package apache2 --state removed -## ;; -## -## cdist-redhat) -## __issue -## __motd -## ;; -## -## # Real machines may be used with their hostname or fqdn, -## # depending on how you call cdist -## # ... -## # ;; -## # machine.example.org) -## # ... -## # ;; -## esac diff --git a/cdist/conf/type/__acl/explorer/acl_is b/cdist/conf/type/__acl/explorer/acl_is deleted file mode 100755 index a693c023..00000000 --- a/cdist/conf/type/__acl/explorer/acl_is +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh -e -# -# 2018 Ander Punnar (ander-at-kvlt-dot-ee) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -[ ! -e "/$__object_id" ] && exit 0 - -if ! command -v getfacl > /dev/null -then - echo 'getfacl not available' >&2 - exit 1 -fi - -getfacl "/$__object_id" 2>/dev/null \ - | grep -Eo '^(default:)?(user|group|(mask|other):):[^:][[:graph:]]+' \ - || true diff --git a/cdist/conf/type/__acl/explorer/checks b/cdist/conf/type/__acl/explorer/checks deleted file mode 100755 index 70bb0412..00000000 --- a/cdist/conf/type/__acl/explorer/checks +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh -e -# -# 2019 Ander Punnar (ander-at-kvlt-dot-ee) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -# TODO check if filesystem has ACL turned on etc - -if [ -f "$__object/parameter/acl" ] -then - grep -E '^(default:)?(user|group):' "$__object/parameter/acl" \ - | while read -r acl - do - param="$( echo "$acl" | awk -F: '{print $(NF-2)}' )" - check="$( echo "$acl" | awk -F: '{print $(NF-1)}' )" - - [ "$param" = 'user' ] && db=passwd || db="$param" - - if ! getent "$db" "$check" > /dev/null - then - echo "missing $param '$check'" >&2 - exit 1 - fi - done -fi diff --git a/cdist/conf/type/__acl/explorer/file_is b/cdist/conf/type/__acl/explorer/file_is deleted file mode 100755 index 096cffd1..00000000 --- a/cdist/conf/type/__acl/explorer/file_is +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh -e -# -# 2018 Ander Punnar (ander-at-kvlt-dot-ee) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -if [ -e "/$__object_id" ] -then - if [ -d "/$__object_id" ] - then echo directory - elif [ -f "/$__object_id" ] - then echo regular - else echo other - fi -else - echo missing -fi diff --git a/cdist/conf/type/__acl/gencode-remote b/cdist/conf/type/__acl/gencode-remote deleted file mode 100755 index 6dab4d09..00000000 --- a/cdist/conf/type/__acl/gencode-remote +++ /dev/null @@ -1,126 +0,0 @@ -#!/bin/sh -e -# -# 2018 Ander Punnar (ander-at-kvlt-dot-ee) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -file_is="$( cat "$__object/explorer/file_is" )" - -[ "$file_is" = 'missing' ] && [ -z "$__cdist_dry_run" ] && exit 0 - -os="$( cat "$__global/explorer/os" )" - -acl_path="/$__object_id" - -acl_is="$( cat "$__object/explorer/acl_is" )" - -if [ -f "$__object/parameter/acl" ] -then - acl_should="$( cat "$__object/parameter/acl" )" -elif - [ -f "$__object/parameter/user" ] \ - || [ -f "$__object/parameter/group" ] \ - || [ -f "$__object/parameter/mask" ] \ - || [ -f "$__object/parameter/other" ] -then - acl_should="$( for param in user group mask other - do - [ ! -f "$__object/parameter/$param" ] && continue - - echo "$param" | grep -Eq 'mask|other' && sep=:: || sep=: - - echo "$param$sep$( cat "$__object/parameter/$param" )" - done )" -else - echo 'no parameters set' >&2 - exit 1 -fi - -if [ -f "$__object/parameter/default" ] -then - acl_should="$( echo "$acl_should" \ - | sed 's/^default://' \ - | sort -u \ - | sed 's/\(.*\)/default:\1\n\1/' )" -fi - -if [ "$file_is" = 'regular' ] \ - && echo "$acl_should" | grep -Eq '^default:' -then - # only directories can have default ACLs, - # but instead of error, - # let's just remove default entries - acl_should="$( echo "$acl_should" | grep -Ev '^default:' )" -fi - -if echo "$acl_should" | awk -F: '{ print $NF }' | grep -Fq 'X' -then - [ "$file_is" = 'directory' ] && rep=x || rep=- - - acl_should="$( echo "$acl_should" | sed "s/\\(.*\\)X/\\1$rep/" )" -fi - -setfacl_exec='setfacl' - -if [ -f "$__object/parameter/recursive" ] -then - if echo "$os" | grep -Fq 'freebsd' - then - echo "$os setfacl do not support recursive operations" >&2 - else - setfacl_exec="$setfacl_exec -R" - fi -fi - -if [ -f "$__object/parameter/remove" ] -then - echo "$acl_is" | while read -r acl - do - # skip wanted ACL entries which already exist - # and skip mask and other entries, because we - # can't actually remove them, but only change. - if echo "$acl_should" | grep -Eq "^$acl" \ - || echo "$acl" | grep -Eq '^(default:)?(mask|other)' - then continue - fi - - if echo "$os" | grep -Fq 'freebsd' - then - remove="$acl" - else - remove="$( echo "$acl" | sed 's/:...$//' )" - fi - - echo "$setfacl_exec -x \"$remove\" \"$acl_path\"" - echo "removed '$remove'" >> "$__messages_out" - done -fi - -for acl in $acl_should -do - if ! echo "$acl_is" | grep -Eq "^$acl" - then - if echo "$os" | grep -Fq 'freebsd' \ - && echo "$acl" | grep -Eq '^default:' - then - echo "setting default ACL in $os is currently not supported" >&2 - else - echo "$setfacl_exec -m \"$acl\" \"$acl_path\"" - echo "added '$acl'" >> "$__messages_out" - fi - fi -done diff --git a/cdist/conf/type/__acl/man.rst b/cdist/conf/type/__acl/man.rst deleted file mode 100644 index 85e946ce..00000000 --- a/cdist/conf/type/__acl/man.rst +++ /dev/null @@ -1,85 +0,0 @@ -cdist-type__acl(7) -================== - -NAME ----- -cdist-type__acl - Set ACL entries - - -DESCRIPTION ------------ -Fully supported and tested on Linux (ext4 filesystem), partial support for FreeBSD. - -See ``setfacl`` and ``acl`` manpages for more details. - - -REQUIRED MULTIPLE PARAMETERS ----------------------------- -acl - Set ACL entry following ``getfacl`` output syntax. - - -BOOLEAN PARAMETERS ------------------- -default - Set all ACL entries as default too. - Only directories can have default ACLs. - Setting default ACL in FreeBSD is currently not supported. - -recursive - Make ``setfacl`` recursive (Linux only), but not ``getfacl`` in explorer. - -remove - Remove undefined ACL entries. - ``mask`` and ``other`` entries can't be removed, but only changed. - - -DEPRECATED PARAMETERS ---------------------- -Parameters ``user``, ``group``, ``mask`` and ``other`` are deprecated and they -will be removed in future versions. Please use ``acl`` parameter instead. - - -EXAMPLES --------- - -.. code-block:: sh - - __acl /srv/project \ - --default \ - --recursive \ - --remove \ - --acl user:alice:rwx \ - --acl user:bob:r-x \ - --acl group:project-group:rwx \ - --acl group:some-other-group:r-x \ - --acl mask::r-x \ - --acl other::r-x - - # give Alice read-only access to subdir, - # but don't allow her to see parent content. - - __acl /srv/project2 \ - --remove \ - --acl default:group:secret-project:rwx \ - --acl group:secret-project:rwx \ - --acl user:alice:--x - - __acl /srv/project2/subdir \ - --default \ - --remove \ - --acl group:secret-project:rwx \ - --acl user:alice:r-x - - -AUTHORS -------- -Ander Punnar - - -COPYING -------- -Copyright \(C) 2018 Ander Punnar. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__acl/parameter/boolean b/cdist/conf/type/__acl/parameter/boolean deleted file mode 100644 index 8b96693f..00000000 --- a/cdist/conf/type/__acl/parameter/boolean +++ /dev/null @@ -1,3 +0,0 @@ -recursive -default -remove diff --git a/cdist/conf/type/__acl/parameter/deprecated/group b/cdist/conf/type/__acl/parameter/deprecated/group deleted file mode 100644 index 94e14159..00000000 --- a/cdist/conf/type/__acl/parameter/deprecated/group +++ /dev/null @@ -1 +0,0 @@ -see manual for details diff --git a/cdist/conf/type/__acl/parameter/deprecated/mask b/cdist/conf/type/__acl/parameter/deprecated/mask deleted file mode 100644 index 94e14159..00000000 --- a/cdist/conf/type/__acl/parameter/deprecated/mask +++ /dev/null @@ -1 +0,0 @@ -see manual for details diff --git a/cdist/conf/type/__acl/parameter/deprecated/other b/cdist/conf/type/__acl/parameter/deprecated/other deleted file mode 100644 index 94e14159..00000000 --- a/cdist/conf/type/__acl/parameter/deprecated/other +++ /dev/null @@ -1 +0,0 @@ -see manual for details diff --git a/cdist/conf/type/__acl/parameter/deprecated/user b/cdist/conf/type/__acl/parameter/deprecated/user deleted file mode 100644 index 94e14159..00000000 --- a/cdist/conf/type/__acl/parameter/deprecated/user +++ /dev/null @@ -1 +0,0 @@ -see manual for details diff --git a/cdist/conf/type/__acl/parameter/optional b/cdist/conf/type/__acl/parameter/optional deleted file mode 100644 index 4b32086b..00000000 --- a/cdist/conf/type/__acl/parameter/optional +++ /dev/null @@ -1,2 +0,0 @@ -mask -other diff --git a/cdist/conf/type/__acl/parameter/optional_multiple b/cdist/conf/type/__acl/parameter/optional_multiple deleted file mode 100644 index 95c25d55..00000000 --- a/cdist/conf/type/__acl/parameter/optional_multiple +++ /dev/null @@ -1,3 +0,0 @@ -acl -user -group diff --git a/cdist/conf/type/__apt_default_release/man.rst b/cdist/conf/type/__apt_default_release/man.rst deleted file mode 100644 index 0277a06f..00000000 --- a/cdist/conf/type/__apt_default_release/man.rst +++ /dev/null @@ -1,46 +0,0 @@ -cdist-type__apt_default_release(7) -================================== - -NAME ----- -cdist-type__apt_default_release - Configure the default release for apt - - -DESCRIPTION ------------ -Configure the default release for apt, using the APT::Default-Release -configuration value. - -REQUIRED PARAMETERS -------------------- -release - The value to set APT::Default-Release to. - - This can contain release name, codename or release version. Examples: - 'stable', 'testing', 'unstable', 'stretch', 'buster', '4.0', '5.0*'. - - -OPTIONAL PARAMETERS -------------------- -None. - - -EXAMPLES --------- - -.. code-block:: sh - - __apt_default_release --release stretch - - -AUTHORS -------- -Matthijs Kooijman - - -COPYING -------- -Copyright \(C) 2017 Matthijs Kooijman. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__apt_default_release/manifest b/cdist/conf/type/__apt_default_release/manifest deleted file mode 100755 index 1232efb5..00000000 --- a/cdist/conf/type/__apt_default_release/manifest +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh -e -# -# 2014 Steven Armstrong (steven-cdist at armstrong.cc) -# 2017 Matthijs Kooijman (matthijs at stdin.nl) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - - -os=$(cat "$__global/explorer/os") -release="$(cat "$__object/parameter/release")" - -case "$os" in - ubuntu|debian|devuan) - __file /etc/apt/apt.conf.d/99-default-release \ - --owner root --group root --mode 644 \ - --source - << DONE -APT::Default-Release "$release"; -DONE - ;; - *) - cat >&2 << DONE -The developer of this type (${__type##*/}) did not think your operating system -($os) would have any use for it. If you think otherwise please submit a patch. -DONE - exit 1 - ;; -esac diff --git a/cdist/conf/type/__apt_default_release/parameter/required b/cdist/conf/type/__apt_default_release/parameter/required deleted file mode 100644 index d7025695..00000000 --- a/cdist/conf/type/__apt_default_release/parameter/required +++ /dev/null @@ -1 +0,0 @@ -release diff --git a/cdist/conf/type/__apt_key/explorer/state b/cdist/conf/type/__apt_key/explorer/state deleted file mode 100755 index 38f1bd3c..00000000 --- a/cdist/conf/type/__apt_key/explorer/state +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/sh -# -# 2011-2014 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Get the current state of the apt key. -# - -if [ -f "$__object/parameter/keyid" ]; then - keyid="$(cat "$__object/parameter/keyid")" -else - keyid="$__object_id" -fi - -keydir="$(cat "$__object/parameter/keydir")" -keyfile="$keydir/$__object_id.gpg" - -if [ -d "$keydir" ] -then - if [ -f "$keyfile" ] - then echo present - else echo absent - fi -else - # fallback to deprecated apt-key - apt-key export "$keyid" | head -n 1 | grep -Fqe "BEGIN PGP PUBLIC KEY BLOCK" \ - && echo present \ - || echo absent -fi diff --git a/cdist/conf/type/__apt_key/gencode-remote b/cdist/conf/type/__apt_key/gencode-remote deleted file mode 100755 index 47c8bb49..00000000 --- a/cdist/conf/type/__apt_key/gencode-remote +++ /dev/null @@ -1,114 +0,0 @@ -#!/bin/sh -e -# -# 2011-2014 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -if [ -f "$__object/parameter/keyid" ]; then - keyid="$(cat "$__object/parameter/keyid")" -else - keyid="$__object_id" -fi -state_should="$(cat "$__object/parameter/state")" -state_is="$(cat "$__object/explorer/state")" - -if [ "$state_should" = "$state_is" ]; then - # nothing to do - exit 0 -fi - -keydir="$(cat "$__object/parameter/keydir")" -keyfile="$keydir/$__object_id.gpg" - -case "$state_should" in - present) - keyserver="$(cat "$__object/parameter/keyserver")" - - if [ -f "$__object/parameter/uri" ]; then - uri="$(cat "$__object/parameter/uri")" - - if [ -d "$keydir" ]; then - cat << EOF - -curl -s -L \\ - -o "$keyfile" \\ - "$uri" - -if grep -Fq 'BEGIN PGP PUBLIC KEY BLOCK' \\ - "$keyfile" -then - cat "$keyfile" \\ - | gpg --export > "$keyfile" -fi - -EOF - else - # fallback to deprecated apt-key - echo "curl -s -L '$uri' | apt-key add -" - fi - elif [ -d "$keydir" ]; then - tmp='/tmp/cdist_apt_key_tmp' - - # we need to kill gpg after 30 seconds, because gpg - # can get stuck if keyserver is not responding. - # exporting env var and not exit 1, - # because we need to clean up and kill dirmngr. - cat << EOF - -mkdir -m 700 -p "$tmp" - -if timeout 30s \\ - gpg --homedir "$tmp" \\ - --keyserver "$keyserver" \\ - --recv-keys "$keyid" -then - gpg --homedir "$tmp" \\ - --export "$keyid" \\ - > "$keyfile" -else - export GPG_GOT_STUCK=1 -fi - -GNUPGHOME="$tmp" gpgconf --kill dirmngr - -rm -rf "$tmp" - -if [ -n "\$GPG_GOT_STUCK" ] -then - echo "GPG GOT STUCK - no response from keyserver after 30 seconds" >&2 - exit 1 -fi - -EOF - else - # fallback to deprecated apt-key - echo "apt-key adv --keyserver \"$keyserver\" --recv-keys \"$keyid\"" - fi - - echo "added '$keyid'" >> "$__messages_out" - ;; - absent) - if [ -f "$keyfile" ]; then - echo "rm '$keyfile'" - else - # fallback to deprecated apt-key - echo "apt-key del \"$keyid\"" - fi - - echo "removed '$keyid'" >> "$__messages_out" - ;; -esac diff --git a/cdist/conf/type/__apt_key/man.rst b/cdist/conf/type/__apt_key/man.rst deleted file mode 100644 index 234bc715..00000000 --- a/cdist/conf/type/__apt_key/man.rst +++ /dev/null @@ -1,72 +0,0 @@ -cdist-type__apt_key(7) -====================== - -NAME ----- -cdist-type__apt_key - Manage the list of keys used by apt - - -DESCRIPTION ------------ -Manages the list of keys used by apt to authenticate packages. - - -REQUIRED PARAMETERS -------------------- -None. - - -OPTIONAL PARAMETERS -------------------- -state - 'present' or 'absent'. Defaults to 'present' - -keyid - the id of the key to add. Defaults to __object_id - -keyserver - the keyserver from which to fetch the key. If omitted the default set - in ./parameter/default/keyserver is used. - -keydir - key save location, defaults to ``/etc/apt/trusted.pgp.d`` - -uri - the URI from which to download the key - - -EXAMPLES --------- - -.. code-block:: sh - - # Add Ubuntu Archive Automatic Signing Key - __apt_key 437D05B5 - # Same thing - __apt_key 437D05B5 --state present - # Get rid of it - __apt_key 437D05B5 --state absent - - # same thing with human readable name and explicit keyid - __apt_key UbuntuArchiveKey --keyid 437D05B5 - - # same thing with other keyserver - __apt_key UbuntuArchiveKey --keyid 437D05B5 --keyserver keyserver.ubuntu.com - - # download key from the internet - __apt_key rabbitmq \ - --uri http://www.rabbitmq.com/rabbitmq-signing-key-public.asc - - -AUTHORS -------- -Steven Armstrong -Ander Punnar - - -COPYING -------- -Copyright \(C) 2011-2019 Steven Armstrong and Ander Punnar. You can -redistribute it and/or modify it under the terms of the GNU General Public -License as published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__apt_key/manifest b/cdist/conf/type/__apt_key/manifest deleted file mode 100755 index 010357cd..00000000 --- a/cdist/conf/type/__apt_key/manifest +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -e - -__package gnupg - -if [ -f "$__object/parameter/uri" ] -then __package curl -else __package dirmngr -fi diff --git a/cdist/conf/type/__apt_key/parameter/default/keydir b/cdist/conf/type/__apt_key/parameter/default/keydir deleted file mode 100644 index 190eb2de..00000000 --- a/cdist/conf/type/__apt_key/parameter/default/keydir +++ /dev/null @@ -1 +0,0 @@ -/etc/apt/trusted.gpg.d diff --git a/cdist/conf/type/__apt_key/parameter/default/keyserver b/cdist/conf/type/__apt_key/parameter/default/keyserver deleted file mode 100644 index 0d189916..00000000 --- a/cdist/conf/type/__apt_key/parameter/default/keyserver +++ /dev/null @@ -1 +0,0 @@ -pool.sks-keyservers.net diff --git a/cdist/conf/type/__apt_key/parameter/default/state b/cdist/conf/type/__apt_key/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__apt_key/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__apt_key/parameter/optional b/cdist/conf/type/__apt_key/parameter/optional deleted file mode 100644 index de647375..00000000 --- a/cdist/conf/type/__apt_key/parameter/optional +++ /dev/null @@ -1,5 +0,0 @@ -state -keyid -keyserver -keydir -uri diff --git a/cdist/conf/type/__apt_key_uri/gencode-remote b/cdist/conf/type/__apt_key_uri/gencode-remote deleted file mode 100755 index 229b6564..00000000 --- a/cdist/conf/type/__apt_key_uri/gencode-remote +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh -e -# -# 2011-2014 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -if [ -f "$__object/parameter/name" ]; then - name="$(cat "$__object/parameter/name")" -else - name="$__object_id" -fi -state_should="$(cat "$__object/parameter/state")" -state_is="$(cat "$__object/explorer/state")" - -if [ "$state_should" = "$state_is" ]; then - # nothing to do - exit 0 -fi - -case "$state_should" in - present) - uri="$(cat "$__object/parameter/uri")" - printf 'curl -s -L "%s" | apt-key add -\n' "$uri" - ;; - absent) - cat << DONE -keyid=\$(apt-key list | grep -B1 "$name" | awk '/pub/ { print \$2 }' | cut -d'/' -f 2) -apt-key del \$keyid -DONE - ;; -esac diff --git a/cdist/conf/type/__apt_key_uri/man.rst b/cdist/conf/type/__apt_key_uri/man.rst deleted file mode 100644 index 82a191b9..00000000 --- a/cdist/conf/type/__apt_key_uri/man.rst +++ /dev/null @@ -1,51 +0,0 @@ -cdist-type__apt_key_uri(7) -========================== - -NAME ----- -cdist-type__apt_key_uri - Add apt key from uri - - -DESCRIPTION ------------ -Download a key from an uri and add it to the apt keyring. - - -REQUIRED PARAMETERS -------------------- -uri - the uri from which to download the key - - -OPTIONAL PARAMETERS -------------------- -state - 'present' or 'absent', defaults to 'present' - -name - a name for this key, used when testing if it is already installed. - Defaults to __object_id - - -EXAMPLES --------- - -.. code-block:: sh - - __apt_key_uri rabbitmq \ - --name 'RabbitMQ Release Signing Key ' \ - --uri http://www.rabbitmq.com/rabbitmq-signing-key-public.asc \ - --state present - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2011-2014 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__apt_key_uri/manifest b/cdist/conf/type/__apt_key_uri/manifest deleted file mode 100755 index bf7b267d..00000000 --- a/cdist/conf/type/__apt_key_uri/manifest +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -e -# -# 2013-2014 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -__package curl diff --git a/cdist/conf/type/__apt_key_uri/parameter/default/state b/cdist/conf/type/__apt_key_uri/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__apt_key_uri/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__apt_key_uri/parameter/optional b/cdist/conf/type/__apt_key_uri/parameter/optional deleted file mode 100644 index 72c84b88..00000000 --- a/cdist/conf/type/__apt_key_uri/parameter/optional +++ /dev/null @@ -1,2 +0,0 @@ -state -name diff --git a/cdist/conf/type/__apt_key_uri/parameter/required b/cdist/conf/type/__apt_key_uri/parameter/required deleted file mode 100644 index c7954952..00000000 --- a/cdist/conf/type/__apt_key_uri/parameter/required +++ /dev/null @@ -1 +0,0 @@ -uri diff --git a/cdist/conf/type/__apt_mark/explorer/apt_version b/cdist/conf/type/__apt_mark/explorer/apt_version deleted file mode 100755 index 7bb90cc2..00000000 --- a/cdist/conf/type/__apt_mark/explorer/apt_version +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh -e -# -# 2016 Ander Punnar (cdist at kvlt.ee) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -apt_version_is=$(dpkg-query --show --showformat '${Version}' apt) - -# from APT changelog: -# apt (0.8.14.2) UNRELEASED; urgency=low -# provide a 'dpkg --set-selections' wrapper to set/release holds - -apt_version_should=0.8.14.2 - -dpkg --compare-versions "$apt_version_should" le "$apt_version_is" \ - && echo 0 \ - || echo 1 diff --git a/cdist/conf/type/__apt_mark/explorer/package_installed b/cdist/conf/type/__apt_mark/explorer/package_installed deleted file mode 100755 index 0b072cbc..00000000 --- a/cdist/conf/type/__apt_mark/explorer/package_installed +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -e -# -# 2016 Ander Punnar (cdist at kvlt.ee) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -if [ -f "$__object/parameter/name" ]; then - name="$(cat "$__object/parameter/name")" -else - name="$__object_id" -fi - -dpkg-query --show --showformat '${Status}' "$name" 2>/dev/null \ - | grep -Fq 'ok installed' \ - && echo 0 \ - || echo 1 diff --git a/cdist/conf/type/__apt_mark/explorer/state b/cdist/conf/type/__apt_mark/explorer/state deleted file mode 100755 index b7fe08fa..00000000 --- a/cdist/conf/type/__apt_mark/explorer/state +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh -e -# -# 2016 Ander Punnar (cdist at kvlt.ee) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -if [ -f "$__object/parameter/name" ]; then - name="$(cat "$__object/parameter/name")" -else - name="$__object_id" -fi - -apt-mark showhold | grep -Fq "$name" && echo hold || echo unhold diff --git a/cdist/conf/type/__apt_mark/gencode-remote b/cdist/conf/type/__apt_mark/gencode-remote deleted file mode 100755 index bc995444..00000000 --- a/cdist/conf/type/__apt_mark/gencode-remote +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/sh -e -# -# 2016 Ander Punnar (cdist at kvlt.ee) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -if [ -f "$__object/parameter/name" ]; then - name="$(cat "$__object/parameter/name")" -else - name="$__object_id" -fi - -apt_version="$(cat "$__object/explorer/apt_version")" - -if [ "$apt_version" != '0' ]; then - echo 'APT version not supported' >&2 - exit 1 -fi - -package_installed="$(cat "$__object/explorer/package_installed")" - -if [ "$package_installed" != '0' ]; then - exit 0 -fi - -state_should="$(cat "$__object/parameter/state")" - -state_is="$(cat "$__object/explorer/state")" - -if [ "$state_should" = "$state_is" ]; then - exit 0 -fi - -case "$state_should" in - hold|unhold) - echo "apt-mark $state_should $name > /dev/null" - ;; - *) - echo "Unknown state: $state_should" >&2 - exit 1 - ;; -esac diff --git a/cdist/conf/type/__apt_mark/man.rst b/cdist/conf/type/__apt_mark/man.rst deleted file mode 100644 index 7aa2a519..00000000 --- a/cdist/conf/type/__apt_mark/man.rst +++ /dev/null @@ -1,47 +0,0 @@ -cdist-type__apt_mark(7) -======================= - -NAME ----- -cdist-type__apt_mark - set package state as 'hold' or 'unhold' - - -DESCRIPTION ------------ -See apt-mark(8) for details. - - -REQUIRED PARAMETERS -------------------- -state - Either "hold" or "unhold". - - -OPTIONAL PARAMETERS -------------------- -name - If supplied, use the name and not the object id as the package name. - - -EXAMPLES --------- - -.. code-block:: sh - - # hold package - __apt_mark quagga --state hold - # unhold package - __apt_mark quagga --state unhold - - -AUTHORS -------- -Ander Punnar - - -COPYING -------- -Copyright \(C) 2016 Ander Punnar. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__apt_norecommends/man.rst b/cdist/conf/type/__apt_norecommends/man.rst deleted file mode 100644 index 001fffe4..00000000 --- a/cdist/conf/type/__apt_norecommends/man.rst +++ /dev/null @@ -1,42 +0,0 @@ -cdist-type__apt_norecommends(7) -=============================== - -NAME ----- -cdist-type__apt_norecommends - Configure apt to not install recommended packages - - -DESCRIPTION ------------ -Configure apt to not install any recommended or suggested packages. - - -REQUIRED PARAMETERS -------------------- -None. - - -OPTIONAL PARAMETERS -------------------- -None. - - -EXAMPLES --------- - -.. code-block:: sh - - __apt_norecommends - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2014 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__apt_norecommends/manifest b/cdist/conf/type/__apt_norecommends/manifest deleted file mode 100755 index e737df89..00000000 --- a/cdist/conf/type/__apt_norecommends/manifest +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/sh -e -# -# 2014 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - - -os=$(cat "$__global/explorer/os") - -case "$os" in - ubuntu|debian|devuan) - # No stinking recommends thank you very much. - # If I want something installed I will do so myself. - __file /etc/apt/apt.conf.d/99-no-recommends \ - --owner root --group root --mode 644 \ - --source - << DONE -APT::Install-Recommends "0"; -APT::Install-Suggests "0"; -APT::AutoRemove::RecommendsImportant "0"; -APT::AutoRemove::SuggestsImportant "0"; -DONE - ;; - *) - cat >&2 << DONE -The developer of this type (${__type##*/}) did not think your operating system -($os) would have any use for it. If you think otherwise please submit a patch. -DONE - exit 1 - ;; -esac diff --git a/cdist/conf/type/__apt_ppa/man.rst b/cdist/conf/type/__apt_ppa/man.rst deleted file mode 100644 index 8347c908..00000000 --- a/cdist/conf/type/__apt_ppa/man.rst +++ /dev/null @@ -1,50 +0,0 @@ -cdist-type__apt_ppa(7) -====================== - -NAME ----- -cdist-type__apt_ppa - Manage ppa repositories - - -DESCRIPTION ------------ -This cdist type allows manage ubuntu ppa repositories. - - -REQUIRED PARAMETERS -------------------- -state - The state the ppa should be in, either 'present' or 'absent'. - Defaults to 'present' - - -OPTIONAL PARAMETERS -------------------- -None. - - -EXAMPLES --------- - -.. code-block:: sh - - # Enable a ppa repository - __apt_ppa ppa:sans-intern/missing-bits - # same as - __apt_ppa ppa:sans-intern/missing-bits --state present - - # Disable a ppa repository - __apt_ppa ppa:sans-intern/missing-bits --state absent - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2011-2014 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__apt_ppa/parameter/default/state b/cdist/conf/type/__apt_ppa/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__apt_ppa/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__apt_source/files/source.list.template b/cdist/conf/type/__apt_source/files/source.list.template deleted file mode 100755 index d4420e96..00000000 --- a/cdist/conf/type/__apt_source/files/source.list.template +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -set -u - -entry="$uri $distribution $component" -cat << DONE -# Created by cdist ${__type##*/} -# Do not change. Changes will be overwritten. -# - -# $name -deb ${forcedarch} $entry -DONE -if [ -f "$__object/parameter/include-src" ]; then - echo "deb-src $entry" -fi diff --git a/cdist/conf/type/__apt_source/gencode-remote b/cdist/conf/type/__apt_source/gencode-remote deleted file mode 100755 index 1e8592c6..00000000 --- a/cdist/conf/type/__apt_source/gencode-remote +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh -e -# -# 2018 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -name="$__object_id" -destination="/etc/apt/sources.list.d/${name}.list" - -if grep -q "^__file${destination}" "$__messages_in"; then - printf 'apt-get update || apt-get update\n' -fi - diff --git a/cdist/conf/type/__apt_source/man.rst b/cdist/conf/type/__apt_source/man.rst deleted file mode 100644 index d1acb388..00000000 --- a/cdist/conf/type/__apt_source/man.rst +++ /dev/null @@ -1,70 +0,0 @@ -cdist-type__apt_source(7) -========================= - -NAME ----- -cdist-type__apt_source - Manage apt sources - - -DESCRIPTION ------------ -This cdist type allows you to manage apt sources. It invokes index update -internally when needed so call of index updating type is not needed. - - -REQUIRED PARAMETERS -------------------- -uri - the uri to the apt repository - - -OPTIONAL PARAMETERS -------------------- -arch - set this if you need to force and specific arch (ubuntu specific) - -state - 'present' or 'absent', defaults to 'present' - -distribution - the distribution codename to use. Defaults to DISTRIB_CODENAME from - the targets /etc/lsb-release - -component - space delimited list of components to enable. Defaults to an empty string. - - -BOOLEAN PARAMETERS ------------------- -include-src - include deb-src entries - - -EXAMPLES --------- - -.. code-block:: sh - - __apt_source rabbitmq \ - --uri http://www.rabbitmq.com/debian/ \ - --distribution testing \ - --component main \ - --include-src \ - --state present - - __apt_source canonical_partner \ - --uri http://archive.canonical.com/ \ - --component partner --state present - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2011-2018 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__apt_source/manifest b/cdist/conf/type/__apt_source/manifest deleted file mode 100755 index 35f15909..00000000 --- a/cdist/conf/type/__apt_source/manifest +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh -e -# -# 2011-2018 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -name="$__object_id" -state="$(cat "$__object/parameter/state")" -uri="$(cat "$__object/parameter/uri")" - -if [ -f "$__object/parameter/distribution" ]; then - distribution="$(cat "$__object/parameter/distribution")" -else - distribution="$(cat "$__global/explorer/lsb_codename")" -fi - -component="$(cat "$__object/parameter/component")" - -if [ -f "$__object/parameter/arch" ]; then - forcedarch="[arch=$(cat "$__object/parameter/arch")]" -else - forcedarch="" -fi - -# export variables for use in template -export name -export uri -export distribution -export component -export forcedarch - -# generate file from template -mkdir "$__object/files" -"$__type/files/source.list.template" > "$__object/files/source.list" -__file "/etc/apt/sources.list.d/${name}.list" \ - --source "$__object/files/source.list" \ - --owner root --group root --mode 0644 \ - --state "$state" diff --git a/cdist/conf/type/__apt_source/parameter/boolean b/cdist/conf/type/__apt_source/parameter/boolean deleted file mode 100644 index 8fa49177..00000000 --- a/cdist/conf/type/__apt_source/parameter/boolean +++ /dev/null @@ -1 +0,0 @@ -include-src diff --git a/cdist/conf/type/__apt_source/parameter/default/state b/cdist/conf/type/__apt_source/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__apt_source/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__apt_source/parameter/optional b/cdist/conf/type/__apt_source/parameter/optional deleted file mode 100644 index 87537335..00000000 --- a/cdist/conf/type/__apt_source/parameter/optional +++ /dev/null @@ -1,4 +0,0 @@ -state -distribution -component -arch \ No newline at end of file diff --git a/cdist/conf/type/__apt_source/parameter/required b/cdist/conf/type/__apt_source/parameter/required deleted file mode 100644 index c7954952..00000000 --- a/cdist/conf/type/__apt_source/parameter/required +++ /dev/null @@ -1 +0,0 @@ -uri diff --git a/cdist/conf/type/__apt_update_index/gencode-remote b/cdist/conf/type/__apt_update_index/gencode-remote deleted file mode 100755 index 70b59710..00000000 --- a/cdist/conf/type/__apt_update_index/gencode-remote +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh -e -# -# 2011 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -# run 'apt-get update' if anything in /etc/apt is newer then /var/lib/apt/lists -cat << DONE -if find /etc/apt -mindepth 1 -cnewer /var/lib/apt/lists | grep . > /dev/null; then - apt-get update || apt-get update -fi -DONE diff --git a/cdist/conf/type/__apt_update_index/man.rst b/cdist/conf/type/__apt_update_index/man.rst deleted file mode 100644 index 3031902f..00000000 --- a/cdist/conf/type/__apt_update_index/man.rst +++ /dev/null @@ -1,41 +0,0 @@ -cdist-type__apt_update_index(7) -=============================== - -NAME ----- -cdist-type__apt_update_index - Update apt's package index - - -DESCRIPTION ------------ -This cdist type runs apt-get update whenever any apt sources have changed. - - -REQUIRED PARAMETERS -------------------- -None. - -OPTIONAL PARAMETERS -------------------- -None. - - -EXAMPLES --------- - -.. code-block:: sh - - __apt_update_index - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2011 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__block/explorer/block b/cdist/conf/type/__block/explorer/block deleted file mode 100755 index e1ca3441..00000000 --- a/cdist/conf/type/__block/explorer/block +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh -# -# 2013 Steven Armstrong (steven-cdist armstrong.cc) -# 2014 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - - -file="$(cat "$__object/parameter/file" 2>/dev/null || echo "/$__object_id")" - -# file does not exist, nothing we could do -[ -f "$file" ] || exit 0 - -prefix=$(cat "$__object/parameter/prefix" 2>/dev/null || echo "#cdist:__block/$__object_id") -suffix=$(cat "$__object/parameter/suffix" 2>/dev/null || echo "#/cdist:__block/$__object_id") -awk -v prefix="^$prefix\$" -v suffix="^$suffix\$" '{ - if (match($0,prefix)) { - triggered=1 - } - if (triggered) { - if (match($0,suffix)) { - triggered=0 - } - print - } -}' "$file" diff --git a/cdist/conf/type/__block/gencode-remote b/cdist/conf/type/__block/gencode-remote deleted file mode 100755 index 1f5cc033..00000000 --- a/cdist/conf/type/__block/gencode-remote +++ /dev/null @@ -1,89 +0,0 @@ -#!/bin/sh -e -# -# 2013 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -# quote function from http://www.etalabs.net/sh_tricks.html -quote() { - printf '%s\n' "$1" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/'/" -} - -file="$(cat "$__object/parameter/file" 2>/dev/null || echo "/$__object_id")" -state_should=$(cat "$__object/parameter/state") -prefix=$(cat "$__object/parameter/prefix" 2>/dev/null || echo "#cdist:__block/$__object_id") -suffix=$(cat "$__object/parameter/suffix" 2>/dev/null || echo "#/cdist:__block/$__object_id") - -block="$__object/files/block" -if [ ! -s "$__object/explorer/block" ]; then - state_is='absent' -else - state_is=$(diff -q "$block" "$__object/explorer/block" >/dev/null \ - && echo present \ - || echo changed - ) -fi - -state_should="$(cat "$__object/parameter/state")" -if [ "$state_should" = "$state_is" ]; then - # Nothing to do, move along - exit 0 -fi - -remove_block() { - cat << DONE -tmpfile=\$(mktemp ${file}.cdist.XXXXXXXXXX) -# preserve ownership and permissions of existing file -if [ -f "$file" ]; then - cp -p "$file" "\$tmpfile" -fi -awk -v prefix=^$(quote "$prefix")\$ -v suffix=^$(quote "$suffix")\$ ' -{ - if (match(\$0,prefix)) { - triggered=1 - } - if (triggered) { - if (match(\$0,suffix)) { - triggered=0 - } - } else { - print - } -}' "$file" > "\$tmpfile" -mv -f "\$tmpfile" "$file" -DONE -} - -case "$state_should" in - present) - if [ "$state_is" = "changed" ]; then - echo update >> "$__messages_out" - remove_block - else - echo add >> "$__messages_out" - fi - cat << DONE -cat >> "$file" << ${__type##*/}_DONE -$(cat "$block") -${__type##*/}_DONE -DONE - ;; - absent) - echo remove >> "$__messages_out" - remove_block - ;; -esac diff --git a/cdist/conf/type/__block/man.rst b/cdist/conf/type/__block/man.rst deleted file mode 100644 index 90e50381..00000000 --- a/cdist/conf/type/__block/man.rst +++ /dev/null @@ -1,82 +0,0 @@ -cdist-type__block(7) -==================== - -NAME ----- -cdist-type__block - Manage blocks of text in files - - -DESCRIPTION ------------ -Manage a block of text in an existing file. -The block is identified using the prefix and suffix parameters. -Everything between prefix and suffix is considered to be a managed block -of text. - - -REQUIRED PARAMETERS -------------------- -text - the text to manage. - If text is '-' (dash), take what was written to stdin as the text. - - -OPTIONAL PARAMETERS -------------------- -file - the file in which to manage the text block. - Defaults to object_id. - -prefix - the prefix to add before the text. - Defaults to #cdist:__block/$__object_id - -suffix - the suffix to add after the text. - Defaults to #/cdist:__block/$__object_id - -state - 'present' or 'absent', defaults to 'present' - - -MESSAGES --------- -add - block was added -update - block was updated/changed -remove - block was removed - - -EXAMPLES --------- - -.. code-block:: sh - - # text from argument - __block /path/to/file \ - --prefix '#start' \ - --suffix '#end' \ - --text 'some\nblock of\ntext' - - # text from stdin - __block some-id \ - --file /path/to/file \ - --text - << DONE - here some block - of text - DONE - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2013 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__block/manifest b/cdist/conf/type/__block/manifest deleted file mode 100755 index 726950d3..00000000 --- a/cdist/conf/type/__block/manifest +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh -e -# -# 2013-2014 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -prefix=$(cat "$__object/parameter/prefix" 2>/dev/null || echo "#cdist:__block/$__object_id") -suffix=$(cat "$__object/parameter/suffix" 2>/dev/null || echo "#/cdist:__block/$__object_id") -text=$(cat "$__object/parameter/text") - -mkdir "$__object/files" -# Generate text block for inclusion in file -block="$__object/files/block" -echo "$prefix" > "$block" -if [ "$text" = "-" ]; then - cat "$__object/stdin" >> "$block" -else - echo "$text" >> "$block" -fi -echo "$suffix" >> "$block" diff --git a/cdist/conf/type/__block/parameter/default/state b/cdist/conf/type/__block/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__block/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__block/parameter/optional b/cdist/conf/type/__block/parameter/optional deleted file mode 100644 index fa3abebf..00000000 --- a/cdist/conf/type/__block/parameter/optional +++ /dev/null @@ -1,4 +0,0 @@ -file -prefix -state -suffix diff --git a/cdist/conf/type/__block/parameter/required b/cdist/conf/type/__block/parameter/required deleted file mode 100644 index 8e27be7d..00000000 --- a/cdist/conf/type/__block/parameter/required +++ /dev/null @@ -1 +0,0 @@ -text diff --git a/cdist/conf/type/__ccollect_source/explorer/stat b/cdist/conf/type/__ccollect_source/explorer/stat deleted file mode 100755 index 9b5ad75b..00000000 --- a/cdist/conf/type/__ccollect_source/explorer/stat +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/sh -# -# 2013 Steven Armstrong (steven-cdist armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -destination="/$__object_id" - -# nothing to work with, nothing we could do -[ -e "$destination" ] || exit 0 - -os=$("$__explorer/os") -case "$os" in - "freebsd"|"netbsd"|"openbsd") - # FIXME: should be something like this based on man page, but can not test - stat -f "type: %ST -owner: %Du %Su -group: %Dg %Sg -mode: %Op %Sp -size: %Dz -links: %Dl -" "$destination" - ;; - "macosx") - stat -f "type: %HT - owner: %Du %Su - group: %Dg %Sg - mode: %Lp %Sp - size: %Dz - links: %Dl - " "$destination" - ;; - *) - stat --printf="type: %F -owner: %u %U -group: %g %G -mode: %a %A -size: %s -links: %h -" "$destination" - ;; -esac diff --git a/cdist/conf/type/__ccollect_source/explorer/type b/cdist/conf/type/__ccollect_source/explorer/type deleted file mode 100755 index e723047c..00000000 --- a/cdist/conf/type/__ccollect_source/explorer/type +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh -# -# 2013 Steven Armstrong (steven-cdist armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -destination="/$__object_id" - -if [ ! -e "$destination" ]; then - echo none -elif [ -h "$destination" ]; then - echo symlink -elif [ -f "$destination" ]; then - echo file -elif [ -d "$destination" ]; then - echo directory -else - echo unknown -fi diff --git a/cdist/conf/type/__ccollect_source/gencode-remote b/cdist/conf/type/__ccollect_source/gencode-remote deleted file mode 100755 index 57353c24..00000000 --- a/cdist/conf/type/__ccollect_source/gencode-remote +++ /dev/null @@ -1,92 +0,0 @@ -#!/bin/sh -e -# -# 2014 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -destination="/$__object_id" -state_should="$(cat "$__object/parameter/state")" -type="$(cat "$__object/explorer/type")" -stat_file="$__object/explorer/stat" - - -get_current_value() { - if [ -s "$stat_file" ]; then - _name="$1" - _value="$2" - case "$_value" in - [0-9]*) - _index=2 - ;; - *) - _index=3 - ;; - esac - awk '/'"$_name"':/ { print $'$_index' }' "$stat_file" - unset _name _value _index - fi -} - -set_group() { - echo "chgrp '$1' '$destination'" - echo "chgrp '$1'" >> "$__messages_out" -} - -set_owner() { - echo "chown '$1' '$destination'" - echo "chown '$1'" >> "$__messages_out" -} - -set_mode() { - echo "chmod '$1' '$destination'" - echo "chmod '$1'" >> "$__messages_out" -} - -case "$state_should" in - present|exists) - # Note: Mode - needs to happen last as a chown/chgrp can alter mode by - # clearing S_ISUID and S_ISGID bits (see chown(2)) - for attribute in group owner mode; do - if [ -f "$__object/parameter/$attribute" ]; then - value_should="$(cat "$__object/parameter/$attribute")" - - # change 0xxx format to xxx format => same as stat returns - if [ "$attribute" = mode ]; then - value_should="$(echo "$value_should" | sed 's/^0\(...\)/\1/')" - fi - - value_is="$(get_current_value "$attribute" "$value_should")" - if [ -f "$__object/files/set-attributes" ] || [ "$value_should" != "$value_is" ]; then - "set_$attribute" "$value_should" - fi - fi - done - - ;; - - absent) - if [ "$type" = "file" ]; then - echo "rm -f '$destination'" - echo remove >> "$__messages_out" - fi - ;; - - *) - echo "Unknown state: $state_should" >&2 - exit 1 - ;; -esac diff --git a/cdist/conf/type/__ccollect_source/man.rst b/cdist/conf/type/__ccollect_source/man.rst deleted file mode 100644 index b0c23482..00000000 --- a/cdist/conf/type/__ccollect_source/man.rst +++ /dev/null @@ -1,78 +0,0 @@ -cdist-type__ccollect_source(7) -============================== - -NAME ----- -cdist-type__ccollect_source - Manage ccollect sources - - -DESCRIPTION ------------ -This cdist type allows you to create or delete ccollect sources. - - -REQUIRED PARAMETERS -------------------- -source - The source from which to backup -destination - The destination directory - - -OPTIONAL PARAMETERS -------------------- -state - 'present' or 'absent', defaults to 'present' -ccollectconf - The CCOLLECT_CONF directory. Defaults to /etc/ccollect. - - -OPTIONAL MULTIPLE PARAMETERS ----------------------------- -exclude - Paths to exclude of backup - - -BOOLEAN PARAMETERS ------------------- -verbose - Whether to report backup verbosely - -create-destination - Create the directory specified in the destination parameter on the remote host - -EXAMPLES --------- - -.. code-block:: sh - - __ccollect_source doc.ungleich.ch \ - --source doc.ungleich.ch:/ \ - --destination /backup/doc.ungleich.ch \ - --exclude '/proc/*' --exclude '/sys/*' \ - --verbose - - __ccollect_source doc.ungleich.ch \ - --source doc.ungleich.ch:/ \ - --destination /backup/doc.ungleich.ch \ - --exclude '/proc/*' --exclude '/sys/*' \ - --verbose \ - --create-destination - - -SEE ALSO --------- -:strong:`ccollect`\ (1) - - -AUTHORS -------- -Nico Schottelius - - -COPYING -------- -Copyright \(C) 2014 Nico Schottelius. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__ccollect_source/manifest b/cdist/conf/type/__ccollect_source/manifest deleted file mode 100755 index 727a4c97..00000000 --- a/cdist/conf/type/__ccollect_source/manifest +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/sh -e -# -# 2014 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -name="$__object_id" -state="$(cat "$__object/parameter/state")" -source="$(cat "$__object/parameter/source")" -destination="$(cat "$__object/parameter/destination")" -ccollectconf="$(sed 's,/$,,' "$__object/parameter/ccollectconf")" - -sourcedir="$ccollectconf/sources" -basedir="$sourcedir/$name" - -destination_file="$basedir/destination" -source_file="$basedir/source" -exclude_file="$basedir/exclude" -verbose_file="$basedir/verbose" - -__directory "$basedir" --state "$state" - -export require="__directory$basedir" -echo "$destination" | __file "$destination_file" --source - --state "$state" -echo "$source" | __file "$source_file" --source - --state "$state" - -################################################################################ -# Booleans -if [ "${state}" = "absent" ]; then - verbosestate="absent" -elif [ -f "$__object/parameter/verbose" ]; then - verbosestate="present" -else - verbosestate="absent" -fi -__file "$verbose_file" --state "$verbosestate" - -if [ -f "$__object/parameter/exclude" ]; then - __file "$exclude_file" --source - --state "$state" \ - < "$__object/parameter/exclude" -fi - -if [ -f "$__object/parameter/create-destination" ]; then - __directory "${destination}" --parents --state "${state}" -fi diff --git a/cdist/conf/type/__ccollect_source/parameter/boolean b/cdist/conf/type/__ccollect_source/parameter/boolean deleted file mode 100644 index 434c644f..00000000 --- a/cdist/conf/type/__ccollect_source/parameter/boolean +++ /dev/null @@ -1,2 +0,0 @@ -verbose -create-destination diff --git a/cdist/conf/type/__ccollect_source/parameter/default/ccollectconf b/cdist/conf/type/__ccollect_source/parameter/default/ccollectconf deleted file mode 100644 index a9fda009..00000000 --- a/cdist/conf/type/__ccollect_source/parameter/default/ccollectconf +++ /dev/null @@ -1 +0,0 @@ -/etc/ccollect diff --git a/cdist/conf/type/__ccollect_source/parameter/default/state b/cdist/conf/type/__ccollect_source/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__ccollect_source/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__ccollect_source/parameter/optional b/cdist/conf/type/__ccollect_source/parameter/optional deleted file mode 100644 index 0249d11e..00000000 --- a/cdist/conf/type/__ccollect_source/parameter/optional +++ /dev/null @@ -1,2 +0,0 @@ -ccollectconf -state diff --git a/cdist/conf/type/__ccollect_source/parameter/optional_multiple b/cdist/conf/type/__ccollect_source/parameter/optional_multiple deleted file mode 100644 index 9ba870ea..00000000 --- a/cdist/conf/type/__ccollect_source/parameter/optional_multiple +++ /dev/null @@ -1 +0,0 @@ -exclude diff --git a/cdist/conf/type/__ccollect_source/parameter/required b/cdist/conf/type/__ccollect_source/parameter/required deleted file mode 100644 index 9239646e..00000000 --- a/cdist/conf/type/__ccollect_source/parameter/required +++ /dev/null @@ -1,2 +0,0 @@ -source -destination diff --git a/cdist/conf/type/__cdist/man.rst b/cdist/conf/type/__cdist/man.rst deleted file mode 100644 index be082781..00000000 --- a/cdist/conf/type/__cdist/man.rst +++ /dev/null @@ -1,63 +0,0 @@ -cdist-type__cdist(7) -==================== - -NAME ----- -cdist-type__cdist - Manage cdist installations - - -DESCRIPTION ------------ -This cdist type allows you to easily setup cdist -on another box, to allow the other box to configure -systems. - -This type is *NOT* required by target hosts. -It is only helpful to build FROM which you configure -other hosts. - -This type will use git to clone - - -REQUIRED PARAMETERS -------------------- - -OPTIONAL PARAMETERS -------------------- -username - Select the user to create for the cdist installation. - Defaults to "cdist". - -source - Select the source from which to clone cdist from. - Defaults to "git@code.ungleich.ch:ungleich-public/cdist.git". - - -branch - Select the branch to checkout from. - Defaults to "master". - - -EXAMPLES --------- - -.. code-block:: sh - - # Install cdist for user cdist in her home as subfolder cdist - __cdist /home/cdist/cdist - - # Use alternative source - __cdist --source "git@code.ungleich.ch:ungleich-public/cdist.git" /home/cdist/cdist - - -AUTHORS -------- -Nico Schottelius - - -COPYING -------- -Copyright \(C) 2013 Nico Schottelius. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__cdist/manifest b/cdist/conf/type/__cdist/manifest deleted file mode 100755 index a97cf288..00000000 --- a/cdist/conf/type/__cdist/manifest +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh -e -# -# 2013 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -directory="$__object_id" - -if [ -f "$__object/parameter/shell" ]; then - shell="--shell $(cat "$__object/parameter/shell")" -else - shell="" -fi - -username="$(cat "$__object/parameter/username")" - -branch="$(cat "$__object/parameter/branch")" - -source="$(cat "$__object/parameter/source")" - -# Currently hardcoded - if anyone cares, make a parameter -# out of it -home=/home/$username - -__user "$username" --home "$home" $shell - -require="__user/$username" __directory "$home" \ - --owner "$username" - -require="__user/$username __directory/$home" __git "$directory" \ - --source "$source" \ - --owner "$username" --branch "$branch" diff --git a/cdist/conf/type/__cdist/parameter/default/branch b/cdist/conf/type/__cdist/parameter/default/branch deleted file mode 100644 index 1f7391f9..00000000 --- a/cdist/conf/type/__cdist/parameter/default/branch +++ /dev/null @@ -1 +0,0 @@ -master diff --git a/cdist/conf/type/__cdist/parameter/default/source b/cdist/conf/type/__cdist/parameter/default/source deleted file mode 100644 index 1ad3a250..00000000 --- a/cdist/conf/type/__cdist/parameter/default/source +++ /dev/null @@ -1 +0,0 @@ -git@code.ungleich.ch:ungleich-public/cdist.git diff --git a/cdist/conf/type/__cdist/parameter/default/username b/cdist/conf/type/__cdist/parameter/default/username deleted file mode 100644 index a585e141..00000000 --- a/cdist/conf/type/__cdist/parameter/default/username +++ /dev/null @@ -1 +0,0 @@ -cdist diff --git a/cdist/conf/type/__cdist/parameter/optional b/cdist/conf/type/__cdist/parameter/optional deleted file mode 100644 index a5f14343..00000000 --- a/cdist/conf/type/__cdist/parameter/optional +++ /dev/null @@ -1,4 +0,0 @@ -branch -source -username -shell diff --git a/cdist/conf/type/__cdistmarker/gencode-remote b/cdist/conf/type/__cdistmarker/gencode-remote deleted file mode 100755 index e71955c4..00000000 --- a/cdist/conf/type/__cdistmarker/gencode-remote +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh -e -# -# Copyright (C) 2011 Daniel Maher (phrawzty+cdist at gmail.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -# The marker file is established in the docs, but it isn't obligatory. -destination="$(cat "$__object/parameter/destination")" - -# The basic output of date is usually good enough, but variety is the -# spice of life... -format="$(cat "$__object/parameter/format")" - -# Dump the timestamp in UTC to the marker -echo "date $format > $destination" diff --git a/cdist/conf/type/__cdistmarker/man.rst b/cdist/conf/type/__cdistmarker/man.rst deleted file mode 100644 index f3a8bafe..00000000 --- a/cdist/conf/type/__cdistmarker/man.rst +++ /dev/null @@ -1,55 +0,0 @@ -cdist-type__cdistmarker(7) -========================== - -NAME ----- -cdist-type__cdistmarker - Add a timestamped cdist marker. - - -DESCRIPTION ------------ -This type is used to add a common marker file which indicates that a given -machine is being managed by cdist. The contents of this file consist of a -timestamp, which can be used to determine the most recent time at which cdist -was run against the machine in question. - - -REQUIRED PARAMETERS -------------------- -None. - - -OPTIONAL PARAMETERS -------------------- -destination - The path and filename of the marker. - Default: /etc/cdist-configured - -format - The format of the timestamp. This is passed directly to system 'date'. - Default: -u - - -EXAMPLES --------- - -.. code-block:: sh - - # Creates the marker as normal. - __cdistmarker - - # Creates the marker differently. - __cdistmarker --destination /tmp/cdist_marker --format '+%s' - - -AUTHORS -------- -Daniel Maher - - -COPYING -------- -Copyright \(C) 2011 Daniel Maher. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__cdistmarker/parameter/default/destination b/cdist/conf/type/__cdistmarker/parameter/default/destination deleted file mode 100644 index bd3a112f..00000000 --- a/cdist/conf/type/__cdistmarker/parameter/default/destination +++ /dev/null @@ -1 +0,0 @@ -/etc/cdist-configured diff --git a/cdist/conf/type/__cdistmarker/parameter/default/format b/cdist/conf/type/__cdistmarker/parameter/default/format deleted file mode 100644 index 5dc9e6ec..00000000 --- a/cdist/conf/type/__cdistmarker/parameter/default/format +++ /dev/null @@ -1 +0,0 @@ --u diff --git a/cdist/conf/type/__cdistmarker/parameter/optional b/cdist/conf/type/__cdistmarker/parameter/optional deleted file mode 100644 index c8e637c0..00000000 --- a/cdist/conf/type/__cdistmarker/parameter/optional +++ /dev/null @@ -1,2 +0,0 @@ -destination -format diff --git a/cdist/conf/type/__check_messages/gencode-remote b/cdist/conf/type/__check_messages/gencode-remote deleted file mode 100755 index ec36cecc..00000000 --- a/cdist/conf/type/__check_messages/gencode-remote +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh -e -# -# 2019 Ander Punnar (ander-at-kvlt-dot-ee) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -if grep -Eq \ - "$( cat "$__object/parameter/pattern" )" \ - "$__messages_in" -then - tee "$__messages_out" < "$__object/parameter/execute" -fi diff --git a/cdist/conf/type/__check_messages/man.rst b/cdist/conf/type/__check_messages/man.rst deleted file mode 100644 index 5c80a0ae..00000000 --- a/cdist/conf/type/__check_messages/man.rst +++ /dev/null @@ -1,52 +0,0 @@ -cdist-type__check_messages(7) -============================= - -NAME ----- -cdist-type__check_messages - Check messages for pattern and execute command on match. - - -DESCRIPTION ------------ -Check messages for pattern and execute command on match. - -This type is useful if you chain together multiple related types using -dependencies and want to restart service if at least one type changes -something. - -For more information about messages see `cdist messaging `_. - -For more information about dependencies and execution order see -`cdist manifest `_ documentation. - - -REQUIRED PARAMETERS -------------------- -pattern - Extended regular expression pattern for search (passed to ``grep -E``). - -execute - Command to execute on pattern match. - - -EXAMPLES --------- - -.. code-block:: sh - - __check_messages munin \ - --pattern '^__(file|link|line)/etc/munin/' \ - --execute 'service munin-node restart' - - -AUTHORS -------- -Ander Punnar - - -COPYING -------- -Copyright \(C) 2019 Ander Punnar. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__check_messages/parameter/required b/cdist/conf/type/__check_messages/parameter/required deleted file mode 100644 index 374363cb..00000000 --- a/cdist/conf/type/__check_messages/parameter/required +++ /dev/null @@ -1,2 +0,0 @@ -pattern -execute diff --git a/cdist/conf/type/__chroot_mount/gencode-local b/cdist/conf/type/__chroot_mount/gencode-local deleted file mode 100755 index b131346c..00000000 --- a/cdist/conf/type/__chroot_mount/gencode-local +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -e -# -# 2016 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -chroot="/$__object_id" - -if [ -f "$__object/parameter/manage-resolv-conf" ]; then - suffix="$(cat "$__object/parameter/manage-resolv-conf")" - resolv_conf="${chroot}/etc/resolv.conf" - original_resolv_conf="${resolv_conf}.${suffix}" - cat << DONE -$__remote_exec $__target_host << EOSSH -if [ -f "${resolv_conf}" ]; then - mv "${resolv_conf}" "${original_resolv_conf}" -fi -# copy hosts resolv.conf into chroot -cp /etc/resolv.conf "${resolv_conf}" -EOSSH -DONE -fi diff --git a/cdist/conf/type/__chroot_mount/gencode-remote b/cdist/conf/type/__chroot_mount/gencode-remote deleted file mode 100755 index 4fbb3ffc..00000000 --- a/cdist/conf/type/__chroot_mount/gencode-remote +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/sh -e -# -# 2012 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -chroot="/$__object_id" - -cat << DONE -# Prepare chroot -[ -d "${chroot}/proc" ] || mkdir "${chroot}/proc" -mountpoint -q "${chroot}/proc" \ - || mount -t proc -o nosuid,noexec,nodev proc "${chroot}/proc" - -[ -d "${chroot}/sys" ] || mkdir "${chroot}/sys" -mountpoint -q "${chroot}/sys" \ - || mount -t sysfs -o nosuid,noexec,nodev sys "${chroot}/sys" - -[ -d "${chroot}/dev" ] || mkdir "${chroot}/dev" -mountpoint -q "${chroot}/dev" \ - || mount -t devtmpfs -o mode=0755,nosuid udev "${chroot}/dev" - -[ -d "${chroot}/dev/pts" ] || mkdir "${chroot}/dev/pts" -mountpoint -q "${chroot}/dev/pts" \ - || mount -t devpts -o mode=0620,gid=5,nosuid,noexec devpts "${chroot}/dev/pts" - -[ -d "${chroot}/tmp" ] || mkdir -m 1777 "${chroot}/tmp" -mountpoint -q "${chroot}/tmp" \ - || mount -t tmpfs -o mode=1777,strictatime,nodev,nosuid tmpfs "${chroot}/tmp" -DONE diff --git a/cdist/conf/type/__chroot_mount/man.rst b/cdist/conf/type/__chroot_mount/man.rst deleted file mode 100644 index 41fd496b..00000000 --- a/cdist/conf/type/__chroot_mount/man.rst +++ /dev/null @@ -1,55 +0,0 @@ -cdist-type__chroot_mount(7) -=========================== - -NAME ----- -cdist-type__chroot_mount - mount a chroot - - -DESCRIPTION ------------ -Mount and prepare a chroot for running commands within it. - - -REQUIRED PARAMETERS -------------------- -None - - -OPTIONAL PARAMETERS -------------------- -manage-resolv-conf - manage /etc/resolv.conf inside the chroot. - Use the value of this parameter as the suffix to save a copy - of the current /etc/resolv.conf to /etc/resolv.conf.$suffix. - This is used by the __chroot_umount type to restore the initial - file content when unmounting the chroot. - - -BOOLEAN PARAMETERS ------------------- -None. - - -EXAMPLES --------- - -.. code-block:: sh - - __chroot_mount /path/to/chroot - - __chroot_mount /path/to/chroot \ - --manage-resolv-conf "some-known-string" - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2012-2017 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__chroot_mount/parameter/optional b/cdist/conf/type/__chroot_mount/parameter/optional deleted file mode 100644 index 27928f2c..00000000 --- a/cdist/conf/type/__chroot_mount/parameter/optional +++ /dev/null @@ -1 +0,0 @@ -manage-resolv-conf diff --git a/cdist/conf/type/__chroot_umount/gencode-local b/cdist/conf/type/__chroot_umount/gencode-local deleted file mode 100755 index b3cb69c6..00000000 --- a/cdist/conf/type/__chroot_umount/gencode-local +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -e -# -# 2016 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -chroot="/$__object_id" - -if [ -f "$__object/parameter/manage-resolv-conf" ]; then - suffix="$(cat "$__object/parameter/manage-resolv-conf")" - resolv_conf="${chroot}/etc/resolv.conf" - original_resolv_conf="${resolv_conf}.${suffix}" -cat << DONE -$__remote_exec $__target_host << EOSSH -if [ -f "${original_resolv_conf}" ]; then - # restore original /etc/resolv.conf that we moved out of the way - # in __chroot_mount/gencode-local - mv -f "${original_resolv_conf}" "${resolv_conf}" -fi -EOSSH -DONE -fi diff --git a/cdist/conf/type/__chroot_umount/gencode-remote b/cdist/conf/type/__chroot_umount/gencode-remote deleted file mode 100755 index ff669e1b..00000000 --- a/cdist/conf/type/__chroot_umount/gencode-remote +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -e -# -# 2012 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -chroot="/$__object_id" - -cat << DONE -umount -l "${chroot}/tmp" -umount -l "${chroot}/dev/pts" -umount -l "${chroot}/dev" -umount -l "${chroot}/sys" -umount -l "${chroot}/proc" -if [ -d "${chroot}/etc/resolvconf/resolv.conf.d" ]; then - # ensure /etc/resolvconf/resolv.conf.d/tail is not linked to \ - # e.g. /etc/resolvconf/resolv.conf.d/original - rm -f "${chroot}/etc/resolvconf/resolv.conf.d/tail" - touch "${chroot}/etc/resolvconf/resolv.conf.d/tail" -fi -DONE diff --git a/cdist/conf/type/__chroot_umount/man.rst b/cdist/conf/type/__chroot_umount/man.rst deleted file mode 100644 index 2a15f362..00000000 --- a/cdist/conf/type/__chroot_umount/man.rst +++ /dev/null @@ -1,60 +0,0 @@ -cdist-type__chroot_umount(7) -============================ - -NAME ----- -cdist-type__chroot_umount - unmount a chroot mounted by __chroot_mount - - -DESCRIPTION ------------ -Undo what __chroot_mount did. - - -REQUIRED PARAMETERS -------------------- -None - - -OPTIONAL PARAMETERS -------------------- -manage-resolv-conf - manage /etc/resolv.conf inside the chroot. - Use the value of this parameter as the suffix to find the backup file - that was saved by the __chroot_mount. - This is used by the to restore the initial file content when unmounting - the chroot. - - -BOOLEAN PARAMETERS ------------------- -None. - - -EXAMPLES --------- - -.. code-block:: sh - - __chroot_umount /path/to/chroot - - __chroot_umount /path/to/chroot \ - --manage-resolv-conf "some-known-string" - - -SEE ALSO --------- -:strong:`cdist-type__chroot_mount`\ (7) - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2012-2017 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__chroot_umount/manifest b/cdist/conf/type/__chroot_umount/manifest deleted file mode 100755 index b3cb69c6..00000000 --- a/cdist/conf/type/__chroot_umount/manifest +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -e -# -# 2016 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -chroot="/$__object_id" - -if [ -f "$__object/parameter/manage-resolv-conf" ]; then - suffix="$(cat "$__object/parameter/manage-resolv-conf")" - resolv_conf="${chroot}/etc/resolv.conf" - original_resolv_conf="${resolv_conf}.${suffix}" -cat << DONE -$__remote_exec $__target_host << EOSSH -if [ -f "${original_resolv_conf}" ]; then - # restore original /etc/resolv.conf that we moved out of the way - # in __chroot_mount/gencode-local - mv -f "${original_resolv_conf}" "${resolv_conf}" -fi -EOSSH -DONE -fi diff --git a/cdist/conf/type/__chroot_umount/parameter/optional b/cdist/conf/type/__chroot_umount/parameter/optional deleted file mode 100644 index 27928f2c..00000000 --- a/cdist/conf/type/__chroot_umount/parameter/optional +++ /dev/null @@ -1 +0,0 @@ -manage-resolv-conf diff --git a/cdist/conf/type/__clean_path/explorer/list b/cdist/conf/type/__clean_path/explorer/list deleted file mode 100755 index 07d38127..00000000 --- a/cdist/conf/type/__clean_path/explorer/list +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -e -# -# 2019 Ander Punnar (ander-at-kvlt-dot-ee) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -path="/$__object_id" - -[ ! -d "$path" ] && exit 0 - -pattern="$( cat "$__object/parameter/pattern" )" - -if [ -f "$__object/parameter/exclude" ] -then - exclude="$( cat "$__object/parameter/exclude" )" - - find "$path" -mindepth 1 -maxdepth 1 -regex "$pattern" \ - -and -not -regex "$exclude" -else - find "$path" -mindepth 1 -maxdepth 1 -regex "$pattern" -fi diff --git a/cdist/conf/type/__clean_path/gencode-remote b/cdist/conf/type/__clean_path/gencode-remote deleted file mode 100755 index 998a70d8..00000000 --- a/cdist/conf/type/__clean_path/gencode-remote +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh -e -# -# 2019 Ander Punnar (ander-at-kvlt-dot-ee) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -[ ! -s "$__object/explorer/list" ] && exit 0 - -path="/$__object_id" - -pattern="$( cat "$__object/parameter/pattern" )" - -if [ -f "$__object/parameter/exclude" ] -then - exclude="$( cat "$__object/parameter/exclude" )" - - echo "find '$path' -mindepth 1 -maxdepth 1 -regex '$pattern'" \ - "-and -not -regex '$exclude'" \ - '-exec rm -rf {} \;' -else - echo "find '$path' -mindepth 1 -maxdepth 1 -regex '$pattern'" \ - '-exec rm -rf {} \;' -fi - -while read -r f -do - echo "removed '$f'" >> "$__messages_out" -done \ -< "$__object/explorer/list" - -if [ -f "$__object/parameter/onchange" ] -then - cat "$__object/parameter/onchange" -fi diff --git a/cdist/conf/type/__clean_path/man.rst b/cdist/conf/type/__clean_path/man.rst deleted file mode 100644 index 826f4589..00000000 --- a/cdist/conf/type/__clean_path/man.rst +++ /dev/null @@ -1,60 +0,0 @@ -cdist-type__clean_path(7) -========================= - -NAME ----- -cdist-type__clean_path - Remove files and directories which match the pattern. - - -DESCRIPTION ------------ -Remove files and directories which match the pattern. - -Provided path (as __object_id) must be a directory. - -Patterns are passed to ``find``'s ``-regex`` - see ``find(1)`` for more details. - -Look up of files and directories is non-recursive (``-maxdepth 1``). - -Parent directory is excluded (``-mindepth 1``). - -This type is not POSIX compatible (sorry, Solaris users). - - -REQUIRED PARAMETERS -------------------- -pattern - Pattern of files which are removed from path. - - -OPTIONAL PARAMETERS -------------------- -exclude - Pattern of files which are excluded from removal. - -onchange - The code to run if files or directories were removed. - - -EXAMPLES --------- - -.. code-block:: sh - - __clean_path /etc/apache2/conf-enabled \ - --pattern '.+' \ - --exclude '.+\(charset\.conf\|security\.conf\)' \ - --onchange 'service apache2 restart' - - -AUTHORS -------- -Ander Punnar - - -COPYING -------- -Copyright \(C) 2019 Ander Punnar. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__clean_path/parameter/optional b/cdist/conf/type/__clean_path/parameter/optional deleted file mode 100644 index 6f313474..00000000 --- a/cdist/conf/type/__clean_path/parameter/optional +++ /dev/null @@ -1,2 +0,0 @@ -exclude -onchange diff --git a/cdist/conf/type/__clean_path/parameter/required b/cdist/conf/type/__clean_path/parameter/required deleted file mode 100644 index 54774947..00000000 --- a/cdist/conf/type/__clean_path/parameter/required +++ /dev/null @@ -1 +0,0 @@ -pattern diff --git a/cdist/conf/type/__config_file/gencode-remote b/cdist/conf/type/__config_file/gencode-remote deleted file mode 100755 index 5f1626be..00000000 --- a/cdist/conf/type/__config_file/gencode-remote +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh -e -# -# 2015 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -destination="$__object_id" - -if [ -f "$__object/parameter/onchange" ]; then - if grep -q "^__file/${destination}" "$__messages_in"; then - cat "$__object/parameter/onchange" - fi -fi diff --git a/cdist/conf/type/__config_file/man.rst b/cdist/conf/type/__config_file/man.rst deleted file mode 100644 index 5e0e58bd..00000000 --- a/cdist/conf/type/__config_file/man.rst +++ /dev/null @@ -1,64 +0,0 @@ -cdist-type__config_file(7) -========================== - -NAME ----- -cdist-type__config_file - _Manages config files - - -DESCRIPTION ------------ -Deploy config files using the file type. -Run the given code if the files changes. - - -REQUIRED PARAMETERS -------------------- -None. - - -OPTIONAL PARAMETERS -------------------- -group - see cdist-type__file -mode - see cdist-type__file -onchange - the code to run if the file changes -owner - see cdist-type__file -source - Path to the config file. - If source is '-' (dash), take what was written to stdin as the config file content. -state - see cdist-type__file - - -EXAMPLES --------- - -.. code-block:: sh - - __config_file /etc/consul/conf.d/watch_foo.json \ - --owner root --group consul --mode 640 \ - --source "$__type/files/watch_foo.json" \ - --state present \ - --onchange 'service consul status >/dev/null && service consul reload || true' - - -SEE ALSO --------- -:strong:`cdist-type__file`\ (7) - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2015 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__config_file/manifest b/cdist/conf/type/__config_file/manifest deleted file mode 100755 index be8f9f67..00000000 --- a/cdist/conf/type/__config_file/manifest +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh -e -# -# 2015 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -set -- "/${__object_id}" -cd "$__object/parameter/" -for param in *; do - case "$param" in - source) - source="$(cat "$__object/parameter/source")" - if [ "$source" = "-" ]; then - source="$__object/stdin" - fi - set -- "$@" --source "$source" - ;; - owner|group|mode|state) - set -- "$@" "--${param}" "$(cat "$__object/parameter/$param")" - ;; - *) - # ignore unknown parameters - : - ;; - esac -done - -__file "$@" diff --git a/cdist/conf/type/__config_file/parameter/default/state b/cdist/conf/type/__config_file/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__config_file/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__config_file/parameter/optional b/cdist/conf/type/__config_file/parameter/optional deleted file mode 100644 index 085c7725..00000000 --- a/cdist/conf/type/__config_file/parameter/optional +++ /dev/null @@ -1,6 +0,0 @@ -group -mode -onchange -owner -source -state diff --git a/cdist/conf/type/__consul/files/versions/0.4.1/cksum b/cdist/conf/type/__consul/files/versions/0.4.1/cksum deleted file mode 100644 index edba1a68..00000000 --- a/cdist/conf/type/__consul/files/versions/0.4.1/cksum +++ /dev/null @@ -1 +0,0 @@ -428915666 15738724 consul diff --git a/cdist/conf/type/__consul/files/versions/0.4.1/source b/cdist/conf/type/__consul/files/versions/0.4.1/source deleted file mode 100644 index b1e9908d..00000000 --- a/cdist/conf/type/__consul/files/versions/0.4.1/source +++ /dev/null @@ -1 +0,0 @@ -https://dl.bintray.com/mitchellh/consul/0.4.1_linux_amd64.zip diff --git a/cdist/conf/type/__consul/files/versions/0.5.0/cksum b/cdist/conf/type/__consul/files/versions/0.5.0/cksum deleted file mode 100644 index fe9888ae..00000000 --- a/cdist/conf/type/__consul/files/versions/0.5.0/cksum +++ /dev/null @@ -1 +0,0 @@ -131560372 17734417 consul diff --git a/cdist/conf/type/__consul/files/versions/0.5.0/source b/cdist/conf/type/__consul/files/versions/0.5.0/source deleted file mode 100644 index 00a209a5..00000000 --- a/cdist/conf/type/__consul/files/versions/0.5.0/source +++ /dev/null @@ -1 +0,0 @@ -https://dl.bintray.com/mitchellh/consul/0.5.0_linux_amd64.zip diff --git a/cdist/conf/type/__consul/files/versions/0.5.1/cksum b/cdist/conf/type/__consul/files/versions/0.5.1/cksum deleted file mode 100644 index a176ed43..00000000 --- a/cdist/conf/type/__consul/files/versions/0.5.1/cksum +++ /dev/null @@ -1 +0,0 @@ -2564582176 18232733 consul diff --git a/cdist/conf/type/__consul/files/versions/0.5.1/source b/cdist/conf/type/__consul/files/versions/0.5.1/source deleted file mode 100644 index f02a1103..00000000 --- a/cdist/conf/type/__consul/files/versions/0.5.1/source +++ /dev/null @@ -1 +0,0 @@ -https://dl.bintray.com/mitchellh/consul/0.5.1_linux_amd64.zip diff --git a/cdist/conf/type/__consul/files/versions/0.5.2/cksum b/cdist/conf/type/__consul/files/versions/0.5.2/cksum deleted file mode 100644 index 1c077266..00000000 --- a/cdist/conf/type/__consul/files/versions/0.5.2/cksum +++ /dev/null @@ -1 +0,0 @@ -2207534901 18245010 consul diff --git a/cdist/conf/type/__consul/files/versions/0.5.2/source b/cdist/conf/type/__consul/files/versions/0.5.2/source deleted file mode 100644 index 43b43d55..00000000 --- a/cdist/conf/type/__consul/files/versions/0.5.2/source +++ /dev/null @@ -1 +0,0 @@ -https://releases.hashicorp.com/consul/0.5.2/consul_0.5.2_linux_amd64.zip diff --git a/cdist/conf/type/__consul/files/versions/0.6.0/cksum b/cdist/conf/type/__consul/files/versions/0.6.0/cksum deleted file mode 100644 index bf41a9b8..00000000 --- a/cdist/conf/type/__consul/files/versions/0.6.0/cksum +++ /dev/null @@ -1 +0,0 @@ -688442448 19798264 consul diff --git a/cdist/conf/type/__consul/files/versions/0.6.0/source b/cdist/conf/type/__consul/files/versions/0.6.0/source deleted file mode 100644 index 691f2a87..00000000 --- a/cdist/conf/type/__consul/files/versions/0.6.0/source +++ /dev/null @@ -1 +0,0 @@ -https://releases.hashicorp.com/consul/0.6.0/consul_0.6.0_linux_amd64.zip diff --git a/cdist/conf/type/__consul/files/versions/0.6.1/cksum b/cdist/conf/type/__consul/files/versions/0.6.1/cksum deleted file mode 100644 index aa354351..00000000 --- a/cdist/conf/type/__consul/files/versions/0.6.1/cksum +++ /dev/null @@ -1 +0,0 @@ -3100584780 20416856 consul diff --git a/cdist/conf/type/__consul/files/versions/0.6.1/source b/cdist/conf/type/__consul/files/versions/0.6.1/source deleted file mode 100644 index 3b20388f..00000000 --- a/cdist/conf/type/__consul/files/versions/0.6.1/source +++ /dev/null @@ -1 +0,0 @@ -https://releases.hashicorp.com/consul/0.6.1/consul_0.6.1_linux_amd64.zip diff --git a/cdist/conf/type/__consul/files/versions/0.6.2/cksum b/cdist/conf/type/__consul/files/versions/0.6.2/cksum deleted file mode 100644 index 9c0b35c5..00000000 --- a/cdist/conf/type/__consul/files/versions/0.6.2/cksum +++ /dev/null @@ -1 +0,0 @@ -2124180907 20416920 consul diff --git a/cdist/conf/type/__consul/files/versions/0.6.2/source b/cdist/conf/type/__consul/files/versions/0.6.2/source deleted file mode 100644 index b0c6eeed..00000000 --- a/cdist/conf/type/__consul/files/versions/0.6.2/source +++ /dev/null @@ -1 +0,0 @@ -https://releases.hashicorp.com/consul/0.6.2/consul_0.6.2_linux_amd64.zip diff --git a/cdist/conf/type/__consul/files/versions/0.6.3/cksum b/cdist/conf/type/__consul/files/versions/0.6.3/cksum deleted file mode 100644 index 886d01bb..00000000 --- a/cdist/conf/type/__consul/files/versions/0.6.3/cksum +++ /dev/null @@ -1 +0,0 @@ -1832669072 20417720 consul diff --git a/cdist/conf/type/__consul/files/versions/0.6.3/source b/cdist/conf/type/__consul/files/versions/0.6.3/source deleted file mode 100644 index fef668be..00000000 --- a/cdist/conf/type/__consul/files/versions/0.6.3/source +++ /dev/null @@ -1 +0,0 @@ -https://releases.hashicorp.com/consul/0.6.3/consul_0.6.3_linux_amd64.zip diff --git a/cdist/conf/type/__consul/files/versions/0.6.4/cksum b/cdist/conf/type/__consul/files/versions/0.6.4/cksum deleted file mode 100644 index 1124b7aa..00000000 --- a/cdist/conf/type/__consul/files/versions/0.6.4/cksum +++ /dev/null @@ -1 +0,0 @@ -3832641574 23002736 consul diff --git a/cdist/conf/type/__consul/files/versions/0.6.4/source b/cdist/conf/type/__consul/files/versions/0.6.4/source deleted file mode 100644 index 96879b8d..00000000 --- a/cdist/conf/type/__consul/files/versions/0.6.4/source +++ /dev/null @@ -1 +0,0 @@ -https://releases.hashicorp.com/consul/0.6.4/consul_0.6.4_linux_amd64.zip diff --git a/cdist/conf/type/__consul/files/versions/0.7.0/cksum b/cdist/conf/type/__consul/files/versions/0.7.0/cksum deleted file mode 100644 index 3bffeedb..00000000 --- a/cdist/conf/type/__consul/files/versions/0.7.0/cksum +++ /dev/null @@ -1 +0,0 @@ -695240564 24003648 consul diff --git a/cdist/conf/type/__consul/files/versions/0.7.0/source b/cdist/conf/type/__consul/files/versions/0.7.0/source deleted file mode 100644 index ad610fc7..00000000 --- a/cdist/conf/type/__consul/files/versions/0.7.0/source +++ /dev/null @@ -1 +0,0 @@ -https://releases.hashicorp.com/consul/0.7.0/consul_0.7.0_linux_amd64.zip diff --git a/cdist/conf/type/__consul/files/versions/0.7.1/cksum b/cdist/conf/type/__consul/files/versions/0.7.1/cksum deleted file mode 100644 index 476bd9f6..00000000 --- a/cdist/conf/type/__consul/files/versions/0.7.1/cksum +++ /dev/null @@ -1 +0,0 @@ -3128343188 28402769 consul diff --git a/cdist/conf/type/__consul/files/versions/0.7.1/source b/cdist/conf/type/__consul/files/versions/0.7.1/source deleted file mode 100644 index 6ba2e7bf..00000000 --- a/cdist/conf/type/__consul/files/versions/0.7.1/source +++ /dev/null @@ -1 +0,0 @@ -https://releases.hashicorp.com/consul/0.7.1/consul_0.7.1_linux_amd64.zip diff --git a/cdist/conf/type/__consul/files/versions/0.8.1/cksum b/cdist/conf/type/__consul/files/versions/0.8.1/cksum deleted file mode 100644 index 9125cc8f..00000000 --- a/cdist/conf/type/__consul/files/versions/0.8.1/cksum +++ /dev/null @@ -1 +0,0 @@ -283033689 36101209 consul diff --git a/cdist/conf/type/__consul/files/versions/0.8.1/source b/cdist/conf/type/__consul/files/versions/0.8.1/source deleted file mode 100644 index 92386c7c..00000000 --- a/cdist/conf/type/__consul/files/versions/0.8.1/source +++ /dev/null @@ -1 +0,0 @@ -https://releases.hashicorp.com/consul/0.8.1/consul_0.8.1_linux_amd64.zip diff --git a/cdist/conf/type/__consul/files/versions/1.0.6/cksum b/cdist/conf/type/__consul/files/versions/1.0.6/cksum deleted file mode 100644 index b70b55f4..00000000 --- a/cdist/conf/type/__consul/files/versions/1.0.6/cksum +++ /dev/null @@ -1 +0,0 @@ -4120550353 48801129 consul diff --git a/cdist/conf/type/__consul/files/versions/1.0.6/source b/cdist/conf/type/__consul/files/versions/1.0.6/source deleted file mode 100644 index 769d3134..00000000 --- a/cdist/conf/type/__consul/files/versions/1.0.6/source +++ /dev/null @@ -1 +0,0 @@ -https://releases.hashicorp.com/consul/1.0.6/consul_1.0.6_linux_amd64.zip diff --git a/cdist/conf/type/__consul/files/versions/1.2.3/cksum b/cdist/conf/type/__consul/files/versions/1.2.3/cksum deleted file mode 100644 index 6352409e..00000000 --- a/cdist/conf/type/__consul/files/versions/1.2.3/cksum +++ /dev/null @@ -1 +0,0 @@ -191982 110369685 diff --git a/cdist/conf/type/__consul/files/versions/1.2.3/source b/cdist/conf/type/__consul/files/versions/1.2.3/source deleted file mode 100644 index 5e67bc37..00000000 --- a/cdist/conf/type/__consul/files/versions/1.2.3/source +++ /dev/null @@ -1 +0,0 @@ -https://releases.hashicorp.com/consul/1.2.3/consul_1.2.3_linux_amd64.zip diff --git a/cdist/conf/type/__consul/files/versions/1.3.0/cksum b/cdist/conf/type/__consul/files/versions/1.3.0/cksum deleted file mode 100644 index 7a885378..00000000 --- a/cdist/conf/type/__consul/files/versions/1.3.0/cksum +++ /dev/null @@ -1 +0,0 @@ -1714523667 98363467 consul diff --git a/cdist/conf/type/__consul/files/versions/1.3.0/source b/cdist/conf/type/__consul/files/versions/1.3.0/source deleted file mode 100644 index 18a1ba8e..00000000 --- a/cdist/conf/type/__consul/files/versions/1.3.0/source +++ /dev/null @@ -1 +0,0 @@ -https://releases.hashicorp.com/consul/1.3.0/consul_1.3.0_linux_amd64.zip diff --git a/cdist/conf/type/__consul/files/versions/1.5.0/cksum b/cdist/conf/type/__consul/files/versions/1.5.0/cksum deleted file mode 100644 index efca9caa..00000000 --- a/cdist/conf/type/__consul/files/versions/1.5.0/cksum +++ /dev/null @@ -1 +0,0 @@ -886614099 103959898 consul diff --git a/cdist/conf/type/__consul/files/versions/1.5.0/source b/cdist/conf/type/__consul/files/versions/1.5.0/source deleted file mode 100644 index cafa9248..00000000 --- a/cdist/conf/type/__consul/files/versions/1.5.0/source +++ /dev/null @@ -1 +0,0 @@ -https://releases.hashicorp.com/consul/1.5.0/consul_1.5.0_linux_amd64.zip diff --git a/cdist/conf/type/__consul/gencode-remote b/cdist/conf/type/__consul/gencode-remote deleted file mode 100755 index 2a21054f..00000000 --- a/cdist/conf/type/__consul/gencode-remote +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/sh -e -# -# 2018 Darko Poljak (darko.poljak at gmail.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -#set -x - -if [ ! -f "$__object/parameter/direct" ]; then - # Nothing here, staged file is used. - exit 0 -fi - -state=$(cat "$__object/parameter/state") -destination="/usr/local/bin/consul" - -if [ "$state" = "absent" ]; then - printf 'rm -f "%s"' "$destination" - exit 0 -fi - -versions_dir="$__type/files/versions" -version="$(cat "$__object/parameter/version")" -version_dir="$versions_dir/$version" - -source=$(cat "$version_dir/source") -source_file_name="${source##*/}" -cksum_should=$(cut -d' ' -f1,2 "$version_dir/cksum") - -cat << eof - tmpdir=\$(mktemp -d -p /tmp "${__type##*/}.XXXXXXXXXX") - curl -s -L "$source" > "\$tmpdir/$source_file_name" - unzip -p "\$tmpdir/$source_file_name" > "${destination}.tmp" - rm -rf "\$tmpdir" - - cksum_is=\$(cksum "${destination}.tmp" | cut -d' ' -f1,2) - if [ "\$cksum_is" = "$cksum_should" ]; then - rm -f "${destination}" - mv "${destination}.tmp" "${destination}" - chown root:root "$destination" - chmod 755 "$destination" - else - rm -f "${destination}.tmp" - echo "Failed to verify checksum for $__object_name" >&2 - exit 1 - fi -eof - -echo "/usr/local/bin/consul created" >> "$__messages_out" diff --git a/cdist/conf/type/__consul/man.rst b/cdist/conf/type/__consul/man.rst deleted file mode 100644 index 5b2db50a..00000000 --- a/cdist/conf/type/__consul/man.rst +++ /dev/null @@ -1,75 +0,0 @@ -cdist-type__consul(7) -===================== - -NAME ----- -cdist-type__consul - Install consul - - -DESCRIPTION ------------ -Downloads and installs the consul binary from https://dl.bintray.com/mitchellh/consul. -Note that the consul binary is downloaded on the server (the machine running -cdist) and then deployed to the target host using the __file type unless --direct -parameter is used. - - -REQUIRED PARAMETERS -------------------- -None. - - -OPTIONAL PARAMETERS -------------------- -state - either 'present' or 'absent'. Defaults to 'present' - -version - which version of consul to install. See ./files/versions for a list of - supported versions. Defaults to the latest known version. - - -BOOLEAN PARAMETERS ------------------- -direct - Download and deploy consul binary directly on the target machine. - - -MESSAGES --------- -If consul binary is created using __staged_file then underlaying __file type messages are emitted. - -If consul binary is created by direct method then the following messages are emitted: - -/usr/local/bin/consul created - consul binary was created - - -EXAMPLES --------- - -.. code-block:: sh - - # just install using defaults - __consul - - # install by downloading consul binary directly on the target machine - __consul --direct - - # specific version - __consul \ - --version 0.4.1 - - -AUTHORS -------- -| Steven Armstrong -| Darko Poljak - - -COPYING -------- -Copyright \(C) 2015 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__consul/manifest b/cdist/conf/type/__consul/manifest deleted file mode 100755 index 156eb667..00000000 --- a/cdist/conf/type/__consul/manifest +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/sh -e -# -# 2015 Steven Armstrong (steven-cdist at armstrong.cc) -# 2016 Nico Schottelius (nico-cdist at schottelius.org) -# 2018 Darko Poljak (darko.poljak at gmail.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - - -os=$(cat "$__global/explorer/os") - -case "$os" in - alpine|scientific|centos|redhat|ubuntu|debian|devuan|archlinux|gentoo) - # any linux should work - : - ;; - *) - echo "Your operating system ($os) is currently not supported by this type (${__type##*/})." >&2 - echo "Please contribute an implementation for it if you can." >&2 - exit 1 - ;; -esac - -versions_dir="$__type/files/versions" -version="$(cat "$__object/parameter/version")" -version_dir="$versions_dir/$version" - -if [ ! -d "$version_dir" ]; then - echo "Unknown consul version '$version'. Expected one of:" >&2 - ls "$versions_dir" >&2 - exit 1 -fi - -if [ -f "$__object/parameter/direct" ]; then - __package unzip - __package curl -else - __staged_file /usr/local/bin/consul \ - --source "$(cat "$version_dir/source")" \ - --cksum "$(cat "$version_dir/cksum")" \ - --fetch-command 'curl -s -L "%s"' \ - --prepare-command 'unzip -p "%s"' \ - --state "$(cat "$__object/parameter/state")" \ - --group root \ - --owner root \ - --mode 755 -fi diff --git a/cdist/conf/type/__consul/parameter/boolean b/cdist/conf/type/__consul/parameter/boolean deleted file mode 100644 index aa81b5e0..00000000 --- a/cdist/conf/type/__consul/parameter/boolean +++ /dev/null @@ -1 +0,0 @@ -direct diff --git a/cdist/conf/type/__consul/parameter/default/state b/cdist/conf/type/__consul/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__consul/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__consul/parameter/default/version b/cdist/conf/type/__consul/parameter/default/version deleted file mode 100644 index af0b7ddb..00000000 --- a/cdist/conf/type/__consul/parameter/default/version +++ /dev/null @@ -1 +0,0 @@ -1.0.6 diff --git a/cdist/conf/type/__consul/parameter/optional b/cdist/conf/type/__consul/parameter/optional deleted file mode 100644 index 4d595ed7..00000000 --- a/cdist/conf/type/__consul/parameter/optional +++ /dev/null @@ -1,2 +0,0 @@ -state -version diff --git a/cdist/conf/type/__consul_agent/files/consul-prepare.upstart b/cdist/conf/type/__consul_agent/files/consul-prepare.upstart deleted file mode 100644 index 569220d1..00000000 --- a/cdist/conf/type/__consul_agent/files/consul-prepare.upstart +++ /dev/null @@ -1,9 +0,0 @@ -start on starting consul - -task - -script - mkdir -p /var/run/consul - chown consul:consul /var/run/consul - chmod 2770 /var/run/consul -end script diff --git a/cdist/conf/type/__consul_agent/files/consul.sys-openrc b/cdist/conf/type/__consul_agent/files/consul.sys-openrc deleted file mode 100644 index 1dbe9375..00000000 --- a/cdist/conf/type/__consul_agent/files/consul.sys-openrc +++ /dev/null @@ -1,38 +0,0 @@ -#!/sbin/openrc-run -# 2019 Nico Schottelius (nico-cdist at schottelius.org) - -description="consul agent" - -pidfile="${CONSUL_PIDFILE:-"/var/run/$RC_SVCNAME/pidfile"}" -command="${CONSUL_BINARY:-"/usr/local/bin/consul"}" - - -checkconfig() { - if [ ! -d /var/run/consul ] ; then - mkdir -p /var/run/consul || return 1 - chown consul:consul /var/run/$NAME || return 1 - chmod 2770 /var/run/$NAME || return 1 - fi -} - -start() { - need net - - start-stop-daemon --start --quiet --oknodo \ - --pidfile "$pidfile" --background \ - --exec $command -- agent -pid-file="$pidfile" -config-dir /etc/consul/conf.d -} -start_pre() { - checkconfig -} - -stop() { - if [ "${RC_CMD}" = "restart" ] ; then - checkconfig || return 1 - fi - - ebegin "Stopping $RC_SVCNAME" - start-stop-daemon --stop --exec "$command" \ - --pidfile "$pidfile" --quiet - eend $? -} diff --git a/cdist/conf/type/__consul_agent/files/consul.systemd b/cdist/conf/type/__consul_agent/files/consul.systemd deleted file mode 100644 index 8d5fd323..00000000 --- a/cdist/conf/type/__consul_agent/files/consul.systemd +++ /dev/null @@ -1,22 +0,0 @@ -[Unit] -Description=Consul Agent -Wants=basic.target -After=basic.target network.target - -[Service] -User=consul -Group=consul -Environment="GOMAXPROCS=2" -# Run ExecStartPre with root-permissions -PermissionsStartOnly=true -ExecStartPre=/usr/bin/mkdir -p /var/run/consul -ExecStartPre=/usr/bin/chown consul:consul /var/run/consul -ExecStartPre=/usr/bin/chmod 2770 /var/run/consul -ExecStart=/usr/local/bin/consul agent -config-dir /etc/consul/conf.d -ExecReload=/bin/kill -HUP $MAINPID -KillMode=process -Restart=on-failure -RestartSec=42s - -[Install] -WantedBy=multi-user.target diff --git a/cdist/conf/type/__consul_agent/files/consul.sysv-debian b/cdist/conf/type/__consul_agent/files/consul.sysv-debian deleted file mode 100644 index 4f43c000..00000000 --- a/cdist/conf/type/__consul_agent/files/consul.sysv-debian +++ /dev/null @@ -1,94 +0,0 @@ -#!/bin/sh -# -# 2015-2018 Nico Schottelius (nico-cdist at schottelius.org) -# 2015 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -### BEGIN INIT INFO -# Provides: consul -# Required-Start: $network $local_fs $remote_fs -# Required-Stop: $local_fs -# Should-Start: -# Should-Stop: -# Short-Description: consul -# Description: consul agent -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -### END INIT INFO - -if [ -f "/etc/default/consul" ]; then - # shellcheck disable=SC1091 - . /etc/default/consul -fi - -# shellcheck disable=SC1091 -. /lib/lsb/init-functions - -NAME=consul -CONSUL=/usr/local/bin/consul -CONFIG=/etc/$NAME/conf.d -PID_FILE=/var/run/$NAME/pidfile - -mkdir -p /var/run/$NAME -chown consul:consul /var/run/$NAME -chmod 2770 /var/run/$NAME - -export PATH="${PATH:+$PATH:}/usr/sbin:/sbin" - -case "$1" in - start) - log_daemon_msg "Starting consul agent" "consul" || true - if start-stop-daemon --start --quiet --oknodo \ - --pidfile "$PID_FILE" --background \ - --exec $CONSUL -- agent -pid-file="$PID_FILE" -config-dir "$CONFIG"; then - log_end_msg 0 || true - else - log_end_msg 1 || true - fi - ;; - - stop) - log_daemon_msg "Stopping consul agent" "consul" || true - if start-stop-daemon --stop --quiet --oknodo --pidfile $PID_FILE; then - log_end_msg 0 || true - else - log_end_msg 1 || true - fi - ;; - - reload) - log_daemon_msg "Reloading consul agent" "consul" || true - if start-stop-daemon --stop --signal HUP --quiet --oknodo --pidfile $PID_FILE --exec $CONSUL; then - log_end_msg 0 || true - else - log_end_msg 1 || true - fi - ;; - - restart) - $0 stop && $0 start - ;; - - status) - status_of_proc -p $PID_FILE $CONSUL consul && exit 0 || exit $? - ;; - - *) - log_action_msg "Usage: /etc/init.d/consul {start|stop|reload|restart|status}" - exit 1 - ;; -esac diff --git a/cdist/conf/type/__consul_agent/files/consul.sysv-redhat b/cdist/conf/type/__consul_agent/files/consul.sysv-redhat deleted file mode 100644 index 58fc9bd9..00000000 --- a/cdist/conf/type/__consul_agent/files/consul.sysv-redhat +++ /dev/null @@ -1,98 +0,0 @@ -#!/bin/bash -# -# /etc/rc.d/init.d/consul -# -# Daemonize the consul agent. -# -# chkconfig: 2345 95 95 -# description: Service discovery and configuration made easy. \ -# Distributed, highly available, and datacenter-aware. -# processname: consul -# pidfile: /var/run/consul/pidfile - -# Source function library. - -# shellcheck disable=SC1091 -. /etc/init.d/functions -NAME=consul -CONSUL=/usr/local/bin/consul -CONFIG="/etc/$NAME/conf.d" -PID_FILE="/var/run/$NAME/pidfile" -LOG_FILE="/var/log/$NAME" - -# shellcheck disable=SC1090 -[ -e "/etc/sysconfig/$NAME" ] && . "/etc/sysconfig/$NAME" -export GOMAXPROCS="${GOMAXPROCS:-2}" - -mkdir -p "/var/run/$NAME" -chown consul:consul "/var/run/$NAME" -chmod 2770 "/var/run/$NAME" - - -start() { - printf "Starting %s: " "$NAME" - daemon --user=consul \ - --pidfile="$PID_FILE" \ - "$CONSUL" agent -pid-file="$PID_FILE" -config-dir "$CONFIG" >> "$LOG_FILE" & - retcode=$? - touch "/var/lock/subsys/$NAME" - return "$retcode" -} - -stop() { - printf "Shutting down %s: " "$NAME" - killproc -p "$PID_FILE" "$NAME" - retcode=$? - rm -f "/var/lock/subsys/$NAME" - return "$retcode" -} - -case "$1" in - start) - if status -p "$PID_FILE" "$NAME" >/dev/null; then - echo "$NAME already running" - else - start - fi - ;; - stop) - if status -p "$PID_FILE" "$NAME" >/dev/null; then - stop - else - echo "$NAME not running" - fi - ;; - info) - "$CONSUL" info - ;; - status) - status -p "$PID_FILE" "$NAME" - exit $? - ;; - restart) - if status -p "$PID_FILE" "$NAME" >/dev/null; then - stop - fi - start - ;; - reload) - if status -p "$PID_FILE" "$NAME" >/dev/null; then - kill -HUP "$(cat "$PID_FILE")" - else - echo "$NAME not running" - fi - ;; - condrestart) - if [ -f "/var/lock/subsys/$NAME" ]; then - if status -p "$PID_FILE" "$NAME" >/dev/null; then - stop - fi - start - fi - ;; - *) - echo "Usage: $NAME {start|stop|status|reload|restart|condrestart|info}" - exit 1 - ;; -esac -exit $? diff --git a/cdist/conf/type/__consul_agent/files/consul.upstart b/cdist/conf/type/__consul_agent/files/consul.upstart deleted file mode 100644 index ed0c7b8e..00000000 --- a/cdist/conf/type/__consul_agent/files/consul.upstart +++ /dev/null @@ -1,13 +0,0 @@ -description "Consul Agent" -start on (local-filesystems and net-device-up IFACE!=lo) -stop on runlevel [06] - -setuid consul -setgid consul - -respawn -respawn limit 10 10 -kill timeout 10 - -exec /usr/local/bin/consul agent -config-dir /etc/consul/conf.d - diff --git a/cdist/conf/type/__consul_agent/gencode-remote b/cdist/conf/type/__consul_agent/gencode-remote deleted file mode 100755 index 997aa831..00000000 --- a/cdist/conf/type/__consul_agent/gencode-remote +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh -e -# -# 2015 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -service="consul" -state="$(cat "$__object/parameter/state")" - -case "$state" in - present) - : - ;; - absent) - echo "service $service stop || true" - ;; -esac diff --git a/cdist/conf/type/__consul_agent/man.rst b/cdist/conf/type/__consul_agent/man.rst deleted file mode 100644 index 966abc60..00000000 --- a/cdist/conf/type/__consul_agent/man.rst +++ /dev/null @@ -1,181 +0,0 @@ -cdist-type__consul_agent(7) -=========================== - -NAME ----- -cdist-type__consul_agent - Manage the consul agent - - -DESCRIPTION ------------ -Configure and manage the consul agent. - - -REQUIRED PARAMETERS -------------------- -None. - - -OPTIONAL PARAMETERS -------------------- -acl-datacenter - only used by servers. This designates the datacenter which is authoritative - for ACL information. - -acl-default-policy - either "allow" or "deny"; defaults to "allow". The default policy controls the - behavior of a token when there is no matching rule. - -acl-down-policy - either "allow", "deny" or "extend-cache"; "extend-cache" is the default. - -acl-master-token - only used for servers in the acl_datacenter. This token will be created with - management-level permissions if it does not exist. It allows operators to - bootstrap the ACL system with a token ID that is well-known. - -acl-token - when provided, the agent will use this token when making requests to the - Consul servers. - -acl-ttl - used to control Time-To-Live caching of ACLs. - -bind-addr - sets the bind address for cluster communication - -bootstrap-expect - sets server to expect bootstrap mode - -ca-file-source - path to a PEM encoded certificate authority file which will be uploaded and - configure using the ca_file config option. - -cert-file-source - path to a PEM encoded certificate file which will be uploaded and - configure using the cert_file config option. - -client-addr - sets the address to bind for client access - -datacenter - datacenter of the agent - -encrypt - provides the gossip encryption key - -group - the primary group for the agent - -json-config - path to a partial json config file without leading { and trailing }. - If json-config is '-' (dash), take what was written to stdin as the file content. - -key-file-source - path to a PEM encoded private key file which will be uploaded and - configure using the key_file config option. - -node-name - name of this node. Must be unique in the cluster - -retry-join - address to attempt joining every retry_interval until at least one join works. - Can be specified multiple times. - -user - the user to run the agent as - -state - if the agent is 'present' or 'absent'. Defaults to 'present'. - Currently state=absent is not working due to some dependency issues. - - -BOOLEAN PARAMETERS ------------------- -disable-remote-exec - disables support for remote execution. When set to true, the agent will ignore any incoming remote exec requests. - -disable-update-check - disables automatic checking for security bulletins and new version releases - -leave-on-terminate - gracefully leave cluster on SIGTERM - -rejoin-after-leave - rejoin the cluster using the previous state after leaving - -server - used to control if an agent is in server or client mode - -enable-syslog - enables logging to syslog - -verify-incoming - enforce the use of TLS and verify a client's authenticity on incoming connections - -verify-outgoing - enforce the use of TLS and verify the peers authenticity on outgoing connections - - -EXAMPLES --------- - -.. code-block:: sh - - # configure as server, bootstrap and rejoin - hostname="$(cat "$__global/explorer/hostname")" - __consul_agent \ - --datacenter dc1 \ - --node-name "${hostname%%.*}" \ - --disable-update-check \ - --server \ - --rejoin-after-leave \ - --bootstrap-expect 3 \ - --retry-join consul-01 \ - --retry-join consul-02 \ - --retry-join consul-03 - - # configure as server, bootstrap and rejoin with ssl support - hostname="$(cat "$__global/explorer/hostname")" - __consul_agent \ - --datacenter dc1 \ - --node-name "${hostname%%.*}" \ - --disable-update-check \ - --server \ - --rejoin-after-leave \ - --bootstrap-expect 3 \ - --retry-join consul-01 \ - --retry-join consul-02 \ - --retry-join consul-03 \ - --ca-file-source /path/to/ca.pem \ - --cert-file-source /path/to/cert.pem \ - --key-file-source /path/to/key.pem \ - --verify-incoming \ - --verify-outgoing - - # configure as client and try joining existing cluster - __consul_agent \ - --datacenter dc1 \ - --node-name "${hostname%%.*}" \ - --disable-update-check \ - --retry-join consul-01 \ - --retry-join consul-02 \ - --retry-join consul-03 - - -SEE ALSO --------- -consul documentation at: . - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2015 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__consul_agent/manifest b/cdist/conf/type/__consul_agent/manifest deleted file mode 100755 index a88d26ed..00000000 --- a/cdist/conf/type/__consul_agent/manifest +++ /dev/null @@ -1,225 +0,0 @@ -#!/bin/sh -e -# -# 2015 Steven Armstrong (steven-cdist at armstrong.cc) -# 2015-2019 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - - -os=$(cat "$__global/explorer/os") - -case "$os" in - alpine|scientific|centos|debian|devuan|redhat|ubuntu) - # whitelist safeguard - : - ;; - *) - echo "Your operating system ($os) is currently not supported by this type (${__type##*/})." >&2 - echo "Please contribute an implementation for it if you can." >&2 - exit 1 - ;; -esac - -state="$(cat "$__object/parameter/state")" -user="$(cat "$__object/parameter/user")" -group="$(cat "$__object/parameter/group")" -data_dir="/var/lib/consul" -conf_dir="/etc/consul/conf.d" -conf_file="config.json" - -# FIXME: there has got to be a better way to handle the dependencies in this case -case "$state" in - present) - __group "$group" --system --state "$state" - require="__group/$group" \ - __user "$user" --system --gid "$group" \ - --home "$data_dir" --state "$state" - export require="__user/consul" - ;; - absent) - echo "Sorry, state=absent currently not supported :-(" >&2 - exit 1 - require="$__object_name" \ - __user "$user" --system --gid "$group" --state "$state" - require="__user/$user" \ - __group "$group" --system --state "$state" - ;; -esac - -__directory /etc/consul \ - --owner root --group "$group" --mode 750 --state "$state" -require="__directory/etc/consul" \ - __directory "$conf_dir" \ - --owner root --group "$group" --mode 750 --state "$state" - -if [ -f "$__object/parameter/ca-file-source" ] || [ -f "$__object/parameter/cert-file-source" ] || [ -f "$__object/parameter/key-file-source" ]; then - # create directory for ssl certs - require="__directory/etc/consul" \ - __directory /etc/consul/ssl \ - --owner root --group "$group" --mode 750 --state "$state" -fi - -__directory "$data_dir" \ - --owner "$user" --group "$group" --mode 770 --state "$state" - - -# Generate json config file -( -echo "{" - -# parameters we define ourself -printf ' "data_dir": "%s"\n' "$data_dir" - -cd "$__object/parameter/" -for param in *; do - case "$param" in - state|user|group|json-config) continue ;; - ca-file-source|cert-file-source|key-file-source) - source="$(cat "$__object/parameter/$param")" - destination="/etc/consul/ssl/${source##*/}" - require="__directory/etc/consul/ssl" \ - __file "$destination" \ - --owner root --group consul --mode 640 \ - --source "$source" \ - --state "$state" - key="$(echo "${param%-*}" | tr '-' '_')" - printf ' ,"%s": "%s"\n' "$key" "$destination" - ;; - disable-remote-exec|disable-update-check|leave-on-terminate|rejoin-after-leave|server|enable-syslog|verify-incoming|verify-outgoing) - # handle boolean parameters - key="$(echo "$param" | tr '-' '_')" - printf ' ,"%s": true\n' "$key" - ;; - retry-join) - # join multiple parameters into json array - retry_join="$(awk '{printf "\""$1"\","}' "$__object/parameter/retry-join")" - # remove trailing , - printf ' ,"retry_join": [%s]\n' "${retry_join%*,}" - ;; - retry-join-wan) - # join multiple parameters into json array over wan - retry_join_wan="$(awk '{printf "\""$1"\","}' "$__object/parameter/retry-join-wan")" - # remove trailing , - printf ' ,"retry_join_wan": [%s]\n' "${retry_join_wan%*,}" - ;; - bootstrap-expect) - # integer key=value parameters - key="$(echo "$param" | tr '-' '_')" - printf ' ,"%s": %s\n' "$key" "$(cat "$__object/parameter/$param")" - ;; - *) - # string key=value parameters - key="$(echo "$param" | tr '-' '_')" - printf ' ,"%s": "%s"\n' "$key" "$(cat "$__object/parameter/$param")" - ;; - esac -done -if [ -f "$__object/parameter/json-config" ]; then - json_config="$(cat "$__object/parameter/json-config")" - if [ "$json_config" = "-" ]; then - json_config="$__object/stdin" - fi - # remove leading and trailing whitespace and commas from first and last line - # indent each line with 3 spaces for consistency - json=$(sed -e 's/^[ \t]*/ /' -e '1s/^[ \t,]*//' -e '$s/[ \t,]*$//' "$json_config") - printf ' ,%s\n' "$json" -fi -echo "}" -) | \ -require="__directory${conf_dir}" \ - __config_file "${conf_dir}/${conf_file}" \ - --owner root --group "$group" --mode 640 \ - --state "$state" \ - --onchange 'service consul status >/dev/null && service consul reload || true' \ - --source - - -init_sysvinit() -{ - __file /etc/init.d/consul \ - --owner root --group root --mode 0755 \ - --state "$state" \ - --source "$__type/files/consul.sysv-$1" - require="__file/etc/init.d/consul" __start_on_boot consul -} - -init_systemd() -{ - __file /lib/systemd/system/consul.service \ - --owner root --group root --mode 0644 \ - --state "$state" \ - --source "$__type/files/consul.systemd" - require="__file/lib/systemd/system/consul.service" __start_on_boot consul -} - -init_upstart() -{ - __file /etc/init/consul-prepare.conf \ - --owner root --group root --mode 0644 \ - --state "$state" \ - --source "$__type/files/consul-prepare.upstart" - require="__file/etc/init/consul-prepare.conf" \ - __file /etc/init/consul.conf \ - --owner root --group root --mode 0644 \ - --state "$state" \ - --source "$__type/files/consul.upstart" - require="__file/etc/init/consul.conf" __start_on_boot consul -} - -# Install init script to start on boot -case "$os" in - alpine|devuan) - init_sysvinit debian - ;; - centos|redhat) - os_version="$(sed 's/[^0-9.]//g' "$__global/explorer/os_version")" - major_version="${os_version%%.*}" - case "$major_version" in - [456]) - init_sysvinit redhat - ;; - 7) - init_systemd - ;; - *) - echo "Unsupported CentOS/Redhat version: $os_version" >&2 - exit 1 - ;; - esac - ;; - - debian) - os_version=$(cat "$__global/explorer/os_version") - major_version="${os_version%%.*}" - - case "$major_version" in - [567]) - init_sysvinit debian - ;; - [89]) - init_systemd - ;; - *) - echo "Unsupported Debian version $os_version" >&2 - exit 1 - ;; - esac - ;; - - ubuntu) - init_upstart - ;; -esac diff --git a/cdist/conf/type/__consul_agent/parameter/boolean b/cdist/conf/type/__consul_agent/parameter/boolean deleted file mode 100644 index 91f7f17e..00000000 --- a/cdist/conf/type/__consul_agent/parameter/boolean +++ /dev/null @@ -1,8 +0,0 @@ -disable-remote-exec -disable-update-check -leave-on-terminate -rejoin-after-leave -server -enable-syslog -verify-incoming -verify-outgoing diff --git a/cdist/conf/type/__consul_agent/parameter/default/group b/cdist/conf/type/__consul_agent/parameter/default/group deleted file mode 100644 index 7d22c92b..00000000 --- a/cdist/conf/type/__consul_agent/parameter/default/group +++ /dev/null @@ -1 +0,0 @@ -consul diff --git a/cdist/conf/type/__consul_agent/parameter/default/state b/cdist/conf/type/__consul_agent/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__consul_agent/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__consul_agent/parameter/default/user b/cdist/conf/type/__consul_agent/parameter/default/user deleted file mode 100644 index 7d22c92b..00000000 --- a/cdist/conf/type/__consul_agent/parameter/default/user +++ /dev/null @@ -1 +0,0 @@ -consul diff --git a/cdist/conf/type/__consul_agent/parameter/optional b/cdist/conf/type/__consul_agent/parameter/optional deleted file mode 100644 index 37aad8c1..00000000 --- a/cdist/conf/type/__consul_agent/parameter/optional +++ /dev/null @@ -1,20 +0,0 @@ -acl-datacenter -acl-default-policy -acl-down-policy -acl-master-token -acl-token -acl-ttl -bind-addr -bootstrap-expect -ca-file-source -cert-file-source -client-addr -datacenter -encrypt -group -json-config -key-file-source -node-name -user -state -advertise-wan diff --git a/cdist/conf/type/__consul_agent/parameter/optional_multiple b/cdist/conf/type/__consul_agent/parameter/optional_multiple deleted file mode 100644 index 740e4d7f..00000000 --- a/cdist/conf/type/__consul_agent/parameter/optional_multiple +++ /dev/null @@ -1,2 +0,0 @@ -retry-join -retry-join-wan diff --git a/cdist/conf/type/__consul_check/man.rst b/cdist/conf/type/__consul_check/man.rst deleted file mode 100644 index 9694c7af..00000000 --- a/cdist/conf/type/__consul_check/man.rst +++ /dev/null @@ -1,102 +0,0 @@ -cdist-type__consul_check(7) -============================= - -NAME ----- -cdist-type__consul_check - Manages consul checks - - -DESCRIPTION ------------ -Generate and deploy check definitions for a consul agent. -See http://www.consul.io/docs/agent/checks.html for parameter documentation. - -Use either script together with interval, or use ttl. - - -REQUIRED PARAMETERS -------------------- -None. - - -OPTIONAL PARAMETERS -------------------- -docker-container-id - the id of the docker container to run - -http - the url to check - -id - The id of this check. - -interval - the interval in which the check should run - -name - The name of this check. Defaults to __object_id - -notes - human readable description - -script - the shell command to run - -service-id - the id of the service this check is bound to - -shell - the shell to run inside the docker container - -state - if this check is 'present' or 'absent'. Defaults to 'present'. - -status - specify the initial state of this health check - -tcp - the host and port to check - -timeout - after how long to timeout checks which take to long - -token - ACL token to use for interacting with the catalog - -ttl - how long a TTL check is considered healthy without being updated through the - HTTP interface - - -EXAMPLES --------- - -.. code-block:: sh - - __consul_check redis \ - --script /usr/local/bin/check_redis.py \ - --interval 10s - - __consul_check some-object-id \ - --id web-app \ - --name "Web App Status" \ - --notes "Web app does a curl internally every 10 seconds" \ - --ttl 30s - - -SEE ALSO --------- -:strong:`cdist-type__consul_agent`\ (7) - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2015-2016 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__consul_check/manifest b/cdist/conf/type/__consul_check/manifest deleted file mode 100755 index c9f7add9..00000000 --- a/cdist/conf/type/__consul_check/manifest +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/sh -e -# -# 2015-2016 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -name="$(cat "$__object/parameter/name" 2>/dev/null || echo "$__object_id")" -conf_dir="/etc/consul/conf.d" -conf_file="check_${name}.json" -state="$(cat "$__object/parameter/state")" - -# Sanity checks -if [ -f "$__object/parameter/ttl" ]; then - for conflicts_ttl in 'docker-container-id' 'http' 'script' 'tcp' 'timeout'; do - if [ -f "$__object/parameter/${conflicts_ttl}" ]; then - echo "Can not use --ttl together with --${conflicts_ttl}." >&2 - exit 1 - fi - done -fi -if [ ! -f "$__object/parameter/interval" ]; then - for requires_interval in 'docker-id' 'http' 'script' 'tcp'; do - if [ -f "$__object/parameter/${requires_interval}" ]; then - echo "When using --${requires_interval} you must also define --interval." >&2 - exit 1 - fi - done -fi -if [ -f "$__object/parameter/docker-container-id" ] && [ ! -f "$__object/parameter/script" ]; then - echo "When using --docker-container-id you must also define --script." >&2 - exit 1 -fi - -# Generate json config file -( -echo "{" -printf ' "check": {\n' -printf ' "name": "%s"\n' "$name" -cd "$__object/parameter/" -for param in *; do - case "$param" in - state|name) continue ;; - *) - key="$(echo "$param" | tr '-' '_')" - printf ' ,"%s": "%s"\n' "$key" "$(cat "$__object/parameter/$param")" - ;; - esac -done -# end check -echo " }" -# end json file -echo "}" -) | \ -require="__directory${conf_dir}" \ - __config_file "${conf_dir}/${conf_file}" \ - --owner root --group consul --mode 640 \ - --state "$state" \ - --onchange 'service consul status >/dev/null && service consul reload || true' \ - --source - diff --git a/cdist/conf/type/__consul_check/parameter/default/state b/cdist/conf/type/__consul_check/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__consul_check/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__consul_check/parameter/optional b/cdist/conf/type/__consul_check/parameter/optional deleted file mode 100644 index 0e392956..00000000 --- a/cdist/conf/type/__consul_check/parameter/optional +++ /dev/null @@ -1,15 +0,0 @@ -docker-container-id -http -id -interval -name -notes -script -service-id -shell -state -status -tcp -timeout -token -ttl diff --git a/cdist/conf/type/__consul_reload/gencode-remote b/cdist/conf/type/__consul_reload/gencode-remote deleted file mode 100755 index 839fd0c3..00000000 --- a/cdist/conf/type/__consul_reload/gencode-remote +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -e -# -# 2015 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -service="consul" -if grep -q "^__file/etc/consul/conf.d/" "$__messages_in"; then - echo "service $service status && service $service reload || true" -fi diff --git a/cdist/conf/type/__consul_reload/man.rst b/cdist/conf/type/__consul_reload/man.rst deleted file mode 100644 index f48a041a..00000000 --- a/cdist/conf/type/__consul_reload/man.rst +++ /dev/null @@ -1,42 +0,0 @@ -cdist-type__consul_reload(7) -============================ - -NAME ----- -cdist-type__consul_reload - Reload consul - - -DESCRIPTION ------------ -Reload consul after configuration changes. - - -REQUIRED PARAMETERS -------------------- -None. - - -OPTIONAL PARAMETERS -------------------- -None. - - -EXAMPLES --------- - -.. code-block:: sh - - __consul_reload - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2015 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__consul_service/man.rst b/cdist/conf/type/__consul_service/man.rst deleted file mode 100644 index 510be3d5..00000000 --- a/cdist/conf/type/__consul_service/man.rst +++ /dev/null @@ -1,85 +0,0 @@ -cdist-type__consul_service(7) -============================= - -NAME ----- -cdist-type__consul_service - Manages consul services - - -DESCRIPTION ------------ -Generate and deploy service definitions for a consul agent. -See http://www.consul.io/docs/agent/services.html for parameter documentation. - -Use either script together with interval, or use ttl. - - -REQUIRED PARAMETERS -------------------- -None. - - -OPTIONAL PARAMETERS -------------------- -check-interval - the interval in which the script given with --check-script should be run - -check-http - the URL to check for HTTP 200-ish status every --check-interval - -check-script - the shell command to run every --check-interval - -check-ttl - how long a service is considered healthy without being updated through the - HTTP interfave - -id - Defaults to --name - -name - The name of this service. Defaults to __object_id - -port - the port at which this service can be reached - -state - if this service is 'present' or 'absent'. Defaults to 'present'. - -tag - a tag to add to this service. Can be specified multiple times. - - -EXAMPLES --------- - -.. code-block:: sh - - __consul_service redis \ - --tag master \ - --tag production \ - --port 8000 \ - --check-script /usr/local/bin/check_redis.py \ - --check-interval 10s - - __consul_service webapp \ - --port 80 \ - --check-ttl 10s - - -SEE ALSO --------- -:strong:`cdist-type__consul_agent`\ (7) - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2015 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__consul_service/manifest b/cdist/conf/type/__consul_service/manifest deleted file mode 100755 index 60397db7..00000000 --- a/cdist/conf/type/__consul_service/manifest +++ /dev/null @@ -1,94 +0,0 @@ -#!/bin/sh -e -# -# 2015 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -name="$(cat "$__object/parameter/name" 2>/dev/null || echo "$__object_id")" -conf_dir="/etc/consul/conf.d" -conf_file="service_${name}.json" -state="$(cat "$__object/parameter/state")" - -# Sanity checks -if [ -f "$__object/parameter/check-script" ] && [ -f "$__object/parameter/check-ttl" ]; then - echo "Use either --check-script together with --check-interval OR --check-ttl, but not both" >&2 - exit 1 -fi -if [ -f "$__object/parameter/check-script" ] && [ ! -f "$__object/parameter/check-interval" ]; then - echo "When using --check-script you must also define --check-interval" >&2 - exit 1 -fi -if [ -f "$__object/parameter/check-http" ] && [ ! -f "$__object/parameter/check-interval" ]; then - echo "When using --check-http you must also define --check-interval" >&2 - exit 1 -fi - -# Generate json config file -( -echo "{" -printf ' "service": {\n' -printf ' "name": "%s"\n' "$name" -cd "$__object/parameter/" -for param in *; do - case "$param" in - state|name|check-interval) continue ;; - check-script) - printf ' ,"check": {\n' - printf ' "script": "%s"\n' "$(cat "$__object/parameter/check-script")" - printf ' ,"interval": "%s"\n' "$(cat "$__object/parameter/check-interval")" - printf ' }\n' - ;; - check-ttl) - printf ' ,"check": {\n' - printf ' "ttl": "%s"\n' "$(cat "$__object/parameter/check-ttl")" - printf ' }\n' - ;; - check-http) - printf ' ,"check": {\n' - printf ' "http": "%s"\n' "$(cat "$__object/parameter/check-http")" - printf ' ,"interval": "%s"\n' "$(cat "$__object/parameter/check-interval")" - printf ' }\n' - ;; - tag) - # create json array from newline delimited file - tags="$(awk '{printf "\""$1"\","}' "$__object/parameter/tag")" - # remove trailing , - printf ' ,"tags": [%s]\n' "${tags%*,}" - ;; - port) - # integer key=value parameters - key="$(echo "$param" | tr '-' '_')" - printf ' ,"%s": %s\n' "$key" "$(cat "$__object/parameter/$param")" - ;; - *) - # string key=value parameters - key="$(echo "$param" | tr '-' '_')" - printf ' ,"%s": "%s"\n' "$key" "$(cat "$__object/parameter/$param")" - ;; - esac -done -# end service -echo " }" -# end json file -echo "}" -) | \ -require="__directory${conf_dir}" \ - __config_file "${conf_dir}/${conf_file}" \ - --owner root --group consul --mode 640 \ - --state "$state" \ - --onchange 'service consul status >/dev/null && service consul reload || true' \ - --source - diff --git a/cdist/conf/type/__consul_service/parameter/default/state b/cdist/conf/type/__consul_service/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__consul_service/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__consul_service/parameter/optional b/cdist/conf/type/__consul_service/parameter/optional deleted file mode 100644 index 2e3e8b63..00000000 --- a/cdist/conf/type/__consul_service/parameter/optional +++ /dev/null @@ -1,8 +0,0 @@ -check-http -check-interval -check-script -check-ttl -id -name -port -state diff --git a/cdist/conf/type/__consul_service/parameter/optional_multiple b/cdist/conf/type/__consul_service/parameter/optional_multiple deleted file mode 100644 index 42c7c82c..00000000 --- a/cdist/conf/type/__consul_service/parameter/optional_multiple +++ /dev/null @@ -1 +0,0 @@ -tag diff --git a/cdist/conf/type/__consul_template/files/consul-template.systemd b/cdist/conf/type/__consul_template/files/consul-template.systemd deleted file mode 100644 index c67eaab5..00000000 --- a/cdist/conf/type/__consul_template/files/consul-template.systemd +++ /dev/null @@ -1,19 +0,0 @@ -[Unit] -Description=Consul-Template Daemon -Wants=basic.target -After=basic.target network.target - -[Service] -User=root -Group=root -Environment="CONSUL_TEMPLATE_LOG=info" -Environment="GOMAXPROCS=2" -ExecStart=/usr/local/bin/consul-template -config /etc/consul-template/conf.d -ExecReload=/bin/kill -HUP $MAINPID -KillMode=process -Restart=on-failure -RestartSec=10s -LimitNOFILE=4096 - -[Install] -WantedBy=multi-user.target diff --git a/cdist/conf/type/__consul_template/files/consul-template.sysv b/cdist/conf/type/__consul_template/files/consul-template.sysv deleted file mode 100644 index b263915a..00000000 --- a/cdist/conf/type/__consul_template/files/consul-template.sysv +++ /dev/null @@ -1,92 +0,0 @@ -#!/bin/bash -# -# /etc/rc.d/init.d/consul-template -# -# Daemonize the consul-template agent. -# -# chkconfig: 2345 95 95 -# description: Generic template rendering and notifications with Consul -# processname: consul-template -# pidfile: /var/run/consul-template/pidfile - -# Source function library. - -# shellcheck disable=SC1091 -. /etc/init.d/functions -NAME=consul-template -CONSUL_TEMPLATE=/usr/local/bin/consul-template -CONFIG="/etc/$NAME/conf.d" -PID_FILE="/var/run/$NAME/pidfile" -LOG_FILE="/var/log/$NAME" - -# shellcheck disable=SC1090 -[ -e "/etc/sysconfig/$NAME" ] && . "/etc/sysconfig/$NAME" -export CONSUL_TEMPLATE_LOG="${CONSUL_TEMPLATE_LOG:-info}" -export GOMAXPROCS="${GOMAXPROCS:-2}" - -mkdir -p "/var/run/$NAME" - -start() { - printf "Starting %s: " "$NAME" - daemon --pidfile="$PID_FILE" \ - "$CONSUL_TEMPLATE" -config "$CONFIG" >> "$LOG_FILE" 2>&1 & - echo "$!" > "$PID_FILE" - retcode=$? - touch "/var/lock/subsys/$NAME" - return "$retcode" -} - -stop() { - printf "Shutting down %s: " "$NAME" - killproc -p "$PID_FILE" "$CONSUL_TEMPLATE" - retcode=$? - rm -f "/var/lock/subsys/$NAME" - return "$retcode" -} - -case "$1" in - start) - if status -p "$PID_FILE" "$NAME" >/dev/null; then - echo "$NAME already running" - else - start - fi - ;; - stop) - if status -p "$PID_FILE" "$NAME" >/dev/null; then - stop - else - echo "$NAME not running" - fi - ;; - status) - status -p "$PID_FILE" "$NAME" - exit $? - ;; - restart) - if status -p "$PID_FILE" "$NAME" >/dev/null; then - stop - fi - start - ;; - reload) - if status -p "$PID_FILE" "$NAME" >/dev/null; then - kill -HUP "$(cat "$PID_FILE")" - else - echo "$NAME not running" - fi - ;; - condrestart) - if [ -f "/var/lock/subsys/$NAME" ]; then - if status -p "$PID_FILE" "$NAME" >/dev/null; then - stop - fi - start - fi - ;; - *) - echo "Usage: $NAME {start|stop|status|reload|restart}" - exit 1 - ;; -esac -exit $? diff --git a/cdist/conf/type/__consul_template/files/consul-template.upstart b/cdist/conf/type/__consul_template/files/consul-template.upstart deleted file mode 100644 index b81a2818..00000000 --- a/cdist/conf/type/__consul_template/files/consul-template.upstart +++ /dev/null @@ -1,12 +0,0 @@ -description "Consul-Template Daemon" -start on (local-filesystems and net-device-up IFACE!=lo) -stop on runlevel [06] - -env CONSUL_TEMPLATE_LOG=info -env GOMAXPROCS=${GOMAXPROCS} - -exec /usr/local/bin/consul-template -config /etc/consul-template/conf.d >> /var/log/consul-template 2>&1 - -respawn -respawn limit 10 10 -kill timeout 10 diff --git a/cdist/conf/type/__consul_template/files/versions/0.10.0/cksum b/cdist/conf/type/__consul_template/files/versions/0.10.0/cksum deleted file mode 100644 index bbf394db..00000000 --- a/cdist/conf/type/__consul_template/files/versions/0.10.0/cksum +++ /dev/null @@ -1 +0,0 @@ -3401777891 9273880 consul-template diff --git a/cdist/conf/type/__consul_template/files/versions/0.10.0/source b/cdist/conf/type/__consul_template/files/versions/0.10.0/source deleted file mode 100644 index 031b1155..00000000 --- a/cdist/conf/type/__consul_template/files/versions/0.10.0/source +++ /dev/null @@ -1 +0,0 @@ -https://releases.hashicorp.com/consul-template/0.10.0/consul-template_0.10.0_linux_amd64.zip diff --git a/cdist/conf/type/__consul_template/files/versions/0.15.0/cksum b/cdist/conf/type/__consul_template/files/versions/0.15.0/cksum deleted file mode 100644 index 426338bd..00000000 --- a/cdist/conf/type/__consul_template/files/versions/0.15.0/cksum +++ /dev/null @@ -1 +0,0 @@ -2643547924 12487232 consul-template diff --git a/cdist/conf/type/__consul_template/files/versions/0.15.0/source b/cdist/conf/type/__consul_template/files/versions/0.15.0/source deleted file mode 100644 index fdf1fccf..00000000 --- a/cdist/conf/type/__consul_template/files/versions/0.15.0/source +++ /dev/null @@ -1 +0,0 @@ -https://releases.hashicorp.com/consul-template/0.15.0/consul-template_0.15.0_linux_amd64.zip diff --git a/cdist/conf/type/__consul_template/man.rst b/cdist/conf/type/__consul_template/man.rst deleted file mode 100644 index f13c699d..00000000 --- a/cdist/conf/type/__consul_template/man.rst +++ /dev/null @@ -1,141 +0,0 @@ -cdist-type__consul_template(7) -============================== - -NAME ----- -cdist-type__consul_template - Manage the consul-template service - - -DESCRIPTION ------------ -Downloads and installs the consul-template binary from -https://github.com/hashicorp/consul-template/releases/download/. -Generates a global config file and creates directory for per template config files. -Note that the consul-template binary is downloaded on the server (the machine running -cdist) and then deployed to the target host using the __file type. - - -REQUIRED PARAMETERS -------------------- -None. - - -OPTIONAL PARAMETERS -------------------- -auth-username - specify a username for basic authentication. - -auth-password - specify a password for basic authentication. - -batch-size - the size of the batch when polling multiple dependencies. - -consul - the location of the Consul instance to query (may be an IP address or FQDN) with port. - Defaults to 'localhost:8500'. - -log-level - The log level for output. This applies to the stdout/stderr logging as well - as syslog logging (if enabled). Valid values are "debug", "info", "warn", - and "err". The default value is "warn". - -max-stale - the maximum staleness of a query. If specified, Consul will distribute work among all - servers instead of just the leader. - -retry - the amount of time to wait if Consul returns an error when communicating - with the API. - -state - either 'present' or 'absent'. Defaults to 'present' - -ssl-cert - Path to an SSL client certificate to use to authenticate to the consul server. - Useful if the consul server "verify_incoming" option is set. - -ssl-ca-cert - Path to a CA certificate file, containing one or more CA certificates to - use to validate the certificate sent by the consul server to us. This is a - handy alternative to setting --ssl-no-verify if you are using your own CA. - -syslog-facility - The facility to use when sending to syslog. This requires the use of --syslog. - The default value is LOCAL0. - -token - the Consul API token. - -vault-address - the location of the Vault instance to query (may be an IP address or FQDN) with port. - -vault-token - the Vault API token. - -vault-ssl-cert - Path to an SSL client certificate to use to authenticate to the vault server. - -vault-ssl-ca-cert - Path to a CA certificate file, containing one or more CA certificates to - use to validate the certificate sent by the vault server to us. - -version - which version of consul-template to install. See ./files/versions for a list of - supported versions. Defaults to the latest known version. - -wait - the minimum(:maximum) to wait before rendering a new template to disk and - triggering a command, separated by a colon (:). If the optional maximum - value is omitted, it is assumed to be 4x the required minimum value. - - -BOOLEAN PARAMETERS ------------------- -ssl - use HTTPS while talking to Consul. Requires the Consul server to be configured to serve secure connections. - -ssl-no-verify - ignore certificate warnings. Only used if ssl is enabled. - -syslog - Send log output to syslog (in addition to stdout and stderr). - -vault-ssl - use HTTPS while talking to Vault. Requires the Vault server to be configured to serve secure connections. - -vault-ssl-no-verify - ignore certificate warnings. Only used if vault is enabled. - - -EXAMPLES --------- - -.. code-block:: sh - - __consul_template \ - --consul consul.service.consul:8500 \ - --retry 30s - - # specific version - __consul_template \ - --version 0.6.5 \ - --retry 30s - - -SEE ALSO --------- -consul documentation at: . - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2015 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__consul_template/manifest b/cdist/conf/type/__consul_template/manifest deleted file mode 100755 index b02fc332..00000000 --- a/cdist/conf/type/__consul_template/manifest +++ /dev/null @@ -1,191 +0,0 @@ -#!/bin/sh -e -# -# 2015 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - - -os=$(cat "$__global/explorer/os") - -case "$os" in - scientific|centos|redhat) - # whitelist safeguard - service_onchange='service consul-template status >/dev/null && service consul-template reload || true' \ - ;; - archlinux) - service_onchange="systemctl status consul-template >/dev/null && systemctl reload consul-template || true" - ;; - *) - echo "Your operating system ($os) is currently not supported by this type (${__type##*/})." >&2 - echo "Please contribute an implementation for it if you can." >&2 - exit 1 - ;; -esac - -versions_dir="$__type/files/versions" -version="$(cat "$__object/parameter/version")" -version_dir="$versions_dir/$version" - -if [ ! -d "$version_dir" ]; then - echo "Unknown consul-template version '$version'. Expected one of:" >&2 - ls "$versions_dir" >&2 - exit 1 -fi - -state="$(cat "$__object/parameter/state")" - -__staged_file /usr/local/bin/consul-template \ - --source "$(cat "$version_dir/source")" \ - --cksum "$(cat "$version_dir/cksum")" \ - --fetch-command 'curl -s -L "%s"' \ - --prepare-command 'unzip -p "%s"' \ - --state "$state" \ - --group root \ - --owner root \ - --mode 755 - - -conf_dir="/etc/consul-template/conf.d" -conf_file="config.hcl" -template_dir="/etc/consul-template/template" - -__directory /etc/consul-template \ - --owner root --group root --mode 750 -require="__directory/etc/consul-template" \ - __directory "$conf_dir" \ - --owner root --group root --mode 750 -require="__directory/etc/consul-template" \ - __directory "$template_dir" \ - --owner root --group root --mode 750 - - -# Generate hcl config file -( -cd "$__object/parameter/" -for param in *; do - case "$param" in - auth-password|state|ssl-*|syslog-*|version|vault-token|vault-ssl*) continue ;; - auth-username) - printf 'auth {\n' - printf ' enabled = true\n' - printf ' username = "%s"\n' "$(cat "$__object/parameter/auth-username")" - if [ -f "$__object/parameter/auth-password" ]; then - printf ' password = %s\n' "$(cat "$__object/parameter/auth-password")" - fi - printf '}\n' - ;; - ssl) - printf 'ssl {\n' - printf ' enabled = true\n' - if [ -f "$__object/parameter/ssl-no-verify" ]; then - printf ' verify = false\n' - fi - if [ -f "$__object/parameter/ssl-cert" ]; then - printf ' cert = "%s"\n' "$(cat "$__object/parameter/ssl-cert")" - fi - if [ -f "$__object/parameter/ssl-ca-cert" ]; then - printf ' ca_cert = "%s"\n' "$(cat "$__object/parameter/ssl-ca-cert")" - fi - printf '}\n' - ;; - syslog) - printf 'syslog {\n' - printf ' enabled = true\n' - if [ -f "$__object/parameter/syslog-facility" ]; then - printf ' facility = "%s"\n' "$(cat "$__object/parameter/syslog-facility")" - fi - printf '}\n' - ;; - vault-address) - printf 'vault {\n' - printf ' address = "%s"\n' "$(cat "$__object/parameter/vault-address")" - if [ -f "$__object/parameter/vault-token" ]; then - printf ' token = "%s"\n' "$(cat "$__object/parameter/vault-token")" - fi - if [ -f "$__object/parameter/vault-ssl" ]; then - printf ' ssl {\n' - printf ' enabled = true\n' - if [ -f "$__object/parameter/vault-ssl-no-verify" ]; then - printf ' verify = false\n' - fi - if [ -f "$__object/parameter/vault-ssl-cert" ]; then - printf ' cert = "%s"\n' "$(cat "$__object/parameter/vault-ssl-cert")" - fi - if [ -f "$__object/parameter/vault-ssl-ca-cert" ]; then - printf ' ca_cert = "%s"\n' "$(cat "$__object/parameter/vault-ssl-ca-cert")" - fi - printf ' }\n' - fi - printf '}\n' - ;; - *) - # string key=value parameters - key="$(echo "$param" | tr '-' '_')" - printf '%s = "%s"\n' "$key" "$(cat "$__object/parameter/$param")" - ;; - esac -done -) | \ -require="__directory${conf_dir}" \ - __config_file "${conf_dir}/${conf_file}" \ - --owner root --group root --mode 640 \ - --state "$state" \ - --onchange "$service_onchange" \ - --source - - - -# Install init script to start on boot -service="consul-template" -case "$os" in - centos|redhat) - os_version="$(sed 's/[^0-9.]//g' "$__global/explorer/os_version")" - major_version="${os_version%%.*}" - case "$major_version" in - 7) - __file "/lib/systemd/system/${service}.service" \ - --owner root --group root --mode 0555 \ - --state "$state" \ - --source "$__type/files/${service}.systemd" - export require="__file/lib/systemd/system/${service}.service" - ;; - *) - __file "/etc/init.d/${service}" \ - --owner root --group root --mode 0555 \ - --state "$state" \ - --source "$__type/files/${service}.sysv" - export require="__file/etc/init.d/${service}" - ;; - esac - __start_on_boot "$service" --state "$state" - ;; - ubuntu) - __file "/etc/init/${service}.conf" \ - --owner root --group root --mode 0644 \ - --state "$state" \ - --source "$__type/files/${service}.upstart" - export require="__file/etc/init/${service}.conf" - __start_on_boot "$service" --state "$state" - ;; - archlinux) - __file "/lib/systemd/system/${service}.service" \ - --owner root --group root --mode 0555 \ - --state "$state" \ - --source "$__type/files/${service}.systemd" - export require="__file/lib/systemd/system/${service}.service" - __start_on_boot "$service" --state "$state" - ;; -esac diff --git a/cdist/conf/type/__consul_template/notes b/cdist/conf/type/__consul_template/notes deleted file mode 100644 index fc7cca11..00000000 --- a/cdist/conf/type/__consul_template/notes +++ /dev/null @@ -1,93 +0,0 @@ -# < 0.7.0 -ssl = true -ssl_no_verify = true - -# >= 0.7.0 -ssl { - enabled = true - verify = false -} - -# >= 0.9.0 -ssl-cert -ssl-ca-cert - - - --------------------------------------------------------------------------------- -### from docs - - -ssl { - enabled = true - verify = false - cert = "/path/to/client/cert.pem" - ca_cert = "/path/to/ca/cert.pem" -} - - -ssl - Use HTTPS while talking to Consul. Requires the Consul server to be configured to serve secure connections. The default value is false. - -ssl-verify - Verify certificates when connecting via SSL. This requires the use of -ssl. The default value is true. - -ssl-cert - Path to an SSL client certificate to use to authenticate to the consul server. Useful if the consul server "verify_incoming" option is set. - -ssl-ca-cert - Path to a CA certificate file, containing one or more CA certificates to use to validate the certificate sent by the consul server to us. This is a handy alternative to setting --ssl-verify=false if you are using your own CA. - --------------------------------------------------------------------------------- - -### example config file from docs - -consul = "127.0.0.1:8500" -token = "abcd1234" // May also be specified via the envvar CONSUL_TOKEN -retry = "10s" -max_stale = "10m" -log_level = "warn" -pid_file = "/path/to/pid" - -vault { - address = "https://vault.service.consul:8200" - token = "abcd1234" // May also be specified via the envvar VAULT_TOKEN - ssl { - enabled = true - verify = true - cert = "/path/to/client/cert.pem" - ca_cert = "/path/to/ca/cert.pem" - } -} - - ---auth-username ---auth-password -# if any are given enabled = true -auth { - enabled = true - username = "test" - password = "test" -} - -ssl { - enabled = true - verify = false - cert = "/path/to/client/cert.pem" - ca_cert = "/path/to/ca/cert.pem" -} - -syslog { - enabled = true - facility = "LOCAL5" -} - -template { - source = "/path/on/disk/to/template" - destination = "/path/on/disk/where/template/will/render" - command = "optional command to run when the template is updated" -} - -template { - // Multiple template definitions are supported -} diff --git a/cdist/conf/type/__consul_template/parameter/boolean b/cdist/conf/type/__consul_template/parameter/boolean deleted file mode 100644 index 10057e46..00000000 --- a/cdist/conf/type/__consul_template/parameter/boolean +++ /dev/null @@ -1,5 +0,0 @@ -ssl -ssl-no-verify -syslog -vault-ssl -vault-ssl-no-verify diff --git a/cdist/conf/type/__consul_template/parameter/default/consul b/cdist/conf/type/__consul_template/parameter/default/consul deleted file mode 100644 index 42dfa616..00000000 --- a/cdist/conf/type/__consul_template/parameter/default/consul +++ /dev/null @@ -1 +0,0 @@ -localhost:8500 diff --git a/cdist/conf/type/__consul_template/parameter/default/log-level b/cdist/conf/type/__consul_template/parameter/default/log-level deleted file mode 100644 index 1ef71804..00000000 --- a/cdist/conf/type/__consul_template/parameter/default/log-level +++ /dev/null @@ -1 +0,0 @@ -warn diff --git a/cdist/conf/type/__consul_template/parameter/default/state b/cdist/conf/type/__consul_template/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__consul_template/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__consul_template/parameter/default/syslog-facility b/cdist/conf/type/__consul_template/parameter/default/syslog-facility deleted file mode 100644 index f32df182..00000000 --- a/cdist/conf/type/__consul_template/parameter/default/syslog-facility +++ /dev/null @@ -1 +0,0 @@ -LOCAL0 diff --git a/cdist/conf/type/__consul_template/parameter/default/version b/cdist/conf/type/__consul_template/parameter/default/version deleted file mode 100644 index a5510516..00000000 --- a/cdist/conf/type/__consul_template/parameter/default/version +++ /dev/null @@ -1 +0,0 @@ -0.15.0 diff --git a/cdist/conf/type/__consul_template/parameter/optional b/cdist/conf/type/__consul_template/parameter/optional deleted file mode 100644 index 8bc528ac..00000000 --- a/cdist/conf/type/__consul_template/parameter/optional +++ /dev/null @@ -1,18 +0,0 @@ -auth-username -auth-password -batch-size -consul -log-level -max-stale -retry -state -ssl-cert -ssl-ca-cert -syslog-facility -token -vault-address -vault-token -vault-ssl-cert -vault-ssl-ca-cert -version -wait diff --git a/cdist/conf/type/__consul_template_template/man.rst b/cdist/conf/type/__consul_template_template/man.rst deleted file mode 100644 index b2e3820b..00000000 --- a/cdist/conf/type/__consul_template_template/man.rst +++ /dev/null @@ -1,84 +0,0 @@ -cdist-type__consul_template_template(7) -======================================= - -NAME ----- -cdist-type__consul_template_template - Manage consul-template templates - - -DESCRIPTION ------------ -Generate and deploy template definitions for a consul-template. -See https://github.com/hashicorp/consul-template#examples for documentation. -Templates are written in the Go template format. -Either the --source or the --source-file parameter must be given. - - -REQUIRED PARAMETERS -------------------- -destination - the destination where the generated file should go. - - -OPTIONAL PARAMETERS -------------------- -command - an optional command to run after rendering the template to its destination. - -source - path to the template source. Conflicts --source-file. - -source-file - path to a local file which is uploaded using the __file type and configured - as the source. - If source is '-' (dash), take what was written to stdin as the file content. - Conflicts --source. - -state - if this template is 'present' or 'absent'. Defaults to 'present'. - -wait - The `minimum(:maximum)` time to wait before rendering a new template to - disk and triggering a command, separated by a colon (`:`). If the optional - maximum value is omitted, it is assumed to be 4x the required minimum value. - This is a numeric time with a unit suffix ("5s"). There is no default value. - The wait value for a template takes precedence over any globally-configured - wait. - - -EXAMPLES --------- - -.. code-block:: sh - - # configure template on the target - __consul_template_template nginx \ - --source /etc/my-consul-templates/nginx.ctmpl \ - --destination /etc/nginx/nginx.conf \ - --command 'service nginx restart' - - - # upload a local file to the target and configure it - __consul_template_template nginx \ - --wait '2s:6s' \ - --source-file "$__manifest/files/nginx.ctmpl" \ - --destination /etc/nginx/nginx.conf \ - --command 'service nginx restart' - - -SEE ALSO --------- -:strong:`cdist-type__consul_template`\ (7), :strong:`cdist-type__consul_template_config`\ (7) - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2015-2016 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__consul_template_template/manifest b/cdist/conf/type/__consul_template_template/manifest deleted file mode 100755 index 1eae1fad..00000000 --- a/cdist/conf/type/__consul_template_template/manifest +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/sh -e -# -# 2015 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -name="$(cat "$__object/parameter/name" 2>/dev/null || echo "$__object_id")" -state="$(cat "$__object/parameter/state")" -conf_dir="/etc/consul-template/conf.d" -conf_file="template_${name}.hcl" -template_dir="/etc/consul-template/template" -require="" - -# Sanity checks -if [ -f "$__object/parameter/source" ] && [ -f "$__object/parameter/source-file" ]; then - echo "Use either --source OR --source-file, but not both." >&2 - exit 1 -fi -if [ ! -f "$__object/parameter/source" ] && [ ! -f "$__object/parameter/source-file" ]; then - echo "Either --source OR --source-file must be given." >&2 - exit 1 -fi - -if [ -f "$__object/parameter/source-file" ]; then - destination="${template_dir}/${name}" - require="__file${destination}" -fi - -# Generate hcl config file -{ -printf 'template {\n' -cd "$__object/parameter/" -for param in *; do - case "$param" in - source-file) - source="$(cat "$__object/parameter/$param")" - if [ "$source" = "-" ]; then - source="$__object/stdin" - fi - require="__directory${template_dir}" \ - __file "$destination" \ - --owner root --group root --mode 640 \ - --source "$source" \ - --state "$state" - printf ' source = "%s"\n' "$destination" - - ;; - source|destination|command|wait) - printf ' %s = "%s"\n' "$param" "$(cat "$__object/parameter/$param")" - ;; - *) - # ignore unknown parameters - : - ;; - esac -done -printf '}\n' -} | \ -require="$require __directory${conf_dir}" \ - __config_file "${conf_dir}/${conf_file}" \ - --owner root --group root --mode 640 \ - --state "$state" \ - --onchange 'service consul-template status >/dev/null && service consul-template reload || true' \ - --source - diff --git a/cdist/conf/type/__consul_template_template/parameter/default/state b/cdist/conf/type/__consul_template_template/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__consul_template_template/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__consul_template_template/parameter/optional b/cdist/conf/type/__consul_template_template/parameter/optional deleted file mode 100644 index 3e55fbb7..00000000 --- a/cdist/conf/type/__consul_template_template/parameter/optional +++ /dev/null @@ -1,5 +0,0 @@ -command -source -source-file -state -wait diff --git a/cdist/conf/type/__consul_template_template/parameter/required b/cdist/conf/type/__consul_template_template/parameter/required deleted file mode 100644 index ac459b09..00000000 --- a/cdist/conf/type/__consul_template_template/parameter/required +++ /dev/null @@ -1 +0,0 @@ -destination diff --git a/cdist/conf/type/__consul_watch_checks/man.rst b/cdist/conf/type/__consul_watch_checks/man.rst deleted file mode 100644 index a9a9f58d..00000000 --- a/cdist/conf/type/__consul_watch_checks/man.rst +++ /dev/null @@ -1,73 +0,0 @@ -cdist-type__consul_watch_checks(7) -================================== - -NAME ----- -cdist-type__consul_watch_checks - Manages consul checks watches - - -DESCRIPTION ------------ -Generate and deploy watch definitions of type 'checks' for a consul agent. -See http://www.consul.io/docs/agent/watches.html for parameter documentation. - - -REQUIRED PARAMETERS -------------------- -handler - the handler to invoke when the data view updates - - -OPTIONAL PARAMETERS -------------------- -datacenter - can be provided to override the agent's default datacenter - -filter-service - filter to a specific service. Conflicts with --filter-state. - -filter-state - filter to a specific state. Conflicts with --filter-service. - -state - if this watch is 'present' or 'absent'. Defaults to 'present'. - -token - can be provided to override the agent's default ACL token - - -EXAMPLES --------- - -.. code-block:: sh - - __consul_watch_checks some-id \ - --handler /usr/bin/my-handler.sh - - __consul_watch_checks some-id \ - --filter-service consul \ - --handler /usr/bin/my-handler.sh - - __consul_watch_checks some-id \ - --filter-state passing \ - --handler /usr/bin/my-handler.sh - - -SEE ALSO --------- -:strong:`cdist-type__consul_agent`\ (7) - -consul documentation at: . - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2015 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__consul_watch_checks/manifest b/cdist/conf/type/__consul_watch_checks/manifest deleted file mode 100755 index 5fdd7a74..00000000 --- a/cdist/conf/type/__consul_watch_checks/manifest +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/sh -e -# -# 2015 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -cdist_type="${__type##*/}" -watch_type="${cdist_type##*_}" -conf_dir="/etc/consul/conf.d" -conf_file="watch_${watch_type}_${__object_id}.json" -state="$(cat "$__object/parameter/state")" - -# Sanity checks -if [ -f "$__object/parameter/filter-service" ] && [ -f "$__object/parameter/filter-state" ]; then - echo "Use either --filter-service or --filter-state but not both." >&2 - exit 1 -fi - -# Generate json config file -( -echo "{" -printf ' "watches": [{\n' -printf ' "type": "%s"\n' "$watch_type" -cd "$__object/parameter/" -for param in *; do - case "$param" in - state) continue ;; - filter-*) - key="${param##*-}" - printf ' ,"%s": "%s"\n' "$key" "$(cat "$__object/parameter/$param")" - ;; - *) - key="$(echo "$param" | tr '-' '_')" - printf ' ,"%s": "%s"\n' "$key" "$(cat "$__object/parameter/$param")" - ;; - esac -done -# end watches -echo " }]" -# end json file -echo "}" -) | \ -require="__directory${conf_dir}" \ - __config_file "${conf_dir}/${conf_file}" \ - --owner root --group consul --mode 640 \ - --state "$state" \ - --onchange 'service consul status >/dev/null && service consul reload || true' \ - --source - diff --git a/cdist/conf/type/__consul_watch_checks/parameter/default/state b/cdist/conf/type/__consul_watch_checks/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__consul_watch_checks/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__consul_watch_checks/parameter/optional b/cdist/conf/type/__consul_watch_checks/parameter/optional deleted file mode 100644 index d37fd557..00000000 --- a/cdist/conf/type/__consul_watch_checks/parameter/optional +++ /dev/null @@ -1,5 +0,0 @@ -datacenter -filter-service -filter-state -state -token diff --git a/cdist/conf/type/__consul_watch_checks/parameter/required b/cdist/conf/type/__consul_watch_checks/parameter/required deleted file mode 100644 index 64b916c1..00000000 --- a/cdist/conf/type/__consul_watch_checks/parameter/required +++ /dev/null @@ -1 +0,0 @@ -handler diff --git a/cdist/conf/type/__consul_watch_event/man.rst b/cdist/conf/type/__consul_watch_event/man.rst deleted file mode 100644 index 6fe60d40..00000000 --- a/cdist/conf/type/__consul_watch_event/man.rst +++ /dev/null @@ -1,66 +0,0 @@ -cdist-type__consul_watch_event(7) -================================= - -NAME ----- -cdist-type__consul_watch_event - Manages consul event watches - - -DESCRIPTION ------------ -Generate and deploy watch definitions of type 'event' for a consul agent. -See http://www.consul.io/docs/agent/watches.html for parameter documentation. - - -REQUIRED PARAMETERS -------------------- -handler - the handler to invoke when the data view updates - - -OPTIONAL PARAMETERS -------------------- -datacenter - can be provided to override the agent's default datacenter - -name - restrict the watch to only events with the given name - -state - if this watch is 'present' or 'absent'. Defaults to 'present'. - -token - can be provided to override the agent's default ACL token - - -EXAMPLES --------- - -.. code-block:: sh - - __consul_watch_event some-id \ - --handler /usr/bin/my-handler.sh - - __consul_watch_event some-id \ - --name web-deploy \ - --handler /usr/bin/my-handler.sh - - -SEE ALSO --------- -:strong:`cdist-type__consul_agent`\ (7) - -consul documentation at: . - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2015 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__consul_watch_event/manifest b/cdist/conf/type/__consul_watch_event/manifest deleted file mode 100755 index 61934656..00000000 --- a/cdist/conf/type/__consul_watch_event/manifest +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh -e -# -# 2015 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -cdist_type="${__type##*/}" -watch_type="${cdist_type##*_}" -conf_dir="/etc/consul/conf.d" -conf_file="watch_${watch_type}_${__object_id}.json" -state="$(cat "$__object/parameter/state")" - -# Generate json config file -( -echo "{" -printf ' "watches": [{\n' -printf ' "type": "%s"\n' "$watch_type" -cd "$__object/parameter/" -for param in *; do - case "$param" in - state) continue ;; - *) - key="$(echo "$param" | tr '-' '_')" - printf ' ,"%s": "%s"\n' "$key" "$(cat "$__object/parameter/$param")" - ;; - esac -done -# end watches -echo " }]" -# end json file -echo "}" -) | \ -require="__directory${conf_dir}" \ - __config_file "${conf_dir}/${conf_file}" \ - --owner root --group consul --mode 640 \ - --state "$state" \ - --onchange 'service consul status >/dev/null && service consul reload || true' \ - --source - diff --git a/cdist/conf/type/__consul_watch_event/parameter/default/state b/cdist/conf/type/__consul_watch_event/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__consul_watch_event/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__consul_watch_event/parameter/optional b/cdist/conf/type/__consul_watch_event/parameter/optional deleted file mode 100644 index ac808c47..00000000 --- a/cdist/conf/type/__consul_watch_event/parameter/optional +++ /dev/null @@ -1,4 +0,0 @@ -datacenter -name -state -token diff --git a/cdist/conf/type/__consul_watch_event/parameter/required b/cdist/conf/type/__consul_watch_event/parameter/required deleted file mode 100644 index 64b916c1..00000000 --- a/cdist/conf/type/__consul_watch_event/parameter/required +++ /dev/null @@ -1 +0,0 @@ -handler diff --git a/cdist/conf/type/__consul_watch_key/man.rst b/cdist/conf/type/__consul_watch_key/man.rst deleted file mode 100644 index a12f8425..00000000 --- a/cdist/conf/type/__consul_watch_key/man.rst +++ /dev/null @@ -1,63 +0,0 @@ -cdist-type__consul_watch_key(7) -=============================== - -NAME ----- -cdist-type__consul_watch_key - Manages consul key watches - - -DESCRIPTION ------------ -Generate and deploy watch definitions of type 'key' for a consul agent. -See http://www.consul.io/docs/agent/watches.html for parameter documentation. - - -REQUIRED PARAMETERS -------------------- -handler - the handler to invoke when the data view updates - -key - the key to watch for changes - - -OPTIONAL PARAMETERS -------------------- -datacenter - can be provided to override the agent's default datacenter - -state - if this watch is 'present' or 'absent'. Defaults to 'present'. - -token - can be provided to override the agent's default ACL token - - -EXAMPLES --------- - -.. code-block:: sh - - __consul_watch_key some-id \ - --key foo/bar/baz \ - --handler /usr/bin/my-key-handler.sh - - -SEE ALSO --------- -:strong:`cdist-type__consul_agent`\ (7) - -consul documentation at: . - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2015 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__consul_watch_key/manifest b/cdist/conf/type/__consul_watch_key/manifest deleted file mode 100755 index 61934656..00000000 --- a/cdist/conf/type/__consul_watch_key/manifest +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh -e -# -# 2015 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -cdist_type="${__type##*/}" -watch_type="${cdist_type##*_}" -conf_dir="/etc/consul/conf.d" -conf_file="watch_${watch_type}_${__object_id}.json" -state="$(cat "$__object/parameter/state")" - -# Generate json config file -( -echo "{" -printf ' "watches": [{\n' -printf ' "type": "%s"\n' "$watch_type" -cd "$__object/parameter/" -for param in *; do - case "$param" in - state) continue ;; - *) - key="$(echo "$param" | tr '-' '_')" - printf ' ,"%s": "%s"\n' "$key" "$(cat "$__object/parameter/$param")" - ;; - esac -done -# end watches -echo " }]" -# end json file -echo "}" -) | \ -require="__directory${conf_dir}" \ - __config_file "${conf_dir}/${conf_file}" \ - --owner root --group consul --mode 640 \ - --state "$state" \ - --onchange 'service consul status >/dev/null && service consul reload || true' \ - --source - diff --git a/cdist/conf/type/__consul_watch_key/parameter/default/state b/cdist/conf/type/__consul_watch_key/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__consul_watch_key/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__consul_watch_key/parameter/optional b/cdist/conf/type/__consul_watch_key/parameter/optional deleted file mode 100644 index bfce8305..00000000 --- a/cdist/conf/type/__consul_watch_key/parameter/optional +++ /dev/null @@ -1,3 +0,0 @@ -datacenter -state -token diff --git a/cdist/conf/type/__consul_watch_key/parameter/required b/cdist/conf/type/__consul_watch_key/parameter/required deleted file mode 100644 index a7ae5b65..00000000 --- a/cdist/conf/type/__consul_watch_key/parameter/required +++ /dev/null @@ -1,2 +0,0 @@ -handler -key diff --git a/cdist/conf/type/__consul_watch_keyprefix/man.rst b/cdist/conf/type/__consul_watch_keyprefix/man.rst deleted file mode 100644 index c600323c..00000000 --- a/cdist/conf/type/__consul_watch_keyprefix/man.rst +++ /dev/null @@ -1,63 +0,0 @@ -cdist-type__consul_watch_keyprefix(7) -===================================== - -NAME ----- -cdist-type__consul_watch_keyprefix - Manages consul keyprefix watches - - -DESCRIPTION ------------ -Generate and deploy watch definitions of type 'keyprefix' for a consul agent. -See http://www.consul.io/docs/agent/watches.html for parameter documentation. - - -REQUIRED PARAMETERS -------------------- -handler - the handler to invoke when the data view updates - -prefix - the prefix of keys to watch for changes - - -OPTIONAL PARAMETERS -------------------- -datacenter - can be provided to override the agent's default datacenter - -state - if this watch is 'present' or 'absent'. Defaults to 'present'. - -token - can be provided to override the agent's default ACL token - - -EXAMPLES --------- - -.. code-block:: sh - - __consul_watch_keyprefix some-id \ - --prefix foo/ \ - --handler /usr/bin/my-prefix-handler.sh - - -SEE ALSO --------- -:strong:`cdist-type__consul_agent`\ (7) - -consul documentation at: . - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2015 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__consul_watch_keyprefix/manifest b/cdist/conf/type/__consul_watch_keyprefix/manifest deleted file mode 100755 index 61934656..00000000 --- a/cdist/conf/type/__consul_watch_keyprefix/manifest +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh -e -# -# 2015 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -cdist_type="${__type##*/}" -watch_type="${cdist_type##*_}" -conf_dir="/etc/consul/conf.d" -conf_file="watch_${watch_type}_${__object_id}.json" -state="$(cat "$__object/parameter/state")" - -# Generate json config file -( -echo "{" -printf ' "watches": [{\n' -printf ' "type": "%s"\n' "$watch_type" -cd "$__object/parameter/" -for param in *; do - case "$param" in - state) continue ;; - *) - key="$(echo "$param" | tr '-' '_')" - printf ' ,"%s": "%s"\n' "$key" "$(cat "$__object/parameter/$param")" - ;; - esac -done -# end watches -echo " }]" -# end json file -echo "}" -) | \ -require="__directory${conf_dir}" \ - __config_file "${conf_dir}/${conf_file}" \ - --owner root --group consul --mode 640 \ - --state "$state" \ - --onchange 'service consul status >/dev/null && service consul reload || true' \ - --source - diff --git a/cdist/conf/type/__consul_watch_keyprefix/parameter/default/state b/cdist/conf/type/__consul_watch_keyprefix/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__consul_watch_keyprefix/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__consul_watch_keyprefix/parameter/optional b/cdist/conf/type/__consul_watch_keyprefix/parameter/optional deleted file mode 100644 index bfce8305..00000000 --- a/cdist/conf/type/__consul_watch_keyprefix/parameter/optional +++ /dev/null @@ -1,3 +0,0 @@ -datacenter -state -token diff --git a/cdist/conf/type/__consul_watch_keyprefix/parameter/required b/cdist/conf/type/__consul_watch_keyprefix/parameter/required deleted file mode 100644 index 6223b4de..00000000 --- a/cdist/conf/type/__consul_watch_keyprefix/parameter/required +++ /dev/null @@ -1,2 +0,0 @@ -handler -keyprefix diff --git a/cdist/conf/type/__consul_watch_nodes/man.rst b/cdist/conf/type/__consul_watch_nodes/man.rst deleted file mode 100644 index d886a586..00000000 --- a/cdist/conf/type/__consul_watch_nodes/man.rst +++ /dev/null @@ -1,59 +0,0 @@ -cdist-type__consul_watch_nodes(7) -================================= - -NAME ----- -cdist-type__consul_watch_nodes - Manages consul nodes watches - - -DESCRIPTION ------------ -Generate and deploy watch definitions of type 'nodes' for a consul agent. -See http://www.consul.io/docs/agent/watches.html for parameter documentation. - - -REQUIRED PARAMETERS -------------------- -handler - the handler to invoke when the data view updates - - -OPTIONAL PARAMETERS -------------------- -datacenter - can be provided to override the agent's default datacenter - -state - if this watch is 'present' or 'absent'. Defaults to 'present'. - -token - can be provided to override the agent's default ACL token - - -EXAMPLES --------- - -.. code-block:: sh - - __consul_watch_nodes some-id \ - --handler /usr/bin/my-key-handler.sh - - -SEE ALSO --------- -:strong:`cdist-type__consul_agent`\ (7) - -consul documentation at: . - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2015 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__consul_watch_nodes/manifest b/cdist/conf/type/__consul_watch_nodes/manifest deleted file mode 100755 index 61934656..00000000 --- a/cdist/conf/type/__consul_watch_nodes/manifest +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh -e -# -# 2015 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -cdist_type="${__type##*/}" -watch_type="${cdist_type##*_}" -conf_dir="/etc/consul/conf.d" -conf_file="watch_${watch_type}_${__object_id}.json" -state="$(cat "$__object/parameter/state")" - -# Generate json config file -( -echo "{" -printf ' "watches": [{\n' -printf ' "type": "%s"\n' "$watch_type" -cd "$__object/parameter/" -for param in *; do - case "$param" in - state) continue ;; - *) - key="$(echo "$param" | tr '-' '_')" - printf ' ,"%s": "%s"\n' "$key" "$(cat "$__object/parameter/$param")" - ;; - esac -done -# end watches -echo " }]" -# end json file -echo "}" -) | \ -require="__directory${conf_dir}" \ - __config_file "${conf_dir}/${conf_file}" \ - --owner root --group consul --mode 640 \ - --state "$state" \ - --onchange 'service consul status >/dev/null && service consul reload || true' \ - --source - diff --git a/cdist/conf/type/__consul_watch_nodes/parameter/default/state b/cdist/conf/type/__consul_watch_nodes/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__consul_watch_nodes/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__consul_watch_nodes/parameter/optional b/cdist/conf/type/__consul_watch_nodes/parameter/optional deleted file mode 100644 index bfce8305..00000000 --- a/cdist/conf/type/__consul_watch_nodes/parameter/optional +++ /dev/null @@ -1,3 +0,0 @@ -datacenter -state -token diff --git a/cdist/conf/type/__consul_watch_nodes/parameter/required b/cdist/conf/type/__consul_watch_nodes/parameter/required deleted file mode 100644 index 64b916c1..00000000 --- a/cdist/conf/type/__consul_watch_nodes/parameter/required +++ /dev/null @@ -1 +0,0 @@ -handler diff --git a/cdist/conf/type/__consul_watch_service/man.rst b/cdist/conf/type/__consul_watch_service/man.rst deleted file mode 100644 index 37cabcc9..00000000 --- a/cdist/conf/type/__consul_watch_service/man.rst +++ /dev/null @@ -1,83 +0,0 @@ -cdist-type__consul_watch_service(7) -=================================== - -NAME ----- -cdist-type__consul_watch_service - Manages consul service watches - - -DESCRIPTION ------------ -Generate and deploy watch definitions of type 'service' for a consul agent. -See http://www.consul.io/docs/agent/watches.html for parameter documentation. - - -REQUIRED PARAMETERS -------------------- -handler - the handler to invoke when the data view updates - -service - the service to watch for changes - - -OPTIONAL PARAMETERS -------------------- -datacenter - can be provided to override the agent's default datacenter - -state - if this watch is 'present' or 'absent'. Defaults to 'present'. - -token - can be provided to override the agent's default ACL token - -tag - filter by tag - - -BOOLEAN PARAMETERS ------------------- -passingonly - specifies if only hosts passing all checks are displayed - - -EXAMPLES --------- - -.. code-block:: sh - - __consul_watch_service some-id \ - --service consul \ - --handler /usr/bin/my-handler.sh - - __consul_watch_service some-id \ - --service redis \ - --tag production \ - --handler /usr/bin/my-handler.sh - - __consul_watch_service some-id \ - --service redis \ - --tag production \ - --passingonly \ - --handler /usr/bin/my-handler.sh - - -SEE ALSO --------- -:strong:`cdist-type__consul_agent`\ (7) - -consul documentation at: . - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2015 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__consul_watch_service/manifest b/cdist/conf/type/__consul_watch_service/manifest deleted file mode 100755 index db38eb18..00000000 --- a/cdist/conf/type/__consul_watch_service/manifest +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/sh -e -# -# 2015 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -cdist_type="${__type##*/}" -watch_type="${cdist_type##*_}" -conf_dir="/etc/consul/conf.d" -conf_file="watch_${watch_type}_${__object_id}.json" -state="$(cat "$__object/parameter/state")" - -# Generate json config file -( -echo "{" -printf ' "watches": [{\n' -printf ' "type": "%s"\n' "$watch_type" -cd "$__object/parameter/" -for param in *; do - case "$param" in - state) continue ;; - passingonly) - printf ' ,"passingonly": true\n' - ;; - *) - key="$(echo "$param" | tr '-' '_')" - printf ' ,"%s": "%s"\n' "$key" "$(cat "$__object/parameter/$param")" - ;; - esac -done -# end watches -echo " }]" -# end json file -echo "}" -) | \ -require="__directory${conf_dir}" \ - __config_file "${conf_dir}/${conf_file}" \ - --owner root --group consul --mode 640 \ - --state "$state" \ - --onchange 'service consul status >/dev/null && service consul reload || true' \ - --source - diff --git a/cdist/conf/type/__consul_watch_service/parameter/boolean b/cdist/conf/type/__consul_watch_service/parameter/boolean deleted file mode 100644 index 4c1e4b3f..00000000 --- a/cdist/conf/type/__consul_watch_service/parameter/boolean +++ /dev/null @@ -1 +0,0 @@ -passingonly diff --git a/cdist/conf/type/__consul_watch_service/parameter/default/state b/cdist/conf/type/__consul_watch_service/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__consul_watch_service/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__consul_watch_service/parameter/optional b/cdist/conf/type/__consul_watch_service/parameter/optional deleted file mode 100644 index a81860ac..00000000 --- a/cdist/conf/type/__consul_watch_service/parameter/optional +++ /dev/null @@ -1,4 +0,0 @@ -datacenter -state -tag -token diff --git a/cdist/conf/type/__consul_watch_service/parameter/required b/cdist/conf/type/__consul_watch_service/parameter/required deleted file mode 100644 index e1ffa4d6..00000000 --- a/cdist/conf/type/__consul_watch_service/parameter/required +++ /dev/null @@ -1,2 +0,0 @@ -handler -service diff --git a/cdist/conf/type/__consul_watch_services/man.rst b/cdist/conf/type/__consul_watch_services/man.rst deleted file mode 100644 index cea5f901..00000000 --- a/cdist/conf/type/__consul_watch_services/man.rst +++ /dev/null @@ -1,59 +0,0 @@ -cdist-type__consul_watch_services(7) -==================================== - -NAME ----- -cdist-type__consul_watch_services - Manages consul services watches - - -DESCRIPTION ------------ -Generate and deploy watch definitions of type 'services' for a consul agent. -See http://www.consul.io/docs/agent/watches.html for parameter documentation. - - -REQUIRED PARAMETERS -------------------- -handler - the handler to invoke when the data view updates - - -OPTIONAL PARAMETERS -------------------- -datacenter - can be provided to override the agent's default datacenter - -state - if this watch is 'present' or 'absent'. Defaults to 'present'. - -token - can be provided to override the agent's default ACL token - - -EXAMPLES --------- - -.. code-block:: sh - - __consul_watch_services some-id \ - --handler /usr/bin/my-key-handler.sh - - -SEE ALSO --------- -:strong:`cdist-type__consul_agent`\ (7) - -consul documentation at: . - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2015 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__consul_watch_services/manifest b/cdist/conf/type/__consul_watch_services/manifest deleted file mode 100755 index 61934656..00000000 --- a/cdist/conf/type/__consul_watch_services/manifest +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh -e -# -# 2015 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -cdist_type="${__type##*/}" -watch_type="${cdist_type##*_}" -conf_dir="/etc/consul/conf.d" -conf_file="watch_${watch_type}_${__object_id}.json" -state="$(cat "$__object/parameter/state")" - -# Generate json config file -( -echo "{" -printf ' "watches": [{\n' -printf ' "type": "%s"\n' "$watch_type" -cd "$__object/parameter/" -for param in *; do - case "$param" in - state) continue ;; - *) - key="$(echo "$param" | tr '-' '_')" - printf ' ,"%s": "%s"\n' "$key" "$(cat "$__object/parameter/$param")" - ;; - esac -done -# end watches -echo " }]" -# end json file -echo "}" -) | \ -require="__directory${conf_dir}" \ - __config_file "${conf_dir}/${conf_file}" \ - --owner root --group consul --mode 640 \ - --state "$state" \ - --onchange 'service consul status >/dev/null && service consul reload || true' \ - --source - diff --git a/cdist/conf/type/__consul_watch_services/parameter/default/state b/cdist/conf/type/__consul_watch_services/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__consul_watch_services/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__consul_watch_services/parameter/optional b/cdist/conf/type/__consul_watch_services/parameter/optional deleted file mode 100644 index bfce8305..00000000 --- a/cdist/conf/type/__consul_watch_services/parameter/optional +++ /dev/null @@ -1,3 +0,0 @@ -datacenter -state -token diff --git a/cdist/conf/type/__consul_watch_services/parameter/required b/cdist/conf/type/__consul_watch_services/parameter/required deleted file mode 100644 index 64b916c1..00000000 --- a/cdist/conf/type/__consul_watch_services/parameter/required +++ /dev/null @@ -1 +0,0 @@ -handler diff --git a/cdist/conf/type/__cron/explorer/entry b/cdist/conf/type/__cron/explorer/entry deleted file mode 100644 index 801861a3..00000000 --- a/cdist/conf/type/__cron/explorer/entry +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -# -# 2011-2013 Steven Armstrong (steven-cdist at armstrong.cc) -# 2013 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -name="$__object_name" -user="$(cat "$__object/parameter/user")" - -if [ -f "$__object/parameter/raw_command" ]; then - command="$(cat "$__object/parameter/command")" - crontab -u "$user" -l 2>/dev/null | grep "^$command\$" || true -else - crontab -u "$user" -l 2>/dev/null | grep "# $name\$" || true -fi diff --git a/cdist/conf/type/__cron/gencode-remote b/cdist/conf/type/__cron/gencode-remote deleted file mode 100755 index 59398058..00000000 --- a/cdist/conf/type/__cron/gencode-remote +++ /dev/null @@ -1,96 +0,0 @@ -#!/bin/sh -e -# -# 2011 Steven Armstrong (steven-cdist at armstrong.cc) -# 2013 Nico Schottelius (nico-cdist at schottelius.org) -# 2013 Thomas Oettli (otho at sfs.biz) -# 2017 Daniel Heule (hda at sfs.biz) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -name="$__object_name" -user="$(cat "$__object/parameter/user")" -command="$(cat "$__object/parameter/command")" - -if [ -f "$__object/parameter/raw" ]; then - raw="$(cat "$__object/parameter/raw")" - entry="$raw $command # $name" -elif [ -f "$__object/parameter/raw_command" ]; then - entry="$command" -else - minute="$(cat "$__object/parameter/minute" 2>/dev/null || echo "*")" - hour="$(cat "$__object/parameter/hour" 2>/dev/null || echo "*")" - day_of_month="$(cat "$__object/parameter/day_of_month" 2>/dev/null || echo "*")" - month="$(cat "$__object/parameter/month" 2>/dev/null || echo "*")" - day_of_week="$(cat "$__object/parameter/day_of_week" 2>/dev/null || echo "*")" - entry="$minute $hour $day_of_month $month $day_of_week $command # $name" -fi - -mkdir "$__object/files" -echo "$entry" > "$__object/files/entry" - -if diff -q "$__object/files/entry" "$__object/explorer/entry" >/dev/null; then - state_is=present -else - state_is=absent -fi - -state_should="$(cat "$__object/parameter/state" 2>/dev/null || echo "present")" - -[ "$state_is" = "$state_should" ] && exit 0 - -# If anything is going to change, ensure the old entries are -# not present anymore - -# These are the old markers -prefix="#cdist:__cron/$__object_id" -suffix="#/cdist:__cron/$__object_id" -filter='^# DO NOT EDIT THIS FILE|^# \(.* installed on |^# \(Cron version V|^# \(Cronie version .\..\)$' -cat << DONE -crontab -u $user -l 2>/dev/null | grep -v -E "$filter" | awk -v prefix="$prefix" -v suffix="$suffix" ' -{ - if (index(\$0,prefix)) { - triggered=1 - } - if (triggered) { - if (index(\$0,suffix)) { - triggered=0 - } - } else { - print - } -} -' | crontab -u $user - -DONE - -case "$state_should" in - present) - # if we insert new entry, filter also all entrys out with the same id - echo "(" - echo "crontab -u $user -l 2>/dev/null | grep -v -E \"$filter\" | grep -v \"# $name\\$\" 2>/dev/null || true" - echo "echo '$entry'" - echo ") | crontab -u $user -" - ;; - absent) - if [ -f "$__object/parameter/raw_command" ]; then - echo "( crontab -u $user -l 2>/dev/null | grep -v -E \"$filter\" 2>/dev/null || true ) | \\" - echo "grep -v \"^$entry\\$\" | crontab -u $user -" - else - echo "( crontab -u $user -l 2>/dev/null | grep -v -E \"$filter\" 2>/dev/null || true ) | \\" - echo "grep -v \"# $name\\$\" | crontab -u $user -" - fi - ;; -esac diff --git a/cdist/conf/type/__cron/man.rst b/cdist/conf/type/__cron/man.rst deleted file mode 100644 index d0694738..00000000 --- a/cdist/conf/type/__cron/man.rst +++ /dev/null @@ -1,84 +0,0 @@ -cdist-type__cron(7) -=================== - -NAME ----- -cdist-type__cron - Installs and manages cron jobs - - -DESCRIPTION ------------ -This cdist type allows you to manage entries in a users crontab. - - -REQUIRED PARAMETERS -------------------- -user - The user who's crontab is edited -command - The command to run. - - -OPTIONAL PARAMETERS -------------------- -state - Either present or absent. Defaults to present. -minute - See crontab(5). Defaults to * -hour - See crontab(5). Defaults to * -day_of_month - See crontab(5). Defaults to * -month - See crontab(5). Defaults to * -day_of_week - See crontab(5). Defaults to * -raw - Take whatever the user has given instead of time and date fields. - If given, all other time and date fields are ignored. - Can for example be used to specify cron EXTENSIONS like reboot, yearly etc. - See crontab(5) for the extensions if any that your cron implementation - implements. -raw_command - Take whatever the user has given in the command and ignore everything else. - If given, the command will be added to crontab. - Can for example be used to define variables like SHELL or MAILTO. - - -EXAMPLES --------- - -.. code-block:: sh - - # run Monday to Saturday at 23:15 - __cron some-id --user root --command "/path/to/script" \ - --hour 23 --minute 15 --day_of_week 1-6 - - # run on reboot - __cron some-id --user root --command "/path/to/script" \ - --raw @reboot - - # remove cronjob - __cron some-id --user root --command "/path/to/script" --state absent - - # define default shell - __cron some-id --user root --raw_command --command "SHELL=/bin/bash" \ - --state present - - -SEE ALSO --------- -:strong:`crontab`\ (5) - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2011-2013 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__cron/manifest b/cdist/conf/type/__cron/manifest deleted file mode 100755 index 53973e07..00000000 --- a/cdist/conf/type/__cron/manifest +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -e -# -# 2013 Thomas Oettli (otho at sfs.biz) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -if [ -f "$__object/parameter/raw" ] && [ -f "$__object/parameter/raw_command" ]; then - echo "ERROR: both raw and raw_command specified" >&2 - exit 1 -fi diff --git a/cdist/conf/type/__cron/parameter/boolean b/cdist/conf/type/__cron/parameter/boolean deleted file mode 100644 index 54cfb0b3..00000000 --- a/cdist/conf/type/__cron/parameter/boolean +++ /dev/null @@ -1 +0,0 @@ -raw_command diff --git a/cdist/conf/type/__cron/parameter/optional b/cdist/conf/type/__cron/parameter/optional deleted file mode 100644 index 517d821e..00000000 --- a/cdist/conf/type/__cron/parameter/optional +++ /dev/null @@ -1,7 +0,0 @@ -state -minute -hour -day_of_month -month -day_of_week -raw diff --git a/cdist/conf/type/__cron/parameter/required b/cdist/conf/type/__cron/parameter/required deleted file mode 100644 index 711a59ab..00000000 --- a/cdist/conf/type/__cron/parameter/required +++ /dev/null @@ -1,2 +0,0 @@ -user -command diff --git a/cdist/conf/type/__daemontools/files/init.d-svscan b/cdist/conf/type/__daemontools/files/init.d-svscan deleted file mode 100644 index 996eb4e8..00000000 --- a/cdist/conf/type/__daemontools/files/init.d-svscan +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/bash -### BEGIN INIT INFO -# Provides: svscan -# Required-Start: -# Required-Stop: -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: svscan -# Description: djb svscan -### END INIT INFO -# from https://gist.githubusercontent.com/pacojp/5766990/raw/2ed009ab19515afc9e58291b636d673c5ca864b3/init.d.svscan -# written by Adam McKenna -# edited by Kamila Součková - -export PATH=$PATH:/usr/local/bin - -l=/var/log/svscan - -if [ ! -d $l ]; then - mkdir $l - chown daemon $l -fi - -case "$1" in - start) - printf "Starting daemontools: " - if ! pidof svscan > /dev/null 2>&1; then - printf "svscan " - env - PATH="$PATH" svscan /service 2>&1 | setuidgid daemon multilog t /var/log/svscan & - echo "." - else - echo "already running." - fi - ;; - stop) - printf "Stopping daemontools: " - pids="$(pidof svscan)" - if [ -n "${pids}" ] - then - printf "svscan" - while [ -n "${pids}" ] - do - # shellcheck disable=SC2086 - kill ${pids} - printf "." - pids="$(pidof svscan)" - done - fi - printf " services" - for i in /service/*; do - svc -dx "$i" - printf "." - done - printf " logging " - for i in /service/*/log; do - svc -dx "$i" - printf "." - done - echo "" - ;; - restart|force-reload) - $0 stop - $0 start - ;; - *) - echo 'Usage: /etc/init.d/svscan {start|stop|restart|force-reload}' - exit 1 -esac diff --git a/cdist/conf/type/__daemontools/man.rst b/cdist/conf/type/__daemontools/man.rst deleted file mode 100644 index bc1b4d33..00000000 --- a/cdist/conf/type/__daemontools/man.rst +++ /dev/null @@ -1,54 +0,0 @@ -cdist-type__daemontools(7) -========================== - -NAME ----- -cdist-type__daemontools - Install daemontools - - -DESCRIPTION ------------ -Install djb daemontools and (optionally) an init script. - - -REQUIRED PARAMETERS -------------------- -None. - - -OPTIONAL PARAMETERS -------------------- -from-package - Package to install. Must be compatible with the original daemontools. Example: daemontools-encore. Default: daemontools. - -servicedir - Directory to scan for services. Default: `/service` - - -BOOLEAN PARAMETERS ------------------- -install-init-script - Add an init script and set it to start on boot. - - -EXAMPLES --------- - -.. code-block:: sh - - __daemontools --from-package daemontools-encore # if you prefer - -SEE ALSO --------- -:strong:`cdist-type__daemontools_service`\ (7) - -AUTHORS -------- -Kamila Součková - -COPYING -------- -Copyright \(C) 2017 Kamila Součková. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__daemontools/manifest b/cdist/conf/type/__daemontools/manifest deleted file mode 100755 index b04c7e07..00000000 --- a/cdist/conf/type/__daemontools/manifest +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh -e - -pkg=$(cat "$__object/parameter/from-package") -servicedir=$(cat "$__object/parameter/servicedir") - -__package "$pkg" -__directory "$servicedir" --mode 700 - -os=$(cat "$__global/explorer/os") -init=$(cat "$__global/explorer/init") - -require="" -case $os in - freebsd) - # TODO change to __start_on_boot once it supports freebsd - __config_file /etc/rc.conf.d/svscan --source - <<-EOT - svscan_enable="YES" - svscan_servicedir="$servicedir" - EOT - require="$require __package/$pkg __directory/$servicedir __config_file/etc/rc.conf.d/svscan" \ - __process svscan --name ".*/svscan $servicedir" --start 'service svscan start' - ;; - *) - case $init in - init) - if [ -f "$__object/parameter/install-init-script" ]; then - __config_file /etc/init.d/svscan --mode 755 --source "$__type/files/init.d-svscan" - REQUIREEXTRA="__config_file/etc/init.d/svscan" - fi - require="$require $REQUIREEXTRA" __start_on_boot svscan - require="$require __package/$pkg __directory/$servicedir __start_on_boot/svscan" \ - __process svscan --name ".*/svscan $servicedir" --start 'service svscan start' - ;; - *) - echo "Your init system ($init) is not supported by this type. Submit a patch at github.com/ungleich/cdist!" - exit 1 - ;; - esac - ;; -esac diff --git a/cdist/conf/type/__daemontools/parameter/boolean b/cdist/conf/type/__daemontools/parameter/boolean deleted file mode 100644 index 99a1cefd..00000000 --- a/cdist/conf/type/__daemontools/parameter/boolean +++ /dev/null @@ -1 +0,0 @@ -install-init-script diff --git a/cdist/conf/type/__daemontools/parameter/default/from-package b/cdist/conf/type/__daemontools/parameter/default/from-package deleted file mode 100644 index 598dd40a..00000000 --- a/cdist/conf/type/__daemontools/parameter/default/from-package +++ /dev/null @@ -1 +0,0 @@ -daemontools diff --git a/cdist/conf/type/__daemontools/parameter/default/servicedir b/cdist/conf/type/__daemontools/parameter/default/servicedir deleted file mode 100644 index b74e27f6..00000000 --- a/cdist/conf/type/__daemontools/parameter/default/servicedir +++ /dev/null @@ -1 +0,0 @@ -/service diff --git a/cdist/conf/type/__daemontools/parameter/optional b/cdist/conf/type/__daemontools/parameter/optional deleted file mode 100644 index 22c0805d..00000000 --- a/cdist/conf/type/__daemontools/parameter/optional +++ /dev/null @@ -1,2 +0,0 @@ -from-package -servicedir diff --git a/cdist/conf/type/__daemontools_service/explorer/svc b/cdist/conf/type/__daemontools_service/explorer/svc deleted file mode 100755 index 9ba462f2..00000000 --- a/cdist/conf/type/__daemontools_service/explorer/svc +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -command -v svc || true diff --git a/cdist/conf/type/__daemontools_service/man.rst b/cdist/conf/type/__daemontools_service/man.rst deleted file mode 100644 index ec1d20ff..00000000 --- a/cdist/conf/type/__daemontools_service/man.rst +++ /dev/null @@ -1,72 +0,0 @@ -cdist-type__daemontools_service(7) -================================== - -NAME ----- -cdist-type__daemontools_service - Create a daemontools-compatible service dir. - - -DESCRIPTION ------------ -Create a directory structure compatible with daemontools-like service management. - -Note that svc must be present on the target system. - -The object ID will be used as the service name. - -REQUIRED PARAMETERS -------------------- -None. - -OPTIONAL PARAMETERS -------------------- -run - Command to run. exec-ing and stderr redirection will be added. One of run, run-file must be specified. - - Example: `my-program` - -run-file - File to save as /run. One of run, run-file must be specified. - - Example: - -.. code-block:: sh - - #!/bin/sh - exec 2>&1 - exec my_program - - -log-run - Command to run for log consumption. Default: `multilog t ./main` - -servicedir - Directory to install into. Default: `/service` - -BOOLEAN PARAMETERS ------------------- -None. - -EXAMPLES --------- - -.. code-block:: sh - - require="__daemontools" __daemontools_service prometheus --run "setuidgid prometheus $GOBIN/prometheus $FLAGS" - - -SEE ALSO --------- -:strong:`cdist-type__daemontools`\ (7) - - -AUTHORS -------- -Kamila Součková - -COPYING -------- -Copyright \(C) 2017 Kamila Součková. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__daemontools_service/manifest b/cdist/conf/type/__daemontools_service/manifest deleted file mode 100755 index 78bae285..00000000 --- a/cdist/conf/type/__daemontools_service/manifest +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh -e - -RUN_PREFIX="#!/bin/sh -exec 2>&1 -exec " # mind the space :D - -name=$__object_id -servicedir=$(cat "$__object/parameter/servicedir") -run=$(cat "$__object/parameter/run") -runfile=$(cat "$__object/parameter/run-file") -logrun=$(cat "$__object/parameter/log-run") - -svc=$(cat "$__type/explorer/svc") - -if [ -z "$svc" ]; then - echo "svc not found! Install daemontools first: see __daemontools" - exit 1 -fi - -badusage() { - echo "__daemontools_service/$__object_id: exactly one of --run, --run-file must be set" >&2 - exit 1 -} - -[ -z "$run$runfile" ] && badusage -[ -n "$run" ] && [ -n "$runfile" ] && badusage - -__directory "$servicedir/$name/log/main" --parents - -echo "$RUN_PREFIX$run" | require="__directory/$servicedir/$name/log/main" __config_file "$servicedir/$name/run" \ - --onchange "svc -t '$servicedir/$name' 2>/dev/null" \ - --mode 755 \ - --source "${runfile:--}" - -echo "$RUN_PREFIX$logrun" | require="__directory/$servicedir/$name/log/main" __config_file "$servicedir/$name/log/run" \ - --onchange "svc -t '$servicedir/$name/log' 2>/dev/null" \ - --mode 755 \ - --source "-" diff --git a/cdist/conf/type/__daemontools_service/parameter/default/log-run b/cdist/conf/type/__daemontools_service/parameter/default/log-run deleted file mode 100644 index 80d57a74..00000000 --- a/cdist/conf/type/__daemontools_service/parameter/default/log-run +++ /dev/null @@ -1 +0,0 @@ -multilog t ./main diff --git a/cdist/conf/type/__daemontools_service/parameter/default/run-file b/cdist/conf/type/__daemontools_service/parameter/default/run-file deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__daemontools_service/parameter/default/servicedir b/cdist/conf/type/__daemontools_service/parameter/default/servicedir deleted file mode 100644 index b74e27f6..00000000 --- a/cdist/conf/type/__daemontools_service/parameter/default/servicedir +++ /dev/null @@ -1 +0,0 @@ -/service diff --git a/cdist/conf/type/__daemontools_service/parameter/optional b/cdist/conf/type/__daemontools_service/parameter/optional deleted file mode 100644 index 7e54985f..00000000 --- a/cdist/conf/type/__daemontools_service/parameter/optional +++ /dev/null @@ -1,4 +0,0 @@ -log-run -run -run-file -servicedir diff --git a/cdist/conf/type/__debconf_set_selections/gencode-remote b/cdist/conf/type/__debconf_set_selections/gencode-remote deleted file mode 100755 index e99aef40..00000000 --- a/cdist/conf/type/__debconf_set_selections/gencode-remote +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh -e -# -# 2011-2014 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Setup selections -# - -filename="$(cat "$__object/parameter/file")" - -if [ "$filename" = "-" ]; then - filename="$__object/stdin" -fi - -echo "debconf-set-selections << __file-eof" -cat "$filename" -echo "__file-eof" diff --git a/cdist/conf/type/__debconf_set_selections/man.rst b/cdist/conf/type/__debconf_set_selections/man.rst deleted file mode 100644 index 58c25b81..00000000 --- a/cdist/conf/type/__debconf_set_selections/man.rst +++ /dev/null @@ -1,53 +0,0 @@ -cdist-type__debconf_set_selections(7) -===================================== - -NAME ----- -cdist-type__debconf_set_selections - Setup debconf selections - - -DESCRIPTION ------------ -On Debian and alike systems debconf-set-selections(1) can be used -to setup configuration parameters. - - -REQUIRED PARAMETERS -------------------- -file - Use the given filename as input for debconf-set-selections(1) - If filename is "-", read from stdin. - - -EXAMPLES --------- - -.. code-block:: sh - - # Setup configuration for nslcd - __debconf_set_selections nslcd --file /path/to/file - - # Setup configuration for nslcd from another type - __debconf_set_selections nslcd --file "$__type/files/preseed/nslcd" - - __debconf_set_selections nslcd --file - << eof - gitolite gitolite/gituser string git - eof - - -SEE ALSO --------- -:strong:`debconf-set-selections`\ (1), :strong:`cdist-type__update_alternatives`\ (7) - - -AUTHORS -------- -Nico Schottelius - - -COPYING -------- -Copyright \(C) 2011-2014 Nico Schottelius. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__directory/explorer/stat b/cdist/conf/type/__directory/explorer/stat deleted file mode 100755 index 03d466ba..00000000 --- a/cdist/conf/type/__directory/explorer/stat +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/sh -# -# 2013 Steven Armstrong (steven-cdist armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -destination="/$__object_id" - -# nothing to work with, nothing we could do -[ -e "$destination" ] || exit 0 - -os=$("$__explorer/os") -case "$os" in - "freebsd"|"netbsd"|"openbsd"|"macosx") - stat -f "type: %HT -owner: %Du %Su -group: %Dg %Sg -mode: %Lp %Sp -" "$destination" | awk '/^type/ { print tolower($0); next; } { print; }' - ;; - alpine) - stat -c "type: %F -owner: %u %U -group: %g %G -mode: %a %A -" "$destination" - ;; - solaris) - ls1="$( ls -ld "$destination" )" - ls2="$( ls -ldn "$destination" )" - - if [ -f "$__object/parameter/mode" ] - then mode_should="$( cat "$__object/parameter/mode" )" - fi - - # yes, it is ugly hack, but if you know better way... - if [ -z "$( find "$destination" -perm "$mode_should" )" ] - then octets=888 - else octets="$( echo "$mode_should" | sed 's/^0//' )" - fi - - case "$( echo "$ls1" | cut -c1-1 )" in - -) echo 'type: regular file' ;; - d) echo 'type: directory' ;; - esac - - echo "owner: $( echo "$ls2" \ - | awk '{print $3}' ) $( echo "$ls1" \ - | awk '{print $3}' )" - - echo "group: $( echo "$ls2" \ - | awk '{print $4}' ) $( echo "$ls1" \ - | awk '{print $4}' )" - - echo "mode: $octets $( echo "$ls1" | awk '{print $1}' )" - ;; - *) - stat --printf="type: %F -owner: %u %U -group: %g %G -mode: %a %A -" "$destination" - ;; -esac diff --git a/cdist/conf/type/__directory/explorer/type b/cdist/conf/type/__directory/explorer/type deleted file mode 100755 index e723047c..00000000 --- a/cdist/conf/type/__directory/explorer/type +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh -# -# 2013 Steven Armstrong (steven-cdist armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -destination="/$__object_id" - -if [ ! -e "$destination" ]; then - echo none -elif [ -h "$destination" ]; then - echo symlink -elif [ -f "$destination" ]; then - echo file -elif [ -d "$destination" ]; then - echo directory -else - echo unknown -fi diff --git a/cdist/conf/type/__directory/gencode-remote b/cdist/conf/type/__directory/gencode-remote deleted file mode 100755 index 374db47a..00000000 --- a/cdist/conf/type/__directory/gencode-remote +++ /dev/null @@ -1,116 +0,0 @@ -#!/bin/sh -e -# -# 2011-2013 Nico Schottelius (nico-cdist at schottelius.org) -# 2013 Steven Armstrong (steven-cdist armstrong.cc) -# 2014 Daniel Heule (hda at sfs.biz) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -destination="/$__object_id" -state_should="$(cat "$__object/parameter/state")" -type="$(cat "$__object/explorer/type")" -stat_file="$__object/explorer/stat" - -# variable to keep track if we have to set directory attributes -set_attributes= - -mkdiropt="" -[ -f "$__object/parameter/parents" ] && mkdiropt="-p" - -recursive="" -if [ -f "$__object/parameter/recursive" ]; then - recursive="-R" - # need to allways set attributes when recursive is given - # as we don't want to check all subfolders/files - set_attributes=1 -fi - -get_current_value() { - if [ -s "$stat_file" ]; then - _name="$1" - _value="$2" - case "$_value" in - [0-9]*) - _index=2 - ;; - *) - _index=3 - ;; - esac - awk '/'"$_name"':/ { print $'$_index' }' "$stat_file" - unset _name _value _index - fi -} - -set_group() { - echo "chgrp $recursive '$1' '$destination'" - echo "chgrp $recursive '$1'" >> "$__messages_out" -} - -set_owner() { - echo "chown $recursive '$1' '$destination'" - echo "chown $recursive '$1'" >> "$__messages_out" -} - -set_mode() { - echo "chmod $recursive '$1' '$destination'" - echo "chmod $recursive '$1'" >> "$__messages_out" -} - -case "$state_should" in - present) - if [ "$type" != "directory" ]; then - set_attributes=1 - if [ "$type" != "none" ]; then - # our destination is not a directory, remove whatever is there - # and then create our directory and set all attributes - echo "rm -f '$destination'" - echo "remove non directory" >> "$__messages_out" - fi - echo "mkdir $mkdiropt '$destination'" - echo "create" >> "$__messages_out" - fi - - # Note: Mode - needs to happen last as a chown/chgrp can alter mode by - # clearing S_ISUID and S_ISGID bits (see chown(2)) - for attribute in group owner mode; do - if [ -f "$__object/parameter/$attribute" ]; then - value_should="$(cat "$__object/parameter/$attribute")" - value_is="$(get_current_value "$attribute" "$value_should")" - - # change 0xxx format to xxx format => same as stat returns - if [ "$attribute" = mode ]; then - value_should="$(echo "$value_should" | sed 's/^0\(...\)/\1/')" - fi - - if [ "$set_attributes" = 1 ] || [ "$value_should" != "$value_is" ]; then - "set_$attribute" "$value_should" - fi - fi - done - ;; - absent) - if [ "$type" = "directory" ]; then - echo "rm -rf '$destination'" - echo remove >> "$__messages_out" - fi - ;; - *) - echo "Unknown state: $state_should" >&2 - exit 1 - ;; -esac diff --git a/cdist/conf/type/__directory/man.rst b/cdist/conf/type/__directory/man.rst deleted file mode 100644 index 74b00afe..00000000 --- a/cdist/conf/type/__directory/man.rst +++ /dev/null @@ -1,101 +0,0 @@ -cdist-type__directory(7) -======================== - -NAME ----- -cdist-type__directory - Manage a directory - - -DESCRIPTION ------------ -This cdist type allows you to create or remove directories on the target. - - -REQUIRED PARAMETERS -------------------- -None. - - -OPTIONAL PARAMETERS -------------------- -state - 'present' or 'absent', defaults to 'present' - -group - Group to chgrp to. - -mode - Unix permissions, suitable for chmod. - -owner - User to chown to. - - -BOOLEAN PARAMETERS ------------------- -parents - Whether to create parents as well (mkdir -p behaviour). - Warning: all intermediate directory permissions default - to whatever mkdir -p does. - - Usually this means root:root, 0700. - -recursive - If supplied the chgrp and chown call will run recursively. - This does *not* influence the behaviour of chmod. - -MESSAGES --------- -chgrp - Changed group membership -chown - Changed owner -chmod - Changed mode -create - Empty directory was created -remove - Directory exists, but state is absent, directory will be removed by generated code. -remove non directory - Something other than a directory with the same name exists and was removed prior to create. - - -EXAMPLES --------- - -.. code-block:: sh - - # A silly example - __directory /tmp/foobar - - # Remove a directory - __directory /tmp/foobar --state absent - - # Ensure /etc exists correctly - __directory /etc --owner root --group root --mode 0755 - - # Create nfs service directory, including parents - __directory /home/services/nfs --parents - - # Change permissions recursively - __directory /home/services --recursive --owner root --group root - - # Setup a temp directory - __directory /local --mode 1777 - - # Take it all - __directory /home/services/kvm --recursive --parents \ - --owner root --group root --mode 0755 --state present - - -AUTHORS -------- -Nico Schottelius - - -COPYING -------- -Copyright \(C) 2011 Nico Schottelius. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__directory/parameter/default/state b/cdist/conf/type/__directory/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__directory/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__docker/man.rst b/cdist/conf/type/__docker/man.rst deleted file mode 100644 index 718543a8..00000000 --- a/cdist/conf/type/__docker/man.rst +++ /dev/null @@ -1,55 +0,0 @@ -cdist-type__docker(7) -===================== - -NAME ----- -cdist-type__docker - install Docker CE - - -DESCRIPTION ------------ -Installs latest Docker Community Edition package. - - -REQUIRED PARAMETERS -------------------- -None. - - -OPTIONAL PARAMETERS -------------------- -state - 'present' or 'absent', defaults to 'present' -version - The specific version to install. Defaults to the special value 'latest', - meaning the version the package manager will install by default. - - -BOOLEAN PARAMETERS ------------------- -None. - - -EXAMPLES --------- - -.. code-block:: sh - - # Install docker - __docker - - # Remove docker - __docker --state absent - - # Install specific version - __docker --state present --version 18.03.0.ce - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2016 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__docker/manifest b/cdist/conf/type/__docker/manifest deleted file mode 100755 index 6a57d85a..00000000 --- a/cdist/conf/type/__docker/manifest +++ /dev/null @@ -1,109 +0,0 @@ -#!/bin/sh -e -# -# 2016 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - - -os=$(cat "$__global/explorer/os") -state=$(cat "$__object/parameter/state") -version=$(cat "$__object/parameter/version") - -case "$os" in - centos) - # shellcheck source=/dev/null - if (. "$__global/explorer/os_release" && [ "${VERSION_ID}" = "7" ]); then - __yum_repo docker-ce-stable \ - --name 'Docker CE Stable' \ - --baseurl "https://download.docker.com/linux/centos/7/\$basearch/stable" \ - --enabled \ - --gpgcheck 1 \ - --gpgkey 'https://download.docker.com/linux/centos/gpg' \ - --state "${state}" - if [ "$version" != "latest" ]; then - require="__yum_repo/docker-ce-stable" __package docker-ce --version "${version}" --state "${state}" - else - require="__yum_repo/docker-ce-stable" __package docker-ce --state "${state}" - fi - else - echo "CentOS version 7 is required!" >&2 - exit 1 - fi - ;; - ubuntu|debian) - if [ "${state}" = "present" ]; then - __package apt-transport-https - __package ca-certificates - __package gnupg2 - fi - __apt_key_uri docker --name "Docker Release (CE deb) " \ - --uri "https://download.docker.com/linux/${os}/gpg" --state "${state}" - - require="__apt_key_uri/docker" __apt_source docker \ - --uri "https://download.docker.com/linux/${os}" \ - --distribution "$(cat "$__global/explorer/lsb_codename")" \ - --state "${state}" \ - --component "stable" - if [ "$version" != "latest" ]; then - require="__apt_source/docker" __package docker-ce --version "${version}" --state "${state}" - else - require="__apt_source/docker" __package docker-ce --state "${state}" - fi - ;; - devuan) - os_version="$(cat "$__global/explorer/os_version")" - - case "$os_version" in - ascii) - distribution="stretch" - ;; - jessie) - distribution="jessie" - ;; - *) - echo "Your devuan release ($os_version) is currently not supported by this type (${__type##*/}).">&2 - echo "Please contribute an implementation for it if you can." >&2 - exit 1 - ;; - esac - - if [ "${state}" = "present" ]; then - __package apt-transport-https - __package ca-certificates - __package gnupg2 - fi - __apt_key_uri docker --name "Docker Release (CE deb) " \ - --uri "https://download.docker.com/linux/${os}/gpg" --state "${state}" - - require="__apt_key_uri/docker" __apt_source docker \ - --uri "https://download.docker.com/linux/${os}" \ - --distribution "${distribution}" \ - --state "${state}" \ - --component "stable" - if [ "$version" != "latest" ]; then - require="__apt_source/docker" __package docker-ce --version "${version}" --state "${state}" - else - require="__apt_source/docker" __package docker-ce --state "${state}" - fi - - ;; - *) - echo "Your operating system ($os) is currently not supported by this type (${__type##*/})." >&2 - echo "Please contribute an implementation for it if you can." >&2 - exit 1 - ;; -esac diff --git a/cdist/conf/type/__docker/parameter/default/state b/cdist/conf/type/__docker/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__docker/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__docker/parameter/default/version b/cdist/conf/type/__docker/parameter/default/version deleted file mode 100644 index a0f9a4b4..00000000 --- a/cdist/conf/type/__docker/parameter/default/version +++ /dev/null @@ -1 +0,0 @@ -latest diff --git a/cdist/conf/type/__docker/parameter/optional b/cdist/conf/type/__docker/parameter/optional deleted file mode 100644 index 4d595ed7..00000000 --- a/cdist/conf/type/__docker/parameter/optional +++ /dev/null @@ -1,2 +0,0 @@ -state -version diff --git a/cdist/conf/type/__docker_compose/gencode-remote b/cdist/conf/type/__docker_compose/gencode-remote deleted file mode 100755 index 77fc2fdf..00000000 --- a/cdist/conf/type/__docker_compose/gencode-remote +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh -e -# -# 2016 Dominique Roux (dominique.roux at ungleich.ch) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -# Variables -version="$(cat "$__object/parameter/version")" -state="$(cat "$__object/parameter/state")" - -if [ "${state}" = "present" ]; then - # Download docker-compose file - #shellcheck disable=SC2016 - echo 'curl -L "https://github.com/docker/compose/releases/download/'"${version}"'/docker-compose-$(uname -s)-$(uname -m)" -o /tmp/docker-compose' - echo 'mv /tmp/docker-compose /usr/local/bin/docker-compose' - # Change permissions - echo 'chmod +x /usr/local/bin/docker-compose' -fi diff --git a/cdist/conf/type/__docker_compose/man.rst b/cdist/conf/type/__docker_compose/man.rst deleted file mode 100644 index 7386e737..00000000 --- a/cdist/conf/type/__docker_compose/man.rst +++ /dev/null @@ -1,58 +0,0 @@ -cdist-type__docker_compose(7) -============================= - -NAME ----- -cdist-type__docker_compose - install docker-compose - - -DESCRIPTION ------------ -Installs docker-compose package. -State 'absent' will not remove docker binary itself, -only docker-compose binary will be removed - - -REQUIRED PARAMETERS -------------------- -None. - - -OPTIONAL PARAMETERS -------------------- -version - Define docker_compose version, defaults to "1.9.0" - -state - 'present' or 'absent', defaults to 'present' - - -BOOLEAN PARAMETERS ------------------- -None. - - -EXAMPLES --------- - -.. code-block:: sh - - # Install docker-compose - __docker_compose - - # Install version 1.9.0-rc4 - __docker_compose --version 1.9.0-rc4 - - # Remove docker-compose - __docker_compose --state absent - - -AUTHORS -------- -Dominique Roux - - -COPYING -------- -Copyright \(C) 2016 Dominique Roux. Free use of this software is -granted under the terms of the GNU General Public License version 3 or later (GPLv3+). diff --git a/cdist/conf/type/__docker_compose/manifest b/cdist/conf/type/__docker_compose/manifest deleted file mode 100755 index f7de3a76..00000000 --- a/cdist/conf/type/__docker_compose/manifest +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh -e -# -# 2016 Dominique Roux (dominique.roux at ungleich.ch) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -state="$(cat "$__object/parameter/state")" - -# Needed packages -if [ "${state}" = "present" ]; then - __docker - __package curl -elif [ "${state}" = "absent" ]; then - __file /usr/local/bin/docker-compose --state absent -else - echo "Unknown state: ${state}" >&2 - exit 1 -fi diff --git a/cdist/conf/type/__docker_compose/parameter/default/state b/cdist/conf/type/__docker_compose/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__docker_compose/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__docker_compose/parameter/default/version b/cdist/conf/type/__docker_compose/parameter/default/version deleted file mode 100644 index 850e7424..00000000 --- a/cdist/conf/type/__docker_compose/parameter/default/version +++ /dev/null @@ -1 +0,0 @@ -1.14.0 diff --git a/cdist/conf/type/__docker_compose/parameter/optional b/cdist/conf/type/__docker_compose/parameter/optional deleted file mode 100644 index 4d595ed7..00000000 --- a/cdist/conf/type/__docker_compose/parameter/optional +++ /dev/null @@ -1,2 +0,0 @@ -state -version diff --git a/cdist/conf/type/__docker_config/explorer/config-data b/cdist/conf/type/__docker_config/explorer/config-data deleted file mode 100755 index b4bb0e11..00000000 --- a/cdist/conf/type/__docker_config/explorer/config-data +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh -e -# -# 2018 Ľubomír Kučera -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -docker config inspect "${__object_id:?}" --format '{{json .Spec.Data}}' \ - 2>/dev/null | tr -d '"' | base64 -d diff --git a/cdist/conf/type/__docker_config/explorer/config-exists b/cdist/conf/type/__docker_config/explorer/config-exists deleted file mode 100755 index 58c207d4..00000000 --- a/cdist/conf/type/__docker_config/explorer/config-exists +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -e -# -# 2018 Ľubomír Kučera -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -if docker config ls | grep -q " ${__object_id:?} "; then - echo yes -else - echo no -fi diff --git a/cdist/conf/type/__docker_config/gencode-remote b/cdist/conf/type/__docker_config/gencode-remote deleted file mode 100755 index 65497b7e..00000000 --- a/cdist/conf/type/__docker_config/gencode-remote +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/sh -e -# -# 2018 Ľubomír Kučera -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -config="${__object_id:?}" -config_exists=$(cat "${__object:?}/explorer/config-exists") -state=$(cat "${__object:?}/parameter/state") - -case "${state}" in - absent) - if [ "${config_exists}" != "yes" ]; then - exit 0 - fi - - echo "docker config rm \"${config}\"" - ;; - present) - source=$(cat "${__object}/parameter/source") - - if [ -z "${source}" ]; then - exit 0 - fi - - if [ "${source}" = "-" ]; then - source="${__object}/stdin" - fi - - if [ "${config_exists}" = "yes" ]; then - if cmp -s "${source}" "${__object}/explorer/config-data"; then - exit 0 - else - echo "docker config rm \"${config}\"" - fi - fi - - cat <<-EOF - source_file="\$(mktemp cdist.XXXXXXXXXX)" - - base64 -d > "\${source_file}" << eof - $(base64 "${source}") - eof - - docker config create "${config}" "\${source_file}" - - rm "\${source_file}" - EOF - ;; - *) - echo "Unsupported state: ${state}" >&2 - - exit 1 - ;; -esac diff --git a/cdist/conf/type/__docker_config/man.rst b/cdist/conf/type/__docker_config/man.rst deleted file mode 100644 index 7c74c8af..00000000 --- a/cdist/conf/type/__docker_config/man.rst +++ /dev/null @@ -1,55 +0,0 @@ -cdist-type__docker_config(7) -============================ - -NAME ----- - -cdist-type__docker_config - Manage Docker configs - -DESCRIPTION ------------ - -This type manages Docker configs. - -OPTIONAL PARAMETERS -------------------- - -source - Path to the source file. If it is '-' (dash), read standard input. - -state - 'present' or 'absent', defaults to 'present' where: - - present - if the config does not exist, it is created - absent - the config is removed - -CAVEATS -------- - -Since Docker configs cannot be updated once created, this type tries removing -and recreating the config if it changes. If the config is used by a service at -the time of removing, then this type will fail. - -EXAMPLES --------- - -.. code-block:: sh - - # Creates "foo" config from "bar" source file - __docker_config foo --source bar - - -AUTHORS -------- - -Ľubomír Kučera - -COPYING -------- - -Copyright \(C) 2018 Ľubomír Kučera. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__docker_config/parameter/default/source b/cdist/conf/type/__docker_config/parameter/default/source deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__docker_config/parameter/default/state b/cdist/conf/type/__docker_config/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__docker_config/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__docker_config/parameter/optional b/cdist/conf/type/__docker_config/parameter/optional deleted file mode 100644 index d77f3048..00000000 --- a/cdist/conf/type/__docker_config/parameter/optional +++ /dev/null @@ -1,2 +0,0 @@ -source -state diff --git a/cdist/conf/type/__docker_secret/explorer/secret-exists b/cdist/conf/type/__docker_secret/explorer/secret-exists deleted file mode 100755 index 1405f8bc..00000000 --- a/cdist/conf/type/__docker_secret/explorer/secret-exists +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -e -# -# 2018 Ľubomír Kučera -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -if docker secret ls | grep -q " ${__object_id:?} "; then - echo yes -else - echo no -fi diff --git a/cdist/conf/type/__docker_secret/gencode-remote b/cdist/conf/type/__docker_secret/gencode-remote deleted file mode 100755 index c75e91d9..00000000 --- a/cdist/conf/type/__docker_secret/gencode-remote +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/sh -e -# -# 2018 Ľubomír Kučera -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -secret="${__object_id:?}" -secret_exists=$(cat "${__object:?}/explorer/secret-exists") -state=$(cat "${__object:?}/parameter/state") - -case "${state}" in - absent) - if [ "${secret_exists}" != "yes" ]; then - exit 0 - fi - - echo "docker secret rm ${secret}" - ;; - present) - if [ "${secret_exists}" = "yes" ]; then - exit 0 - fi - - source=$(cat "${__object}/parameter/source") - - if [ -z "${source}" ]; then - exit 0 - fi - - if [ "${source}" = "-" ]; then - source="${__object}/stdin" - fi - - cat <<-EOF - source_file="\$(mktemp cdist.XXXXXXXXXX)" - - base64 -d > "\${source_file}" << eof - $(base64 "${source}") - eof - - docker secret create "${secret}" "\${source_file}" - - rm "\${source_file}" - EOF - ;; - *) - echo "Unsupported state: ${state}" >&2 - - exit 1 - ;; -esac diff --git a/cdist/conf/type/__docker_secret/man.rst b/cdist/conf/type/__docker_secret/man.rst deleted file mode 100644 index 7fe69623..00000000 --- a/cdist/conf/type/__docker_secret/man.rst +++ /dev/null @@ -1,54 +0,0 @@ -cdist-type__docker_secret(7) -============================ - -NAME ----- - -cdist-type__docker_secret - Manage Docker secrets - -DESCRIPTION ------------ - -This type manages Docker secrets. - -OPTIONAL PARAMETERS -------------------- - -source - Path to the source file. If it is '-' (dash), read standard input. - -state - 'present' or 'absent', defaults to 'present' where: - - present - if the secret does not exist, it is created - absent - the secret is removed - -CAVEATS -------- - -Since Docker secrets cannot be updated once created, this type takes no action -if the specified secret already exists. - -EXAMPLES --------- - -.. code-block:: sh - - # Creates "foo" secret from "bar" source file - __docker_secret foo --source bar - - -AUTHORS -------- - -Ľubomír Kučera - -COPYING -------- - -Copyright \(C) 2018 Ľubomír Kučera. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__docker_secret/parameter/default/source b/cdist/conf/type/__docker_secret/parameter/default/source deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__docker_secret/parameter/default/state b/cdist/conf/type/__docker_secret/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__docker_secret/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__docker_secret/parameter/optional b/cdist/conf/type/__docker_secret/parameter/optional deleted file mode 100644 index d77f3048..00000000 --- a/cdist/conf/type/__docker_secret/parameter/optional +++ /dev/null @@ -1,2 +0,0 @@ -source -state diff --git a/cdist/conf/type/__docker_stack/explorer/stack-exists b/cdist/conf/type/__docker_stack/explorer/stack-exists deleted file mode 100755 index 4f511821..00000000 --- a/cdist/conf/type/__docker_stack/explorer/stack-exists +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -e -# -# 2018 Ľubomír Kučera -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -if docker stack ls | grep -q "^${__object_id:?} "; then - echo 1 -else - echo 0 -fi diff --git a/cdist/conf/type/__docker_stack/gencode-remote b/cdist/conf/type/__docker_stack/gencode-remote deleted file mode 100755 index 586271d0..00000000 --- a/cdist/conf/type/__docker_stack/gencode-remote +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/sh -e -# -# 2018 Ľubomír Kučera -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -stack="${__object_id:?}" -state=$(cat "${__object:?}/parameter/state") - -case "${state}" in - absent) - stack_exists=$(cat "${__object:?}/explorer/stack-exists") - - if [ "${stack_exists}" -ne 1 ]; then - exit 0 - fi - - echo "docker stack rm ${stack}" - ;; - present) - compose_file=$(cat "${__object}/parameter/compose-file") - - if [ -z "${compose_file}" ]; then - exit 0 - fi - - if [ "${compose_file}" = "-" ]; then - compose_file="${__object}/stdin" - fi - - cat <<-EOF - compose_file="\$(mktemp cdist.XXXXXXXXXX)" - - base64 -d > "\${compose_file}" << eof - $(base64 "${compose_file}") - eof - - docker stack deploy --compose-file "\${compose_file}" \ - --prune --with-registry-auth ${stack} - - rm "\${compose_file}" - EOF - ;; - *) - echo "Unsupported state: ${state}" >&2 - - exit 1 - ;; -esac diff --git a/cdist/conf/type/__docker_stack/man.rst b/cdist/conf/type/__docker_stack/man.rst deleted file mode 100644 index d0597c25..00000000 --- a/cdist/conf/type/__docker_stack/man.rst +++ /dev/null @@ -1,54 +0,0 @@ -cdist-type__docker_stack(7) -=========================== - -NAME ----- - -cdist-type__docker_stack - Manage Docker stacks - -DESCRIPTION ------------ - -This type manages service stacks. - -.. note:: - Since there is no easy way to tell whether a stack needs to be updated, - `docker stack deploy` is being run every time this type is invoked. - However, it does not mean this type is not idempotent. If Docker does not - detect changes, the existing stack will not be updated. - -OPTIONAL PARAMETERS -------------------- - -compose-file - Path to the compose file. If it is '-' (dash), read standard input. - -state - 'present' or 'absent', defaults to 'present' where: - - present - the stack is deployed - absent - the stack is removed - -EXAMPLES --------- - -.. code-block:: sh - - # Deploys 'foo' stack defined in 'docker-compose.yml' compose file - __docker_stack foo --compose-file docker-compose.yml - - -AUTHORS -------- - -Ľubomír Kučera - -COPYING -------- - -Copyright \(C) 2018 Ľubomír Kučera. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__docker_stack/parameter/default/compose-file b/cdist/conf/type/__docker_stack/parameter/default/compose-file deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__docker_stack/parameter/default/state b/cdist/conf/type/__docker_stack/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__docker_stack/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__docker_stack/parameter/optional b/cdist/conf/type/__docker_stack/parameter/optional deleted file mode 100644 index b3457bd3..00000000 --- a/cdist/conf/type/__docker_stack/parameter/optional +++ /dev/null @@ -1,2 +0,0 @@ -compose-file -state diff --git a/cdist/conf/type/__docker_swarm/explorer/swarm-state b/cdist/conf/type/__docker_swarm/explorer/swarm-state deleted file mode 100755 index 2c9fd598..00000000 --- a/cdist/conf/type/__docker_swarm/explorer/swarm-state +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -e -# -# 2018 Ľubomír Kučera -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -docker info 2>/dev/null | grep '^ *Swarm: ' | awk '{print $2}' diff --git a/cdist/conf/type/__docker_swarm/gencode-remote b/cdist/conf/type/__docker_swarm/gencode-remote deleted file mode 100755 index 4b199a02..00000000 --- a/cdist/conf/type/__docker_swarm/gencode-remote +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh -e -# -# 2018 Ľubomír Kučera -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -state=$(cat "${__object:?}/parameter/state") -swarm_state="$(cat "${__object}/explorer/swarm-state")" - -if [ -z "${swarm_state}" ]; then - echo "Unable to determine Swarm state. Is compatible version of Docker installed?" >&2 - - exit 1 -fi - -case "${state}" in - absent) - if [ "${swarm_state}" = "active" ]; then - echo "docker swarm leave --force" - fi - ;; - present) - if [ "${swarm_state}" = "inactive" ]; then - echo "docker swarm init" - fi - ;; - *) - echo "Unsupported state: ${state}" >&2 - - exit 1 - ;; -esac diff --git a/cdist/conf/type/__docker_swarm/man.rst b/cdist/conf/type/__docker_swarm/man.rst deleted file mode 100644 index 4dc408f0..00000000 --- a/cdist/conf/type/__docker_swarm/man.rst +++ /dev/null @@ -1,49 +0,0 @@ -cdist-type__docker_swarm(7) -=========================== - -NAME ----- - -cdist-type__docker_swarm - Manage Swarm - -DESCRIPTION ------------ - -This type can initialize Docker swarm mode. For more information about swarm -mode, see `Swarm mode overview `_. - -OPTIONAL PARAMETERS -------------------- - -state - 'present' or 'absent', defaults to 'present' where: - - present - Swarm is initialized - absent - Swarm is left - -EXAMPLES --------- - -.. code-block:: sh - - # Initializes a swarm - __docker_swarm - - # Leaves a swarm - __docker_swarm --state absent - - -AUTHORS -------- - -Ľubomír Kučera - -COPYING -------- - -Copyright \(C) 2018 Ľubomír Kučera. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__docker_swarm/parameter/default/state b/cdist/conf/type/__docker_swarm/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__docker_swarm/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__dog_vdi/explorer/list b/cdist/conf/type/__dog_vdi/explorer/list deleted file mode 100755 index 856c86fc..00000000 --- a/cdist/conf/type/__dog_vdi/explorer/list +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -# -# 2014 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -name="$__object_id" - -dog vdi list -r "$name" diff --git a/cdist/conf/type/__dog_vdi/gencode-remote b/cdist/conf/type/__dog_vdi/gencode-remote deleted file mode 100755 index 9d49506c..00000000 --- a/cdist/conf/type/__dog_vdi/gencode-remote +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh -e -# -# 2014 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -state_should="$(cat "$__object/parameter/state")" -num_vdi_lines=$(wc -l < "$__object/explorer/list") -name="$__object_id" - - -if [ "$num_vdi_lines" = 1 ]; then - state_is=present -else - state_is=absent -fi - -[ "$state_is" = "$state_should" ] && exit 0 - -case "$state_should" in - present) - size="$(cat "$__object/parameter/size")" - echo "dog vdi create '$name' '$size'" - ;; - absent) - echo "dog vdi delete '$name'" - ;; -esac diff --git a/cdist/conf/type/__dog_vdi/man.rst b/cdist/conf/type/__dog_vdi/man.rst deleted file mode 100644 index 4be1920d..00000000 --- a/cdist/conf/type/__dog_vdi/man.rst +++ /dev/null @@ -1,59 +0,0 @@ -cdist-type__dog_vdi(7) -====================== - -NAME ----- -cdist-type__dog_vdi - Manage Sheepdog VM images - - -DESCRIPTION ------------ -The dog program is used to create images for sheepdog -to be used in qemu. - - -OPTIONAL PARAMETERS -------------------- -state - Either "present" or "absent", defaults to "present" -size - Size of the image in "dog vdi" compatible units. - - Required if state is "present". - - - -EXAMPLES --------- - -.. code-block:: sh - - # Create a 50G size image - __dog_vdi nico-privat.sky.ungleich.ch --size 50G - - # Create a 50G size image (more explicit) - __dog_vdi nico-privat.sky.ungleich.ch --size 50G --state present - - # Remove image - __dog_vdi nico-privat.sky.ungleich.ch --state absent - - # Remove image - keeping --size is ok - __dog_vdi nico-privat.sky.ungleich.ch --size 50G --state absent - - -SEE ALSO --------- -:strong:`qemu`\ (1), :strong:`dog`\ (8) - - -AUTHORS -------- -Nico Schottelius - - -COPYING -------- -Copyright \(C) 2014 Nico Schottelius. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__dog_vdi/manifest b/cdist/conf/type/__dog_vdi/manifest deleted file mode 100755 index 869bdede..00000000 --- a/cdist/conf/type/__dog_vdi/manifest +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh -e -# -# 2014 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -state_should="$(cat "$__object/parameter/state")" - -case "$state_should" in - present) - if [ ! -f "$__object/parameter/size" ]; then - echo "Size is required when state is present" >&2 - exit 1 - fi - ;; - absent) - : - ;; - *) - echo "Unsupported state: $state_should" >&2 - exit 1 - ;; -esac diff --git a/cdist/conf/type/__dog_vdi/parameter/default/state b/cdist/conf/type/__dog_vdi/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__dog_vdi/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__dog_vdi/parameter/optional b/cdist/conf/type/__dog_vdi/parameter/optional deleted file mode 100644 index c3ac4490..00000000 --- a/cdist/conf/type/__dog_vdi/parameter/optional +++ /dev/null @@ -1,2 +0,0 @@ -state -size diff --git a/cdist/conf/type/__dot_file/explorer/home b/cdist/conf/type/__dot_file/explorer/home deleted file mode 100755 index 08d941bf..00000000 --- a/cdist/conf/type/__dot_file/explorer/home +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh -# Copyright (C) 2016 Dmitry Bogatov - -# Author: Dmitry Bogatov - -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 3 -# of the License, or (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -set -eu - -user="$(cat "${__object}/parameter/user")" - -if command -v getent >/dev/null 2>&1; then - line=$(getent passwd "${user}") -else - line=$(grep "^${user}:" /etc/passwd) -fi -printf '%s' "$line" | cut -d: -f6 diff --git a/cdist/conf/type/__dot_file/explorer/primary_group b/cdist/conf/type/__dot_file/explorer/primary_group deleted file mode 100755 index 30b303ac..00000000 --- a/cdist/conf/type/__dot_file/explorer/primary_group +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -# Copyright (C) 2016 Dmitry Bogatov - -# Author: Dmitry Bogatov - -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 3 -# of the License, or (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -set -eu - -user="$(cat "${__object}/parameter/user")" -id -gn "${user}" diff --git a/cdist/conf/type/__dot_file/man.rst b/cdist/conf/type/__dot_file/man.rst deleted file mode 100644 index ae65eb95..00000000 --- a/cdist/conf/type/__dot_file/man.rst +++ /dev/null @@ -1,71 +0,0 @@ -cdist-type__dot_file(7) -======================== - -NAME ----- - -cdist-type__dot_file - install file under user's home directory - -DESCRIPTION ------------ - -This type installs a file (=\ *__object_id*) under user's home directory, -providing a way to install per-user configuration files. File owner -and group is deduced from user, for who file is installed. - -Unlike regular __file type, you do not need make any assumptions, -where user's home directory is. - -REQUIRED PARAMETERS -------------------- - -user - User, for who file is installed - -OPTIONAL PARAMETERS -------------------- - -mode - forwarded to :strong:`__file` type - -state - forwarded to :strong:`__file` type - -source - forwarded to :strong:`__file` type - -MESSAGES --------- - -This type inherits all messages from :strong:`file` type, and do not add -any new. - -EXAMPLES --------- - -.. code-block:: sh - - # Install .forward file for user 'alice'. Since state is 'present', - # user is not meant to edit this file, all changes will be overridden. - # It is good idea to put warning about it in file itself. - __dot_file .forward --user alice --source "$__files/forward" - - # Install .muttrc for user 'bob', if not already present. User can safely - # edit it, his changes will not be overwritten. - __dot_file .muttrc --user bob --source "$__files/recommended_mutt_config" --state exists - - - # Install default xmonad config for user 'eve'. Parent directory is created automatically. - __dot_file .xmonad/xmonad.hs --user eve --state exists --source "$__files/xmonad.hs" - -SEE ALSO --------- - -**cdist-type__file**\ (7) - -COPYING -------- - -Copyright (C) 2015 Dmitry Bogatov. Free use of this software is granted -under the terms of the GNU General Public License version 3 or later -(GPLv3+). diff --git a/cdist/conf/type/__dot_file/manifest b/cdist/conf/type/__dot_file/manifest deleted file mode 100755 index 5e4957e5..00000000 --- a/cdist/conf/type/__dot_file/manifest +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/sh -e -# -# Copyright (C) 2016 Bogatov Dmitry -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -set -eu - -user="$(cat "${__object}/parameter/user")" -home="$(cat "${__object}/explorer/home")" -primary_group="$(cat "${__object}/explorer/primary_group")" - -# Create parent directory. Type __directory has flag 'parents', but it -# will leave us with root-owned directory in user home, which is not -# acceptable. So we create parent directories one-by-one. XXX: maybe -# it should be fixed in '__directory'? -set -- -subpath=${__object_id} -while subpath="$(dirname "${subpath}")" ; do - [ "${subpath}" = . ] && break - set -- "${subpath}" "$@" -done -unset subpath - -export CDIST_ORDER_DEPENDENCY -for dir ; do - __directory "${home}/${dir}" \ - --group "${primary_group}" \ - --owner "${user}" -done - -# These parameters are forwarded to __file type. 'mode' is always -# present, since it have been given default. - -set -- -for p in state mode source ; do - if [ -f "${__object}/parameter/${p}" ] ; then - value="$(cat "${__object}/parameter/${p}")" - set -- "$@" "--${p}" "${value}" - unset value - fi -done - -# If source is `-' we can't just forward it, since stdin is already -# captured by __dot_file. So, we replace '-' with "$__object/stdin". -# -# It means that it is possible for __file to receive --source -# parameter twice, but, since latest wins, it is okay. -source="$(cat "${__object}/parameter/source")" -if [ "${source}" = "-" ] ; then - set -- "$@" --source "${__object}/stdin" -fi -unset source - -__file "${home}/${__object_id}" --owner "$user" --group "$primary_group" "$@" diff --git a/cdist/conf/type/__dot_file/parameter/default/mode b/cdist/conf/type/__dot_file/parameter/default/mode deleted file mode 100644 index e9f960cf..00000000 --- a/cdist/conf/type/__dot_file/parameter/default/mode +++ /dev/null @@ -1 +0,0 @@ -600 diff --git a/cdist/conf/type/__dot_file/parameter/optional b/cdist/conf/type/__dot_file/parameter/optional deleted file mode 100644 index ccab9fa6..00000000 --- a/cdist/conf/type/__dot_file/parameter/optional +++ /dev/null @@ -1,3 +0,0 @@ -state -mode -source diff --git a/cdist/conf/type/__dot_file/parameter/required b/cdist/conf/type/__dot_file/parameter/required deleted file mode 100644 index 4eb8387f..00000000 --- a/cdist/conf/type/__dot_file/parameter/required +++ /dev/null @@ -1 +0,0 @@ -user diff --git a/cdist/conf/type/__file/explorer/stat b/cdist/conf/type/__file/explorer/stat deleted file mode 100755 index 13c1c208..00000000 --- a/cdist/conf/type/__file/explorer/stat +++ /dev/null @@ -1,88 +0,0 @@ -#!/bin/sh -# -# 2013 Steven Armstrong (steven-cdist armstrong.cc) -# 2019 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -destination="/$__object_id" - -# nothing to work with, nothing we could do -[ -e "$destination" ] || exit 0 - -os=$("$__explorer/os") -case "$os" in - "freebsd"|"netbsd"|"openbsd"|"macosx") - stat -f "type: %HT -owner: %Du %Su -group: %Dg %Sg -mode: %Lp %Sp -size: %Dz -links: %Dl -" "$destination" | awk '/^type/ { print tolower($0); next; } { print; }' - ;; - alpine) - # busybox stat - stat -c "type: %F -owner: %u %U -group: %g %G -mode: %a %A -size: %s -links: %h -" "$destination" - ;; - solaris) - ls1="$( ls -ld "$destination" )" - ls2="$( ls -ldn "$destination" )" - - if [ -f "$__object/parameter/mode" ] - then mode_should="$( cat "$__object/parameter/mode" )" - fi - - # yes, it is ugly hack, but if you know better way... - if [ -z "$( find "$destination" -perm "$mode_should" )" ] - then octets=888 - else octets="$( echo "$mode_should" | sed 's/^0//' )" - fi - - case "$( echo "$ls1" | cut -c1-1 )" in - -) echo 'type: regular file' ;; - d) echo 'type: directory' ;; - esac - - echo "owner: $( echo "$ls2" \ - | awk '{print $3}' ) $( echo "$ls1" \ - | awk '{print $3}' )" - - echo "group: $( echo "$ls2" \ - | awk '{print $4}' ) $( echo "$ls1" \ - | awk '{print $4}' )" - - echo "mode: $octets $( echo "$ls1" | awk '{print $1}' )" - echo "size: $( echo "$ls1" | awk '{print $5}' )" - echo "links: $( echo "$ls1" | awk '{print $2}' )" - ;; - *) - stat --printf="type: %F -owner: %u %U -group: %g %G -mode: %a %A -size: %s -links: %h -" "$destination" - ;; -esac diff --git a/cdist/conf/type/__file/explorer/type b/cdist/conf/type/__file/explorer/type deleted file mode 100755 index e723047c..00000000 --- a/cdist/conf/type/__file/explorer/type +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh -# -# 2013 Steven Armstrong (steven-cdist armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -destination="/$__object_id" - -if [ ! -e "$destination" ]; then - echo none -elif [ -h "$destination" ]; then - echo symlink -elif [ -f "$destination" ]; then - echo file -elif [ -d "$destination" ]; then - echo directory -else - echo unknown -fi diff --git a/cdist/conf/type/__file/gencode-local b/cdist/conf/type/__file/gencode-local deleted file mode 100755 index fb9f9a92..00000000 --- a/cdist/conf/type/__file/gencode-local +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/sh -e -# -# 2011-2012 Nico Schottelius (nico-cdist at schottelius.org) -# 2013 Steven Armstrong (steven-cdist armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -destination="/$__object_id" -state_should="$(cat "$__object/parameter/state")" -type="$(cat "$__object/explorer/type")" - -[ "$state_should" = "exists" ] && [ "$type" = "file" ] && exit 0 # nothing to do - -if [ "$state_should" = "pre-exists" ]; then - if [ -f "$__object/parameter/source" ]; then - echo "--source cannot be used with --state pre-exists" - exit 1 - fi - - if [ "$type" = "file" ]; then - exit 0 # nothing to do - else - echo "File \"$destination\" does not exist" - exit 1 - fi -fi - -upload_file= -create_file= -if [ "$state_should" = "present" ] || [ "$state_should" = "exists" ]; then - if [ ! -f "$__object/parameter/source" ]; then - remote_stat="$(cat "$__object/explorer/stat")" - if [ -z "$remote_stat" ]; then - create_file=1 - echo create >> "$__messages_out" - fi - else - source="$(cat "$__object/parameter/source")" - if [ "$source" = "-" ]; then - source="$__object/stdin" - fi - if [ ! -f "$source" ]; then - echo "Source \"$source\" does not exist." >&2 - exit 1 - else - if [ "$type" != "file" ]; then - # destination is not a regular file, upload source to replace it - upload_file=1 - else - local_cksum="$(cksum < "$source")" - remote_cksum="$(cat "$__object/explorer/cksum")" - if [ "$local_cksum" != "$remote_cksum" ]; then - # destination is a regular file, but not the right one - upload_file=1 - fi - fi - fi - fi - if [ "$create_file" ] || [ "$upload_file" ]; then - # tell gencode-remote that we created or uploaded a file and that it must - # set all attributes no matter what the explorer retreived - mkdir "$__object/files" - touch "$__object/files/set-attributes" - - # upload file to temp location - tempfile_template="${destination}.cdist.XXXXXXXXXX" - cat << DONE -destination_upload="\$($__remote_exec $__target_host "mktemp $tempfile_template")" -DONE - if [ "$upload_file" ]; then - echo upload >> "$__messages_out" - # IPv6 fix - if echo "${__target_host}" | grep -q -E '^[0-9a-fA-F:]+$' - then - my_target_host="[${__target_host}]" - else - my_target_host="${__target_host}" - fi - cat << DONE -$__remote_copy "$source" "${my_target_host}:\$destination_upload" -DONE - fi -# move uploaded file into place -cat << DONE -$__remote_exec $__target_host "rm -rf \"$destination\"; mv \"\$destination_upload\" \"$destination\"" -DONE - fi -fi diff --git a/cdist/conf/type/__file/gencode-remote b/cdist/conf/type/__file/gencode-remote deleted file mode 100755 index b04c471e..00000000 --- a/cdist/conf/type/__file/gencode-remote +++ /dev/null @@ -1,107 +0,0 @@ -#!/bin/sh -e -# -# 2011-2013 Nico Schottelius (nico-cdist at schottelius.org) -# 2013 Steven Armstrong (steven-cdist armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -destination="/$__object_id" -state_should="$(cat "$__object/parameter/state")" -type="$(cat "$__object/explorer/type")" -stat_file="$__object/explorer/stat" -fire_onchange='' - -get_current_value() { - if [ -s "$stat_file" ]; then - _name="$1" - _value="$2" - case "$_value" in - [0-9]*) - _index=2 - ;; - *) - _index=3 - ;; - esac - awk '/'"$_name"':/ { print $'$_index' }' "$stat_file" - unset _name _value _index - fi -} - -set_group() { - echo "chgrp '$1' '$destination'" - echo "chgrp '$1'" >> "$__messages_out" - fire_onchange=1 -} - -set_owner() { - echo "chown '$1' '$destination'" - echo "chown '$1'" >> "$__messages_out" - fire_onchange=1 -} - -set_mode() { - echo "chmod '$1' '$destination'" - echo "chmod '$1'" >> "$__messages_out" - fire_onchange=1 -} - -case "$state_should" in - present|exists|pre-exists) - # Note: Mode - needs to happen last as a chown/chgrp can alter mode by - # clearing S_ISUID and S_ISGID bits (see chown(2)) - for attribute in group owner mode; do - if [ -f "$__object/parameter/$attribute" ]; then - value_should="$(cat "$__object/parameter/$attribute")" - - # change 0xxx format to xxx format => same as stat returns - if [ "$attribute" = mode ]; then - value_should="$(echo "$value_should" | sed 's/^0\(...\)/\1/')" - fi - - value_is="$(get_current_value "$attribute" "$value_should")" - if [ -f "$__object/files/set-attributes" ] || [ "$value_should" != "$value_is" ]; then - "set_$attribute" "$value_should" - fi - fi - done - if [ -f "$__object/files/set-attributes" ]; then - # set-attributes is created if file is created or uploaded in gencode-local - fire_onchange=1 - fi - - ;; - - absent) - if [ "$type" = "file" ]; then - echo "rm -f '$destination'" - echo remove >> "$__messages_out" - fire_onchange=1 - fi - ;; - - *) - echo "Unknown state: $state_should" >&2 - exit 1 - ;; -esac - -if [ -f "$__object/parameter/onchange" ]; then - if [ -n "$fire_onchange" ]; then - cat "$__object/parameter/onchange" - fi -fi diff --git a/cdist/conf/type/__file/man.rst b/cdist/conf/type/__file/man.rst deleted file mode 100644 index 7a0603bb..00000000 --- a/cdist/conf/type/__file/man.rst +++ /dev/null @@ -1,124 +0,0 @@ -cdist-type__file(7) -=================== - -NAME ----- -cdist-type__file - Manage files. - - -DESCRIPTION ------------ -This cdist type allows you to create files, remove files and set file -attributes on the target. - -If the file already exists on the target, then if it is a: - -regular file, and state is: - present - replace it with the source file if they are not equal - exists - do nothing -symlink - replace it with the source file -directory - replace it with the source file - -One exception is that when state is pre-exists, an error is raised if -the file would have been created otherwise (e.g. it is not present or -not a regular file). - -In any case, make sure that the file attributes are as specified. - - -REQUIRED PARAMETERS -------------------- -None. - -OPTIONAL PARAMETERS -------------------- -state - 'present', 'absent', 'exists' or 'pre-exists', defaults to 'present' where: - - present - the file is exactly the one from source - absent - the file does not exist - exists - the file from source but only if it doesn't already exist - pre-exists - check that the file exists and is a regular file, but do not - create or modify it - -group - Group to chgrp to. - -mode - Unix permissions, suitable for chmod. - -owner - User to chown to. - -source - If supplied, copy this file from the host running cdist to the target. - If not supplied, an empty file or directory will be created. - If source is '-' (dash), take what was written to stdin as the file content. - -onchange - The code to run if file is modified. - -MESSAGES --------- -chgrp - Changed group membership -chown - Changed owner -chmod - Changed mode -create - Empty file was created (no --source specified) -remove - File exists, but state is absent, file will be removed by generated code. -upload - File was uploaded - - -EXAMPLES --------- - -.. code-block:: sh - - # Create /etc/cdist-configured as an empty file - __file /etc/cdist-configured - # The same thing - __file /etc/cdist-configured --state present - # Use __file from another type - __file /etc/issue --source "$__type/files/archlinux" --state present - # Delete existing file - __file /etc/cdist-configured --state absent - # Supply some more settings - __file /etc/shadow --source "$__type/files/shadow" \ - --owner root --group shadow --mode 0640 \ - --state present - # Provide a default file, but let the user change it - __file /home/frodo/.bashrc --source "/etc/skel/.bashrc" \ - --state exists \ - --owner frodo --mode 0600 - # Check that the file is present, show an error when it is not - __file /etc/somefile --state pre-exists - # Take file content from stdin - __file /tmp/whatever --owner root --group root --mode 644 --source - << DONE - Here goes the content for /tmp/whatever - DONE - - -AUTHORS -------- -Nico Schottelius - - -COPYING -------- -Copyright \(C) 2011-2013 Nico Schottelius. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__file/parameter/default/state b/cdist/conf/type/__file/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__file/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__file/parameter/optional b/cdist/conf/type/__file/parameter/optional deleted file mode 100644 index 9b98352c..00000000 --- a/cdist/conf/type/__file/parameter/optional +++ /dev/null @@ -1,6 +0,0 @@ -state -group -mode -owner -source -onchange diff --git a/cdist/conf/type/__filesystem/explorer/lsblk b/cdist/conf/type/__filesystem/explorer/lsblk deleted file mode 100644 index 9ae544ac..00000000 --- a/cdist/conf/type/__filesystem/explorer/lsblk +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh -# -# 2016 - 2016 Daniel Heule (hda at sfs.biz) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -os=$("$__explorer/os") - -if [ -f "$__object/parameter/device" ]; then - blkdev="$(cat "$__object/parameter/device")" -else - blkdev="$__object_id" -fi - -case "$os" in - centos|fedora|redhat|suse|gentoo) - if [ ! -x "$(command -v lsblk)" ]; then - echo "lsblk is required for __filesystem type" >&2 - exit 1 - else - #echo -n $(lsblk -nd -P -o NAME,FSTYPE,LABEL,MOUNTPOINT "$blkdev" 2>/dev/null) - lsblk -nd -P -o NAME,FSTYPE,LABEL,MOUNTPOINT "$blkdev" 2>/dev/null - fi - ;; - *) - echo "__filesystem type lacks implementation for os: $os" >&2 - exit 1 - ;; -esac diff --git a/cdist/conf/type/__filesystem/gencode-remote b/cdist/conf/type/__filesystem/gencode-remote deleted file mode 100755 index 0bcdc13c..00000000 --- a/cdist/conf/type/__filesystem/gencode-remote +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/sh -e -# -# 2016 - 2016 Daniel Heule (hda at sfs.biz) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - - -fstype="$(cat "$__object/parameter/fstype")" - -if [ -f "$__object/parameter/device" ]; then - mydev="$(cat "$__object/parameter/device")" -else - mydev="$__object_id" -fi - -label="$(cat "$__object/parameter/label")" -mkfsoptions="$(cat "$__object/parameter/mkfsoptions")" - - -if [ -f "$__object/parameter/force" ]; then - # create filesystem even an other filesystem is on disk or the label is not correct, use with caution ! - forcefs="true" -else - forcefs="false" -fi - - - -blkdev_devname="$(grep -P -o 'NAME="\K[^"]*' "$__object/explorer/lsblk")" -blkdev_fstype="$(grep -P -o 'FSTYPE="\K[^"]*' "$__object/explorer/lsblk")" -blkdev_label="$(grep -P -o 'LABEL="\K[^"]*' "$__object/explorer/lsblk")" -blkdev_mountpoint="$(grep -P -o 'MOUNTPOINT="\K[^"]*' "$__object/explorer/lsblk")" - -if [ -z "$blkdev_devname" ]; then - echo "Specified device $mydev not found on target system" >&2 - exit 1 -fi - -[ "$blkdev_label" = "$label" ] && [ "$blkdev_fstype" = "$fstype" ] && exit 0 - -if [ -n "$blkdev_mountpoint" ]; then - echo "Specified device $mydev is mounted on $blkdev_mountpoint, __filesystem does NOTHING with mountd devices" >&2 - exit 0 -fi - -if [ -n "$blkdev_fstype" ] && [ "$forcefs" != "true" ]; then - if [ "$blkdev_label" != "$label" ]; then - echo "Specified device $mydev has not the spezified label: $blkdev_label, but __filesystem does NOTHING in this case without the --force option" >&2 - exit 0 - fi - if [ "$blkdev_fstype" != "$fstype" ]; then - echo "Specified device $mydev has not the spezified filesystem: $blkdev_fstype, but __filesystem does NOTHING in this case without the --force option" >&2 - exit 0 - fi -fi - - -# ok, all conditions checked, we need to format the device, lets go -opts="$mkfsoptions" -if [ -n "$label" ]; then - opts="$opts -L '$label'" -fi - -case "$fstype" in - ext2|ext3|ext4) - if [ "$forcefs" = "true" ]; then - opts="$opts -F" - fi - echo "mkfs.$fstype $opts /dev/$blkdev_devname" - ;; - btrfs) - if [ "$forcefs" = "true" ]; then - opts="$opts --force" - fi - echo "mkfs.btrfs $opts /dev/$blkdev_devname" - ;; - xfs) - if [ "$forcefs" = "true" ]; then - opts="$opts -f" - fi - echo "mkfs.xfs $opts /dev/$blkdev_devname" - ;; - *) - echo "__filesystem type lacks implementation for filesystem: $fstype" >&2 - exit 1 - ;; -esac -echo "filesystem $fstype on $mydev : /dev/$blkdev_devname created" >> "$__messages_out" diff --git a/cdist/conf/type/__filesystem/man.rst b/cdist/conf/type/__filesystem/man.rst deleted file mode 100644 index 1c103ac9..00000000 --- a/cdist/conf/type/__filesystem/man.rst +++ /dev/null @@ -1,81 +0,0 @@ -cdist-type__filesystem(7) -========================= - -NAME ----- -cdist-type__filesystem - Create Filesystems. - - -DESCRIPTION ------------ -This cdist type allows you to create filesystems on devices. - -If the device is mounted on target, it refuses to do anything. - -If the device has a filesystem other then the specified and/or -the label is not correct, it only makes a new filesystem -if you have specified --force option. - - -REQUIRED PARAMETERS -------------------- -fstype - Filesystem type, for example 'ext3', 'btrfs' or 'xfs'. - - - -OPTIONAL PARAMETERS -------------------- -device - Blockdevice for filesystem, Defaults to object_id. - On linux, it can be any lsblk accepted device notation. - - | - | For example: - | /dev/sdx - | or /dev/disk/by-xxxx/xxx - | or /dev/mapper/xxxx - -label - Label which should be applied on the filesystem. - -mkfsoptions - Additional options which are inserted to the mkfs.xxx call. - - -BOOLEAN PARAMETERS ------------------- -force - Normally, this type does nothing if a filesystem is found - on the target device. If you specify force, it's formatted - if the filesystem type or label differs from parameters. - Warning: This option can easily lead into data loss! - -MESSAGES --------- -filesystem on \: created - Filesystem was created on - - -EXAMPLES --------- - -.. code-block:: sh - - # Ensures that device /dev/sdb is formatted with xfs - __filesystem /dev/sdb --fstype xfs --label Testdisk1 - # The same thing with btrfs and disk spezified by pci path to disk 1:0 on vmware - __filesystem dev_sdb --fstype btrfs --device /dev/disk/by-path/pci-0000:0b:00.0-scsi-0:0:0:0 --label Testdisk2 - # Make sure that a multipath san device has a filesystem ... - __filesystem dev_sdb --fstype xfs --device /dev/mapper/360060e80432f560050202f22000023ff --label Testdisk3 - - -AUTHORS -------- -Daniel Heule - - -COPYING -------- -Copyright \(C) 2016 Daniel Heule. Free use of this software is -granted under the terms of the GNU General Public License version 3 or any later version (GPLv3+). diff --git a/cdist/conf/type/__filesystem/parameter/boolean b/cdist/conf/type/__filesystem/parameter/boolean deleted file mode 100644 index 14b33226..00000000 --- a/cdist/conf/type/__filesystem/parameter/boolean +++ /dev/null @@ -1 +0,0 @@ -force diff --git a/cdist/conf/type/__filesystem/parameter/default/label b/cdist/conf/type/__filesystem/parameter/default/label deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__filesystem/parameter/default/mkfsoptions b/cdist/conf/type/__filesystem/parameter/default/mkfsoptions deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__filesystem/parameter/optional b/cdist/conf/type/__filesystem/parameter/optional deleted file mode 100644 index 79dddc21..00000000 --- a/cdist/conf/type/__filesystem/parameter/optional +++ /dev/null @@ -1,3 +0,0 @@ -device -label -mkfsoptions diff --git a/cdist/conf/type/__filesystem/parameter/required b/cdist/conf/type/__filesystem/parameter/required deleted file mode 100644 index 98f8b69f..00000000 --- a/cdist/conf/type/__filesystem/parameter/required +++ /dev/null @@ -1 +0,0 @@ -fstype diff --git a/cdist/conf/type/__firewalld_rule/explorer/rule b/cdist/conf/type/__firewalld_rule/explorer/rule deleted file mode 100644 index 0234e5b6..00000000 --- a/cdist/conf/type/__firewalld_rule/explorer/rule +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh -# -# 2015 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -protocol="$(cat "$__object/parameter/protocol")" -table="$(cat "$__object/parameter/table")" -chain="$(cat "$__object/parameter/chain")" -priority="$(cat "$__object/parameter/priority")" -rule="$(cat "$__object/parameter/rule")" - -if firewall-cmd --permanent --direct --query-rule "$protocol" "$table" "$chain" "$priority" "$rule" >/dev/null; then - echo present -else - echo absent -fi diff --git a/cdist/conf/type/__firewalld_rule/gencode-remote b/cdist/conf/type/__firewalld_rule/gencode-remote deleted file mode 100755 index bd6d13e5..00000000 --- a/cdist/conf/type/__firewalld_rule/gencode-remote +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh -e -# -# 2015 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -state_should="$(cat "$__object/parameter/state")" -state_is="$(cat "$__object/explorer/rule")" - -[ "$state_is" = "$state_should" ] && exit 0 - -protocol="$(cat "$__object/parameter/protocol")" -table="$(cat "$__object/parameter/table")" -chain="$(cat "$__object/parameter/chain")" -priority="$(cat "$__object/parameter/priority")" -rule="$(cat "$__object/parameter/rule")" - -case "$state_should" in - present) - echo "firewall-cmd --quiet --permanent --direct --add-rule '$protocol' '$table' '$chain' '$priority' $rule" - echo "firewall-cmd --quiet --direct --add-rule '$protocol' '$table' '$chain' '$priority' $rule" - ;; - - absent) - echo "firewall-cmd --quiet --permanent --direct --remove-rule '$protocol' '$table' '$chain' '$priority' $rule" - echo "firewall-cmd --quiet --direct --remove-rule '$protocol' '$table' '$chain' '$priority' $rule" - ;; - *) - echo "Unknown state $state_should" >&2 - exit 1 - ;; -esac diff --git a/cdist/conf/type/__firewalld_rule/man.rst b/cdist/conf/type/__firewalld_rule/man.rst deleted file mode 100644 index 5de5d15c..00000000 --- a/cdist/conf/type/__firewalld_rule/man.rst +++ /dev/null @@ -1,81 +0,0 @@ -cdist-type__firewalld_rule(7) -============================= - -NAME ----- -cdist-type__firewalld_rule - Configure firewalld rules - - -DESCRIPTION ------------ -This cdist type allows you to manage rules in firewalld -using the *direct* way (i.e. no zone support). - - -REQUIRED PARAMETERS -------------------- -rule - The rule to apply. Essentially an firewalld command - line without firewalld in front of it. -protocol - Either ipv4, ipv4 or eb. See firewall-cmd(1) -table - The table to use (like filter or nat). See firewall-cmd(1). -chain - The chain to use (like INPUT_direct or FORWARD_direct). See firewall-cmd(1). -priority - The priority to use (0 is topmost). See firewall-cmd(1). - - -OPTIONAL PARAMETERS -------------------- -state - 'present' or 'absent', defaults to 'present' - - -EXAMPLES --------- - -.. code-block:: sh - - # Allow access from entrance.place4.ungleich.ch - __firewalld_rule entrance \ - --protocol ipv4 \ - --table filter \ - --chain INPUT_direct \ - --priority 0 \ - --rule '-s entrance.place4.ungleich.ch -j ACCEPT' - - # Allow forwarding of traffic from br0 - __firewalld_rule vm-forward --protocol ipv4 \ - --table filter \ - --chain FORWARD_direct \ - --priority 0 \ - --rule '-i br0 -j ACCEPT' - - # Ensure old rule is absent - warning, the rule part must stay the same! - __firewalld_rule vm-forward - --protocol ipv4 \ - --table filter \ - --chain FORWARD_direct \ - --priority 0 \ - --rule '-i br0 -j ACCEPT' \ - --state absent - - -SEE ALSO --------- -:strong:`cdist-type__iptables_rule`\ (7), :strong:`firewalld`\ (8) - - -AUTHORS -------- -Nico Schottelius - - -COPYING -------- -Copyright \(C) 2015 Nico Schottelius. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__firewalld_rule/parameter/default/state b/cdist/conf/type/__firewalld_rule/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__firewalld_rule/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__firewalld_rule/parameter/required b/cdist/conf/type/__firewalld_rule/parameter/required deleted file mode 100644 index 58def7e4..00000000 --- a/cdist/conf/type/__firewalld_rule/parameter/required +++ /dev/null @@ -1,5 +0,0 @@ -chain -priority -protocol -rule -table diff --git a/cdist/conf/type/__firewalld_start/gencode-remote b/cdist/conf/type/__firewalld_start/gencode-remote deleted file mode 100755 index 3e767f68..00000000 --- a/cdist/conf/type/__firewalld_start/gencode-remote +++ /dev/null @@ -1,84 +0,0 @@ -#!/bin/sh -e -# -# 2016 Darko Poljak(darko.poljak at ungleich.ch) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -startstate="$(cat "$__object/parameter/startstate")" -init=$(cat "$__global/explorer/init") - -os=$(cat "$__global/explorer/os") -os_version=$(cat "$__global/explorer/os_version") -name="firewalld" - -case "${startstate}" in - present) - cmd="start" - ;; - absent) - cmd="stop" - ;; - *) - echo "Unknown startstate: ${startstate}" >&2 - exit 1 - ;; -esac - -if [ "$init" = 'systemd' ]; then - # this handles ALL linux distros with systemd - # e.g. archlinux, gentoo in some cases, new RHEL and SLES versions - echo "systemctl \"$cmd\" \"$name\"" -else - case "$os" in - debian) - case "$os_version" in - [1-7]*) - echo "service \"$name\" \"$cmd\"" - ;; - 8*) - echo "systemctl \"$cmd\" \"$name\"" - ;; - *) - echo "Unsupported version $os_version of $os" >&2 - exit 1 - ;; - esac - ;; - - gentoo) - echo service \"$name\" \"$cmd\" - ;; - - amazon|scientific|centos|fedora|owl|redhat|suse) - echo service \"$name\" \"$cmd\" - ;; - - openwrt) - echo "/etc/init.d/\"$name\" \"$cmd\"" - ;; - - ubuntu) - echo "service \"$name\" \"$cmd\"" - ;; - - *) - echo "Unsupported os: $os" >&2 - exit 1 - ;; - esac -fi diff --git a/cdist/conf/type/__firewalld_start/man.rst b/cdist/conf/type/__firewalld_start/man.rst deleted file mode 100644 index 74199cd6..00000000 --- a/cdist/conf/type/__firewalld_start/man.rst +++ /dev/null @@ -1,53 +0,0 @@ -cdist-type__firewalld_start(7) -============================== - -NAME ----- -cdist-type__firewalld_start - start and enable firewalld - - -DESCRIPTION ------------ -This cdist type allows you to start and enable firewalld. - - -REQUIRED PARAMETERS -------------------- -None - -OPTIONAL PARAMETERS -------------------- -startstate - 'present' or 'absent', start/stop firewalld. Default is 'present'. -bootstate - 'present' or 'absent', enable/disable firewalld on boot. Default is 'present'. - - -EXAMPLES --------- - -.. code-block:: sh - - # start and enable firewalld - __firewalld_start - - # only enable firewalld to start on boot - __firewalld_start --startstate present --bootstate absent - - -SEE ALSO --------- -:strong:`firewalld`\ (8) - - -AUTHORS -------- -Darko Poljak - - -COPYING -------- -Copyright \(C) 2016 Darko Poljak. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__firewalld_start/manifest b/cdist/conf/type/__firewalld_start/manifest deleted file mode 100755 index 98caaad9..00000000 --- a/cdist/conf/type/__firewalld_start/manifest +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -e -# -# 2016 Darko Poljak (darko.poljak at ungleich.ch) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . - -bootstate="$(cat "$__object/parameter/bootstate")" - -__package firewalld -require="__package/firewalld" __start_on_boot firewalld --state "${bootstate}" diff --git a/cdist/conf/type/__firewalld_start/parameter/default/bootstate b/cdist/conf/type/__firewalld_start/parameter/default/bootstate deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__firewalld_start/parameter/default/bootstate +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__firewalld_start/parameter/default/startstate b/cdist/conf/type/__firewalld_start/parameter/default/startstate deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__firewalld_start/parameter/default/startstate +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__firewalld_start/parameter/optional b/cdist/conf/type/__firewalld_start/parameter/optional deleted file mode 100644 index 934c7d0d..00000000 --- a/cdist/conf/type/__firewalld_start/parameter/optional +++ /dev/null @@ -1,2 +0,0 @@ -bootstate -startstate diff --git a/cdist/conf/type/__firewalld_start/singleton b/cdist/conf/type/__firewalld_start/singleton deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__git/explorer/group b/cdist/conf/type/__git/explorer/group deleted file mode 100644 index 3ddf9656..00000000 --- a/cdist/conf/type/__git/explorer/group +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -destination="/$__object_id/.git" - -stat --print "%G" "${destination}" 2>/dev/null || exit 0 diff --git a/cdist/conf/type/__git/explorer/owner b/cdist/conf/type/__git/explorer/owner deleted file mode 100644 index 4c3cd431..00000000 --- a/cdist/conf/type/__git/explorer/owner +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -destination="/$__object_id/.git" - -stat --print "%U" "${destination}" 2>/dev/null || exit 0 diff --git a/cdist/conf/type/__git/gencode-remote b/cdist/conf/type/__git/gencode-remote deleted file mode 100755 index 5a9e23fc..00000000 --- a/cdist/conf/type/__git/gencode-remote +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/sh -e -# -# 2012 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -state_is="$(cat "$__object/explorer/state")" -owner_is="$(cat "$__object/explorer/owner")" -group_is="$(cat "$__object/explorer/group")" - -state_should="$(cat "$__object/parameter/state")" - -branch="$(cat "$__object/parameter/branch")" - -source="$(cat "$__object/parameter/source")" - -destination="/$__object_id" - -owner="$(cat "$__object/parameter/owner")" -group="$(cat "$__object/parameter/group")" -mode="$(cat "$__object/parameter/mode")" - -[ "$state_should" = "$state_is" ] && \ -[ "$owner" = "$owner_is" ] && \ -[ "$group" = "$group_is" ] && \ -[ -n "$mode" ] && exit 0 - -case $state_should in - present) - - if [ "$state_should" != "$state_is" ]; then - echo git clone --quiet --branch "$branch" "$source" "$destination" - fi - if { [ -n "$owner" ] && [ "$owner_is" != "$owner" ]; } || \ - { [ -n "$group" ] && [ "$group_is" != "$group" ]; }; then - echo chown -R "${owner}:${group}" "$destination" - fi - if [ -n "$mode" ]; then - echo chmod -R "$mode" "$destination" - fi - ;; - # Handled in manifest - absent) - ;; - - *) - echo "Unknown state: $state_should" >&2 - exit 1 - ;; -esac diff --git a/cdist/conf/type/__git/man.rst b/cdist/conf/type/__git/man.rst deleted file mode 100644 index 130925c8..00000000 --- a/cdist/conf/type/__git/man.rst +++ /dev/null @@ -1,60 +0,0 @@ -cdist-type__git(7) -================== - -NAME ----- -cdist-type__git - Get and or keep git repositories up-to-date - - -DESCRIPTION ------------ -This cdist type allows you to clone git repositories - - -REQUIRED PARAMETERS -------------------- -source - Specifies the git remote to clone from - - -OPTIONAL PARAMETERS -------------------- -state - Either "present" or "absent", defaults to "present" - -branch - Create this branch by checking out the remote branch of this name - Default branch is "master" - -group - Group to chgrp to. - -mode - Unix permissions, suitable for chmod. - -owner - User to chown to. - - -EXAMPLES --------- - -.. code-block:: sh - - __git /home/services/dokuwiki --source git://github.com/splitbrain/dokuwiki.git - - # Checkout cdist, stay on branch 2.1 - __git /home/nico/cdist --source git@code.ungleich.ch:ungleich-public/cdist.git --branch 2.1 - - -AUTHORS -------- -Nico Schottelius - - -COPYING -------- -Copyright \(C) 2012 Nico Schottelius. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__git/manifest b/cdist/conf/type/__git/manifest deleted file mode 100755 index 6fb870f4..00000000 --- a/cdist/conf/type/__git/manifest +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh -e -# -# 2012 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Ensure git is present -# - -__package git --state present - -state_should="$(cat "$__object/parameter/state")" -owner="$(cat "$__object/parameter/owner")" -group="$(cat "$__object/parameter/group")" -mode="$(cat "$__object/parameter/mode")" - -# Let __directory handle removal of git repos - -case "$state_should" in - present) - : - ;; - - absent) - __directory "$__object_id" --state absent \ - --owner "$owner" \ - --group "$group" \ - --mode "$mode" - ;; - - *) - echo "Unknown state: $state_should" >&2 - exit 1 - ;; -esac diff --git a/cdist/conf/type/__git/parameter/default/branch b/cdist/conf/type/__git/parameter/default/branch deleted file mode 100644 index 1f7391f9..00000000 --- a/cdist/conf/type/__git/parameter/default/branch +++ /dev/null @@ -1 +0,0 @@ -master diff --git a/cdist/conf/type/__git/parameter/default/group b/cdist/conf/type/__git/parameter/default/group deleted file mode 100644 index 8b137891..00000000 --- a/cdist/conf/type/__git/parameter/default/group +++ /dev/null @@ -1 +0,0 @@ - diff --git a/cdist/conf/type/__git/parameter/default/mode b/cdist/conf/type/__git/parameter/default/mode deleted file mode 100644 index 8b137891..00000000 --- a/cdist/conf/type/__git/parameter/default/mode +++ /dev/null @@ -1 +0,0 @@ - diff --git a/cdist/conf/type/__git/parameter/default/owner b/cdist/conf/type/__git/parameter/default/owner deleted file mode 100644 index 8b137891..00000000 --- a/cdist/conf/type/__git/parameter/default/owner +++ /dev/null @@ -1 +0,0 @@ - diff --git a/cdist/conf/type/__git/parameter/default/state b/cdist/conf/type/__git/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__git/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__git/parameter/optional b/cdist/conf/type/__git/parameter/optional deleted file mode 100644 index 3c409162..00000000 --- a/cdist/conf/type/__git/parameter/optional +++ /dev/null @@ -1,5 +0,0 @@ -state -branch -group -owner -mode diff --git a/cdist/conf/type/__git/parameter/required b/cdist/conf/type/__git/parameter/required deleted file mode 100644 index 5a18cd2f..00000000 --- a/cdist/conf/type/__git/parameter/required +++ /dev/null @@ -1 +0,0 @@ -source diff --git a/cdist/conf/type/__go_get/explorer/go-executable b/cdist/conf/type/__go_get/explorer/go-executable deleted file mode 100755 index 87182282..00000000 --- a/cdist/conf/type/__go_get/explorer/go-executable +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -# shellcheck disable=SC1091 -[ -f /etc/environment ] && . /etc/environment -# shellcheck disable=SC1091 -[ -f /etc/profile ] && . /etc/profile -go version 2>/dev/null || true diff --git a/cdist/conf/type/__go_get/gencode-remote b/cdist/conf/type/__go_get/gencode-remote deleted file mode 100755 index 4c47a70e..00000000 --- a/cdist/conf/type/__go_get/gencode-remote +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -e - -package=$__object_id - -cat< - - -COPYING -------- -Copyright \(C) 2017 Kamila Součková. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__go_get/manifest b/cdist/conf/type/__go_get/manifest deleted file mode 100755 index a5cc4c80..00000000 --- a/cdist/conf/type/__go_get/manifest +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh -e - -go_executable=$(cat "$__object/explorer/go-executable") -[ -z "$go_executable" ] && echo "__go_get: Cannot find go executable; make sure it is installed and in PATH" >&2 && exit 1 - -os=$(cat "$__global/explorer/os") -case $os in - debian|devuan|ubuntu) - __package build-essential - ;; - *) - echo "__go_get: Don't know how to install g++ on $os" >&2 - echo "__go_get: Send a pull request or contact to add support for $os." >&2 - exit 1 - ;; -esac - -__package git diff --git a/cdist/conf/type/__golang_from_vendor/gencode-remote b/cdist/conf/type/__golang_from_vendor/gencode-remote deleted file mode 100755 index 5200e9e3..00000000 --- a/cdist/conf/type/__golang_from_vendor/gencode-remote +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh -e - -version=$(cat "$__object/parameter/version") - -kernel_name=$(tr '[:upper:]' '[:lower:]' < "$__global/explorer/kernel_name") -machine=$(cat "$__global/explorer/machine") -case $machine in - x86_64|amd64) - arch=amd64 - ;; - x86) - arch=386 - ;; - *) - arch=$machine # at least try... - ;; -esac - -PACKAGE="go${version}.${kernel_name}-${arch}" -URL="https://storage.googleapis.com/golang/${PACKAGE}.tar.gz" -cat </dev/null)" = "xgo$version" ] && exit 0 # already there -wget --no-verbose "$URL" -O "/tmp/${PACKAGE}.tar.gz" -rm -rf /usr/local/go -tar -C /usr/local -xzf /tmp/${PACKAGE}.tar.gz -EOF diff --git a/cdist/conf/type/__golang_from_vendor/man.rst b/cdist/conf/type/__golang_from_vendor/man.rst deleted file mode 100644 index 2b4f065e..00000000 --- a/cdist/conf/type/__golang_from_vendor/man.rst +++ /dev/null @@ -1,48 +0,0 @@ -cdist-type__golang_from_vendor(7) -================================= - -NAME ----- -cdist-type__golang_from_vendor - Install any version of golang from golang.org - - -DESCRIPTION ------------ -This cdist type allows you to install golang from archives provided by https://golang.org/dl/. - -See https://golang.org/dl/ for the list of supported versions, operating systems and architectures. - -This is a singleton type. - - -REQUIRED PARAMETERS -------------------- -None. - - -OPTIONAL PARAMETERS -------------------- -version - The golang version to install, defaults to 1.8.1 - - -EXAMPLES --------- - -.. code-block:: sh - - __golang_from_vendor --version 1.8.1 - - - -AUTHORS -------- -Kamila Součková - - -COPYING -------- -Copyright \(C) 2017 Kamila Součková. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__golang_from_vendor/manifest b/cdist/conf/type/__golang_from_vendor/manifest deleted file mode 100755 index ad39ddfb..00000000 --- a/cdist/conf/type/__golang_from_vendor/manifest +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -e - -# shellcheck disable=SC2016 -__line go_in_path --line 'export PATH=/usr/local/go/bin:$PATH' --file /etc/profile diff --git a/cdist/conf/type/__golang_from_vendor/parameter/default/version b/cdist/conf/type/__golang_from_vendor/parameter/default/version deleted file mode 100644 index a8fdfda1..00000000 --- a/cdist/conf/type/__golang_from_vendor/parameter/default/version +++ /dev/null @@ -1 +0,0 @@ -1.8.1 diff --git a/cdist/conf/type/__golang_from_vendor/singleton b/cdist/conf/type/__golang_from_vendor/singleton deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__grafana_dashboard/man.rst b/cdist/conf/type/__grafana_dashboard/man.rst deleted file mode 100644 index b3974028..00000000 --- a/cdist/conf/type/__grafana_dashboard/man.rst +++ /dev/null @@ -1,43 +0,0 @@ -cdist-type__grafana_dashboard(7) -================================ - -NAME ----- -cdist-type__grafana_dashboard - Install Grafana (https://grafana.com) - - -DESCRIPTION ------------ -This cdist type adds the Grafana repository, installs the grafana package, and sets the server to start on boot. - -This is a singleton type. - -REQUIRED PARAMETERS -------------------- -None. - - -OPTIONAL PARAMETERS -------------------- -None. - - -EXAMPLES --------- - -.. code-block:: sh - - __grafana_dashboard - - -AUTHORS -------- -Kamila Součková - - -COPYING -------- -Copyright \(C) 2017 Kamila Součková. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__grafana_dashboard/manifest b/cdist/conf/type/__grafana_dashboard/manifest deleted file mode 100755 index e652202b..00000000 --- a/cdist/conf/type/__grafana_dashboard/manifest +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh -e - -os=$(cat "$__global/explorer/os") -os_version=$(cat "$__global/explorer/os_version") - -require="" -case $os in - debian|devuan) - case $os_version in - 8*|jessie) - # Differntation not needed anymore - apt_source_distribution=stable - ;; - 9*|ascii/ceres|ascii) - # Differntation not needed anymore - apt_source_distribution=stable - ;; - *) - echo "Don't know how to install Grafana on $os $os_version. Send us a pull request!" >&2 - exit 1 - ;; - esac - - __apt_key_uri grafana \ - --name 'Grafana Release Signing Key' \ - --uri https://packages.grafana.com/gpg.key - - require="$require __apt_key_uri/grafana" __apt_source grafana \ - --uri https://packages.grafana.com/oss/deb \ - --distribution $apt_source_distribution \ - --component main - - __package apt-transport-https - - require="$require __apt_source/grafana __package/apt-transport-https" __package grafana - require="$require __package/grafana" __start_on_boot grafana-server - require="$require __start_on_boot/grafana-server" __process grafana-server --start "service grafana-server start" - ;; - *) - echo "Don't know how to install Grafana on $os. Send us a pull request!" >&2 - exit 1 - ;; -esac diff --git a/cdist/conf/type/__grafana_dashboard/singleton b/cdist/conf/type/__grafana_dashboard/singleton deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__group/gencode-remote b/cdist/conf/type/__group/gencode-remote deleted file mode 100755 index 6091c548..00000000 --- a/cdist/conf/type/__group/gencode-remote +++ /dev/null @@ -1,106 +0,0 @@ -#!/bin/sh -e -# -# 2011-2015 Steven Armstrong (steven-cdist at armstrong.cc) -# 2011 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Manage groups. -# - -name="$__object_id" -os="$(cat "$__global/explorer/os")" -state="$(cat "$__object/parameter/state")" - - -# Use short option names for portability -shorten_property() { - case "$1" in - gid) echo " -g";; - password) echo " -p";; - system) echo " -r";; - esac -} - - -if [ "$state" = "present" ]; then - case "$os" in - freebsd) - supported_change_properties="gid" - ;; - *) - supported_change_properties="gid password" - ;; - esac - if grep -q "^${name}:" "$__object/explorer/group"; then - # change existing - for property in $supported_change_properties; do - if [ -f "$__object/parameter/$property" ]; then - new_value="$(cat "$__object/parameter/$property")" - unset current_value - case "$property" in - password) - current_value="$(awk -F: '{ print $2 }' "$__object/explorer/gshadow")" - ;; - gid) - current_value="$(awk -F: '{ print $3 }' "$__object/explorer/group")" - ;; - esac - if [ "$new_value" != "$current_value" ]; then - set -- "$@" "$(shorten_property "$property")" \'"$new_value"\' - echo "change $property $new_value $current_value" >> "$__messages_out" - fi - fi - done - if [ $# -gt 0 ]; then - if [ "$os" = "freebsd" ]; then - echo pw groupmod "$@" "$name" - else - echo groupmod "$@" "$name" - fi - echo mod >> "$__messages_out" - fi - else - # create new - for property in $supported_change_properties; do - if [ -f "$__object/parameter/$property" ]; then - new_value="$(cat "$__object/parameter/$property")" - if [ -z "$new_value" ]; then - # Boolean parameters have no value - set -- "$@" "$(shorten_property "$property")" - else - set -- "$@" "$(shorten_property "$property")" \'"$new_value"\' - fi - fi - done - if [ "$os" = "freebsd" ]; then - echo pw groupadd "$@" "$name" - else - echo groupadd "$@" "$name" - fi - fi -else - # delete existing - if grep -q "^${name}:" "$__object/explorer/group"; then - if [ "$os" = "freebsd" ]; then - echo pw groupdel "$name" - else - echo groupdel "$name" - fi - echo remove >> "$__messages_out" - fi -fi diff --git a/cdist/conf/type/__group/man.rst b/cdist/conf/type/__group/man.rst deleted file mode 100644 index 614f3d57..00000000 --- a/cdist/conf/type/__group/man.rst +++ /dev/null @@ -1,80 +0,0 @@ -cdist-type__group(7) -==================== - -NAME ----- -cdist-type__group - Manage groups - - -DESCRIPTION ------------ -This cdist type allows you to create or modify groups on the target. - - -REQUIRED PARAMETERS -------------------- -None. - - -OPTIONAL PARAMETERS -------------------- -state - absent or present, defaults to present -gid - see groupmod(8) -password - see above - - -BOOLEAN PARAMETERS ------------------- -system - see groupadd(8), apply only on group creation - - -MESSAGES --------- -mod - group is modified -add - New group added -remove - group is removed -change - Changed group property from current_value to new_value -set - set property to new value, property was not set before - - -EXAMPLES --------- - -.. code-block:: sh - - # Create a group 'foobar' with operating system default settings - __group foobar - - # Remove the 'foobar' group - __group foobar --state absent - - # Create a system group 'myservice' with operating system default settings - __group myservice --system - - # Same but with a specific gid - __group foobar --gid 1234 - - # Same but with a gid and password - __group foobar --gid 1234 --password 'crypted-password-string' - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2011-2015 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__group/parameter/boolean b/cdist/conf/type/__group/parameter/boolean deleted file mode 100644 index bec3a35e..00000000 --- a/cdist/conf/type/__group/parameter/boolean +++ /dev/null @@ -1 +0,0 @@ -system diff --git a/cdist/conf/type/__group/parameter/default/state b/cdist/conf/type/__group/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__group/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__hostname/explorer/hostname_file b/cdist/conf/type/__hostname/explorer/hostname_file deleted file mode 100755 index 6a00aa9f..00000000 --- a/cdist/conf/type/__hostname/explorer/hostname_file +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -# -# 2014 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Retrieve the contents of /etc/hostname -# - -# Almost any distribution -if [ -f /etc/hostname ]; then - cat /etc/hostname -# SuSE -elif [ -f /etc/HOSTNAME ]; then - cat /etc/HOSTNAME -fi diff --git a/cdist/conf/type/__hostname/explorer/hostname_sysconfig b/cdist/conf/type/__hostname/explorer/hostname_sysconfig deleted file mode 100755 index d0d7b4e7..00000000 --- a/cdist/conf/type/__hostname/explorer/hostname_sysconfig +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh -# -# 2014 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Retrieve the contents of /etc/hostname -# - -if [ -f /etc/sysconfig/network ]; then - awk -F= '/^HOSTNAME=/ { print $2 }' /etc/sysconfig/network -fi diff --git a/cdist/conf/type/__hostname/gencode-remote b/cdist/conf/type/__hostname/gencode-remote deleted file mode 100755 index 8b5797dd..00000000 --- a/cdist/conf/type/__hostname/gencode-remote +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/sh -e -# -# 2014-2017 Steven Armstrong (steven-cdist at armstrong.cc) -# 2014 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -if [ -f "$__object/parameter/name" ]; then - name_should="$(cat "$__object/parameter/name")" -else - name_should="${__target_host%%.*}" -fi - -os=$(cat "$__global/explorer/os") -name_running=$(cat "$__global/explorer/hostname") -name_config=$(cat "$__object/explorer/hostname_file") -name_sysconfig=$(cat "$__object/explorer/hostname_sysconfig") -has_hostnamectl=$(cat "$__object/explorer/has_hostnamectl") - -################################################################################ -# If everything is ok -> exit -# -case "$os" in - archlinux|debian|suse|ubuntu|devuan|coreos|alpine) - if [ "$name_config" = "$name_should" ] && [ "$name_running" = "$name_should" ]; then - exit 0 - fi - ;; - scientific|centos|freebsd|openbsd) - if [ "$name_sysconfig" = "$name_should" ] && [ "$name_running" = "$name_should" ]; then - exit 0 - fi - ;; - *) - echo "Unsupported os: $os" >&2 - exit 1 - ;; -esac - -################################################################################ -# Setup hostname -# -echo changed >> "$__messages_out" - -# Use the good old way to set the hostname even on machines running systemd. -case "$os" in - archlinux|debian|ubuntu|devuan|centos|coreos|alpine) - printf "printf '%%s\\\\n' '$name_should' > /etc/hostname\\n" - echo "hostname -F /etc/hostname" - ;; - freebsd|openbsd) - echo "hostname '$name_should'" - ;; - suse) - echo "hostname '$name_should'" - printf "printf '%%s\\\\n' '$name_should' > /etc/HOSTNAME\\n" - ;; -esac - -if [ "$has_hostnamectl" ]; then - # Allow hostnamectl set-hostname to fail silently. - # Who the fuck invented a tool that needs dbus to set the hostname anyway ... - echo "hostnamectl set-hostname '$name_should' || true" -fi diff --git a/cdist/conf/type/__hostname/man.rst b/cdist/conf/type/__hostname/man.rst deleted file mode 100644 index d23a3b8a..00000000 --- a/cdist/conf/type/__hostname/man.rst +++ /dev/null @@ -1,52 +0,0 @@ -cdist-type__hostname(7) -======================= - -NAME ----- -cdist-type__hostname - Set the hostname - - -DESCRIPTION ------------ -Set's the hostname on various operating systems. - - -REQUIRED PARAMETERS -------------------- -None. - -OPTIONAL PARAMETERS -------------------- -name - The hostname to set. Defaults to the first segment of __target_host - (${__target_host%%.*}) - - -MESSAGES --------- -changed - Changed the hostname - -EXAMPLES --------- - -.. code-block:: sh - - # take hostname from __target_host - __hostname - - # set hostname explicitly - __hostname --name some-static-hostname - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2012 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__hostname/manifest b/cdist/conf/type/__hostname/manifest deleted file mode 100755 index 8f1adf12..00000000 --- a/cdist/conf/type/__hostname/manifest +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/sh -e -# -# 2012 Steven Armstrong (steven-cdist at armstrong.cc) -# 2014 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -os=$(cat "$__global/explorer/os") -if [ -f "$__object/parameter/name" ]; then - name_should="$(cat "$__object/parameter/name")" -else - case "$os" in - openbsd) - name_should="${__target_host}" - ;; - *) - name_should="${__target_host%%.*}" - ;; - esac -fi - - -not_supported() { - echo "Your operating system ($os) is currently not supported by this type (${__type##*/})." >&2 - echo "Please contribute an implementation for it if you can." >&2 - exit 1 -} - -case "$os" in - archlinux|debian|suse|ubuntu|devuan|coreos|alpine) - # handled in gencode-remote - : - ;; - scientific|centos) - __key_value sysconfig-hostname \ - --file /etc/sysconfig/network \ - --delimiter '=' \ - --key HOSTNAME \ - --value "$name_should" --exact_delimiter - ;; - freebsd) - __key_value rcconf-hostname \ - --file /etc/rc.conf \ - --delimiter '=' \ - --key 'hostname' \ - --value "$name_should" - ;; - openbsd) - echo "$name_should" | __file /etc/myname --source - - ;; - *) - not_supported - ;; -esac diff --git a/cdist/conf/type/__hostname/singleton b/cdist/conf/type/__hostname/singleton deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__hosts/man.rst b/cdist/conf/type/__hosts/man.rst deleted file mode 100644 index bece7967..00000000 --- a/cdist/conf/type/__hosts/man.rst +++ /dev/null @@ -1,55 +0,0 @@ -cdist-type__hosts(7) -==================== - -NAME ----- - -cdist-type__hosts - manage entries in /etc/hosts - -DESCRIPTION ------------ - -Add or remove entries from */etc/hosts* file. - -OPTIONAL PARAMETERS -------------------- - -state - If state is ``present``, make *object_id* resolve to *ip*. If - state is ``absent``, *object_id* will no longer resolve via - */etc/hosts*, if it was previously configured with this type. - Manually inserted entries are unaffected. - -ip - IP address, to which hostname (=\ *object_id*) must resolve. If - state is ``present``, this parameter is mandatory, if state is - ``absent``, this parameter is silently ignored. - -EXAMPLES --------- - -.. code-block:: sh - - # Now `funny' resolves to 192.168.1.76, - __hosts funny --ip 192.168.1.76 - # and `happy' no longer resolve via /etc/hosts if it was - # previously configured via __hosts. - __hosts happy --state absent - -SEE ALSO --------- - -:strong:`hosts`\ (5) - -AUTHORS -------- - -Dmitry Bogatov - - -COPYING -------- - -Copyright (C) 2015,2016 Dmitry Bogatov. Free use of this software is granted -under the terms of the GNU General Public License version 3 or later -(GPLv3+). diff --git a/cdist/conf/type/__hosts/manifest b/cdist/conf/type/__hosts/manifest deleted file mode 100755 index c536b83b..00000000 --- a/cdist/conf/type/__hosts/manifest +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh -e -# Copyright (C) 2015 Bogatov Dmitry -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -set -ue - -hostname="$__object_id" -state="$(cat "$__object/parameter/state")" -marker="# __hosts/$hostname" - -set -- "__hosts/$hostname" --file /etc/hosts --state "$state" - -if [ "$state" = absent ] ; then - __line "$@" --regex "$marker" -else - ip="$(cat "$__object/parameter/ip")" - __line "$@" --line "$ip $hostname $marker" -fi diff --git a/cdist/conf/type/__hosts/parameter/default/state b/cdist/conf/type/__hosts/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__hosts/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__hosts/parameter/optional b/cdist/conf/type/__hosts/parameter/optional deleted file mode 100644 index 411fc5d2..00000000 --- a/cdist/conf/type/__hosts/parameter/optional +++ /dev/null @@ -1,2 +0,0 @@ -state -ip diff --git a/cdist/conf/type/__install_bootloader_grub/explorer/target_os b/cdist/conf/type/__install_bootloader_grub/explorer/target_os deleted file mode 100755 index f235710a..00000000 --- a/cdist/conf/type/__install_bootloader_grub/explorer/target_os +++ /dev/null @@ -1,100 +0,0 @@ -#!/bin/sh -# -# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org) -# 2014 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# All os variables are lower case. Keep this file in alphabetical -# order by os variable except in cases where order otherwise matters, -# in which case keep the primary os and its derivatives together in -# a block (see Debian and Redhat examples below). -# - -chroot="$(cat "$__object/parameter/chroot")" - -if grep -q ^Amazon "$chroot/etc/system-release" 2>/dev/null; then - echo amazon - exit 0 -fi - -if [ -f "$chroot/etc/arch-release" ]; then - echo archlinux - exit 0 -fi - -if [ -f "$chroot/etc/cdist-preos" ]; then - echo cdist-preos - exit 0 -fi - -### Debian and derivatives -if grep -q ^DISTRIB_ID=Ubuntu "$chroot/etc/lsb-release" 2>/dev/null; then - echo ubuntu - exit 0 -fi - -if [ -f "$chroot/etc/debian_version" ]; then - echo debian - exit 0 -fi -### - -if [ -f "$chroot/etc/gentoo-release" ]; then - echo gentoo - exit 0 -fi - -if [ -f "$chroot/etc/openwrt_version" ]; then - echo openwrt - exit 0 -fi - -if [ -f "$chroot/etc/owl-release" ]; then - echo owl - exit 0 -fi - -### Redhat and derivatives -if grep -q ^CentOS "$chroot/etc/redhat-release" 2>/dev/null; then - echo centos - exit 0 -fi - -if grep -q ^Fedora "$chroot/etc/redhat-release" 2>/dev/null; then - echo fedora - exit 0 -fi - -if [ -f "$chroot/etc/redhat-release" ]; then - echo redhat - exit 0 -fi -### - -if [ -f "$chroot/etc/SuSE-release" ]; then - echo suse - exit 0 -fi - -if [ -f "$chroot/etc/slackware-version" ]; then - echo slackware - exit 0 -fi - -echo "Unknown OS" >&2 -exit 1 diff --git a/cdist/conf/type/__install_bootloader_grub/gencode-remote b/cdist/conf/type/__install_bootloader_grub/gencode-remote deleted file mode 100755 index 1caebbbf..00000000 --- a/cdist/conf/type/__install_bootloader_grub/gencode-remote +++ /dev/null @@ -1,97 +0,0 @@ -#!/bin/sh -e -# -# 2011-2015 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -device="$(cat "$__object/parameter/device" 2>/dev/null || echo "/$__object_id")" -chroot="$(cat "$__object/parameter/chroot")" - -target_os=$(cat "$__object/explorer/target_os") - -mkdir "$__object/files" -install_script="$__object/files/install_script" -# Link file descriptor #6 with stdout -exec 6>&1 -# Link stdout with $install_script -exec > "$install_script" - -# Generate script to install bootloader on distro -printf '#!/bin/sh -l\n' - -case "$target_os" in - ubuntu|debian) - if [ -s "$__global/explorer/efi" ]; then - # FIXME: untested. maybe also just run update-grub for EFI system? - printf 'grub-mkconfig --output=/boot/efi/EFI/%s/grub.cfg\n' "$target_os" - printf 'mkdir -p /boot/efi/EFI/BOOT\n' - printf 'cp /boot/efi/EFI/%s/grubx64.efi /boot/efi/EFI/BOOT/bootx64.efi' "$target_os" - else - printf 'grub-install "%s"\n' "$device" - printf 'update-grub\n' - fi - ;; - archlinux) - if [ -s "$__global/explorer/efi" ]; then - echo "EFI boot loader installation is on your operating system ($target_os) is currently not supported by this type (${__type##*/})." >&2 - echo "Please contribute an implementation for it if you can." >&2 - exit 1 - else - printf 'grub-install "%s"\n' "$device" - # bugfix/workarround: rebuild initramfs - # FIXME: doesn't belong here - printf 'mkinitcpio -p linux\n' - printf 'grub-mkconfig -o /boot/grub/grub.cfg\n' - fi - ;; - centos) - if [ -s "$__global/explorer/efi" ]; then - printf 'grub2-mkconfig --output=/boot/efi/EFI/%s/grub.cfg\n' "$target_os" - printf 'mkdir -p /boot/efi/EFI/BOOT\n' - printf 'cp /boot/efi/EFI/%s/grubx64.efi /boot/efi/EFI/BOOT/bootx64.efi' "$target_os" - else - printf 'grub2-install "%s"\n' "$device" - printf 'grub2-mkconfig --output=/boot/grub2/grub.cfg\n' - fi - ;; - *) - echo "Your operating system ($target_os) is currently not supported by this type (${__type##*/})." >&2 - echo "If you can, please contribute an implementation for it." >&2 - exit 1 - ;; -esac -# Restore stdout and close file descriptor #6. -exec 1>&6 6>&- - - -cat << DONE -# Ensure /tmp exists -[ -d "${chroot}/tmp" ] || mkdir -m 1777 "${chroot}/tmp" -# Generate script to run in chroot -script=\$(mktemp "${chroot}/tmp/${__type##*/}.XXXXXXXXXX") -cat > \$script << script_DONE -$(cat "$install_script") -script_DONE - -# Make script executable -chmod +x "\$script" - -# Run script in chroot -relative_script="\${script#$chroot}" -chroot "$chroot" "\$relative_script" -rm -rf \$script -DONE diff --git a/cdist/conf/type/__install_bootloader_grub/install b/cdist/conf/type/__install_bootloader_grub/install deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__install_bootloader_grub/man.rst b/cdist/conf/type/__install_bootloader_grub/man.rst deleted file mode 100644 index 625db1d2..00000000 --- a/cdist/conf/type/__install_bootloader_grub/man.rst +++ /dev/null @@ -1,48 +0,0 @@ -cdist-type__install_bootloader_grub(7) -====================================== - -NAME ----- -cdist-type__install_bootloader_grub - install grub2 bootloader on given disk - - -DESCRIPTION ------------ -This cdist type allows you to install grub2 bootloader on given disk. - - -REQUIRED PARAMETERS -------------------- -None - - -OPTIONAL PARAMETERS -------------------- -device - The device to install grub to. Defaults to object_id - -chroot - where to chroot before running grub-install. Defaults to /target. - - -EXAMPLES --------- - -.. code-block:: sh - - __install_bootloader_grub /dev/sda - - __install_bootloader_grub /dev/sda --chroot /mnt/foobar - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2011 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__install_bootloader_grub/parameter/default/chroot b/cdist/conf/type/__install_bootloader_grub/parameter/default/chroot deleted file mode 100644 index ea8c4bf7..00000000 --- a/cdist/conf/type/__install_bootloader_grub/parameter/default/chroot +++ /dev/null @@ -1 +0,0 @@ -/target diff --git a/cdist/conf/type/__install_bootloader_grub/parameter/optional b/cdist/conf/type/__install_bootloader_grub/parameter/optional deleted file mode 100644 index 0bd1ce46..00000000 --- a/cdist/conf/type/__install_bootloader_grub/parameter/optional +++ /dev/null @@ -1,2 +0,0 @@ -device -chroot diff --git a/cdist/conf/type/__install_chroot_mount/gencode-local b/cdist/conf/type/__install_chroot_mount/gencode-local deleted file mode 120000 index 68dcbd6a..00000000 --- a/cdist/conf/type/__install_chroot_mount/gencode-local +++ /dev/null @@ -1 +0,0 @@ -../__chroot_mount/gencode-local \ No newline at end of file diff --git a/cdist/conf/type/__install_chroot_mount/gencode-remote b/cdist/conf/type/__install_chroot_mount/gencode-remote deleted file mode 120000 index b1a5485e..00000000 --- a/cdist/conf/type/__install_chroot_mount/gencode-remote +++ /dev/null @@ -1 +0,0 @@ -../__chroot_mount/gencode-remote \ No newline at end of file diff --git a/cdist/conf/type/__install_chroot_mount/install b/cdist/conf/type/__install_chroot_mount/install deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__install_chroot_mount/man.rst b/cdist/conf/type/__install_chroot_mount/man.rst deleted file mode 100644 index 4054c4c4..00000000 --- a/cdist/conf/type/__install_chroot_mount/man.rst +++ /dev/null @@ -1,42 +0,0 @@ -cdist-type__install_chroot_mount(7) -=================================== - -NAME ----- -cdist-type__install_chroot_mount - mount a chroot with install command - - -DESCRIPTION ------------ -Mount and prepare a chroot for running commands within it. - - -REQUIRED PARAMETERS -------------------- -None - - -OPTIONAL PARAMETERS -------------------- -None - - -EXAMPLES --------- - -.. code-block:: sh - - __install_chroot_mount /path/to/chroot - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2012 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__install_chroot_mount/parameter b/cdist/conf/type/__install_chroot_mount/parameter deleted file mode 120000 index 5b5c9e20..00000000 --- a/cdist/conf/type/__install_chroot_mount/parameter +++ /dev/null @@ -1 +0,0 @@ -../__chroot_mount/parameter \ No newline at end of file diff --git a/cdist/conf/type/__install_chroot_umount/gencode-remote b/cdist/conf/type/__install_chroot_umount/gencode-remote deleted file mode 120000 index f2bd2681..00000000 --- a/cdist/conf/type/__install_chroot_umount/gencode-remote +++ /dev/null @@ -1 +0,0 @@ -../__chroot_umount/gencode-remote \ No newline at end of file diff --git a/cdist/conf/type/__install_chroot_umount/install b/cdist/conf/type/__install_chroot_umount/install deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__install_chroot_umount/man.rst b/cdist/conf/type/__install_chroot_umount/man.rst deleted file mode 100644 index 2e020c01..00000000 --- a/cdist/conf/type/__install_chroot_umount/man.rst +++ /dev/null @@ -1,47 +0,0 @@ -cdist-type__install_chroot_umount(7) -==================================== - -NAME ----- -cdist-type__install_chroot_umount - unmount a chroot mounted by __install_chroot_mount - - -DESCRIPTION ------------ -Undo what __install_chroot_mount did. - - -REQUIRED PARAMETERS -------------------- -None - - -OPTIONAL PARAMETERS -------------------- -None - - -EXAMPLES --------- - -.. code-block:: sh - - __install_chroot_umount /path/to/chroot - - -SEE ALSO --------- -:strong:`cdist-type__install_chroot_mount`\ (7) - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2012 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__install_chroot_umount/parameter b/cdist/conf/type/__install_chroot_umount/parameter deleted file mode 120000 index 4148bcd0..00000000 --- a/cdist/conf/type/__install_chroot_umount/parameter +++ /dev/null @@ -1 +0,0 @@ -../__chroot_umount/parameter \ No newline at end of file diff --git a/cdist/conf/type/__install_config/files/remote/copy b/cdist/conf/type/__install_config/files/remote/copy deleted file mode 100755 index fa7fa9b7..00000000 --- a/cdist/conf/type/__install_config/files/remote/copy +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh -e -# -# 2011-2017 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# __remote_copy script to run cdist against a chroot on a remote host via ssh. -# -# Usage: -# __remote_copy="/path/to/this/script /path/to/your/chroot" cdist config target-id -# - -log() { - #echo "$@" | logger -t "__install_config copy" - : -} - -chroot="$1"; shift -target_host="$__target_host" - -# postfix target_host with chroot location -code="$(echo "$@" | sed "s|$target_host:|$target_host:$chroot|g")" - -log "target_host: $target_host" -log "chroot: $chroot" -log "@: $*" -log "code: $code" - -# copy files into chroot -# __default_remote_copy and code should be split -# shellcheck disable=SC2086 -$__default_remote_copy $code - -log "-----" diff --git a/cdist/conf/type/__install_config/files/remote/exec b/cdist/conf/type/__install_config/files/remote/exec deleted file mode 100755 index c2057ebf..00000000 --- a/cdist/conf/type/__install_config/files/remote/exec +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh -e -# -# 2011-2017 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# __remote_exec script to run cdist against a chroot on a remote host via ssh. -# -# Usage: -# __remote_exec="/path/to/this/script /path/to/your/chroot" cdist config target-id -# - -log() { - #echo "$@" | logger -t "__install_config exec" - : -} - -chroot="$1"; shift -target_host="$__target_host" -# In exec mode the first argument is the __target_host which we already got from env. Get rid of it. -shift - -# escape ' with '"'"' -code="$(echo "$@" | sed -e "s/'/'\"'\"'/g")" -# shellcheck disable=SC2089 -code="chroot $chroot sh -e -c '$code'" - -log "target_host: $target_host" -log "chroot: $chroot" -log "@: $*" -log "code: $code" - -# Run the code -# __default_remote_exec and code should be split -# shellcheck disable=SC2086,SC2090 -$__default_remote_exec "$target_host" $code - -log "-----" diff --git a/cdist/conf/type/__install_config/gencode-local b/cdist/conf/type/__install_config/gencode-local deleted file mode 100755 index dd4f2a78..00000000 --- a/cdist/conf/type/__install_config/gencode-local +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -e -# -# 2011-2018 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -chroot="$(cat "$__object/parameter/chroot")" -remote_exec="$__type/files/remote/exec" -remote_copy="$__type/files/remote/copy" - -cat << DONE -export __cdist_install_config=yes -export __cdist_log_level=$__cdist_log_level -export __default_remote_exec="$__remote_exec" -export __default_remote_copy="$__remote_copy" -cdist config \ - --remote-exec="$remote_exec $chroot" \ - --remote-copy="$remote_copy $chroot" \ - $__target_host -DONE - diff --git a/cdist/conf/type/__install_config/install b/cdist/conf/type/__install_config/install deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__install_config/man.rst b/cdist/conf/type/__install_config/man.rst deleted file mode 100644 index 0034e85d..00000000 --- a/cdist/conf/type/__install_config/man.rst +++ /dev/null @@ -1,47 +0,0 @@ -cdist-type__install_config(7) -============================= - -NAME ----- -cdist-type__install_config - run cdist config as part of the installation - - -DESCRIPTION ------------ -This cdist type allows you to run cdist config as part of the installation. -It does this by using a custom __remote_{copy,exec} prefix which runs -cdist config against the /target chroot on the remote host. - - -REQUIRED PARAMETERS -------------------- -None - - -OPTIONAL PARAMETERS -------------------- -chroot - where to chroot before running grub-install. Defaults to /target. - - -EXAMPLES --------- - -.. code-block:: sh - - __install_config - - __install_config --chroot /mnt/somewhere - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2011 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__install_config/parameter/default/chroot b/cdist/conf/type/__install_config/parameter/default/chroot deleted file mode 100644 index ea8c4bf7..00000000 --- a/cdist/conf/type/__install_config/parameter/default/chroot +++ /dev/null @@ -1 +0,0 @@ -/target diff --git a/cdist/conf/type/__install_config/parameter/optional b/cdist/conf/type/__install_config/parameter/optional deleted file mode 100644 index fa32393d..00000000 --- a/cdist/conf/type/__install_config/parameter/optional +++ /dev/null @@ -1 +0,0 @@ -chroot diff --git a/cdist/conf/type/__install_config/singleton b/cdist/conf/type/__install_config/singleton deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__install_coreos/gencode-remote b/cdist/conf/type/__install_coreos/gencode-remote deleted file mode 100755 index f550b5a5..00000000 --- a/cdist/conf/type/__install_coreos/gencode-remote +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -e - -device=$(cat "${__object:?}/parameter/device") -ignition=$(cat "${__object}/parameter/ignition") - -cat < "\${ignition_file}" << eof -$(base64 "${ignition}") -eof - -coreos-install -d "${device}" \ - \$(if [ -s "\${ignition_file}" ]; then - printf -- "-i \${ignition_file}\\n" - fi) - -rm "\${ignition_file}" -EOF diff --git a/cdist/conf/type/__install_coreos/install b/cdist/conf/type/__install_coreos/install deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__install_coreos/man.rst b/cdist/conf/type/__install_coreos/man.rst deleted file mode 100644 index 314f9f2a..00000000 --- a/cdist/conf/type/__install_coreos/man.rst +++ /dev/null @@ -1,50 +0,0 @@ -cdist-type__install_coreos(7) -============================= - -NAME ----- - -cdist-type__install_coreos - Install CoreOS - -DESCRIPTION ------------ - -This type installs CoreOS to a given device using coreos-install_, which is -present in CoreOS ISO by default. - -.. _coreos-install: https://raw.githubusercontent.com/coreos/init/master/bin/coreos-install - -REQUIRED PARAMETERS -------------------- - -device - A device CoreOS will be installed to. - -OPTIONAL PARAMETERS -------------------- - -ignition - Path to ignition config. - -EXAMPLES --------- - -.. code-block:: sh - - __install_coreos \ - --device /dev/sda \ - --ignition ignition.json - - -AUTHORS -------- - -Ľubomír Kučera - -COPYING -------- - -Copyright \(C) 2018 Ľubomír Kučera. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__install_coreos/parameter/default/ignition b/cdist/conf/type/__install_coreos/parameter/default/ignition deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__install_coreos/parameter/optional b/cdist/conf/type/__install_coreos/parameter/optional deleted file mode 100644 index df284caa..00000000 --- a/cdist/conf/type/__install_coreos/parameter/optional +++ /dev/null @@ -1 +0,0 @@ -ignition diff --git a/cdist/conf/type/__install_coreos/parameter/required b/cdist/conf/type/__install_coreos/parameter/required deleted file mode 100644 index f89ee6a8..00000000 --- a/cdist/conf/type/__install_coreos/parameter/required +++ /dev/null @@ -1 +0,0 @@ -device diff --git a/cdist/conf/type/__install_coreos/singleton b/cdist/conf/type/__install_coreos/singleton deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__install_directory/explorer b/cdist/conf/type/__install_directory/explorer deleted file mode 120000 index ba2591e1..00000000 --- a/cdist/conf/type/__install_directory/explorer +++ /dev/null @@ -1 +0,0 @@ -../__directory/explorer \ No newline at end of file diff --git a/cdist/conf/type/__install_directory/gencode-remote b/cdist/conf/type/__install_directory/gencode-remote deleted file mode 120000 index c86d61c9..00000000 --- a/cdist/conf/type/__install_directory/gencode-remote +++ /dev/null @@ -1 +0,0 @@ -../__directory/gencode-remote \ No newline at end of file diff --git a/cdist/conf/type/__install_directory/install b/cdist/conf/type/__install_directory/install deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__install_directory/man.rst b/cdist/conf/type/__install_directory/man.rst deleted file mode 120000 index 1ad7fa84..00000000 --- a/cdist/conf/type/__install_directory/man.rst +++ /dev/null @@ -1 +0,0 @@ -../__directory/man.rst \ No newline at end of file diff --git a/cdist/conf/type/__install_directory/parameter b/cdist/conf/type/__install_directory/parameter deleted file mode 120000 index e23d9672..00000000 --- a/cdist/conf/type/__install_directory/parameter +++ /dev/null @@ -1 +0,0 @@ -../__directory/parameter \ No newline at end of file diff --git a/cdist/conf/type/__install_file/explorer b/cdist/conf/type/__install_file/explorer deleted file mode 120000 index 8479ee44..00000000 --- a/cdist/conf/type/__install_file/explorer +++ /dev/null @@ -1 +0,0 @@ -../__file/explorer \ No newline at end of file diff --git a/cdist/conf/type/__install_file/gencode-local b/cdist/conf/type/__install_file/gencode-local deleted file mode 120000 index 9ce4e805..00000000 --- a/cdist/conf/type/__install_file/gencode-local +++ /dev/null @@ -1 +0,0 @@ -../__file/gencode-local \ No newline at end of file diff --git a/cdist/conf/type/__install_file/gencode-remote b/cdist/conf/type/__install_file/gencode-remote deleted file mode 120000 index f390bba4..00000000 --- a/cdist/conf/type/__install_file/gencode-remote +++ /dev/null @@ -1 +0,0 @@ -../__file/gencode-remote \ No newline at end of file diff --git a/cdist/conf/type/__install_file/install b/cdist/conf/type/__install_file/install deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__install_file/man.rst b/cdist/conf/type/__install_file/man.rst deleted file mode 100644 index c5409167..00000000 --- a/cdist/conf/type/__install_file/man.rst +++ /dev/null @@ -1,112 +0,0 @@ -cdist-type__install_file(7) -=========================== - -NAME ----- -cdist-type__install_file - Manage files with install command. - - -DESCRIPTION ------------ -This cdist type allows you to create files, remove files and set file -attributes on the target. - -If the file already exists on the target, then if it is a: - -regular file, and state is: - present - replace it with the source file if they are not equal - exists - do nothing -symlink - replace it with the source file -directory - replace it with the source file - -In any case, make sure that the file attributes are as specified. - - -REQUIRED PARAMETERS -------------------- -None. - -OPTIONAL PARAMETERS -------------------- -state - 'present', 'absent' or 'exists', defaults to 'present' where: - - present - the file is exactly the one from source - absent - the file does not exist - exists - the file from source but only if it doesn't already exist - -group - Group to chgrp to. - -mode - Unix permissions, suitable for chmod. - -owner - User to chown to. - -source - If supplied, copy this file from the host running cdist to the target. - If not supplied, an empty file or directory will be created. - If source is '-' (dash), take what was written to stdin as the file content. - -MESSAGES --------- -chgrp - Changed group membership -chown - Changed owner -chmod - Changed mode -create - Empty file was created (no --source specified) -remove - File exists, but state is absent, file will be removed by generated code. -upload - File was uploaded - - -EXAMPLES --------- - -.. code-block:: sh - - # Create /etc/cdist-configured as an empty file - __install_file /etc/cdist-configured - # The same thing - __install_file /etc/cdist-configured --state present - # Use __file from another type - __install_file /etc/issue --source "$__type/files/archlinux" --state present - # Delete existing file - __install_file /etc/cdist-configured --state absent - # Supply some more settings - __install_file /etc/shadow --source "$__type/files/shadow" \ - --owner root --group shadow --mode 0640 \ - --state present - # Provide a default file, but let the user change it - __install_file /home/frodo/.bashrc --source "/etc/skel/.bashrc" \ - --state exists \ - --owner frodo --mode 0600 - # Take file content from stdin - __install_file /tmp/whatever --owner root --group root --mode 644 --source - << DONE - Here goes the content for /tmp/whatever - DONE - - -AUTHORS -------- -Nico Schottelius - - -COPYING -------- -Copyright \(C) 2011-2013 Nico Schottelius. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__install_file/parameter b/cdist/conf/type/__install_file/parameter deleted file mode 120000 index e5099e86..00000000 --- a/cdist/conf/type/__install_file/parameter +++ /dev/null @@ -1 +0,0 @@ -../__file/parameter \ No newline at end of file diff --git a/cdist/conf/type/__install_fstab/install b/cdist/conf/type/__install_fstab/install deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__install_fstab/man.rst b/cdist/conf/type/__install_fstab/man.rst deleted file mode 100644 index 5562c139..00000000 --- a/cdist/conf/type/__install_fstab/man.rst +++ /dev/null @@ -1,53 +0,0 @@ -cdist-type__install_fstab(7) -============================ - -NAME ----- -cdist-type__install_fstab - generate /etc/fstab during installation - - -DESCRIPTION ------------ -Uses __install_generate_fstab to generate a /etc/fstab file and uploads it -to the target machine at ${prefix}/etc/fstab. - - -REQUIRED PARAMETERS -------------------- -None - - -OPTIONAL PARAMETERS -------------------- -prefix - The prefix under which to generate the /etc/fstab file. - Defaults to /target. - - -EXAMPLES --------- - -.. code-block:: sh - - __install_fstab - - __install_fstab --prefix /mnt/target - - -SEE ALSO --------- -:strong:`cdist-type__install_generate_fstab`\ (7), -:strong:`cdist-type__install_mount`\ (7) - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2011 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__install_fstab/manifest b/cdist/conf/type/__install_fstab/manifest deleted file mode 100755 index c5d24f3c..00000000 --- a/cdist/conf/type/__install_fstab/manifest +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh -e -# -# 2011 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -prefix="$(cat "$__object/parameter/prefix" 2>/dev/null || echo "/target")" - -[ -d "$__object/files" ] || mkdir "$__object/files" -__install_generate_fstab --uuid --destination "$__object/files/fstab" -require="__install_generate_fstab" \ - __install_file "${prefix}/etc/fstab" --source "$__object/files/fstab" \ - --mode 644 \ - --owner root \ - --group root diff --git a/cdist/conf/type/__install_fstab/singleton b/cdist/conf/type/__install_fstab/singleton deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__install_generate_fstab/files/fstab.header b/cdist/conf/type/__install_generate_fstab/files/fstab.header deleted file mode 100644 index 7653cc78..00000000 --- a/cdist/conf/type/__install_generate_fstab/files/fstab.header +++ /dev/null @@ -1 +0,0 @@ -# Generated by cdist __install_generate_fstab diff --git a/cdist/conf/type/__install_generate_fstab/gencode-local b/cdist/conf/type/__install_generate_fstab/gencode-local deleted file mode 100755 index 80455aaa..00000000 --- a/cdist/conf/type/__install_generate_fstab/gencode-local +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/sh -e -# -# 2011 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -destination="$(cat "$__object/parameter/destination")" -cat "$__type/files/fstab.header" > "$destination" - -mkdir "$__object/files" -# get current UUID's from target_host -$__remote_exec "$__target_host" blkid > "$__object/files/blkid" - -find "$__global/object/__install_mount" -type d -name "$__cdist_object_marker" | -while IFS= read -r object -do - device="$(cat "$object/parameter/device")" - dir="$(cat "$object/parameter/dir")" - type="$(cat "$object/parameter/type")" - if [ -f "$object/parameter/options" ]; then - options="$(cat "$object/parameter/options")" - else - options="defaults" - fi - dump=0 - case "$type" in - swap) - pass=0 - dir="$type" - ;; - tmpfs) - pass=0 - ;; - bind) - pass=0 - type=none - options="bind,$options" - ;; - *) - pass=1 - ;; - esac - if [ -f "$__object/parameter/uuid" ]; then - uuid="$(grep -w "$device" "$__object/files/blkid" | awk '{print $2}')" - if [ -n "$uuid" ]; then - echo "# $dir was on $device during installation" >> "$destination" - device="$uuid" - fi - fi - echo "$device $dir $type $options $dump $pass" >> "$destination" -done diff --git a/cdist/conf/type/__install_generate_fstab/install b/cdist/conf/type/__install_generate_fstab/install deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__install_generate_fstab/man.rst b/cdist/conf/type/__install_generate_fstab/man.rst deleted file mode 100644 index b38f8876..00000000 --- a/cdist/conf/type/__install_generate_fstab/man.rst +++ /dev/null @@ -1,53 +0,0 @@ -cdist-type__install_generate_fstab(7) -===================================== - -NAME ----- -cdist-type__install_generate_fstab - generate /etc/fstab during installation - - -DESCRIPTION ------------ -Generates a /etc/fstab file from information retrieved from -__install_mount definitions. - - -REQUIRED PARAMETERS -------------------- -destination - The path where to store the generated fstab file. - Note that this is a path on the server, where cdist is running, not the target host. - - -OPTIONAL PARAMETERS -------------------- -None - - -BOOLEAN PARAMETERS -------------------- -uuid - use UUID instead of device in fstab - - -EXAMPLES --------- - -.. code-block:: sh - - __install_generate_fstab --destination /path/where/you/want/fstab - - __install_generate_fstab --uuid --destination /path/where/you/want/fstab - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2012 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__install_generate_fstab/parameter/boolean b/cdist/conf/type/__install_generate_fstab/parameter/boolean deleted file mode 100644 index 43ab6159..00000000 --- a/cdist/conf/type/__install_generate_fstab/parameter/boolean +++ /dev/null @@ -1 +0,0 @@ -uuid diff --git a/cdist/conf/type/__install_generate_fstab/parameter/required b/cdist/conf/type/__install_generate_fstab/parameter/required deleted file mode 100644 index ac459b09..00000000 --- a/cdist/conf/type/__install_generate_fstab/parameter/required +++ /dev/null @@ -1 +0,0 @@ -destination diff --git a/cdist/conf/type/__install_generate_fstab/singleton b/cdist/conf/type/__install_generate_fstab/singleton deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__install_mkfs/gencode-remote b/cdist/conf/type/__install_mkfs/gencode-remote deleted file mode 100755 index 8fc2c98e..00000000 --- a/cdist/conf/type/__install_mkfs/gencode-remote +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh -e -# -# 2011-2013 Steven Armstrong (steven-cdist at armstrong.cc) -# 2017 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -device="$(cat "$__object/parameter/device")" -type="$(cat "$__object/parameter/type")" - -case "$type" in - swap) - echo "mkswap -f $device" - exit 0 - ;; - xfs) - command="mkfs.xfs -f -q" - ;; - - vfat) - command="mkfs.vfat" - ;; - - *) - command="mkfs -t $type -q" - ;; -esac - -if [ -f "$__object/parameter/options" ]; then - options="$(cat "$__object/parameter/options")" - command="$command $options" -fi - -command="$command $device" -if [ -f "$__object/parameter/blocks" ]; then - blocks="$(cat "$__object/parameter/blocks")" - command="$command $blocks" -fi -echo "$command" diff --git a/cdist/conf/type/__install_mkfs/install b/cdist/conf/type/__install_mkfs/install deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__install_mkfs/man.rst b/cdist/conf/type/__install_mkfs/man.rst deleted file mode 100644 index 6e5c9aa9..00000000 --- a/cdist/conf/type/__install_mkfs/man.rst +++ /dev/null @@ -1,62 +0,0 @@ -cdist-type__install_mkfs(7) -=========================== - -NAME ----- -cdist-type__install_mkfs - build a linux file system - - -DESCRIPTION ------------ -This cdist type is a wrapper for the mkfs command. - - -REQUIRED PARAMETERS -------------------- -type - The filesystem type to use. Same as used with mkfs -t. - - -OPTIONAL PARAMETERS -------------------- -device - defaults to object_id - -options - file system-specific options to be passed to the mkfs command - -blocks - the number of blocks to be used for the file system - - -EXAMPLES --------- - -.. code-block:: sh - - # reiserfs /dev/sda5 - __install_mkfs /dev/sda5 --type reiserfs - - # same thing with explicit device - __install_mkfs whatever --device /dev/sda5 --type reiserfs - - # jfs with journal on /dev/sda2 - __install_mkfs /dev/sda1 --type jfs --options "-j /dev/sda2" - - -SEE ALSO --------- -:strong:`mkfs`\ (8) - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2011 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__install_mkfs/parameter/optional b/cdist/conf/type/__install_mkfs/parameter/optional deleted file mode 100644 index 86aeae30..00000000 --- a/cdist/conf/type/__install_mkfs/parameter/optional +++ /dev/null @@ -1,3 +0,0 @@ -device -options -blocks diff --git a/cdist/conf/type/__install_mkfs/parameter/required b/cdist/conf/type/__install_mkfs/parameter/required deleted file mode 100644 index aa80e646..00000000 --- a/cdist/conf/type/__install_mkfs/parameter/required +++ /dev/null @@ -1 +0,0 @@ -type diff --git a/cdist/conf/type/__install_mount/gencode-remote b/cdist/conf/type/__install_mount/gencode-remote deleted file mode 100755 index 4415f0ff..00000000 --- a/cdist/conf/type/__install_mount/gencode-remote +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/sh -e -# -# 2011-2013 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -get_type_from_mkfs() { - _device="$1" - find "$__global/object/__install_mkfs" -type d -name "$__cdist_object_marker" | - while IFS= read -r mkfs_object - do - mkfs_device="$(cat "$mkfs_object/parameter/device")" - if [ "$_device" = "$mkfs_device" ]; then - cat "$mkfs_object/parameter/type" - break - fi - done - unset _device - unset mkfs_device - unset mkfs_object -} - -device="$(cat "$__object/parameter/device")" -dir="$(cat "$__object/parameter/dir")" -prefix="$(cat "$__object/parameter/prefix")" -if [ -f "$__object/parameter/type" ]; then - type="$(cat "$__object/parameter/type")" -else - type="$(get_type_from_mkfs "$device")" - # store for later use by others - echo "$type" > "$__object/parameter/type" -fi -[ -n "$type" ] || { - echo "Can't determine type for $__object" >&2 - exit 1 -} -if [ "$type" = "swap" ]; then - printf 'swapon "%s"\n' "$device" -else - mount_point="${prefix}${dir}" - printf '[ -d "%s" ] || mkdir -p "%s"\n' "$mount_point" "$mount_point" - printf 'mount' - if [ "$type" = "bind" ]; then - printf ' --bind' - device="${prefix}${device}" - else - printf ' -t "%s"' "$type" - fi - if [ -f "$__object/parameter/options" ]; then - printf ' -o %s' "$(cat "$__object/parameter/options")" - fi - printf ' "%s"' "$device" - printf ' "%s"\n' "$mount_point" -fi diff --git a/cdist/conf/type/__install_mount/install b/cdist/conf/type/__install_mount/install deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__install_mount/man.rst b/cdist/conf/type/__install_mount/man.rst deleted file mode 100644 index 256cef53..00000000 --- a/cdist/conf/type/__install_mount/man.rst +++ /dev/null @@ -1,65 +0,0 @@ -cdist-type__install_mount(7) -============================ - -NAME ----- -cdist-type__install_mount - mount filesystems in the installer - - -DESCRIPTION ------------ -Mounts filesystems in the installer. Collects data to generate /etc/fstab. - - -REQUIRED PARAMETERS -------------------- -device - the device to mount - - -OPTIONAL PARAMETERS -------------------- -dir - where to mount device. Defaults to object_id. - -options - mount options passed to mount(8) and used in /etc/fstab - -type - filesystem type passed to mount(8) and used in /etc/fstab. - If type is swap, 'dir' is ignored. - Defaults to the filesystem used in __install_mkfs for the same 'device'. - -prefix - the prefix to prepend to 'dir' when mounting in the installer. - Defaults to /target. - - -EXAMPLES --------- - -.. code-block:: sh - - __install_mount slash --dir / --device /dev/sda5 --options noatime - require="__install_mount/slash" __install_mount /boot --device /dev/sda1 - __install_mount swap --device /dev/sda2 --type swap - require="__install_mount/slash" __install_mount /tmp --device tmpfs --type tmpfs - - -SEE ALSO --------- -:strong:`cdist-type__install_mkfs`\ (7), -:strong:`cdist-type__install_mount_apply` (7) - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2011 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__install_mount/manifest b/cdist/conf/type/__install_mount/manifest deleted file mode 100755 index 72fc26e2..00000000 --- a/cdist/conf/type/__install_mount/manifest +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh -e -# -# 2011 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -# set defaults -if [ ! -f "$__object/parameter/dir" ]; then - dir="/$__object_id" - echo "$dir" > "$__object/parameter/dir" -fi -if [ ! -f "$__object/parameter/prefix" ]; then - prefix="/target" - echo "$prefix" > "$__object/parameter/prefix" -fi diff --git a/cdist/conf/type/__install_mount/parameter/optional b/cdist/conf/type/__install_mount/parameter/optional deleted file mode 100644 index 08b6ad04..00000000 --- a/cdist/conf/type/__install_mount/parameter/optional +++ /dev/null @@ -1,3 +0,0 @@ -dir -type -options diff --git a/cdist/conf/type/__install_mount/parameter/required b/cdist/conf/type/__install_mount/parameter/required deleted file mode 100644 index f89ee6a8..00000000 --- a/cdist/conf/type/__install_mount/parameter/required +++ /dev/null @@ -1 +0,0 @@ -device diff --git a/cdist/conf/type/__install_partition_msdos/install b/cdist/conf/type/__install_partition_msdos/install deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__install_partition_msdos/man.rst b/cdist/conf/type/__install_partition_msdos/man.rst deleted file mode 100644 index c408a614..00000000 --- a/cdist/conf/type/__install_partition_msdos/man.rst +++ /dev/null @@ -1,72 +0,0 @@ -cdist-type__install_partition_msdos(7) -====================================== - -NAME ----- -cdist-type__install_partition_msdos - creates msdos partitions - - -DESCRIPTION ------------ -This cdist type allows you to create msdos paritions. - - -REQUIRED PARAMETERS -------------------- -type - the partition type used in fdisk (such as 82 or 83) or "extended" - - -OPTIONAL PARAMETERS -------------------- -device - the device we're working on. Defaults to the string prefix of --partition - -minor - the partition number we're working on. Defaults to the numeric suffix of --partition - -partition - defaults to object_id - -bootable - mark partition as bootable, true or false, defaults to false - -size - the size of the partition (such as 32M or 15G, whole numbers - only), '+' for remaining space, or 'n%' for percentage of remaining - (these should only be used after all specific partition sizes are - specified). Defaults to +. - - -EXAMPLES --------- - -.. code-block:: sh - - # 128MB, linux, bootable - __install_partition_msdos /dev/sda1 --type 83 --size 128M --bootable true - # 512MB, swap - __install_partition_msdos /dev/sda2 --type 82 --size 512M - # 100GB, extended - __install_partition_msdos /dev/sda3 --type extended --size 100G - # 10GB, linux - __install_partition_msdos /dev/sda5 --type 83 --size 10G - # 50% of the free space of the extended partition, linux - __install_partition_msdos /dev/sda6 --type 83 --size 50% - # rest of the extended partition, linux - __install_partition_msdos /dev/sda7 --type 83 --size + - # nvm device partition 2 - __install_partition_msdos /dev/nvme0n1p2 --device /dev/nvme0n1 --minor 2 --type 83 --size 128M --bootable true - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2011-2017 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__install_partition_msdos/manifest b/cdist/conf/type/__install_partition_msdos/manifest deleted file mode 100755 index b32605fa..00000000 --- a/cdist/conf/type/__install_partition_msdos/manifest +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh -e -# -# 2011 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -# set defaults -if [ -f "$__object/parameter/partition" ]; then - partition="(cat "$__object/parameter/partition")" -else - partition="/$__object_id" - echo "$partition" > "$__object/parameter/partition" -fi - -if [ ! -f "$__object/parameter/device" ]; then - device="$(echo "$partition" | sed 's/[0-9]//g')" - echo "$device" > "$__object/parameter/device" -fi -if [ ! -f "$__object/parameter/minor" ]; then - minor="$(echo "$partition" | sed 's/[^0-9]//g')" - echo "$minor" > "$__object/parameter/minor" -fi - -if [ ! -f "$__object/parameter/bootable" ]; then - echo "false" > "$__object/parameter/bootable" -fi -if [ ! -f "$__object/parameter/size" ]; then - echo "+" > "$__object/parameter/size" -fi - -# pull in the type that actually does something with the above parameters -require="$__object_name" __install_partition_msdos_apply diff --git a/cdist/conf/type/__install_partition_msdos/parameter/optional b/cdist/conf/type/__install_partition_msdos/parameter/optional deleted file mode 100644 index 3b3f2083..00000000 --- a/cdist/conf/type/__install_partition_msdos/parameter/optional +++ /dev/null @@ -1,5 +0,0 @@ -device -minor -partition -bootable -size diff --git a/cdist/conf/type/__install_partition_msdos/parameter/required b/cdist/conf/type/__install_partition_msdos/parameter/required deleted file mode 100644 index aa80e646..00000000 --- a/cdist/conf/type/__install_partition_msdos/parameter/required +++ /dev/null @@ -1 +0,0 @@ -type diff --git a/cdist/conf/type/__install_partition_msdos_apply/explorer/partitions b/cdist/conf/type/__install_partition_msdos_apply/explorer/partitions deleted file mode 100755 index 6be61af4..00000000 --- a/cdist/conf/type/__install_partition_msdos_apply/explorer/partitions +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -cat /proc/partitions diff --git a/cdist/conf/type/__install_partition_msdos_apply/files/lib.sh b/cdist/conf/type/__install_partition_msdos_apply/files/lib.sh deleted file mode 100644 index 2db9a441..00000000 --- a/cdist/conf/type/__install_partition_msdos_apply/files/lib.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/sh - -die() { - echo "[__install_partition_msdos_apply] $*" >&2 - exit 1 -} -debug() { - #echo "[__install_partition_msdos_apply] $*" >&2 - : -} - -fdisk_command() { - device="$1" - cmd="$2" - - debug fdisk_command "running fdisk command '${cmd}' on device ${device}" - printf '%s\nw\n' "${cmd}" | fdisk -c -u "$device" - ret=$? - # give disk some time - sleep 1 - return $ret -} - -create_disklabel() { - device=$1 - - debug create_disklabel "creating new msdos disklabel" - fdisk_command "${device}" "o" - return $? -} - -toggle_bootable() { - device="$1" - minor="$2" - fdisk_command "${device}" "a\\n${minor}\\n" - return $? -} - -create_partition() { - device="$1" - minor="$2" - size="$3" - type="$4" - primary_count="$5" - - if [ "$type" = "extended" ] || [ "$type" = "5" ]; then - # Extended partition - primary_extended='e\n' - first_minor="${minor}\\n" - [ "${minor}" = "4" ] && first_minor="" - type_minor="${minor}\\n" - [ "${minor}" = "1" ] && type_minor="" - type="5" - elif [ "${minor}" -lt "5" ]; then - primary_extended='p\n' - first_minor="${minor}\\n" - [ "${minor}" = "4" ] && first_minor="" - type_minor="${minor}\\n" - [ "${minor}" = "1" ] && type_minor="" - else - # Logical partitions - first_minor="${minor}\\n" - type_minor="${minor}\\n" - primary_extended='l\n' - [ "$primary_count" -gt "3" ] && primary_extended="" - fi - [ -n "${size}" ] && size="+${size}M" - fdisk_command "${device}" "n\\n${primary_extended}${first_minor}\\n${size}\\nt\\n${type_minor}${type}\\n" - return $? -} diff --git a/cdist/conf/type/__install_partition_msdos_apply/gencode-remote b/cdist/conf/type/__install_partition_msdos_apply/gencode-remote deleted file mode 100755 index a0b46b2d..00000000 --- a/cdist/conf/type/__install_partition_msdos_apply/gencode-remote +++ /dev/null @@ -1,163 +0,0 @@ -#!/bin/sh -e -# -# 2011-2013 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -#set -x - -die() { - echo "[__install_partition_msdos_apply] $*" >&2 - exit 1 -} -debug() { - #echo "[__install_partition_msdos_apply] $*" >&2 - : -} - -# Convert a size specifier 1G 100M or 50% into the corresponding numeric MB. -size_to_mb() { - size=$1 - available_size="$2" - - number_suffix="$(echo "${size}" | sed -e 's:\.[0-9]\+::' -e 's:\([0-9]\+\)\([KkMmGg%]\)[Bb]\?:\1|\2:')" - number="$(echo "${number_suffix}" | cut -d '|' -f1)" - suffix="$(echo "${number_suffix}" | cut -d '|' -f2)" - - case "$suffix" in - K|k) - size="$(( number / 1024 ))" - ;; - M|m) - size="$number" - ;; - G|g) - size="$(( number * 1024 ))" - ;; - %) - size="$(( available_size * number / 100 ))" - ;; - *) - size="-1" - esac - echo "$size" -} - -get_objects() { - objects_file=$(mktemp) - find "$__global/object/__install_partition_msdos" -type d -name "$__cdist_object_marker" | - while IFS= read -r object - do - object_device="$(cat "$object/parameter/device")" - object_minor="$(cat "$object/parameter/minor")" - echo "$object_device $object_minor $object" >> "$objects_file" - done - sort -k 1,2 "$objects_file" | cut -d' ' -f 3 - rm "$objects_file" - unset objects_file - unset object - unset object_device - unset object_minor -} - -# include function library for use on target -cat "$__type/files/lib.sh" - -partitions="$__object/explorer/partitions" -objects=$(get_objects) -current_device="" -available_device_size= -available_extended_size= -available_size= -primary_count=0 -for object in $objects; do - device="$(cat "$object/parameter/device")" - if [ "$current_device" != "$device" ]; then - echo "create_disklabel '$device' || die 'Failed to create disklabel for $device'" - current_device="$device" - device_name=$(echo "${device}" | sed -e 's:^/dev/::;s:/:\\/:g') - available_device_size=$(( $(awk "/${device_name}\$/ { print \$3; }" "$partitions") / 1024)) - # make sure we don't go past the end of the drive - available_device_size=$((available_device_size - 2)) - available_extended_size=0 - primary_count=0 - debug "----- $device" - debug "current_device=$current_device" - debug "available_device_size=$available_device_size" - fi - - type="$(cat "$object/parameter/type")" - partition="$(cat "$object/parameter/partition")" - minor="$(cat "$object/parameter/minor")" - - bootable="$(cat "$object/parameter/bootable")" - size="$(cat "$object/parameter/size")" - - - if [ "${minor}" -lt "5" ]; then - # Primary partitions - primary_count=$(( primary_count + 1 )) - available_size=$available_device_size - else - # Logical partitions - available_size=$available_extended_size - fi - - if [ "$size" = "+" ]; then - # use rest of device - partition_size="" - available_size=0 - else - partition_size=$(size_to_mb "$size" "$available_size") - available_size="$(( available_size - partition_size ))" - fi - - if [ "${minor}" -lt "5" ]; then - # Primary partitions - available_device_size=$available_size - if [ "$type" = "extended" ] || [ "$type" = "5" ]; then - # Extended partition - available_extended_size=$partition_size - fi - else - # Logical paritions - available_extended_size=$available_size - fi - - [ "$partition_size" = "-1" ] && die "could not translate size '$size' to a usable value" - debug "----- $partition" - debug "primary_count=$primary_count" - debug "current_device=$current_device" - debug "device=$device" - debug "type=$type" - debug "partition=$partition" - debug "minor=$minor" - debug "bootable=$bootable" - debug "size=$size" - debug "partition_size=$partition_size" - debug "available_size=$available_size" - debug "available_device_size=$available_device_size" - debug "available_extended_size=$available_extended_size" - debug "----------" - - echo "create_partition '$device' '$minor' '$partition_size' '$type' '$primary_count' \ - || die 'Failed to create partition: $partition'" - - if [ "$bootable" = "true" ]; then - echo "toggle_bootable '$device' '$minor' || die 'Failed to toogle bootable flag for partition: $partition'" - fi -done diff --git a/cdist/conf/type/__install_partition_msdos_apply/install b/cdist/conf/type/__install_partition_msdos_apply/install deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__install_partition_msdos_apply/man.rst b/cdist/conf/type/__install_partition_msdos_apply/man.rst deleted file mode 100644 index 80740fde..00000000 --- a/cdist/conf/type/__install_partition_msdos_apply/man.rst +++ /dev/null @@ -1,47 +0,0 @@ -cdist-type__install_partition_msdos_apply(7) -============================================ - -NAME ----- -cdist-type__install_partition_msdos_apply - Apply dos partition settings - - -DESCRIPTION ------------ -Create the partitions defined with __install_partition_msdos - - -REQUIRED PARAMETERS -------------------- -None - - -OPTIONAL PARAMETERS -------------------- -None - - -EXAMPLES --------- - -.. code-block:: sh - - __install_partition_msdos_apply - - -SEE ALSO --------- -:strong:`cdist-type__install_partition_msdos_apply`\ (7) - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2011 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__install_partition_msdos_apply/singleton b/cdist/conf/type/__install_partition_msdos_apply/singleton deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__install_reboot/gencode-remote b/cdist/conf/type/__install_reboot/gencode-remote deleted file mode 100755 index 9a6322c1..00000000 --- a/cdist/conf/type/__install_reboot/gencode-remote +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -e -# -# 2011 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -#echo "reboot $options" -cat << DONE -echo 1 > /proc/sys/kernel/sysrq -echo s > /proc/sysrq-trigger - -# close file descriptors to detach from ssh -sh -c 'sleep 3; echo b > /proc/sysrq-trigger' > /dev/null 2>&1 - - -COPYING -------- -Copyright \(C) 2011 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__install_reboot/singleton b/cdist/conf/type/__install_reboot/singleton deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__install_reset_disk/gencode-remote b/cdist/conf/type/__install_reset_disk/gencode-remote deleted file mode 100755 index ac9ae6cf..00000000 --- a/cdist/conf/type/__install_reset_disk/gencode-remote +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/sh -e -# -# 2012 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -disk="/$__object_id" -disk_name="${disk##*/}" - -cat << DONE - -debug() { - echo "[DEBUG] \$@" >&2 -} - -find_md_device_names() { - local disk_name="\$1" - for slave in \$(find /sys/devices/virtual/block/*/slaves/ -name "\${disk_name}*"); do - debug "slave: \$slave" - for holder in \$slave/holders/*; do - debug "holder: \$holder" - if [ -d "\$holder/md" ]; then - debug "mdadm found at \$holder" - holder_name="\${holder##*/}" - echo "\$holder_name" - fi - done - done -} - -# disable any enabled volume group -if command -v vgchange >/dev/null; then - vgchange -a n -else - echo "WARNING: vgchange command not found" >&2 -fi - -# disable any running mdadm arrays related to $disk -for md_name in \$(find_md_device_names "$disk_name" | sort | uniq); do - echo "md_name: \$md_name" - if command -v mdadm >/dev/null; then - mdadm --stop "/dev/\$md_name" - else - echo "WARNING: mdadm command not found" >&2 - echo "WARNING: could not stop active mdadm raid for disk $disk" >&2 - fi -done - -# clean disks from any legacy signatures -if command -v wipefs >/dev/null; then - wipefs -a "$disk" || true -fi - -# erase partition table -dd if=/dev/zero of=$disk bs=512 count=1 -printf 'w\\n' | fdisk -u -c $disk || true -DONE diff --git a/cdist/conf/type/__install_reset_disk/install b/cdist/conf/type/__install_reset_disk/install deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__install_reset_disk/man.rst b/cdist/conf/type/__install_reset_disk/man.rst deleted file mode 100644 index fadeec71..00000000 --- a/cdist/conf/type/__install_reset_disk/man.rst +++ /dev/null @@ -1,43 +0,0 @@ -cdist-type__install_reset_disk(7) -================================= - -NAME ----- -cdist-type__install_reset_disk - reset a disk - - -DESCRIPTION ------------ -Remove partition table. -Remove all lvm labels. -Remove mdadm superblock. - - -REQUIRED PARAMETERS -------------------- -None - -OPTIONAL PARAMETERS -------------------- -None - - -EXAMPLES --------- - -.. code-block:: sh - - __install_reset_disk /dev/sdb - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2012 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__install_stage/gencode-remote b/cdist/conf/type/__install_stage/gencode-remote deleted file mode 100755 index 776e9fd5..00000000 --- a/cdist/conf/type/__install_stage/gencode-remote +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh -e -# -# 2011-2013 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -uri="$(cat "$__object/parameter/uri" 2>/dev/null \ - || echo "$__object_id")" -target="$(cat "$__object/parameter/target")" - -if [ "$__cdist_log_level" -le "10" ] -then - curl="curl" - tar="tar -xvzp" -else - curl="curl -s" - tar="tar -xzp" -fi - -if [ -f "$__object/parameter/insecure" ] ; then - curl="$curl -k" -fi - -echo "$curl '$uri' | $tar -C '$target'" diff --git a/cdist/conf/type/__install_stage/install b/cdist/conf/type/__install_stage/install deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__install_stage/man.rst b/cdist/conf/type/__install_stage/man.rst deleted file mode 100644 index fd764693..00000000 --- a/cdist/conf/type/__install_stage/man.rst +++ /dev/null @@ -1,58 +0,0 @@ -cdist-type__install_stage(7) -============================ - -NAME ----- -cdist-type__install_stage - download and unpack a stage file - - -DESCRIPTION ------------ -Downloads a operating system stage using curl and unpacks it to /target -using tar. The stage tarball is expected to be gzip compressed. - - -REQUIRED PARAMETERS -------------------- -uri - The uri from which to fetch the tarball. - Can be anything understood by curl, e.g: - | http://path/to/stage.tgz - | tftp:///path/to/stage.tgz - | file:///local/path/stage.tgz - - -OPTIONAL PARAMETERS -------------------- -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 --------- - -.. code-block:: sh - - __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 - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2011 - 2013 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__install_stage/parameter/boolean b/cdist/conf/type/__install_stage/parameter/boolean deleted file mode 100644 index e86bf3fc..00000000 --- a/cdist/conf/type/__install_stage/parameter/boolean +++ /dev/null @@ -1 +0,0 @@ -insecure diff --git a/cdist/conf/type/__install_stage/parameter/default/target b/cdist/conf/type/__install_stage/parameter/default/target deleted file mode 100644 index ea8c4bf7..00000000 --- a/cdist/conf/type/__install_stage/parameter/default/target +++ /dev/null @@ -1 +0,0 @@ -/target diff --git a/cdist/conf/type/__install_stage/parameter/optional b/cdist/conf/type/__install_stage/parameter/optional deleted file mode 100644 index eb5a316c..00000000 --- a/cdist/conf/type/__install_stage/parameter/optional +++ /dev/null @@ -1 +0,0 @@ -target diff --git a/cdist/conf/type/__install_stage/parameter/required b/cdist/conf/type/__install_stage/parameter/required deleted file mode 100644 index c7954952..00000000 --- a/cdist/conf/type/__install_stage/parameter/required +++ /dev/null @@ -1 +0,0 @@ -uri diff --git a/cdist/conf/type/__install_stage/singleton b/cdist/conf/type/__install_stage/singleton deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__install_umount/install b/cdist/conf/type/__install_umount/install deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__install_umount/man.rst b/cdist/conf/type/__install_umount/man.rst deleted file mode 100644 index 59f63449..00000000 --- a/cdist/conf/type/__install_umount/man.rst +++ /dev/null @@ -1,43 +0,0 @@ -cdist-type__install_umount(7) -============================= - -NAME ----- -cdist-type__install_umount - umount target directory - - -DESCRIPTION ------------ -This cdist type allows you to recursively umount the given target directory. - - -REQUIRED PARAMETERS -------------------- -None - - -OPTIONAL PARAMETERS -------------------- -target - the mount point to umount. Defaults to object_id - - -EXAMPLES --------- - -.. code-block:: sh - - __install_umount /target - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2011 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__install_umount/parameter/default/target b/cdist/conf/type/__install_umount/parameter/default/target deleted file mode 100644 index ea8c4bf7..00000000 --- a/cdist/conf/type/__install_umount/parameter/default/target +++ /dev/null @@ -1 +0,0 @@ -/target diff --git a/cdist/conf/type/__install_umount/parameter/optional b/cdist/conf/type/__install_umount/parameter/optional deleted file mode 100644 index eb5a316c..00000000 --- a/cdist/conf/type/__install_umount/parameter/optional +++ /dev/null @@ -1 +0,0 @@ -target diff --git a/cdist/conf/type/__iptables_apply/files/init-script b/cdist/conf/type/__iptables_apply/files/init-script deleted file mode 100644 index d9c79ef7..00000000 --- a/cdist/conf/type/__iptables_apply/files/init-script +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# Zürisee, Mon Sep 2 18:38:27 CEST 2013 -# -### BEGIN INIT INFO -# Provides: iptables -# Required-Start: $local_fs $remote_fs -# Required-Stop: $local_fs $remote_fs -# X-Start-Before: fail2ban -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Applies iptables ruleset -# Description: Applies all rules found in /etc/iptables.d -# and saves/restores previous status -### END INIT INFO - - -basedir=/etc/iptables.d -status="${basedir}/.pre-start" - -case $1 in - start) - # Save status - iptables-save > "$status" - - # Apply our ruleset - cd "$basedir" || exit - count="$(find . ! -name . -prune | wc -l)" - - # Only do something if there are rules - if [ "$count" -ge 1 ]; then - for rule in *; do - echo "Applying iptables rule $rule ..." - # Rule should be split. - # shellcheck disable=SC2046 - iptables $(cat "$rule") - done - fi - ;; - - stop) - # Restore from status before, if there is something to restore - if [ -f "$status" ]; then - iptables-restore < "$status" - fi - ;; - restart) - "$0" stop && "$0" start - ;; - reset) - for table in INPUT FORWARD OUTPUT; do - iptables -P "$table" ACCEPT - iptables -F "$table" - done - for table in PREROUTING POSTROUTING OUTPUT; do - iptables -t nat -P "$table" ACCEPT - iptables -t nat -F "$table" - done - ;; -esac diff --git a/cdist/conf/type/__iptables_apply/gencode-remote b/cdist/conf/type/__iptables_apply/gencode-remote deleted file mode 100755 index a80cb936..00000000 --- a/cdist/conf/type/__iptables_apply/gencode-remote +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -e - -if grep -q "^__file/etc/iptables.d/" "$__messages_in"; then - echo /etc/init.d/iptables restart -fi diff --git a/cdist/conf/type/__iptables_apply/man.rst b/cdist/conf/type/__iptables_apply/man.rst deleted file mode 100644 index 76e1f6bf..00000000 --- a/cdist/conf/type/__iptables_apply/man.rst +++ /dev/null @@ -1,45 +0,0 @@ -cdist-type__iptables_apply(7) -============================= - -NAME ----- -cdist-type__iptables_apply - Apply the rules - - -DESCRIPTION ------------ -This cdist type deploys an init script that triggers -the configured rules and also re-applies them on -configuration. - - -REQUIRED PARAMETERS -------------------- -None - -OPTIONAL PARAMETERS -------------------- -None - -EXAMPLES --------- - -None (__iptables_apply is used by __iptables_rule) - - -SEE ALSO --------- -:strong:`cdist-type__iptables_rule`\ (7), :strong:`iptables`\ (8) - - -AUTHORS -------- -Nico Schottelius - - -COPYING -------- -Copyright \(C) 2013 Nico Schottelius. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__iptables_apply/manifest b/cdist/conf/type/__iptables_apply/manifest deleted file mode 100755 index 0061d3de..00000000 --- a/cdist/conf/type/__iptables_apply/manifest +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh -e -# -# 2013 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -__file /etc/init.d/iptables \ - --source "$__type/files/init-script" \ - --state present \ - --mode 0755 - -require="__file/etc/init.d/iptables" __start_on_boot iptables diff --git a/cdist/conf/type/__iptables_apply/singleton b/cdist/conf/type/__iptables_apply/singleton deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__iptables_rule/man.rst b/cdist/conf/type/__iptables_rule/man.rst deleted file mode 100644 index 92d8859f..00000000 --- a/cdist/conf/type/__iptables_rule/man.rst +++ /dev/null @@ -1,66 +0,0 @@ -cdist-type__iptables_rule(7) -============================ - -NAME ----- -cdist-type__iptables_rule - Deploy iptable rulesets - - -DESCRIPTION ------------ -This cdist type allows you to manage iptable rules -in a distribution independent manner. - - -REQUIRED PARAMETERS -------------------- -rule - The rule to apply. Essentially an iptables command - line without iptables in front of it. - - -OPTIONAL PARAMETERS -------------------- -state - 'present' or 'absent', defaults to 'present' - - -EXAMPLES --------- - -.. code-block:: sh - - # Deploy some policies - __iptables_rule policy-in --rule "-P INPUT DROP" - __iptables_rule policy-out --rule "-P OUTPUT ACCEPT" - __iptables_rule policy-fwd --rule "-P FORWARD DROP" - - # The usual established rule - __iptables_rule established --rule "-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT" - - # Some service rules - __iptables_rule http --rule "-A INPUT -p tcp --dport 80 -j ACCEPT" - __iptables_rule ssh --rule "-A INPUT -p tcp --dport 22 -j ACCEPT" - __iptables_rule https --rule "-A INPUT -p tcp --dport 443 -j ACCEPT" - - # Ensure some rules are not present anymore - __iptables_rule munin --rule "-A INPUT -p tcp --dport 4949 -j ACCEPT" \ - --state absent - - -SEE ALSO --------- -:strong:`cdist-type__iptables_apply`\ (7), :strong:`iptables`\ (8) - - -AUTHORS -------- -Nico Schottelius - - -COPYING -------- -Copyright \(C) 2013 Nico Schottelius. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__iptables_rule/manifest b/cdist/conf/type/__iptables_rule/manifest deleted file mode 100755 index ed78787f..00000000 --- a/cdist/conf/type/__iptables_rule/manifest +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh -e -# -# 2013 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -base_dir=/etc/iptables.d - -name="$__object_id" -state="$(cat "$__object/parameter/state")" - -################################################################################ -# Basic setup -# - -__directory "$base_dir" --state present - -# Have apply do the real job -require="$__object_name" __iptables_apply - -################################################################################ -# The rule -# - -require="__directory/$base_dir" __file "$base_dir/${name}" \ - --source "$__object/parameter/rule" \ - --state "$state" diff --git a/cdist/conf/type/__iptables_rule/parameter/default/state b/cdist/conf/type/__iptables_rule/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__iptables_rule/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__iptables_rule/parameter/required b/cdist/conf/type/__iptables_rule/parameter/required deleted file mode 100644 index 2b254dff..00000000 --- a/cdist/conf/type/__iptables_rule/parameter/required +++ /dev/null @@ -1 +0,0 @@ -rule diff --git a/cdist/conf/type/__issue/man.rst b/cdist/conf/type/__issue/man.rst deleted file mode 100644 index 097f2c01..00000000 --- a/cdist/conf/type/__issue/man.rst +++ /dev/null @@ -1,47 +0,0 @@ -cdist-type__issue(7) -==================== - -NAME ----- -cdist-type__issue - Manage issue - - -DESCRIPTION ------------ -This cdist type allows you to easily setup /etc/issue. - - -REQUIRED PARAMETERS -------------------- -None. - - -OPTIONAL PARAMETERS -------------------- -source - If supplied, use this file as /etc/issue instead of default. - - - -EXAMPLES --------- - -.. code-block:: sh - - __issue - - # When called from another type - __issue --source "$__type/files/myfancyissue" - - -AUTHORS -------- -Nico Schottelius - - -COPYING -------- -Copyright \(C) 2011 Nico Schottelius. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__issue/singleton b/cdist/conf/type/__issue/singleton deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__jail/.gitignore b/cdist/conf/type/__jail/.gitignore deleted file mode 100644 index e0471be4..00000000 --- a/cdist/conf/type/__jail/.gitignore +++ /dev/null @@ -1 +0,0 @@ -files/jailbase.tgz diff --git a/cdist/conf/type/__jail/man.rst b/cdist/conf/type/__jail/man.rst deleted file mode 100644 index 7fc8f455..00000000 --- a/cdist/conf/type/__jail/man.rst +++ /dev/null @@ -1,124 +0,0 @@ -cdist-type__jail(7) -=================== - -NAME ----- -cdist-type__jail - Manage FreeBSD jails - - -DESCRIPTION ------------ -This type is used on FreeBSD to manage jails by calling the appropriate per-version subtype. - - -REQUIRED PARAMETERS -------------------- -state - Either "present" or "absent", defaults to "present". - -jailbase - The location of the .tgz archive containing the base fs for your jails. - - -OPTIONAL PARAMETERS -------------------- -name - The name of the jail. Default is to use the object_id as the jail name. - -ip - The ifconfig style IP/netmask combination to use for the jail guest. If - the state parameter is "present," this parameter is required. - -hostname - The FQDN to use for the jail guest. Defaults to the name parameter. - -interface - The name of the physical interface on the jail server to bind the jail to. - Defaults to the first interface found in the output of ifconfig -l. - -devfs-ruleset - The name of the devfs ruleset to associate with the jail. Defaults to - "jailrules." This ruleset must be copied to the server via another type. - To use this option, devfs-enable must be "true." - -jaildir - The location on the remote server to use for hosting jail filesystems. - Defaults to /usr/jail. - -BOOLEAN PARAMETERS ------------------- -stopped - Do not start the jail - -devfs-disable - Whether to disallow devfs mounting within the jail - -onboot - Whether to add the jail to rc.conf's jail_list variable. - - -CAVEATS -------- -This type does not currently support modification of jail options. If, for -example a jail needs to have its IP address or netmask changed, the jail must -be removed then re-added with the correct IP address/netmask or the appropriate -line (jail__ip="...") modified within rc.conf through some alternate -means. - -MESSAGES --------- -start - The jail was started -stop - The jail was stopped -create: - The jail was created -delete - The jail was deleted -onboot - The jail was configured to start on boot - -EXAMPLES --------- - -.. code-block:: sh - - # Create a jail called www - __jail www --state present --ip "192.168.1.2" --jailbase /my/jail/base.tgz - - # Remove the jail called www - __jail www --state absent --jailbase /my/jail/base.tgz - - # The jail www should not be started - __jail www --state present --stopped \ - --ip "192.168.1.2 netmask 255.255.255.0" \ - --jailbase /my/jail/base.tgz - - # Use the name variable explicitly - __jail thisjail --state present --name www \ - --ip "192.168.1.2" \ - --jailbase /my/jail/base.tgz - - # Go nuts - __jail lotsofoptions --state present --name testjail \ - --ip "192.168.1.100 netmask 255.255.255.0" \ - --hostname "testjail.example.com" --interface "em0" \ - --onboot --jailbase /my/jail/base.tgz --jaildir /jails - - -SEE ALSO --------- -:strong:`jail`\ (8) - - -AUTHORS -------- -Jake Guffey - - -COPYING -------- -Copyright \(C) 2012,2016 Jake Guffey. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__jail/manifest b/cdist/conf/type/__jail/manifest deleted file mode 100755 index fad6a3a1..00000000 --- a/cdist/conf/type/__jail/manifest +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh -e -# -# 2012 Jake Guffey (jake.guffey at eprotex.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# The __jail type creates, configures, and deletes FreeBSD jails for use as -# virtual machines. -# - -# Debug -#exec >&2 -#set -x - -# Can only be used on FreeBSD -os="$(cat "$__global/explorer/os")" -if [ ! "$os" = "freebsd" ]; then - echo "__jail can only be used on FreeBSD targets!" >&2 - exit 1 -fi - -jaildir="$(cat "$__object/parameter/jaildir")" - -__directory "${jaildir}" --parents - -set -- "$@" "$__object_id" -cd "$__object/parameter" -for property in *; do - set -- "$@" "--$property" "$(cat "$property")" -done - -if grep -q '^10\.' "$(cat "$__global/explorer/os_version")" ; then # Version is 10.x - __jail_freebsd10 "$@" -else - __jail_freebsd9 "$@" -fi - -# Debug -#set +x - diff --git a/cdist/conf/type/__jail/parameter/boolean b/cdist/conf/type/__jail/parameter/boolean deleted file mode 100644 index 39144f6f..00000000 --- a/cdist/conf/type/__jail/parameter/boolean +++ /dev/null @@ -1,3 +0,0 @@ -onboot -stopped -devfs-disable diff --git a/cdist/conf/type/__jail/parameter/default/devfs-ruleset b/cdist/conf/type/__jail/parameter/default/devfs-ruleset deleted file mode 100644 index f602aa0a..00000000 --- a/cdist/conf/type/__jail/parameter/default/devfs-ruleset +++ /dev/null @@ -1 +0,0 @@ -jailrules diff --git a/cdist/conf/type/__jail/parameter/default/jailbase b/cdist/conf/type/__jail/parameter/default/jailbase deleted file mode 100644 index 8b137891..00000000 --- a/cdist/conf/type/__jail/parameter/default/jailbase +++ /dev/null @@ -1 +0,0 @@ - diff --git a/cdist/conf/type/__jail/parameter/default/jaildir b/cdist/conf/type/__jail/parameter/default/jaildir deleted file mode 100644 index ec7d86c6..00000000 --- a/cdist/conf/type/__jail/parameter/default/jaildir +++ /dev/null @@ -1 +0,0 @@ -/usr/jail diff --git a/cdist/conf/type/__jail/parameter/default/state b/cdist/conf/type/__jail/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__jail/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__jail/parameter/optional b/cdist/conf/type/__jail/parameter/optional deleted file mode 100644 index b36f0fa5..00000000 --- a/cdist/conf/type/__jail/parameter/optional +++ /dev/null @@ -1,8 +0,0 @@ -name -ip -hostname -interface -devfs-ruleset -jaildir -jailbase -state diff --git a/cdist/conf/type/__jail_freebsd10/explorer/basepresent b/cdist/conf/type/__jail_freebsd10/explorer/basepresent deleted file mode 100755 index 034128d5..00000000 --- a/cdist/conf/type/__jail_freebsd10/explorer/basepresent +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh -# -# 2012 Jake Guffey (jake.guffey at eprotex.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# See if the jailbase.tgz or $jaildir/base dir exists -# - -# Debug -#exec >&2 -#set -x - -if [ -f "$__object/parameter/jaildir" ]; then - jaildir="$(cat "$__object/parameter/jaildir")" -else - jaildir="/usr/jail" -fi - -name="base:jailbase.tgz" -out="" - -save_IFS="$IFS" -IFS=":" -for cur in $name; do - if [ -e "${jaildir}/$cur" ]; then - out="${out}:${cur}" - fi -done -IFS="$save_IFS" - -if [ -z "$out" ]; then - echo "NONE" -else - echo "${out}" -fi - -# Debug -#set +x - diff --git a/cdist/conf/type/__jail_freebsd10/explorer/present b/cdist/conf/type/__jail_freebsd10/explorer/present deleted file mode 100755 index ddfb805c..00000000 --- a/cdist/conf/type/__jail_freebsd10/explorer/present +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh -# -# 2012 Jake Guffey (jake.guffey at eprotex.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# See if the requested jail exists -# - -# Debug -#exec >&2 -#set -x - -if [ -f "$__object/parameter/name" ]; then - name="$(cat "$__object/parameter/name")" -else - name=$__object_id -fi - -if [ -f "$__object/parameter/jaildir" ]; then - jaildir="$(cat "$__object/parameter/jaildir")" -else - jaildir="/usr/jail" -fi - -[ -d "${jaildir}/$name" ] && echo "EXISTS" || echo "NOTEXIST" - -#set +x - diff --git a/cdist/conf/type/__jail_freebsd10/gencode-local b/cdist/conf/type/__jail_freebsd10/gencode-local deleted file mode 100755 index f163cad3..00000000 --- a/cdist/conf/type/__jail_freebsd10/gencode-local +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/sh -e -# -# 2012 Jake Guffey (jake.guffey at eprotex.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# The __jail type creates, configures, and deletes FreeBSD jails for use as -# virtual machines. -# - -# Debug -#exec >&2 -#set -x - -jaildir="$(cat "$__object/parameter/jaildir")" - -jailbase="$(cat "$__object/parameter/jailbase")" - -state="$(cat "$__object/parameter/state")" - -if [ "$state" = "present" ] && [ -z "$jailbase" ]; then - exec >&2 - echo "jailbase is a REQUIRED parameter when state=present!" - exit 1 -fi - -remotebase="${jaildir}/jailbase.tgz" -basepresent="$(cat "$__object/explorer/basepresent")" - -if [ "$state" = "present" ]; then - if [ "$basepresent" = "NONE" ]; then - # IPv6 fix - if echo "${__target_host}" | grep -q -E '^[0-9a-fA-F:]+$' - then - my_target_host="[${__target_host}]" - else - my_target_host="${__target_host}" - fi - echo "$__remote_copy" "${jailbase}" "${my_target_host}:${remotebase}" - fi # basepresent=NONE -fi # state=present - -# Debug -#set +x - diff --git a/cdist/conf/type/__jail_freebsd10/gencode-remote b/cdist/conf/type/__jail_freebsd10/gencode-remote deleted file mode 100755 index 4f376c25..00000000 --- a/cdist/conf/type/__jail_freebsd10/gencode-remote +++ /dev/null @@ -1,362 +0,0 @@ -#!/bin/sh -e -# -# 2012,2014,2016 Jake Guffey (jake.guffey at jointheirstm.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# The __jail_freebsd10 type creates, configures, and deletes FreeBSD -# jails for use as virtual machines on FreeBSD 10.x. -# - -# Debug -#exec >&2 -#set -x - -if [ -f "$__object/parameter/name" ]; then - name="$(cat "$__object/parameter/name")" -else - name="$__object_id" -fi - -state="$(cat "$__object/parameter/state")" - -started="true" -# If the user wants the jail gone, it implies it shouldn't be started. -{ [ -f "$__object/parameter/stopped" ] || [ "$state" = "absent" ]; } && started="false" - -if [ -f "$__object/parameter/ip" ]; then - ip="$(cat "$__object/parameter/ip")" -else -# IP is an optional param when $state=absent, but -# when $state=present, it's required. Enforce this. - if [ "$state" = "present" ]; then - exec >&2 - printf 'If --state is "present", --ip must be given\!\n' - exit 1 - fi -fi - -if [ -f "$__object/parameter/hostname" ]; then - hostname="$(cat "$__object/parameter/hostname")" -else - hostname="$name" -fi - -if [ -f "$__object/parameter/devfs-disable" ]; then - devfsenable="false" -else - devfsenable="true" -fi - -devfsruleset="$(cat "$__object/parameter/devfs-ruleset")" - -# devfs_ruleset being defined without devfs_enable being true -# is pointless. Treat this as an error. -if [ -n "$devfsruleset" ] && [ "$devfsenable" = "false" ]; then - exec >&2 - echo "Can't have --devfs-ruleset defined with --devfs-disable" - exit 1 -fi - -if [ -f "$__object/parameter/onboot" ]; then - onboot="true" -fi - -jaildir="$(cat "$__object/parameter/jaildir")" - -present="$(cat "$__object/explorer/present")" -#present="$(cat "$__type/explorer/present")" -status="$(cat "$__object/explorer/status")" - -# Handle ip="addr, addr" format -if [ "$(expr "${ip}" : ".*, .*")" -gt "0" ]; then - SAVE_IFS="$IFS" - IFS=", " - for cur_ip in ${ip}; do - # Just get the last IP address for SSH to listen on - mgmt_ip=$(echo "${cur_ip}" | cut '-d ' -f1) # In case using "ip netmask" format rather than CIDR - done - IFS="$SAVE_IFS" -else - mgmt_ip=$(echo "${ip}" | cut '-d ' -f1) # In case using "ip netmask" format rather than CIDR -fi - -stopJail() { -# Check $status before issuing command - if [ "$status" = "STARTED" ]; then - echo "/etc/rc.d/jail stop ${name}" - echo "stop" >> "$__messages_out" - fi -} - -startJail() { -# Check $status before issuing command - if [ "$status" = "NOTSTART" ]; then - echo "/etc/rc.d/jail start ${name}" - echo "start" >> "$__messages_out" - fi -} - -deleteJail() { -# Unmount the jail's mountpoints if necessary - cat <=1 rw mount is mounted still - for DIR in "\${output}"; do - umount -F "/etc/fstab.${name}" "\$(echo "${DIR}" | awk '{print \$3}')" - done - fi - output="\$(mount | grep "\\/${name} (")" || true - if [ -n "\${output}" ]; then # ro mount is mounted still - umount -F "/etc/fstab.${name}" "\$(echo "\${output}" | awk '{print \$3}')" - fi -EOF -# Remove the jail's rw mountpoints - echo "rm -rf \"${jaildir}/rw/${name}\"" -# Remove the jail directory - echo "rm -rf \"${jaildir}/${name}\"" -# Remove the jail's fstab - echo "rm -f \"/etc/fstab.${name}\"" -# Remove jail entry from jail.conf - cat <> "$__messages_out" -} - -createJail() { -# Create the jail directory -cat <> "$__messages_out" - -# Create the ro+rw mountpoint entries in fstab -cat </etc/fstab.${name} <>/etc/rc.conf - elif [ ! "\$(echo \$jail_enable | tr '[a-z]' '[A-Z]' | tr -d '"')" = "YES" ]; then # jail_enable="NO" - sed -i '.bak' 's/^jail_enable=.*$/jail_enable="YES"/g' /etc/rc.conf # fix this -^ - rm -f /etc/rc.conf.bak - fi - - jailfile=/etc/jail.conf - jailheader="${name} {" - - jaildata="path=\"${jaildir}/${name}\";" - - if [ "$devfsenable" = "true" ]; then - jaildata="\$jaildata - mount.devfs;" - else - jaildata="\$jaildata - mount.nodevfs;" - fi - - jaildata="\$jaildata - host.hostname=\"${hostname}\"; - ip4.addr=\"${ip}\"; - exec.start=\"/bin/sh /etc/rc\"; - exec.stop=\"/bin/sh /etc/rc.shutdown\"; - exec.consolelog=\"/var/log/jail_${name}_console.log\"; - mount.fstab=\"/etc/fstab.${name}\"; - allow.mount; - exec.clean; - allow.set_hostname=0; - allow.sysvipc=0; - allow.raw_sockets=0;" - - jailtrailer="}" - - if [ "$devfsenable" = "true" ] && [ "${devfsruleset}" = "jailrules" ]; then # The default ruleset is to be used - if [ ! -f /etc/devfs.rules ]; then - touch /etc/devfs.rules - fi - if [ -z "\$(grep '\\[jailrules=' /etc/devfs.rules)" ]; then # The default ruleset doesn't exist - # Get the highest-numbered ruleset - highest="\$(sed -n 's/\\[.*=\\([0-9]*\\)\\]/\\1/pg' /etc/devfs.rules | sort -u | tail -n 1)" || true - # increment by 1 - [ -z "\$highest" ] && highest=10 - let num="\${highest}+1" 2>&1 >/dev/null # Close the FD==fail... - # add default ruleset - cat >>/etc/devfs.rules <>\"\$jailfile\"" - -# Add $name to jail_list if $onboot=yes -if [ "$onboot" = "yes" ]; then - - # first check to see whether jail_enable="YES" exists in rc.conf or not and add it - # if necessary - - cat <> "$__messages_out" -fi - -# Add the normal entries into the jail's rc.conf -cat <"${jaildir}/rw/${name}/etc/rc.conf" -echo sshd_enable=\"YES\" >>"${jaildir}/rw/${name}/etc/rc.conf" -echo sendmail_enable=\"NONE\" >>"${jaildir}/rw/${name}/etc/rc.conf" -echo syslogd_enable=\"YES\" >>"${jaildir}/rw/${name}/etc/rc.conf" -echo syslogd_flags=\"-ss\" >>"${jaildir}/rw/${name}/etc/rc.conf" - -EOF -# Configure SSHd's listening address -cat <= 10.0 to manage jails. - - -REQUIRED PARAMETERS -------------------- -state - Either "present" or "absent", defaults to "present". - -jailbase - The location of the .tgz archive containing the base fs for your jails. - - -OPTIONAL PARAMETERS -------------------- -name - The name of the jail. Default is to use the object_id as the jail name. - -ip - The ifconfig style IP/netmask combination to use for the jail guest. If - the state parameter is "present," this parameter is required. - -hostname - The FQDN to use for the jail guest. Defaults to the name parameter. - -interface - The name of the physical interface on the jail server to bind the jail to. - Defaults to the first interface found in the output of ifconfig -l. - -devfs-ruleset - The name of the devfs ruleset to associate with the jail. Defaults to - "jailrules." This ruleset must be copied to the server via another type. - To use this option, devfs-enable must be "true." - -jaildir - The location on the remote server to use for hosting jail filesystems. - Defaults to /usr/jail. - -BOOLEAN PARAMETERS ------------------- -stopped - Do not start the jail - -devfs-disable - Whether to disallow devfs mounting within the jail - -onboot - Whether to add the jail to rc.conf's jail_list variable. - - -CAVEATS -------- -This type does not currently support modification of jail options. If, for -example a jail needs to have its IP address or netmask changed, the jail must -be removed then re-added with the correct IP address/netmask or the appropriate -modifications to jail.conf need to be made through alternate means. - -MESSAGES --------- -start - The jail was started -stop - The jail was stopped -create: - The jail was created -delete - The jail was deleted -onboot - The jail was configured to start on boot - -EXAMPLES --------- - -.. code-block:: sh - - # Create a jail called www - __jail_freebsd10 www --state present --ip "192.168.1.2" --jailbase /my/jail/base.tgz - - # Remove the jail called www - __jail_freebsd10 www --state absent --jailbase /my/jail/base.tgz - - # The jail www should not be started - __jail_freebsd10 www --state present --stopped \ - --ip "192.168.1.2 netmask 255.255.255.0" \ - --jailbase /my/jail/base.tgz - - # Use the name variable explicitly - __jail_freebsd10 thisjail --state present --name www \ - --ip "192.168.1.2" \ - --jailbase /my/jail/base.tgz - - # Go nuts - __jail_freebsd10 lotsofoptions --state present --name testjail \ - --ip "192.168.1.100 netmask 255.255.255.0" \ - --hostname "testjail.example.com" --interface "em0" \ - --onboot --jailbase /my/jail/base.tgz --jaildir /jails - - -SEE ALSO --------- -:strong:`jail`\ (8) - - -AUTHORS -------- -Jake Guffey - - -COPYING -------- -Copyright \(C) 2012-2016 Jake Guffey. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__jail_freebsd10/parameter/boolean b/cdist/conf/type/__jail_freebsd10/parameter/boolean deleted file mode 100644 index 39144f6f..00000000 --- a/cdist/conf/type/__jail_freebsd10/parameter/boolean +++ /dev/null @@ -1,3 +0,0 @@ -onboot -stopped -devfs-disable diff --git a/cdist/conf/type/__jail_freebsd10/parameter/default/devfs-ruleset b/cdist/conf/type/__jail_freebsd10/parameter/default/devfs-ruleset deleted file mode 100644 index f602aa0a..00000000 --- a/cdist/conf/type/__jail_freebsd10/parameter/default/devfs-ruleset +++ /dev/null @@ -1 +0,0 @@ -jailrules diff --git a/cdist/conf/type/__jail_freebsd10/parameter/default/jailbase b/cdist/conf/type/__jail_freebsd10/parameter/default/jailbase deleted file mode 100644 index 8b137891..00000000 --- a/cdist/conf/type/__jail_freebsd10/parameter/default/jailbase +++ /dev/null @@ -1 +0,0 @@ - diff --git a/cdist/conf/type/__jail_freebsd10/parameter/default/jaildir b/cdist/conf/type/__jail_freebsd10/parameter/default/jaildir deleted file mode 100644 index ec7d86c6..00000000 --- a/cdist/conf/type/__jail_freebsd10/parameter/default/jaildir +++ /dev/null @@ -1 +0,0 @@ -/usr/jail diff --git a/cdist/conf/type/__jail_freebsd10/parameter/default/state b/cdist/conf/type/__jail_freebsd10/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__jail_freebsd10/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__jail_freebsd10/parameter/optional b/cdist/conf/type/__jail_freebsd10/parameter/optional deleted file mode 100644 index b36f0fa5..00000000 --- a/cdist/conf/type/__jail_freebsd10/parameter/optional +++ /dev/null @@ -1,8 +0,0 @@ -name -ip -hostname -interface -devfs-ruleset -jaildir -jailbase -state diff --git a/cdist/conf/type/__jail_freebsd9/explorer/basepresent b/cdist/conf/type/__jail_freebsd9/explorer/basepresent deleted file mode 100755 index 034128d5..00000000 --- a/cdist/conf/type/__jail_freebsd9/explorer/basepresent +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh -# -# 2012 Jake Guffey (jake.guffey at eprotex.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# See if the jailbase.tgz or $jaildir/base dir exists -# - -# Debug -#exec >&2 -#set -x - -if [ -f "$__object/parameter/jaildir" ]; then - jaildir="$(cat "$__object/parameter/jaildir")" -else - jaildir="/usr/jail" -fi - -name="base:jailbase.tgz" -out="" - -save_IFS="$IFS" -IFS=":" -for cur in $name; do - if [ -e "${jaildir}/$cur" ]; then - out="${out}:${cur}" - fi -done -IFS="$save_IFS" - -if [ -z "$out" ]; then - echo "NONE" -else - echo "${out}" -fi - -# Debug -#set +x - diff --git a/cdist/conf/type/__jail_freebsd9/explorer/present b/cdist/conf/type/__jail_freebsd9/explorer/present deleted file mode 100755 index ddfb805c..00000000 --- a/cdist/conf/type/__jail_freebsd9/explorer/present +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh -# -# 2012 Jake Guffey (jake.guffey at eprotex.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# See if the requested jail exists -# - -# Debug -#exec >&2 -#set -x - -if [ -f "$__object/parameter/name" ]; then - name="$(cat "$__object/parameter/name")" -else - name=$__object_id -fi - -if [ -f "$__object/parameter/jaildir" ]; then - jaildir="$(cat "$__object/parameter/jaildir")" -else - jaildir="/usr/jail" -fi - -[ -d "${jaildir}/$name" ] && echo "EXISTS" || echo "NOTEXIST" - -#set +x - diff --git a/cdist/conf/type/__jail_freebsd9/explorer/status b/cdist/conf/type/__jail_freebsd9/explorer/status deleted file mode 100755 index c8039f21..00000000 --- a/cdist/conf/type/__jail_freebsd9/explorer/status +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh -# -# 2012 Jake Guffey (jake.guffey at eprotex.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# See if the requested jail is started -# - -# Debug -#exec >&2 -#set -x - -if [ -f "$__object/parameter/name" ]; then - name="$(cat "$__object/parameter/name")" -else - name="$__object_id" -fi - -if [ -f "$__object/parameter/jaildir" ]; then - jaildir="$(cat "$__object/parameter/jaildir")" -else - jaildir="/usr/jail" -fi -# backslash-escaped $jaildir -sjaildir="$(echo ${jaildir} | sed 's#/#\\/#g')" - -jls_output="$(jls | grep "[ ]${sjaildir}\\/${name}\$")" || true - -if [ -n "${jls_output}" ]; then - echo "STARTED" -else - echo "NOTSTART" -fi - -# Debug -#set +x - diff --git a/cdist/conf/type/__jail_freebsd9/gencode-local b/cdist/conf/type/__jail_freebsd9/gencode-local deleted file mode 100755 index bbdc9fcc..00000000 --- a/cdist/conf/type/__jail_freebsd9/gencode-local +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh -e -# -# 2012 Jake Guffey (jake.guffey at eprotex.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# The __jail type creates, configures, and deletes FreeBSD jails for use as -# virtual machines. -# - -jaildir="$(cat "$__object/parameter/jaildir")" - -jailbase="$(cat "$__object/parameter/jailbase")" - -state="$(cat "$__object/parameter/state")" - -if [ "$state" = "present" ] && [ -z "$jailbase" ]; then - exec >&2 - echo "jailbase is a REQUIRED parameter when state=present!" - exit 1 -fi - -remotebase="${jaildir}/jailbase.tgz" -basepresent="$(cat "$__object/explorer/basepresent")" - -if [ "$state" = "present" ]; then - if [ "$basepresent" = "NONE" ]; then - # IPv6 fix - if echo "${__target_host}" | grep -q -E '^[0-9a-fA-F:]+$' - then - my_target_host="[${__target_host}]" - else - my_target_host="${__target_host}" - fi - echo "$__remote_copy" "${jailbase}" "${my_target_host}:${remotebase}" - fi # basepresent=NONE -fi # state=present - diff --git a/cdist/conf/type/__jail_freebsd9/gencode-remote b/cdist/conf/type/__jail_freebsd9/gencode-remote deleted file mode 100755 index 68229d3e..00000000 --- a/cdist/conf/type/__jail_freebsd9/gencode-remote +++ /dev/null @@ -1,357 +0,0 @@ -#!/bin/sh -e -# -# 2012,2014,2016 Jake Guffey (jake.guffey at jointheirstm.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# The __jail_freebsd9 type creates, configures, and deletes FreeBSD jails -# for use as virtual machines on FreeBSD 9.x and before. -# - -# Debug -#exec >&2 -#set -x - -if [ -f "$__object/parameter/name" ]; then - name="$(cat "$__object/parameter/name")" -else - name="$__object_id" -fi - -state="$(cat "$__object/parameter/state")" - -started="true" -# If the user wants the jail gone, it implies it shouldn't be started. -{ [ -f "$__object/parameter/stopped" ] || [ "$state" = "absent" ]; } && started="false" - -if [ -f "$__object/parameter/ip" ]; then - ip="$(cat "$__object/parameter/ip")" -else -# IP is an optional param when $state=absent, but -# when $state=present, it's required. Enforce this. - if [ "$state" = "present" ]; then - exec >&2 - printf 'If --state is "present", --ip must be given\!\n' - exit 1 - fi -fi - -if [ -f "$__object/parameter/hostname" ]; then - hostname="$(cat "$__object/parameter/hostname")" -else - hostname="$name" -fi - -if [ -f "$__object/parameter/interface" ]; then - interface="$(cat "$__object/parameter/interface")" -fi - -if [ -f "$__object/parameter/devfs-disable" ]; then - devfsenable="false" -else - devfsenable="true" -fi - -devfsruleset="$(cat "$__object/parameter/devfs-ruleset")" - -# devfs_ruleset being defined without devfs_enable being true -# is pointless. Treat this as an error. -if [ -n "$devfsruleset" ] && [ "$devfsenable" = "false" ]; then - exec >&2 - echo "Can't have --devfs-ruleset defined with --devfs-disable" - exit 1 -fi - -if [ -f "$__object/parameter/onboot" ]; then - onboot="true" -fi - -jaildir="$(cat "$__object/parameter/jaildir")" - -present="$(cat "$__object/explorer/present")" -status="$(cat "$__object/explorer/status")" - -# Handle ip="iface|addr, iface|addr" format -if [ "$(expr "${ip}" : ".*|.*")" -gt "0" ]; then - # If we have multiple IPs defined, $interface doesn't make sense because ip="iface|addr, iface|addr" implies it - interface="" - SAVE_IFS="$IFS" - IFS=", " - for cur_ip in ${ip}; do - # Just get the last IP address for SSH to listen on - mgmt_ip=$(echo "${cur_ip}" | sed -E -e 's/^.*\|(.*)\/[0-9]+$/\1/') - done - IFS="$SAVE_IFS" -else - mgmt_ip=$(echo "${ip}" | cut '-d ' -f1) -fi - -stopJail() { -# Check $status before issuing command - if [ "$status" = "STARTED" ]; then - echo "/etc/rc.d/jail stop ${name}" - echo "stop" >> "$__messages_out" - fi -} - -startJail() { -# Check $status before issuing command - if [ "$status" = "NOTSTART" ]; then - echo "/etc/rc.d/jail start ${name}" - echo "start" >> "$__messages_out" - fi -} - -deleteJail() { -# Unmount the jail's mountpoints if necessary - cat <=1 rw mount is mounted still - for DIR in "\${output}"; do - umount -F "/etc/fstab.${name}" "\$(echo "${DIR}" | awk '{print \$3}')" - done - fi - output="\$(mount | grep "\\/${name} (")" || true - if [ -n "\${output}" ]; then # ro mount is mounted still - umount -F "/etc/fstab.${name}" "\$(echo "\${output}" | awk '{print \$3}')" - fi -EOF -# Remove the jail's rw mountpoints - echo "rm -rf \"${jaildir}/rw/${name}\"" -# Remove the jail directory - echo "rm -rf \"${jaildir}/${name}\"" -# Remove the jail's fstab - echo "rm -f \"/etc/fstab.${name}\"" -# Remove jail_$name_* lines from rc.conf - cat <> "$__messages_out" -} - -createJail() { -# Create the jail directory -cat <> "$__messages_out" - -# Create the ro+rw mountpoint entries in fstab -cat </etc/fstab.${name} <>/etc/rc.conf - elif [ ! "\$(echo \$jail_enable | tr '[a-z]' '[A-Z]')" = "YES" ]; then # jail_enable="NO" - sed -i '.bak' 's/^jail_enable=.*$/jail_enable="YES"/g' /etc/rc.conf # fix this -^ - rm -f /etc/rc.conf.bak - fi - cat >>/etc/rc.conf <>/etc/rc.conf <>/etc/rc.conf <>/etc/rc.conf <&- >&- - # add default ruleset - cat >>/etc/devfs.rules <> "$__messages_out" -fi - -# Add the normal entries into the jail's rc.conf -cat <"${jaildir}/rw/${name}/etc/rc.conf" -echo sshd_enable=\"YES\" >>"${jaildir}/rw/${name}/etc/rc.conf" -echo sendmail_enable=\"NONE\" >>"${jaildir}/rw/${name}/etc/rc.conf" -echo syslogd_enable=\"YES\" >>"${jaildir}/rw/${name}/etc/rc.conf" -echo syslogd_flags=\"-ss\" >>"${jaildir}/rw/${name}/etc/rc.conf" - -EOF -# Configure SSHd's listening address -cat <_ip="...") modified within rc.conf through some alternate -means. - -MESSAGES --------- -start - The jail was started -stop - The jail was stopped -create: - The jail was created -delete - The jail was deleted -onboot - The jail was configured to start on boot - -EXAMPLES --------- - -.. code-block:: sh - - # Create a jail called www - __jail_freebsd9 www --state present --ip "192.168.1.2" --jailbase /my/jail/base.tgz - - # Remove the jail called www - __jail_freebsd9 www --state absent --jailbase /my/jail/base.tgz - - # The jail www should not be started - __jail_freebsd9 www --state present --stopped \ - --ip "192.168.1.2 netmask 255.255.255.0" \ - --jailbase /my/jail/base.tgz - - # Use the name variable explicitly - __jail_freebsd9 thisjail --state present --name www \ - --ip "192.168.1.2" \ - --jailbase /my/jail/base.tgz - - # Go nuts - __jail_freebsd9 lotsofoptions --state present --name testjail \ - --ip "192.168.1.100 netmask 255.255.255.0" \ - --hostname "testjail.example.com" --interface "em0" \ - --onboot --jailbase /my/jail/base.tgz --jaildir /jails - - -SEE ALSO --------- -:strong:`jail`\ (8) - - -AUTHORS -------- -Jake Guffey - - -COPYING -------- -Copyright \(C) 2012-2016 Jake Guffey. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__jail_freebsd9/parameter/boolean b/cdist/conf/type/__jail_freebsd9/parameter/boolean deleted file mode 100644 index 39144f6f..00000000 --- a/cdist/conf/type/__jail_freebsd9/parameter/boolean +++ /dev/null @@ -1,3 +0,0 @@ -onboot -stopped -devfs-disable diff --git a/cdist/conf/type/__jail_freebsd9/parameter/default/devfs-ruleset b/cdist/conf/type/__jail_freebsd9/parameter/default/devfs-ruleset deleted file mode 100644 index f602aa0a..00000000 --- a/cdist/conf/type/__jail_freebsd9/parameter/default/devfs-ruleset +++ /dev/null @@ -1 +0,0 @@ -jailrules diff --git a/cdist/conf/type/__jail_freebsd9/parameter/default/jailbase b/cdist/conf/type/__jail_freebsd9/parameter/default/jailbase deleted file mode 100644 index 8b137891..00000000 --- a/cdist/conf/type/__jail_freebsd9/parameter/default/jailbase +++ /dev/null @@ -1 +0,0 @@ - diff --git a/cdist/conf/type/__jail_freebsd9/parameter/default/jaildir b/cdist/conf/type/__jail_freebsd9/parameter/default/jaildir deleted file mode 100644 index ec7d86c6..00000000 --- a/cdist/conf/type/__jail_freebsd9/parameter/default/jaildir +++ /dev/null @@ -1 +0,0 @@ -/usr/jail diff --git a/cdist/conf/type/__jail_freebsd9/parameter/default/state b/cdist/conf/type/__jail_freebsd9/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__jail_freebsd9/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__jail_freebsd9/parameter/optional b/cdist/conf/type/__jail_freebsd9/parameter/optional deleted file mode 100644 index b36f0fa5..00000000 --- a/cdist/conf/type/__jail_freebsd9/parameter/optional +++ /dev/null @@ -1,8 +0,0 @@ -name -ip -hostname -interface -devfs-ruleset -jaildir -jailbase -state diff --git a/cdist/conf/type/__key_value/explorer/state b/cdist/conf/type/__key_value/explorer/state deleted file mode 100755 index 7b2de1df..00000000 --- a/cdist/conf/type/__key_value/explorer/state +++ /dev/null @@ -1,104 +0,0 @@ -#!/bin/sh -# -# 2011 Steven Armstrong (steven-cdist at armstrong.cc) -# 2014 Daniel Heule (hda at sfs.biz) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -key="$(cat "$__object/parameter/key" 2>/dev/null \ - || echo "$__object_id")" -state="$(cat "$__object/parameter/state")" - -file="$(cat "$__object/parameter/file")" - -if [ ! -f "$file" ]; then - echo "nosuchfile" - exit -fi - -delimiter="$(cat "$__object/parameter/delimiter")" -value="$(cat "$__object/parameter/value" 2>/dev/null \ - || echo "__CDIST_NOTSET__")" -if [ -f "$__object/parameter/exact_delimiter" ]; then - exact_delimiter=1 -else - exact_delimiter=0 -fi -export key state delimiter value exact_delimiter - -awk -f - "$file" <<"AWK_EOF" -BEGIN { - state=ENVIRON["state"] - key=ENVIRON["key"] - delimiter=ENVIRON["delimiter"] - value=ENVIRON["value"] - exact_delimiter=ENVIRON["exact_delimiter"] - found=0 -} -# enter the main loop -{ - i = index($0,key) - if(i == 1) { - delval = substr($0,length(key)+1) - delpos = index(delval,delimiter) - if(delpos == 0) { - # in this case, the delimiter was not found - next - } - if(delpos > 1) { - spaces = substr(delval,1,delpos-1) - sub(/[ \t]*/,"",spaces) - if( length(spaces) > 0 ) { - # if there are not only spaces between key and delimiter, - # continue since we we are on the wrong line - next - } - if( exact_delimiter == 1) { - # we have key and delimiter, but since additional spaces are not alowed - # return wrongformat - found=1 - print "wrongformat" - exit - } - } - found=1 - if(state == "absent") { - # on state absent, only the ocurance is relevant, so exit here - print "present" - exit - } - linevalue=substr(delval,delpos + length(delimiter)) - if(exact_delimiter == 0){ - #ok, now strip tabs and whitespaces at the beginning of the value - sub(/[ \t]*/,"",linevalue) - } - # Key with separator found - if(linevalue == value) { - # exact match found, so state is present - print "present" - } - else { - print "wrongvalue" - } - exit - } -} -END { - if(found == 0) - print "absent" -} -AWK_EOF diff --git a/cdist/conf/type/__key_value/files/remote_script.sh b/cdist/conf/type/__key_value/files/remote_script.sh deleted file mode 100644 index f7a1add5..00000000 --- a/cdist/conf/type/__key_value/files/remote_script.sh +++ /dev/null @@ -1,106 +0,0 @@ -#!/bin/sh - -key="$(cat "$__object/parameter/key" 2>/dev/null \ - || echo "$__object_id")" -state="$(cat "$__object/parameter/state")" - -file="$(cat "$__object/parameter/file")" - -delimiter="$(cat "$__object/parameter/delimiter")" -value="$(cat "$__object/parameter/value" 2>/dev/null \ - || echo "__CDIST_NOTSET__")" -export key state delimiter value -if [ -f "$__object/parameter/exact_delimiter" ]; then - exact_delimiter=1 -else - exact_delimiter=0 -fi -export exact_delimiter - -tmpfile=$(mktemp "${file}.cdist.XXXXXXXXXX") -# preserve ownership and permissions by copying existing file over tmpfile -if [ -f "$file" ]; then - cp -p "$file" "$tmpfile" -else - touch "$file" -fi -awk -f - "$file" >"$tmpfile" <<"AWK_EOF" -BEGIN { - # import variables in a secure way .. - state=ENVIRON["state"] - key=ENVIRON["key"] - delimiter=ENVIRON["delimiter"] - value=ENVIRON["value"] - comment=ENVIRON["comment"] - exact_delimiter=ENVIRON["exact_delimiter"] - inserted=0 - lastline="" - lastlinepopulated=0 - line=key delimiter value -} -# enter the main loop -{ - # I dont use regex, this is by design, so we can match against every value without special meanings of chars ... - i = index($0,key) - if(i == 1) { - delval = substr($0,length(key)+1) - delpos = index(delval,delimiter) - if(delpos > 1) { - spaces = substr(delval,1,delpos-1) - sub(/[ \t]*/,"",spaces) - if( length(spaces) > 0 ) { - # if there are not only spaces between key and delimiter, - # continue since we we are on the wrong line - if(lastlinepopulated == 1) { - print lastline - } - lastline=$0 - lastlinepopulated=1 - next - } - } - if(state == "absent") { - if(lastline == comment) { - # if comment is present, clear lastlinepopulated flag - lastlinepopulated=0 - } - # if absent, simple yump over this line - next - } - else { - # if comment is present and not present in last line - if (lastlinepopulated == 1) { - print lastline - if( comment != "" && lastline != comment) { - print comment - } - lastlinepopulated=0 - } - inserted=1 - # state is present, so insert correct line here - print line - lastline=line - next - } - } - else { - if(lastlinepopulated == 1) { - print lastline - } - lastline=$0 - lastlinepopulated=1 - } -} -END { - if(lastlinepopulated == 1) { - print lastline - } - if(inserted == 0 && state == "present" ) { - if(comment != "" && lastline != comment){ - print comment - } - print line - } -} -AWK_EOF -mv -f "$tmpfile" "$file" diff --git a/cdist/conf/type/__key_value/gencode-remote b/cdist/conf/type/__key_value/gencode-remote deleted file mode 100755 index 13cc27c7..00000000 --- a/cdist/conf/type/__key_value/gencode-remote +++ /dev/null @@ -1,84 +0,0 @@ -#!/bin/sh -e -# -# 2011 Steven Armstrong (steven-cdist at armstrong.cc) -# 2012-2014 Nico Schottelius (nico-cdist at schottelius.org) -# 2014 Daniel Heule (hda at sfs.biz) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - - -state_should="$(cat "$__object/parameter/state")" -state_is="$(cat "$__object/explorer/state")" -fire_onchange='' - -if [ "$state_is" = "$state_should" ]; then - exit 0 -fi - -# here we check only if the states are valid, -# emit messages and -# let awk do the work ... -case "$state_should" in - absent) - case "$state_is" in - absent|nosuchfile) - # nothing to do - ;; - wrongformat|wrongvalue|present) - echo "remove" >> "$__messages_out" - fire_onchange=1 - ;; - *) - echo "Unknown explorer state: $state_is" >&2 - exit 1 - ;; - esac - ;; - present) - case "$state_is" in - nosuchfile) - echo "create" >> "$__messages_out" - fire_onchange=1 - ;; - absent) - echo "insert" >> "$__messages_out" - fire_onchange=1 - ;; - wrongformated|wrongvalue) - echo "change" >> "$__messages_out" - fire_onchange=1 - ;; - present) - # nothing to do - ;; - *) - echo "Unknown explorer state: $state_is" >&2 - exit 1 - ;; - esac - ;; - *) - echo "Unknown state: $state_should" >&2 - exit 1 - ;; -esac - -cat "$__type/files/remote_script.sh" - -if [ -n "$fire_onchange" ]; then - cat "$__object/parameter/onchange" -fi diff --git a/cdist/conf/type/__key_value/man.rst b/cdist/conf/type/__key_value/man.rst deleted file mode 100644 index 34e4aab2..00000000 --- a/cdist/conf/type/__key_value/man.rst +++ /dev/null @@ -1,96 +0,0 @@ -cdist-type__key_value(7) -======================== - -NAME ----- -cdist-type__key_value - Change property values in files - - -DESCRIPTION ------------ -This cdist type allows you to change values in a key value based config -file. - - -REQUIRED PARAMETERS -------------------- -file - The file to operate on. -delimiter - The delimiter which separates the key from the value. - - -OPTIONAL PARAMETERS -------------------- -state - present or absent, defaults to present. If present, sets the key to value, - if absent, removes the key from the file. -key - The key to change. Defaults to object_id. -value - The value for the key. Optional if state=absent, required otherwise. -comment - If supplied, the value will be inserted before the line with the key, - but only if the key or value must be changed. - You need to ensure yourself that the line is prefixed with the correct - comment sign. (for example # or ; or wathever ..) -onchange - The code to run if the key or value changes (i.e. is inserted, removed or replaced). - - -BOOLEAN PARAMETERS ------------------- -exact_delimiter - If supplied, treat additional whitespaces between key, delimiter and value - as wrong value. - - -MESSAGES --------- -remove - Removed existing key and value -insert - Added key and value -change - Changed value of existing key -create - A new line was inserted in a new file - - -EXAMPLES --------- - -.. code-block:: sh - - # Set the maximum system user id - __key_value SYS_UID_MAX --file /etc/login.defs --value 666 --delimiter ' ' - - # Same with fancy id - __key_value my-fancy-id --file /etc/login.defs --key SYS_UID_MAX --value 666 \ - --delimiter ' ' - - # Enable packet forwarding - __key_value net.ipv4.ip_forward --file /etc/sysctl.conf --value 1 \ - --delimiter ' = ' --comment '# my linux kernel should act as a router' - - # Remove existing key/value - __key_value LEGACY_KEY --file /etc/somefile --state absent --delimiter '=' - - -MORE INFORMATION ----------------- -This type try to handle as many values as possible, so it doesn't use regexes. -So you need to exactly specify the key and delimiter. Delimiter can be of any length. - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2011 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__key_value/manifest b/cdist/conf/type/__key_value/manifest deleted file mode 100755 index 5a91f60c..00000000 --- a/cdist/conf/type/__key_value/manifest +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh -e -# -# 2011 Steven Armstrong (steven-cdist at armstrong.cc) -# 2012 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -state_should="$(cat "$__object/parameter/state")" - -if [ "$state_should" = "present" ] && [ ! -f "$__object/parameter/value" ]; then - echo "Missing required parameter 'value'" >&2 - exit 1 -fi diff --git a/cdist/conf/type/__key_value/parameter/boolean b/cdist/conf/type/__key_value/parameter/boolean deleted file mode 100644 index 190831c1..00000000 --- a/cdist/conf/type/__key_value/parameter/boolean +++ /dev/null @@ -1 +0,0 @@ -exact_delimiter diff --git a/cdist/conf/type/__key_value/parameter/default/comment b/cdist/conf/type/__key_value/parameter/default/comment deleted file mode 100644 index 8b137891..00000000 --- a/cdist/conf/type/__key_value/parameter/default/comment +++ /dev/null @@ -1 +0,0 @@ - diff --git a/cdist/conf/type/__key_value/parameter/default/onchange b/cdist/conf/type/__key_value/parameter/default/onchange deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__key_value/parameter/default/state b/cdist/conf/type/__key_value/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__key_value/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__key_value/parameter/optional b/cdist/conf/type/__key_value/parameter/optional deleted file mode 100644 index d4b8cac0..00000000 --- a/cdist/conf/type/__key_value/parameter/optional +++ /dev/null @@ -1,5 +0,0 @@ -key -value -state -comment -onchange diff --git a/cdist/conf/type/__keyboard/man.rst b/cdist/conf/type/__keyboard/man.rst deleted file mode 100644 index 0eb4cde9..00000000 --- a/cdist/conf/type/__keyboard/man.rst +++ /dev/null @@ -1,37 +0,0 @@ -cdist-type__keyboard(7) -======================= - -NAME ----- -cdit-type__keyboard - Set keyboard layout - - -DESCRIPTION ------------ -This cdist type allows you to modify keyboard layout. - - -REQUIRED PARAMETERS -------------------- -type - Any valid type, for example "us" - - -EXAMPLES --------- - -.. code-block:: sh - - # Set keyboard type to "us" - __keyboard --type "us" - - -AUTHORS -------- -Carlos Ortigoza - - -COPYING -------- -Copyright \(C) 2016 Carlos Ortigoza. Free use of this software is -granted under the terms of the GNU General Public License v3 or later (GPLv3+). diff --git a/cdist/conf/type/__keyboard/manifest b/cdist/conf/type/__keyboard/manifest deleted file mode 100755 index 80cd4819..00000000 --- a/cdist/conf/type/__keyboard/manifest +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh -e -# -# Carlos Ortigoza (carlos.ortigoza at ungleich.ch) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Configure keyboard type by modifying /etc/sysconfig/keyboard file. -# - -os=$(cat "$__global/explorer/os") -keyboard_type="$(cat "$__object/parameter/type")" - -case "$os" in - centos) - __file /etc/sysconfig/keyboard \ - --owner root --group root --mode 644 \ - --state exists - - require="__file/etc/sysconfig/keyboard" \ - __key_value KEYTABLE \ - --file /etc/sysconfig/keyboard \ - --delimiter '=' \ - --value "\"$keyboard_type\"" - - require="__file/etc/sysconfig/keyboard" \ - __key_value LAYOUT \ - --file /etc/sysconfig/keyboard \ - --delimiter '=' \ - --value "\"$keyboard_type\"" - ;; - *) - echo "Your operating system ($os) is currently not supported by this type (${__type##*/})." >&2 - echo "Please contribute an implementation for it if you can." >&2 - exit 1 - ;; -esac diff --git a/cdist/conf/type/__keyboard/parameter/required b/cdist/conf/type/__keyboard/parameter/required deleted file mode 100644 index aa80e646..00000000 --- a/cdist/conf/type/__keyboard/parameter/required +++ /dev/null @@ -1 +0,0 @@ -type diff --git a/cdist/conf/type/__keyboard/singleton b/cdist/conf/type/__keyboard/singleton deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__letsencrypt_cert/explorer/certbot-path b/cdist/conf/type/__letsencrypt_cert/explorer/certbot-path deleted file mode 100755 index 3c6076df..00000000 --- a/cdist/conf/type/__letsencrypt_cert/explorer/certbot-path +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -e - -command -v certbot 2>/dev/null || true diff --git a/cdist/conf/type/__letsencrypt_cert/explorer/certificate-domains b/cdist/conf/type/__letsencrypt_cert/explorer/certificate-domains deleted file mode 100755 index db605b63..00000000 --- a/cdist/conf/type/__letsencrypt_cert/explorer/certificate-domains +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -e - -certbot_path=$("${__type_explorer}/certbot-path") -if [ -n "${certbot_path}" ] -then - certbot certificates --cert-name "${__object_id:?}" | grep ' Domains: ' | \ - cut -d ' ' -f 6- | tr ' ' '\n' -fi diff --git a/cdist/conf/type/__letsencrypt_cert/explorer/certificate-exists b/cdist/conf/type/__letsencrypt_cert/explorer/certificate-exists deleted file mode 100755 index 4e6f44db..00000000 --- a/cdist/conf/type/__letsencrypt_cert/explorer/certificate-exists +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -e - -certbot_path=$("${__type_explorer}/certbot-path") -if [ -n "${certbot_path}" ] -then - if certbot certificates | grep -q " Certificate Name: ${__object_id:?}$"; then - echo yes - else - echo no - fi -else - echo no -fi diff --git a/cdist/conf/type/__letsencrypt_cert/explorer/certificate-is-test b/cdist/conf/type/__letsencrypt_cert/explorer/certificate-is-test deleted file mode 100755 index 9b445059..00000000 --- a/cdist/conf/type/__letsencrypt_cert/explorer/certificate-is-test +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -e - -certbot_path=$("${__type_explorer}/certbot-path") -if [ -n "${certbot_path}" ] -then - if certbot certificates --cert-name "${__object_id:?}" | \ - grep -q 'INVALID: TEST_CERT'; then - echo yes - else - echo no - fi -else - echo no -fi diff --git a/cdist/conf/type/__letsencrypt_cert/gencode-remote b/cdist/conf/type/__letsencrypt_cert/gencode-remote deleted file mode 100755 index 375570a4..00000000 --- a/cdist/conf/type/__letsencrypt_cert/gencode-remote +++ /dev/null @@ -1,82 +0,0 @@ -#!/bin/sh -e - -certificate_exists=$(cat "${__object:?}/explorer/certificate-exists") -name="${__object_id:?}" -state=$(cat "${__object}/parameter/state") - -case "${state}" in - absent) - if [ "${certificate_exists}" = "no" ]; then - exit 0 - fi - - echo "certbot delete --cert-name '${name}' --quiet" - - echo remove >> "${__messages_out:?}" - ;; - present) - domain_param_file="${__object}/parameter/domain" - requested_domains=$(mktemp "${TMPDIR:-/tmp}/domain.cdist.XXXXXXXXXX") - if [ -f "${domain_param_file}" ]; then - cp "${domain_param_file}" "${requested_domains}" - else - echo "$__object_id" >> "${requested_domains}" - fi - - staging=no - if [ -f "${__object}/parameter/staging" ]; then - staging=yes - fi - - if [ "${certificate_exists}" = "yes" ]; then - existing_domains="${__object}/explorer/certificate-domains" - certificate_is_test=$(cat "${__object}/explorer/certificate-is-test") - - sort -uo "${requested_domains}" "${requested_domains}" - sort -uo "${existing_domains}" "${existing_domains}" - - if [ -z "$(comm -23 "${requested_domains}" "${existing_domains}")" ] && \ - [ "${certificate_is_test}" = "${staging}" ]; then - exit 0 - fi - fi - - admin_email="$(cat "$__object/parameter/admin-email")" - webroot="$(cat "$__object/parameter/webroot")" - - cat <<-EOF - certbot certonly \ - --agree-tos \ - --cert-name '${name}' \ - --email '${admin_email}' \ - --expand \ - --non-interactive \ - --quiet \ - $(if [ "${staging}" = "yes" ]; then - echo "--staging" - elif [ "${certificate_is_test}" != "${staging}" ]; then - echo "--force-renewal" - fi) \ - $(if [ -z "${webroot}" ]; then - echo "--standalone" - else - echo "--webroot --webroot-path '${webroot}'" - fi) \ - $(while read -r domain; do - echo "--domain '${domain}' \\" - done < "${requested_domains}") - EOF - rm -f "${requested_domains}" - - if [ "${certificate_exists}" = "no" ]; then - echo create >> "${__messages_out}" - else - echo change >> "${__messages_out}" - fi - ;; - *) - echo "Unsupported state: ${state}" >&2 - - exit 1 - ;; -esac diff --git a/cdist/conf/type/__letsencrypt_cert/man.rst b/cdist/conf/type/__letsencrypt_cert/man.rst deleted file mode 100644 index c4ffc6bc..00000000 --- a/cdist/conf/type/__letsencrypt_cert/man.rst +++ /dev/null @@ -1,109 +0,0 @@ -cdist-type__letsencrypt_cert(7) -=============================== - -NAME ----- - -cdist-type__letsencrypt_cert - Get an SSL certificate from Let's Encrypt - -DESCRIPTION ------------ - -Automatically obtain a Let's Encrypt SSL certificate using Certbot. - -REQUIRED PARAMETERS -------------------- - -object id - A cert name. If domain parameter is not specified then it is used - as a domain to be included in the certificate. - -admin-email - Where to send Let's Encrypt emails like "certificate needs renewal". - -OPTIONAL PARAMETERS -------------------- - -state - 'present' or 'absent', defaults to 'present' where: - - present - if the certificate does not exist, it will be obtained - absent - the certificate will be removed - -webroot - The path to your webroot, as set up in your webserver config. If this - parameter is not present, Certbot will be run in standalone mode. - -OPTIONAL MULTIPLE PARAMETERS ----------------------------- - -renew-hook - Renew hook command directly passed to Certbot in cron job. - -domain - Domains to be included in the certificate. When specified then object id - is not used as a domain. - -BOOLEAN PARAMETERS ------------------- - -automatic-renewal - Install a cron job, which attempts to renew certificates daily. - -staging - Obtain a test certificate from a staging server. - -MESSAGES --------- - -change - Certificte was changed. - -create - Certificte was created. - -remove - Certificte was removed. - -EXAMPLES --------- - -.. code-block:: sh - - # use object id as domain - __letsencrypt_cert example.com \ - --admin-email root@example.com \ - --automatic-renewal \ - --renew-hook "service nginx reload" \ - --webroot /data/letsencrypt/root - -.. code-block:: sh - - # domain parameter is specified so object id is not used as domain - # and example.com needs to be included again with domain parameter - __letsencrypt_cert example.com \ - --admin-email root@example.com \ - --automatic-renewal \ - --domain example.com \ - --domain foo.example.com \ - --domain bar.example.com \ - --renew-hook "service nginx reload" \ - --webroot /data/letsencrypt/root - -AUTHORS -------- - -| Nico Schottelius -| Kamila Součková -| Darko Poljak -| Ľubomír Kučera - -COPYING -------- - -Copyright \(C) 2017-2018 Nico Schottelius, Kamila Součková, Darko Poljak and -Ľubomír Kučera. You can redistribute it and/or modify it under the terms of -the GNU General Public License as published by the Free Software Foundation, -either version 3 of the License, or (at your option) any later version. diff --git a/cdist/conf/type/__letsencrypt_cert/manifest b/cdist/conf/type/__letsencrypt_cert/manifest deleted file mode 100755 index d598949e..00000000 --- a/cdist/conf/type/__letsencrypt_cert/manifest +++ /dev/null @@ -1,105 +0,0 @@ -#!/bin/sh - -certbot_fullpath="$(cat "${__object:?}/explorer/certbot-path")" - -if [ -z "${certbot_fullpath}" ]; then - os="$(cat "${__global:?}/explorer/os")" - os_version="$(cat "${__global}/explorer/os_version")" - - case "$os" in - debian) - case "$os_version" in - 8*) - __apt_source jessie-backports \ - --uri http://http.debian.net/debian \ - --distribution jessie-backports \ - --component main - - require="__apt_source/jessie-backports" __package_apt python-certbot \ - --target-release jessie-backports - require="__apt_source/jessie-backports" __package_apt certbot \ - --target-release jessie-backports - # Seems to be a missing dependency on debian 8 - __package python-ndg-httpsclient - ;; - 9*) - __apt_source stretch-backports \ - --uri http://http.debian.net/debian \ - --distribution stretch-backports \ - --component main - - require="__apt_source/stretch-backports" __package_apt python-certbot \ - --target-release stretch-backports - require="__apt_source/stretch-backports" __package_apt certbot \ - --target-release stretch-backports - ;; - *) - echo "Unsupported OS version: $os_version" >&2 - exit 1 - ;; - esac - - certbot_fullpath=/usr/bin/certbot - ;; - devuan) - case "$os_version" in - jessie) - __apt_source jessie-backports \ - --uri http://auto.mirror.devuan.org/merged \ - --distribution jessie-backports \ - --component main - - require="__apt_source/jessie-backports" __package_apt python-certbot \ - --target-release jessie-backports - require="__apt_source/jessie-backports" __package_apt certbot \ - --target-release jessie-backports - # Seems to be a missing dependency on debian 8 - __package python-ndg-httpsclient - ;; - ascii*) - __apt_source ascii-backports \ - --uri http://auto.mirror.devuan.org/merged \ - --distribution ascii-backports \ - --component main - - require="__apt_source/ascii-backports" __package_apt certbot \ - --target-release ascii-backports - ;; - bewoulf*) - __package_apt certbot - ;; - *) - echo "Unsupported OS version: $os_version" >&2 - exit 1 - ;; - esac - - certbot_fullpath=/usr/bin/certbot - ;; - freebsd) - __package py27-certbot - - certbot_fullpath=/usr/local/bin/certbot - ;; - *) - echo "Unsupported os: $os" >&2 - exit 1 - ;; - esac -fi - -if [ -f "${__object}/parameter/automatic-renewal" ]; then - renew_hook_param="${__object}/parameter/renew-hook" - renew_hook="" - if [ -f "${renew_hook_param}" ]; then - while read -r hook; do - renew_hook="${renew_hook} --renew-hook \"${hook}\"" - done < "${renew_hook_param}" - fi - - __cron letsencrypt-certbot \ - --user root \ - --command "${certbot_fullpath} renew -q ${renew_hook}" \ - --hour 0 \ - --minute 47 -fi diff --git a/cdist/conf/type/__letsencrypt_cert/nonparallel b/cdist/conf/type/__letsencrypt_cert/nonparallel deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__letsencrypt_cert/parameter/boolean b/cdist/conf/type/__letsencrypt_cert/parameter/boolean deleted file mode 100644 index d5b8be99..00000000 --- a/cdist/conf/type/__letsencrypt_cert/parameter/boolean +++ /dev/null @@ -1,2 +0,0 @@ -automatic-renewal -staging diff --git a/cdist/conf/type/__letsencrypt_cert/parameter/default/state b/cdist/conf/type/__letsencrypt_cert/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__letsencrypt_cert/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__letsencrypt_cert/parameter/default/webroot b/cdist/conf/type/__letsencrypt_cert/parameter/default/webroot deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__letsencrypt_cert/parameter/optional b/cdist/conf/type/__letsencrypt_cert/parameter/optional deleted file mode 100644 index 0a63b11e..00000000 --- a/cdist/conf/type/__letsencrypt_cert/parameter/optional +++ /dev/null @@ -1,2 +0,0 @@ -state -webroot diff --git a/cdist/conf/type/__letsencrypt_cert/parameter/optional_multiple b/cdist/conf/type/__letsencrypt_cert/parameter/optional_multiple deleted file mode 100644 index 0e866d45..00000000 --- a/cdist/conf/type/__letsencrypt_cert/parameter/optional_multiple +++ /dev/null @@ -1,2 +0,0 @@ -domain -renew-hook diff --git a/cdist/conf/type/__letsencrypt_cert/parameter/required b/cdist/conf/type/__letsencrypt_cert/parameter/required deleted file mode 100644 index bfe77226..00000000 --- a/cdist/conf/type/__letsencrypt_cert/parameter/required +++ /dev/null @@ -1 +0,0 @@ -admin-email diff --git a/cdist/conf/type/__line/explorer/state b/cdist/conf/type/__line/explorer/state deleted file mode 100755 index 2ef252c8..00000000 --- a/cdist/conf/type/__line/explorer/state +++ /dev/null @@ -1,95 +0,0 @@ -#!/bin/sh -e -# -# 2018 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -if [ -f "$__object/parameter/before" ]; then - position="before" -elif [ -f "$__object/parameter/after" ]; then - position="after" -else - # By default we append to the end of the file. - position="end" -fi - -if [ -f "$__object/parameter/regex" ]; then - needle="regex" -else - needle="line" -fi - -if [ -f "$__object/parameter/file" ]; then - file="$(cat "$__object/parameter/file")" -else - file="/$__object_id" -fi - -if [ ! -f "$file" ]; then - echo "file_missing" - exit 0 -fi - -awk -v position="$position" -v needle="$needle" ' -function _find(_text, _pattern) { - if (needle == "regex") { - return match(_text, _pattern) - } else { - return index(_text, _pattern) - } -} -BEGIN { - getline anchor < (ENVIRON["__object"] "/parameter/" position) - getline pattern < (ENVIRON["__object"] "/parameter/" needle) - state = "absent" -} -{ - if (position == "after") { - if (match($0, anchor)) { - getline - if (_find($0, pattern)) { - state = "present" - } - else { - state = "wrongposition" - } - exit 0 - } - } - else if (position == "before") { - if (_find($0, pattern)) { - getline - if (match($0, anchor)) { - state = "present" - } - else { - state = "wrongposition" - } - exit 0 - } - } - else { - if (_find($0, pattern)) { - state = "present" - exit 0 - } - } -} -END { - print state -} -' "$file" diff --git a/cdist/conf/type/__line/gencode-remote b/cdist/conf/type/__line/gencode-remote deleted file mode 100755 index 03e90c1b..00000000 --- a/cdist/conf/type/__line/gencode-remote +++ /dev/null @@ -1,128 +0,0 @@ -#!/bin/sh -e -# -# 2018 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -if [ -f "$__object/parameter/before" ] && [ -f "$__object/parameter/after" ]; then - echo "Use either --before OR --after but not both." >&2 - exit 1 -fi - -state_should="$(cat "$__object/parameter/state")" -state_is="$(cat "$__object/explorer/state")" - -if [ "$state_should" = "$state_is" ]; then - # nothing to do - exit 0 -fi - -if [ -f "$__object/parameter/before" ]; then - position="before" -elif [ -f "$__object/parameter/after" ]; then - position="after" -else - # By default we append to the end of the file. - position="end" -fi - -if [ -f "$__object/parameter/regex" ]; then - needle="regex" -else - needle="line" -fi - -if [ -f "$__object/parameter/file" ]; then - file="$(cat "$__object/parameter/file")" -else - file="/$__object_id" -fi - -add=0 -remove=0 -case "$state_should" in - present) - if [ "$state_is" = "wrongposition" ]; then - echo updated >> "$__messages_out" - remove=1 - else - echo added >> "$__messages_out" - fi - add=1 - ;; - absent) - echo removed >> "$__messages_out" - remove=1 - ;; -esac - -cat << DONE -tmpfile=\$(mktemp ${file}.cdist.XXXXXXXXXX) -# preserve ownership and permissions of existing file -if [ -f "$file" ]; then - cp -p "$file" "\$tmpfile" -fi - -awk -v position="$position" -v needle="$needle" -v remove=$remove -v add=$add ' -function _find(_text, _pattern) { - if (needle == "regex") { - return match(_text, _pattern) - } else { - return index(_text, _pattern) - } -} -BEGIN { - line_file = ENVIRON["__object"] "/parameter/line" - getline line < line_file - # Need to close line file as it may be re-read as pattern below. - close(line_file) - getline pattern < (ENVIRON["__object"] "/parameter/" needle) - getline anchor < (ENVIRON["__object"] "/parameter/" position) -} -{ - if (remove) { - if (_find(\$0, pattern)) { - # skip over this line -> remove it - next - } - } - if (add) { - if (anchor && match(\$0, anchor)) { - if (position == "before") { - print line - print - } else if (position == "after") { - print - print line - } - next - } - } - print -} -END { - if (add && position == "end") { - print line - } -} -' "$file" > "\$tmpfile" -mv -f "\$tmpfile" "$file" -DONE - -if [ -f "$__object/parameter/onchange" ]; then - cat "$__object/parameter/onchange" -fi diff --git a/cdist/conf/type/__line/man.rst b/cdist/conf/type/__line/man.rst deleted file mode 100644 index f76cab64..00000000 --- a/cdist/conf/type/__line/man.rst +++ /dev/null @@ -1,116 +0,0 @@ -cdist-type__line(7) -=================== - -NAME ----- -cdist-type__line - Manage lines in files - - -DESCRIPTION ------------ -This cdist type allows you to add lines and remove lines from files. - - -REQUIRED PARAMETERS -------------------- -None. - - -OPTIONAL PARAMETERS -------------------- -after - Insert the given line after this pattern. - -before - Insert the given line before this pattern. - -file - If supplied, use this as the destination file. - Otherwise the object_id is used. - -line - Specifies the line which should be absent or present. - - Must be present, if state is 'present'. - Ignored if regex is given and state is 'absent'. - -regex - If state is 'present', search for this pattern and if it matches add - the given line. - - If state is 'absent', ensure all lines matching the regular expression - are absent. - - The regular expression is interpreted by awk's match function. - -state - 'present' or 'absent', defaults to 'present' - -onchange - The code to run if line is added, removed or updated. - - -BOOLEAN PARAMETERS ------------------- -None. - - -MESSAGES --------- -added - The line was added. - -updated - The line or its position was changed. - -removed - The line was removed. - - -EXAMPLES --------- - -.. code-block:: sh - - # Manage a hosts entry for www.example.com. - __line /etc/hosts \ - --line '127.0.0.2 www.example.com' - - # Manage another hosts entry for test.example.com. - __line hosts:test.example.com \ - --file /etc/hosts \ - --line '127.0.0.3 test.example.com' - - # Remove the line starting with TIMEZONE from the /etc/rc.conf file. - __line legacy_timezone \ - --file /etc/rc.conf \ - --regex 'TIMEZONE=.*' \ - --state absent - - # Insert a line before another one. - __line password-auth-local:classify \ - --file /etc/pam.d/password-auth-local \ - --line '-session required pam_exec.so debug log=/tmp/classify.log /usr/local/libexec/classify' \ - --before '^session[[:space:]]+include[[:space:]]+password-auth-ac$' - - # Insert a line after another one. - __line password-auth-local:classify \ - --file /etc/pam.d/password-auth-local \ - --line '-session required pam_exec.so debug log=/tmp/classify.log /usr/local/libexec/classify' \ - --after '^session[[:space:]]+include[[:space:]]+password-auth-ac$' - - -SEE ALSO --------- -:strong:`cdist-type`\ (7) - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2018 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__line/parameter/default/state b/cdist/conf/type/__line/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__line/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__line/parameter/optional b/cdist/conf/type/__line/parameter/optional deleted file mode 100644 index 1c34c699..00000000 --- a/cdist/conf/type/__line/parameter/optional +++ /dev/null @@ -1,7 +0,0 @@ -after -before -file -line -regex -state -onchange diff --git a/cdist/conf/type/__link/explorer/state b/cdist/conf/type/__link/explorer/state deleted file mode 100755 index 7150df25..00000000 --- a/cdist/conf/type/__link/explorer/state +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/sh -# -# 2012-2014 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -destination="/$__object_id" -type="$(cat "$__object/parameter/type")" -source="$(cat "$__object/parameter/source")" - -# no destination? -> state is absent -if [ ! -e "$destination" ]; then - echo absent - exit 0 -fi - -destination_dir="${destination%/*}" - -case "$type" in - symbolic) - cd "$destination_dir" || exit 1 - if [ -h "$destination" ]; then - source_is=$(readlink "$destination") - # ignore trailing slashes for comparison - if [ "${source_is%/}" = "${source%/}" ]; then - echo present - else - echo wrongsource - fi - else - echo absent - fi - ;; - hard) - cd "$destination_dir" || exit 1 - # check source relative to destination_dir - if [ ! -e "$source" ]; then - echo sourcemissing - exit 0 - fi - # Currently not worth the effor to change it, stat is not defined by POSIX - # and different OSes has different implementations for it. - # shellcheck disable=SC2012 - destination_inode=$(ls -i "$destination" | awk '{print $1}') - # Currently not worth the effor to change it, stat is not defined by POSIX - # and different OSes has different implementations for it. - # shellcheck disable=SC2012 - source_inode=$(ls -i "$source" | awk '{print $1}') - if [ "$destination_inode" -eq "$source_inode" ]; then - echo present - else - echo absent - fi - ;; - *) - echo "Unknown type: $type" >&2 - exit 1 - ;; -esac diff --git a/cdist/conf/type/__link/explorer/type b/cdist/conf/type/__link/explorer/type deleted file mode 100755 index b322bf42..00000000 --- a/cdist/conf/type/__link/explorer/type +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh -# -# 2013 Steven Armstrong (steven-cdist armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Mostly a wrapper for ln -# - -destination="/$__object_id" - -if [ ! -e "$destination" ]; then - echo none -elif [ -h "$destination" ]; then - echo symlink -elif [ -f "$destination" ]; then - type="$(cat "$__object/parameter/type")" - case "$type" in - hard) - # Currently not worth the effor to change it, stat is not defined by POSIX - # and different OSes has different implementations for it. - # shellcheck disable=SC2012 - link_count=$(ls -l "$destination" | awk '{ print $2 }') - if [ "$link_count" -gt 1 ]; then - echo hardlink - exit 0 - fi - ;; - esac - echo file -elif [ -d "$destination" ]; then - echo directory -else - echo unknown -fi diff --git a/cdist/conf/type/__link/gencode-remote b/cdist/conf/type/__link/gencode-remote deleted file mode 100755 index 45c22fcc..00000000 --- a/cdist/conf/type/__link/gencode-remote +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/sh -e -# -# 2011-2012 Nico Schottelius (nico-cdist at schottelius.org) -# 2013-2014 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -destination="/$__object_id" - -type="$(cat "$__object/parameter/type")" -source="$(cat "$__object/parameter/source")" - -case "$type" in - symbolic) - lnopt="-s" - ;; - hard) - lnopt="" - ;; - *) - echo "Unknown link type: $type" >&2 - exit 1 - ;; -esac - -state_is="$(cat "$__object/explorer/state")" -state_should="$(cat "$__object/parameter/state")" - -[ "$state_should" = "$state_is" ] && exit 0 - -file_type="$(cat "$__object/explorer/type")" -case "$state_should" in - present) - if [ "$file_type" = "directory" ]; then - # our destination is currently a directory, delete it - printf 'rm -rf "%s" &&\n' "$destination" - echo "removed '$destination' (directory)" >> "$__messages_out" - else - if [ "$state_is" = "wrongsource" ]; then - # our destination is a symlink but points to the wrong source, - # delete it - printf 'rm -f "%s" &&\n' "$destination" - echo "removed '$destination' (wrongsource)" >> "$__messages_out" - fi - fi - - # create our link - printf 'ln %s -f "%s" "%s"\n' "$lnopt" "$source" "$destination" - echo "created '$destination'" >> "$__messages_out" - ;; - absent) - # only delete if it is a sym/hard link - if [ "$file_type" = "symlink" ] || [ "$file_type" = "hardlink" ]; then - printf 'rm -f "%s"\n' "$destination" - echo "removed '$destination'" >> "$__messages_out" - fi - ;; - *) - echo "Unknown state: $state_should" >&2 - exit 1 - ;; -esac diff --git a/cdist/conf/type/__link/man.rst b/cdist/conf/type/__link/man.rst deleted file mode 100644 index fe0ce425..00000000 --- a/cdist/conf/type/__link/man.rst +++ /dev/null @@ -1,76 +0,0 @@ -cdist-type__link(7) -=================== - -NAME ----- -cdist-type__link - Manage links (hard and symbolic) - - -DESCRIPTION ------------ -This cdist type allows you to manage hard and symbolic links. -The given object id is the destination for the link. - - -REQUIRED PARAMETERS -------------------- -source - Specifies the link source. - -type - Specifies the link type: Either hard or symoblic. - - -OPTIONAL PARAMETERS -------------------- -state - 'present' or 'absent', defaults to 'present' - - -MESSAGES --------- - -created - Link to destination was created. - -removed - Link to destination was removed. - -removed (directory) - Destination was removed because state is ``present`` and destination was directory. - -removed (wrongsource) - Destination was removed because state is ``present`` and destination link source was wrong. - - -EXAMPLES --------- - -.. code-block:: sh - - # Create hard link of /etc/shadow - __link /root/shadow --source /etc/shadow --type hard - - # Relative symbolic link - __link /etc/apache2/sites-enabled/www.test.ch \ - --source ../sites-available/www.test.ch \ - --type symbolic - - # Absolute symbolic link - __link /opt/plone --source /home/services/plone --type symbolic - - # Remove link - __link /opt/plone --state absent - - -AUTHORS -------- -Nico Schottelius - - -COPYING -------- -Copyright \(C) 2011-2012 Nico Schottelius. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__link/parameter/default/state b/cdist/conf/type/__link/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__link/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__locale/files/locale.gen b/cdist/conf/type/__locale/files/locale.gen deleted file mode 100644 index cf8e8651..00000000 --- a/cdist/conf/type/__locale/files/locale.gen +++ /dev/null @@ -1,3 +0,0 @@ -de_CH.UTF-8 UTF-8 -de_DE.UTF-8 UTF-8 -en_US.UTF-8 UTF-8 diff --git a/cdist/conf/type/__locale/gencode-remote b/cdist/conf/type/__locale/gencode-remote deleted file mode 100755 index 1feb9884..00000000 --- a/cdist/conf/type/__locale/gencode-remote +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/sh -e -# -# 2013-2019 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Let localedef do the magic -# - -locale="$__object_id" - -# Hardcoded, create a pull request with -# branching on $os in case it is at another location -alias=/usr/share/locale/locale.alias - -input=$(echo "$locale" | cut -d . -f 1) -charmap=$(echo "$locale" | cut -d . -f 2) - -# Adding locale? The name is de_CH.UTF-8 -# Removing locale? The name is de_CH.utf8. -# W-T-F! -locale_remove=$(echo "$locale" | sed 's/UTF-8/utf8/') - -state=$(cat "$__object/parameter/state") - -os=$(cat "$__global/explorer/os") - -# Nothing to be done on alpine -case "$os" in - alpine) - exit 0 - ;; -esac - -case "$state" in - present) - echo localedef -A "$alias" -f "$charmap" -i "$input" "$locale" - ;; - absent) - echo localedef --delete-from-archive "$locale_remove" - ;; - *) - echo "Unsupported state: $state" >&2 - exit 1 - ;; -esac diff --git a/cdist/conf/type/__locale/man.rst b/cdist/conf/type/__locale/man.rst deleted file mode 100644 index e36ab061..00000000 --- a/cdist/conf/type/__locale/man.rst +++ /dev/null @@ -1,50 +0,0 @@ -cdist-type__locale(7) -===================== - -NAME ----- -cdist-type__locale - Configure locales - - -DESCRIPTION ------------ -This cdist type allows you to setup locales. On systems that don't -support locale setting like alpine/musl libc, it is a no-op. - - -OPTIONAL PARAMETERS -------------------- -state - 'present' or 'absent', defaults to present - - -EXAMPLES --------- - -.. code-block:: sh - - # Add locale de_CH.UTF-8 - __locale de_CH.UTF-8 - - # Same as above, but more explicit - __locale de_CH.UTF-8 --state present - - # Remove colourful British English - __locale en_GB.UTF-8 --state absent - - -SEE ALSO --------- -:strong:`locale`\ (1), :strong:`localedef`\ (1), :strong:`cdist-type__locale_system`\ (7) - - -AUTHORS -------- -Nico Schottelius - - -COPYING -------- -Copyright \(C) 2013-2019 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License version 3 or -later (GPLv3+). diff --git a/cdist/conf/type/__locale/manifest b/cdist/conf/type/__locale/manifest deleted file mode 100755 index 9f1e17ac..00000000 --- a/cdist/conf/type/__locale/manifest +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh -e -# -# 2013-2019 Nico Schottelius (nico-cdist at schottelius.org) -# 2015 David Hürlimann (david at ungleich.ch) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Install required packages -# - -os=$(cat "$__global/explorer/os") - - -case "$os" in - debian|devuan) - # Debian needs a seperate package - __package locales --state present - ;; - archlinux|suse|ubuntu|scientific|centos|alpine) - : - ;; - *) - echo "Sorry, do not know how to handle os: $os" >&2 - echo "Please edit the type ${__type##*/} to fix this." >&2 - exit 1 - ;; -esac diff --git a/cdist/conf/type/__locale/parameter/default/state b/cdist/conf/type/__locale/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__locale/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__locale_system/man.rst b/cdist/conf/type/__locale_system/man.rst deleted file mode 100644 index 03d36960..00000000 --- a/cdist/conf/type/__locale_system/man.rst +++ /dev/null @@ -1,64 +0,0 @@ -cdist-type__locale_system(7) -============================ - -NAME ----- -cdist-type__locale_system - Set system-wide locale - - -DESCRIPTION ------------ -This cdist type allows you to modify system-wide locale. -The name of the locale category is given as the object id -(usually you are probably interested in using LANG). - - -OPTIONAL PARAMETERS -------------------- - -state - present or absent, defaults to present. - If present, sets the locale category to the given value. - If absent, removes the locale category from the system file. - -value - The value for the locale category. - Defaults to en_US.UTF-8. - - -EXAMPLES --------- - -.. code-block:: sh - - # Set LANG to en_US.UTF-8 - __locale_system LANG - - # Same as above, but more explicit - __locale_system LANG --value en_US.UTF-8 - - # Set category LC_MESSAGES to de_CH.UTF-8 - __locale_system LC_MESSAGES --value de_CH.UTF-8 - - # Remove setting for LC_ALL - __locale_system LC_ALL --state absent - - - -SEE ALSO --------- -:strong:`locale`\ (1), :strong:`localedef`\ (1), :strong:`cdist-type__locale`\ (7) - - -AUTHORS -------- -| Steven Armstrong -| Carlos Ortigoza -| Nico Schottelius - - -COPYING -------- -Copyright \(C) 2016 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License version 3 or -later (GPLv3+). diff --git a/cdist/conf/type/__locale_system/manifest b/cdist/conf/type/__locale_system/manifest deleted file mode 100755 index 80f7401b..00000000 --- a/cdist/conf/type/__locale_system/manifest +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/sh -e -# -# 2012-2016 Steven Armstrong (steven-cdist at armstrong.cc) -# 2016 Carlos Ortigoza (carlos.ortigoza at ungleich.ch) -# 2016 Nico Schottelius (nico.schottelius at ungleich.ch) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Configure system-wide locale by modifying i18n file. -# - -os=$(cat "$__global/explorer/os") - -case "$os" in - debian|ubuntu) - locale_conf="/etc/default/locale" - ;; - archlinux) - locale_conf="/etc/locale.conf" - ;; - redhat|centos) - locale_conf="/etc/sysconfig/i18n" - ;; - *) - echo "Your operating system ($os) is currently not supported by this type (${__type##*/})." >&2 - echo "Please contribute an implementation for it if you can." >&2 - exit 1 - ;; -esac - -__file "$locale_conf" \ - --owner root --group root --mode 644 \ - --state exists - -require="__file/$locale_conf" \ - __key_value "$locale_conf:$__object_id" \ - --file "$locale_conf" \ - --key "$__object_id" \ - --delimiter = \ - --state "$(cat "$__object/parameter/state")" \ - --value "$(cat "$__object/parameter/value")" diff --git a/cdist/conf/type/__locale_system/parameter/default/state b/cdist/conf/type/__locale_system/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__locale_system/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__locale_system/parameter/default/value b/cdist/conf/type/__locale_system/parameter/default/value deleted file mode 100644 index 927508f3..00000000 --- a/cdist/conf/type/__locale_system/parameter/default/value +++ /dev/null @@ -1 +0,0 @@ -en_US.UTF-8 diff --git a/cdist/conf/type/__locale_system/parameter/optional b/cdist/conf/type/__locale_system/parameter/optional deleted file mode 100644 index d0460d86..00000000 --- a/cdist/conf/type/__locale_system/parameter/optional +++ /dev/null @@ -1,2 +0,0 @@ -state -value diff --git a/cdist/conf/type/__motd/gencode-remote b/cdist/conf/type/__motd/gencode-remote deleted file mode 100755 index bc842cc8..00000000 --- a/cdist/conf/type/__motd/gencode-remote +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -e -# -# 2013 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -os=$(cat "$__global/explorer/os") - -case "$os" in - debian|ubuntu|devuan) - - # Debian and Ubuntu need to be updated, - # as seen in /etc/init.d/bootlogs - echo "uname -snrvm > /var/run/motd" - echo "cat /etc/motd.tail >> /var/run/motd" - ;; - *) - exit 0 - ;; -esac diff --git a/cdist/conf/type/__motd/singleton b/cdist/conf/type/__motd/singleton deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__mount/gencode-remote b/cdist/conf/type/__mount/gencode-remote deleted file mode 100755 index b2096764..00000000 --- a/cdist/conf/type/__mount/gencode-remote +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh -e -# -# 2014 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -path="$(cat "$__object/parameter/path" 2>/dev/null || echo "/$__object_id")" -state_should="$(cat "$__object/parameter/state")" -state_is="$(grep -q -x yes "$__object/explorer/mounted" && echo present || echo absent)" - -if [ "$state_should" = "$state_is" ]; then - # nothing to do - exit 0 -fi - -case "$state_should" in - present) - if [ -f "$__object/parameter/nofstab" ]; then - # mount manually - printf 'mount' - if [ -f "$__object/parameter/type" ]; then - printf ' -t %s' "$(cat "$__object/parameter/type")" - fi - if [ -f "$__object/parameter/options" ]; then - printf ' -o %s' "$(cat "$__object/parameter/options")" - fi - printf ' %s' "$(cat "$__object/parameter/device")" - printf ' %s\n' "$path" - else - # mount using existing fstab entry - printf 'mount "%s"\n' "$path" - fi - ;; - absent) - printf 'umount "%s"\n' "$path" - ;; -esac diff --git a/cdist/conf/type/__mount/man.rst b/cdist/conf/type/__mount/man.rst deleted file mode 100644 index d719a1cd..00000000 --- a/cdist/conf/type/__mount/man.rst +++ /dev/null @@ -1,84 +0,0 @@ -cdist-type__mount(7) -==================== - -NAME ----- -cdit-type__mount - Manage filesystem mounts - - -DESCRIPTION ------------ -Manage filesystem mounts either via /etc/fstab or manually. - - -REQUIRED PARAMETERS -------------------- -None. - - -OPTIONAL PARAMETERS -------------------- -device - device to mount at path, defaults to 'none'. see mount(8) - -dump - value for the dump field in fstab. see fstab(5) - defaults to 0. - - This parameter is ignored, if the nofstab parameter is given. - -options - comma separated string of options, see mount(8) - -pass - value for the pass field in fstab. see fstab(5) - defaults to 0. - - This parameter is ignored, if the nofstab parameter is given. - -path - mount point where to mount the device, see mount(8). - Defaults to __object_id - -state - either present or absent. Defaults to present. - -type - vfstype, see mount(8) - - -BOOLEAN PARAMETERS ------------------- -nofstab - do not manage an entry in /etc/fstab - - -EXAMPLES --------- - -.. code-block:: sh - - __mount /some/dir \ - --device /dev/sdc3 \ - --type xfs \ - --options "defaults,ro" - --dump 0 \ - --pass 1 - - __mount /var/lib/one \ - --device mfsmount \ - --type fuse \ - --options "mfsmaster=mfsmaster.domain.tld,mfssubfolder=/one,nonempty,_netdev" - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2014 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__mount/manifest b/cdist/conf/type/__mount/manifest deleted file mode 100755 index 999d806c..00000000 --- a/cdist/conf/type/__mount/manifest +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh -e -# -# 2014 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -path="$(cat "$__object/parameter/path" 2>/dev/null || echo "/$__object_id")" -state="$(cat "$__object/parameter/state")" - -if [ ! -f "$__object/parameter/nofstab" ]; then - # Generate an entry for /etc/fstab - ( -printf "%s" "$(cat "$__object/parameter/device")" -printf " %s" "$path" -type="$(cat "$__object/parameter/type")" -printf " %s" "$type" -options="$(cat "$__object/parameter/options")" -printf " %s" "$options" -printf " %s" "$(cat "$__object/parameter/dump")" -printf ' %s\n' "$(cat "$__object/parameter/pass")" -) | \ -__block "$__object_name" \ - --file "/etc/fstab" \ - --prefix "#cdist:$__object_name" \ - --suffix "#/cdist:$__object_name" \ - --state "$state" \ - --text - -fi diff --git a/cdist/conf/type/__mount/parameter/boolean b/cdist/conf/type/__mount/parameter/boolean deleted file mode 100644 index ac6f41a8..00000000 --- a/cdist/conf/type/__mount/parameter/boolean +++ /dev/null @@ -1 +0,0 @@ -nofstab diff --git a/cdist/conf/type/__mount/parameter/default/device b/cdist/conf/type/__mount/parameter/default/device deleted file mode 100644 index 621e94f0..00000000 --- a/cdist/conf/type/__mount/parameter/default/device +++ /dev/null @@ -1 +0,0 @@ -none diff --git a/cdist/conf/type/__mount/parameter/default/dump b/cdist/conf/type/__mount/parameter/default/dump deleted file mode 100644 index 573541ac..00000000 --- a/cdist/conf/type/__mount/parameter/default/dump +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/cdist/conf/type/__mount/parameter/default/options b/cdist/conf/type/__mount/parameter/default/options deleted file mode 100644 index e94f8140..00000000 --- a/cdist/conf/type/__mount/parameter/default/options +++ /dev/null @@ -1 +0,0 @@ -defaults diff --git a/cdist/conf/type/__mount/parameter/default/pass b/cdist/conf/type/__mount/parameter/default/pass deleted file mode 100644 index 573541ac..00000000 --- a/cdist/conf/type/__mount/parameter/default/pass +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/cdist/conf/type/__mount/parameter/default/state b/cdist/conf/type/__mount/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__mount/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__mount/parameter/default/type b/cdist/conf/type/__mount/parameter/default/type deleted file mode 100644 index 865faf10..00000000 --- a/cdist/conf/type/__mount/parameter/default/type +++ /dev/null @@ -1 +0,0 @@ -auto diff --git a/cdist/conf/type/__mount/parameter/optional b/cdist/conf/type/__mount/parameter/optional deleted file mode 100644 index 29d3e5ef..00000000 --- a/cdist/conf/type/__mount/parameter/optional +++ /dev/null @@ -1,7 +0,0 @@ -device -dump -options -pass -path -state -type diff --git a/cdist/conf/type/__mysql_database/gencode-remote b/cdist/conf/type/__mysql_database/gencode-remote deleted file mode 100755 index 23e51b05..00000000 --- a/cdist/conf/type/__mysql_database/gencode-remote +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh -e -# -# 2012 Benedikt Koeppel (code@benediktkoeppel.ch) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -# if --database was specified -if [ -f "$__object/parameter/name" ]; then - database="$(cat "$__object/parameter/name")" -else # otherwise use the object id as database name - database="$__object_id" -fi - -cat <<-EOFF -mysql -u root <<-EOF - CREATE DATABASE IF NOT EXISTS $database -EOF -EOFF - -# if --user was specified -if [ -f "$__object/parameter/user" ]; then - user="$(cat "$__object/parameter/user")" - - # if --password was specified - if [ -f "$__object/parameter/password" ]; then - password="$(cat "$__object/parameter/password")" - cat <<-EOFF - mysql -u root <<-EOF - GRANT ALL PRIVILEGES ON $database.* to '$user'@'localhost' IDENTIFIED BY '$password'; -EOF -EOFF - else - cat <<-EOFF - mysql -u root <<-EOF - GRANT ALL PRIVILEGES ON $database.* to '$user'@'localhost'; -EOF -EOFF - fi -fi diff --git a/cdist/conf/type/__mysql_database/man.rst b/cdist/conf/type/__mysql_database/man.rst deleted file mode 100644 index 1e245a08..00000000 --- a/cdist/conf/type/__mysql_database/man.rst +++ /dev/null @@ -1,49 +0,0 @@ -cdist-type__mysql_database(7) -============================= - -NAME ----- -cdist-type__mysql_database - Manage a MySQL database - - -DESCRIPTION ------------ -This cdist type allows you to install a MySQL database. - - -REQUIRED PARAMETERS -------------------- -None. - -OPTIONAL PARAMETERS -------------------- -name - The name of the database to install - defaults to the object id - -user - A user that should have access to the database - -password - The password for the user who manages the database - - -EXAMPLES --------- - -.. code-block:: sh - - __mysql_database "cdist" --name "cdist" --user "myuser" --password "mypwd" - - -AUTHORS -------- -Benedikt Koeppel - - -COPYING -------- -Copyright \(C) 2012 Benedikt Koeppel. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__mysql_database/parameter/optional b/cdist/conf/type/__mysql_database/parameter/optional deleted file mode 100644 index 756afee7..00000000 --- a/cdist/conf/type/__mysql_database/parameter/optional +++ /dev/null @@ -1,3 +0,0 @@ -name -user -password diff --git a/cdist/conf/type/__package/man.rst b/cdist/conf/type/__package/man.rst deleted file mode 100644 index fc36402b..00000000 --- a/cdist/conf/type/__package/man.rst +++ /dev/null @@ -1,64 +0,0 @@ -cdist-type__package(7) -====================== - -NAME ----- -cdist-type__package - Manage packages - - -DESCRIPTION ------------ -This cdist type allows you to install or uninstall packages on the target. -It dispatches the actual work to the package system dependent types. - - -REQUIRED PARAMETERS -------------------- -None - - -OPTIONAL PARAMETERS -------------------- -name - The name of the package to install. Default is to use the object_id as the - package name. -version - The version of the package to install. Default is to install the version - chosen by the local package manager. -type - The package type to use. Default is determined based on the $os explorer - variable. - e.g. - * __package_apt for Debian - * __package_emerge for Gentoo - -state - Either "present" or "absent", defaults to "present" - - -EXAMPLES --------- - -.. code-block:: sh - - # Install the package vim on the target - __package vim --state present - - # Same but install specific version - __package vim --state present --version 7.3.50 - - # Force use of a specific package type - __package vim --state present --type __package_apt - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2011 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__package/nonparallel b/cdist/conf/type/__package/nonparallel deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__package/parameter/boolean b/cdist/conf/type/__package/parameter/boolean deleted file mode 100644 index effcb218..00000000 --- a/cdist/conf/type/__package/parameter/boolean +++ /dev/null @@ -1 +0,0 @@ -upgrade diff --git a/cdist/conf/type/__package/parameter/default/state b/cdist/conf/type/__package/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__package/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__package/parameter/optional b/cdist/conf/type/__package/parameter/optional deleted file mode 100644 index bb3f5154..00000000 --- a/cdist/conf/type/__package/parameter/optional +++ /dev/null @@ -1,7 +0,0 @@ -name -version -type -pkgsite -state -ptype -repo diff --git a/cdist/conf/type/__package_apk/explorer/state b/cdist/conf/type/__package_apk/explorer/state deleted file mode 100755 index b477ca7c..00000000 --- a/cdist/conf/type/__package_apk/explorer/state +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh -# -# 2019 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Retrieve the status of a package - parsed apk output -# - -if [ -f "$__object/parameter/name" ]; then - name="$(cat "$__object/parameter/name")" -else - name="$__object_id" -fi - -# Remove the @.. repo tag for finding out whether it is installed -# f.i. pass@testing => pass -name="$(echo "$name" | sed 's/@.*//')" - -if [ "$(apk list -I "$name")" ]; then - echo present -else - echo absent -fi diff --git a/cdist/conf/type/__package_apk/gencode-remote b/cdist/conf/type/__package_apk/gencode-remote deleted file mode 100755 index 79e3d2b6..00000000 --- a/cdist/conf/type/__package_apk/gencode-remote +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh -e -# -# 2019 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Manage packages on Debian and co. -# - -if [ -f "$__object/parameter/name" ]; then - name="$(cat "$__object/parameter/name")" -else - name="$__object_id" -fi - -state_should="$(cat "$__object/parameter/state")" -state_is="$(cat "$__object/explorer/state")" - -# Nothing to be done -[ "$state_is" = "$state_should" ] && exit 0 - -case "$state_should" in - present) - echo "apk add -q '$name'" - echo "installed" >> "$__messages_out" - ;; - absent) - echo "apk del -q '$name'" - echo "removed" >> "$__messages_out" - ;; - *) - echo "Unknown state: $state_should" >&2 - exit 1 - ;; -esac diff --git a/cdist/conf/type/__package_apk/man.rst b/cdist/conf/type/__package_apk/man.rst deleted file mode 100644 index bc2408b4..00000000 --- a/cdist/conf/type/__package_apk/man.rst +++ /dev/null @@ -1,55 +0,0 @@ -cdist-type__package_akp(7) -========================== - -NAME ----- -cdist-type__package_akp - Manage packages with akp - - -DESCRIPTION ------------ -apk is usually used on Alpine to manage packages. - - -REQUIRED PARAMETERS -------------------- -None - - -OPTIONAL PARAMETERS -------------------- -name - If supplied, use the name and not the object id as the package name. - -state - Either "present" or "absent", defaults to "present" - - -EXAMPLES --------- - -.. code-block:: sh - - # Ensure zsh in installed - __package_apk zsh --state present - - # Remove package - __package_apk apache2 --state absent - - -SEE ALSO --------- -:strong:`cdist-type__package`\ (7) - - -AUTHORS -------- -Nico Schottelius - - -COPYING -------- -Copyright \(C) 2019 Nico Schottelius. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__package_apk/nonparallel b/cdist/conf/type/__package_apk/nonparallel deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__package_apk/parameter/default/state b/cdist/conf/type/__package_apk/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__package_apk/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__package_apk/parameter/optional b/cdist/conf/type/__package_apk/parameter/optional deleted file mode 100644 index 1b423dc4..00000000 --- a/cdist/conf/type/__package_apk/parameter/optional +++ /dev/null @@ -1,2 +0,0 @@ -name -state diff --git a/cdist/conf/type/__package_apt/explorer/state b/cdist/conf/type/__package_apt/explorer/state deleted file mode 100755 index 7ccd6fce..00000000 --- a/cdist/conf/type/__package_apt/explorer/state +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh -# -# 2011-2012 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Retrieve the status of a package - parsed dpkg output -# - -if [ -f "$__object/parameter/name" ]; then - name="$(cat "$__object/parameter/name")" -else - name="$__object_id" -fi - -# Except dpkg failing, if package is not known / installed -packages="$(apt-cache showpkg "$name" | sed -e "1,/Reverse Provides:/d" | cut -d ' ' -f 1) $name" -for p in $packages; do - if dpkg -s "$p" 2>/dev/null | grep --quiet "^Status: install ok installed$" ; then - version=$(dpkg -s "$p" 2>/dev/null | grep "^Version:" | cut -d ' ' -f 2) - echo "present $p $version" - exit 0 - fi -done -echo absent diff --git a/cdist/conf/type/__package_apt/gencode-remote b/cdist/conf/type/__package_apt/gencode-remote deleted file mode 100755 index 699eb0c9..00000000 --- a/cdist/conf/type/__package_apt/gencode-remote +++ /dev/null @@ -1,91 +0,0 @@ -#!/bin/sh -e -# -# 2011-2013 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Manage packages on Debian and co. -# - -if [ -f "$__object/parameter/name" ]; then - name="$(cat "$__object/parameter/name")" -else - name="$__object_id" -fi - -state_should="$(cat "$__object/parameter/state")" - -version_param="$__object/parameter/version" - -version="" -if [ -f "$version_param" ]; then - version="$(cat "$version_param")" -fi - -if [ -f "$__object/parameter/target-release" ]; then - target_release="--target-release $(cat "$__object/parameter/target-release")" -else - target_release="" -fi - -if [ -f "$__object/parameter/purge-if-absent" ]; then - purgeparam="--purge" -else - purgeparam="" -fi - - -# FIXME: use grep directly, state is a list, not a line! -state_is="$(cat "$__object/explorer/state")" -case "$state_is" in - present*) - name="$(echo "$state_is" | cut -d ' ' -f 2)" - version_is="$(echo "$state_is" | cut -d ' ' -f 3)" - state_is="present" - ;; - *) - version_is="" - ;; -esac - -# Hint if we need to avoid questions at some point: -# DEBIAN_PRIORITY=critical can reduce the number of questions -aptget="DEBIAN_FRONTEND=noninteractive apt-get --quiet --yes --no-install-recommends -o Dpkg::Options::=\"--force-confdef\" -o Dpkg::Options::=\"--force-confold\"" - -if [ "$state_is" = "$state_should" ]; then - if [ -z "$version" ] || [ "$version" = "$version_is" ]; then - exit 0; - fi -fi - -case "$state_should" in - present) - if [ -n "$version" ]; then - name="${name}=${version}" - fi - echo "$aptget install $target_release '$name'" - echo "installed" >> "$__messages_out" - ;; - absent) - echo "$aptget remove $purgeparam '$name'" - echo "removed" >> "$__messages_out" - ;; - *) - echo "Unknown state: $state_should" >&2 - exit 1 - ;; -esac diff --git a/cdist/conf/type/__package_apt/man.rst b/cdist/conf/type/__package_apt/man.rst deleted file mode 100644 index a3a70d91..00000000 --- a/cdist/conf/type/__package_apt/man.rst +++ /dev/null @@ -1,74 +0,0 @@ -cdist-type__package_apt(7) -========================== - -NAME ----- -cdist-type__package_apt - Manage packages with apt-get - - -DESCRIPTION ------------ -apt-get is usually used on Debian and variants (like Ubuntu) to -manage packages. - - -REQUIRED PARAMETERS -------------------- -None - - -OPTIONAL PARAMETERS -------------------- -name - If supplied, use the name and not the object id as the package name. - -state - Either "present" or "absent", defaults to "present" - -target-release - Passed on to apt-get install, see apt-get(8). - Essentially allows you to retrieve packages from a different release - -version - The version of the package to install. Default is to install the version - chosen by the local package manager. - - -BOOLEAN PARAMETERS ------------------- -purge-if-absent - If this parameter is given when state is `absent`, the package is - purged from the system (using `--purge`). - - -EXAMPLES --------- - -.. code-block:: sh - - # Ensure zsh in installed - __package_apt zsh --state present - - # In case you only want *a* webserver, but don't care which one - __package_apt webserver --state present --name nginx - - # Remove obsolete package - __package_apt puppet --state absent - - -SEE ALSO --------- -:strong:`cdist-type__package`\ (7) - - -AUTHORS -------- -Nico Schottelius - - -COPYING -------- -Copyright \(C) 2011-2012 Nico Schottelius. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__package_apt/nonparallel b/cdist/conf/type/__package_apt/nonparallel deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__package_apt/notes.txt b/cdist/conf/type/__package_apt/notes.txt deleted file mode 100644 index 4b89f9b3..00000000 --- a/cdist/conf/type/__package_apt/notes.txt +++ /dev/null @@ -1,3 +0,0 @@ -# All you ever wanted to know about apt/apt-get -http://wiki.ubuntuusers.de/apt-get - diff --git a/cdist/conf/type/__package_apt/parameter/boolean b/cdist/conf/type/__package_apt/parameter/boolean deleted file mode 100644 index f9a0f6b0..00000000 --- a/cdist/conf/type/__package_apt/parameter/boolean +++ /dev/null @@ -1 +0,0 @@ -purge-if-absent diff --git a/cdist/conf/type/__package_apt/parameter/default/state b/cdist/conf/type/__package_apt/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__package_apt/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__package_apt/parameter/optional b/cdist/conf/type/__package_apt/parameter/optional deleted file mode 100644 index d6674f95..00000000 --- a/cdist/conf/type/__package_apt/parameter/optional +++ /dev/null @@ -1,4 +0,0 @@ -name -version -state -target-release diff --git a/cdist/conf/type/__package_dpkg/explorer/pkg_state b/cdist/conf/type/__package_dpkg/explorer/pkg_state deleted file mode 100644 index d7487ed8..00000000 --- a/cdist/conf/type/__package_dpkg/explorer/pkg_state +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -e - -package=$( basename "$__object_id" ) - -dpkg_status="$(dpkg-query --show --showformat='${db:Status-Abbrev} ${binary:Package}_${Version}_${Architecture}.deb\n' "${package%%_*}" 2>/dev/null || true)" - -if echo "$dpkg_status" | grep -q '^ii'; then - echo "${dpkg_status##* }" -fi - - diff --git a/cdist/conf/type/__package_dpkg/gencode-remote b/cdist/conf/type/__package_dpkg/gencode-remote deleted file mode 100755 index 1c271748..00000000 --- a/cdist/conf/type/__package_dpkg/gencode-remote +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh -e -# -# 2013 Tomas Pospisek (tpo_deb sourcepole.ch) -# 2018 Thomas Eckert (tom at it-eckert.de) -# -# This file is based on cdist's __file/gencode-local and part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# This __package_dpkg type does not check whether a *.deb package is -# allready installed. It just copies the *.deb package over to the -# destination and installs it. We could use __package_apt to check -# whether a *.deb package is allready installed and only install it -# if we're given a --force argument or similar (would be clever not -# to conflict with dpkg's --force options). But currently we don't -# do any checks or --force'ing. -# -state=$( cat "$__object/parameter/state" ) -package=$( basename "$__object_id" ) -state_is="$(cat "$__object/explorer/pkg_state")" -state_should="" - -[ "$state" = "absent" ] || state_should="$package" -[ "$state_is" = "$state_should" ] && exit 0 - -case "$state" in - present) - echo "dpkg --install /var/cache/apt/archives/$__object_id" - echo "installed" >> "$__messages_out" - ;; - absent) - [ -f "$__object/parameter/purge-if-absent" ] \ - && action="--purge" \ - || action="--remove" - echo "dpkg $action ${__object_id%%_*}" - echo "removed ($action)" >> "$__messages_out" - ;; - *) echo "ERROR: unknown state '$state'" >&2 ;; -esac diff --git a/cdist/conf/type/__package_dpkg/man.rst b/cdist/conf/type/__package_dpkg/man.rst deleted file mode 100644 index 828d8cdd..00000000 --- a/cdist/conf/type/__package_dpkg/man.rst +++ /dev/null @@ -1,93 +0,0 @@ -cdist-type__package_dpkg(7) -=========================== - -NAME ----- -cdist-type__package_dpkg - Manage packages with dpkg - - -DESCRIPTION ------------ -This type is used on Debian and variants (like Ubuntu) to -install packages that are provided locally as \*.deb files. - -The object given to this type must be the name of the deb package. -The filename of the deb package has to follow Debian naming conventions, i.e. -`${binary:Package}_${Version}_${Architecture}.deb` (see `dpkg-query(1)` for -details). - - -OPTIONAL PARAMETERS -------------------- -state - `present` or `absent`, defaults to `present`. - -REQUIRED PARAMETERS -------------------- -source - path to the \*.deb package - - -BOOLEAN PARAMETERS ------------------- -purge-if-absent - If this parameter is given when state is `absent`, the package is - purged from the system (using `--purge`). - - -EXPLORER --------- -pkg_state - Returns the full package name if package is installed, empty otherwise. - - -MESSAGES --------- -installed - The deb-file was installed. - -removed (--remove) - The package was removed, keeping config. - -removed (--purge) - The package was removed including config (purged). - - -EXAMPLES --------- - -.. code-block:: sh - - # Install foo and bar packages - __package_dpkg foo_0.1_all.deb --source /tmp/foo_0.1_all.deb - __package_dpkg bar_1.4.deb --source $__type/files/bar_1.4.deb - - # uninstall baz: - __package_dpkg baz_1.4_amd64.deb \ - --source $__type/files/baz_1.4_amd64.deb \ - --state "absent" - # uninstall baz and also purge config-files: - __package_dpkg baz_1.4_amd64.deb \ - --source $__type/files/baz_1.4_amd64.deb \ - --purge-if-absent \ - --state "absent" - - -SEE ALSO --------- -:strong:`cdist-type__package`\ (7), :strong:`dpkg-query`\ (1) - - -AUTHORS -------- -| Tomas Pospisek -| Thomas Eckert - - -COPYING -------- -Copyright \(C) 2013 Tomas Pospisek. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. -This type is based on __package_apt. diff --git a/cdist/conf/type/__package_dpkg/manifest b/cdist/conf/type/__package_dpkg/manifest deleted file mode 100755 index 6d228d8e..00000000 --- a/cdist/conf/type/__package_dpkg/manifest +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh -e -# -# 2013 Tomas Pospisek (tpo_deb sourcepole.ch) -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# This __package_dpkg type does not check whether a *.deb package is -# allready installed. It just copies the *.deb package over to the -# destination and installs it. We could use __package_apt to check -# whether a *.deb package is allready installed and only install it -# if we're given a --force argument or similar (would be clever not -# to conflict with dpkg's --force options). But currently we don't -# do any checks or --force'ing. - - -state=$( cat "$__object/parameter/state" ) -package_path=$( cat "$__object/parameter/source" ) -package=$( basename "$__object_id" ) -state_is="$(cat "$__object/explorer/pkg_state")" -state_should="" - -[ "$state" = "absent" ] || state_should="$package" -[ "$state_is" = "$state_should" ] && exit 0 - -__file "/var/cache/apt/archives/$package" \ - --source "$package_path" \ - --state "$state" - diff --git a/cdist/conf/type/__package_dpkg/nonparallel b/cdist/conf/type/__package_dpkg/nonparallel deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__package_dpkg/parameter/boolean b/cdist/conf/type/__package_dpkg/parameter/boolean deleted file mode 100644 index f9a0f6b0..00000000 --- a/cdist/conf/type/__package_dpkg/parameter/boolean +++ /dev/null @@ -1 +0,0 @@ -purge-if-absent diff --git a/cdist/conf/type/__package_dpkg/parameter/default/state b/cdist/conf/type/__package_dpkg/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__package_dpkg/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__package_dpkg/parameter/required b/cdist/conf/type/__package_dpkg/parameter/required deleted file mode 100644 index 5a18cd2f..00000000 --- a/cdist/conf/type/__package_dpkg/parameter/required +++ /dev/null @@ -1 +0,0 @@ -source diff --git a/cdist/conf/type/__package_emerge/gencode-remote b/cdist/conf/type/__package_emerge/gencode-remote deleted file mode 100755 index e1b85ebb..00000000 --- a/cdist/conf/type/__package_emerge/gencode-remote +++ /dev/null @@ -1,77 +0,0 @@ -#!/bin/sh -e -# -# 2013 Thomas Oettli (otho at sfs.biz) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Manage packages with Portage (mostly gentoo) -# - -if [ -f "$__object/parameter/name" ]; then - name="$__object/parameter/name" -else - name="$__object_id" -fi - -state_should="$(cat "$__object/parameter/state")" - -version="$(cat "$__object/parameter/version")" - -if [ -n "$version" ]; then - name="=$name-$version" -fi - -pkg_version="$(cat "$__object/explorer/pkg_version")" -if [ -z "$pkg_version" ]; then - state_is="absent" -elif [ -z "$version" ] && [ "$(echo "$pkg_version" | wc -l)" -gt 1 ]; then - echo "Package name is not unique! The following packages are installed:" >&2 - echo "$pkg_version" >&2 - exit 1 -elif [ -n "$version" ] && [ "$(echo "$pkg_version" | cut -d " " -f 1 | sort | uniq | wc -l)" -gt 1 ]; then - echo "Package name is not unique! The following packages are installed:" >&2 - echo "$pkg_version" >&2 - exit 1 -else - state_is="present" - if [ -n "$version" ] && echo "$pkg_version" | cut -d " " -f 2 | grep -q -x "$version"; then - installed_version="$(echo "$pkg_version" | cut -d " " -f 2 | grep -x "$version")" - else - installed_version="$(echo "$pkg_version" | cut -d " " -f 2 | tail -n 1)" - fi -fi - - -# Exit if nothing is needed to be done -[ "$state_is" = "$state_should" ] && { [ -z "$version" ] || [ "$installed_version" = "$version" ]; } && exit 0 -[ "$state_should" = "absent" ] && [ -n "$version" ] && [ "$installed_version" != "$version" ] && exit 0 - - -case "$state_should" in - present) - echo "emerge '$name' &>/dev/null || exit 1" - echo "installed" >> "$__messages_out" - ;; - absent) - echo "emerge -C '$name' &>/dev/null || exit 1" - echo "removed" >> "$__messages_out" - ;; - *) - echo "Unknown state: $state_should" >&2 - exit 1 - ;; -esac diff --git a/cdist/conf/type/__package_emerge/man.rst b/cdist/conf/type/__package_emerge/man.rst deleted file mode 100644 index 88adaff0..00000000 --- a/cdist/conf/type/__package_emerge/man.rst +++ /dev/null @@ -1,63 +0,0 @@ -cdist-type__package_emerge(7) -============================= - -NAME ----- -cdist-type__package_emerge - Manage packages with portage - - -DESCRIPTION ------------ -Portage is usually used on the gentoo distribution to manage packages. -This type requires app-portage/gentoolkit installed on the target host. -cdist-type__package_emerge_dependencies is supposed to install the needed -packages on the target host. - - -REQUIRED PARAMETERS -------------------- -None - - -OPTIONAL PARAMETERS -------------------- -name - If supplied, use the name and not the object id as the package name. - -state - Either "present" or "absent", defaults to "present". - -version - If supplied, use to install or uninstall a specific version of the package named. - -EXAMPLES --------- - -.. code-block:: sh - - # Ensure sys-devel/gcc is installed - __package_emerge sys-devel/gcc --state present - - # If you want a specific version of a package - __package_emerge app-portage/gentoolkit --state present --version 0.3.0.8-r2 - - # Remove package - __package_emerge sys-devel/gcc --state absent - - -SEE ALSO --------- -:strong:`cdist-type__package`\ (7), :strong:`cdist-type__package_emerge_dependencies`\ (7) - - -AUTHORS -------- -Thomas Oettli - - -COPYING -------- -Copyright \(C) 2013 Thomas Oettli. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__package_emerge/nonparallel b/cdist/conf/type/__package_emerge/nonparallel deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__package_emerge/parameter/default/state b/cdist/conf/type/__package_emerge/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__package_emerge/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__package_emerge/parameter/default/version b/cdist/conf/type/__package_emerge/parameter/default/version deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__package_emerge_dependencies/explorer/flaggie_installed b/cdist/conf/type/__package_emerge_dependencies/explorer/flaggie_installed deleted file mode 100644 index 1652ffc3..00000000 --- a/cdist/conf/type/__package_emerge_dependencies/explorer/flaggie_installed +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -if [ -x /usr/bin/flaggie ]; then - echo "true" -else - echo "false" -fi diff --git a/cdist/conf/type/__package_emerge_dependencies/explorer/gentoolkit_installed b/cdist/conf/type/__package_emerge_dependencies/explorer/gentoolkit_installed deleted file mode 100644 index 74c2378d..00000000 --- a/cdist/conf/type/__package_emerge_dependencies/explorer/gentoolkit_installed +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -if [ -x /usr/bin/q ]; then - echo "true" -else - echo "false" -fi diff --git a/cdist/conf/type/__package_emerge_dependencies/gencode-remote b/cdist/conf/type/__package_emerge_dependencies/gencode-remote deleted file mode 100755 index f3e6f76e..00000000 --- a/cdist/conf/type/__package_emerge_dependencies/gencode-remote +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -e - -gentoolkit_installed="$(cat "$__object/explorer/gentoolkit_installed")" -flaggie_installed="$(cat "$__object/explorer/flaggie_installed")" - -if [ "${gentoolkit_installed}" != "true" ]; then - # emerge app-portage/gentoolkit - echo "emerge app-portage/gentoolkit &> /dev/null || exit 1" - echo "installed app-portage/gentoolkit" >> "$__messages_out" -fi - -if [ "${flaggie_installed}" != "true" ]; then - # emerge app-portage/flaggie - echo "emerge app-portage/flaggie &> /dev/null || exit 1" - echo "installed app-portage/flaggie" >> "$__messages_out" -fi diff --git a/cdist/conf/type/__package_emerge_dependencies/man.rst b/cdist/conf/type/__package_emerge_dependencies/man.rst deleted file mode 100644 index 598d31f1..00000000 --- a/cdist/conf/type/__package_emerge_dependencies/man.rst +++ /dev/null @@ -1,52 +0,0 @@ -cdist-type__package_emerge_dependencies(7) -========================================== - -NAME ----- -cdist-type__package_emerge_dependencies - Install dependencies for __package_emerge - - -DESCRIPTION ------------ -Portage is usually used on the gentoo distribution to manage packages. -This type installs the following tools which are required by __package_emerge to work: - -* app-portage/flaggie -* app-portage/gentoolkit - - -REQUIRED PARAMETERS -------------------- -None - - -OPTIONAL PARAMETERS -------------------- -None - - -EXAMPLES --------- - -.. code-block:: sh - - # Ensure app-portage/flaggie and app-portage/gentoolkit are installed - __package_emerge_dependencies - - -SEE ALSO --------- -:strong:`cdist-type__package`\ (7), :strong:`cdist-type__package_emerge`\ (7) - - -AUTHORS -------- -Thomas Oettli - - -COPYING -------- -Copyright \(C) 2013 Thomas Oettli. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__package_emerge_dependencies/nonparallel b/cdist/conf/type/__package_emerge_dependencies/nonparallel deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__package_emerge_dependencies/singleton b/cdist/conf/type/__package_emerge_dependencies/singleton deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__package_luarocks/explorer/pkg_status b/cdist/conf/type/__package_luarocks/explorer/pkg_status deleted file mode 100755 index e83e8ce6..00000000 --- a/cdist/conf/type/__package_luarocks/explorer/pkg_status +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh -# -# 2012 SwellPath, Inc. -# Christian G. Warden -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# Retrieve the status of a rock -# - -if [ -f "$__object/parameter/name" ]; then - name="$(cat "$__object/parameter/name")" -else - name="$__object_id" -fi - -# Accept luarocks failing if package is not known/installed -luarocks list "$name" | grep -E -A1 "^$name$" || exit 0 diff --git a/cdist/conf/type/__package_luarocks/gencode-remote b/cdist/conf/type/__package_luarocks/gencode-remote deleted file mode 100755 index d83b3c3a..00000000 --- a/cdist/conf/type/__package_luarocks/gencode-remote +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/sh -e -# -# 2012 SwellPath, Inc. -# Christian G. Warden -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Manage LuaRocks packages -# - - -if [ -f "$__object/parameter/name" ]; then - name="$(cat "$__object/parameter/name")" -else - name="$__object_id" -fi - -state_should="$(cat "$__object/parameter/state")" - -if grep -q "(installed)" "$__object/explorer/pkg_status"; then - state_is="present" -else - state_is="absent" -fi - -# Leave if nothing is to be done -[ "$state_is" = "$state_should" ] && exit 0 - -case "$state_should" in - present) - echo "luarocks install '$name'" - echo "installed" >> "$__messages_out" - ;; - absent) - echo "luarocks remove '$name'" - echo "removed" >> "$__messages_out" - ;; - *) - echo "Unknown state: $state_should" >&2 - exit 1 - ;; -esac diff --git a/cdist/conf/type/__package_luarocks/man.rst b/cdist/conf/type/__package_luarocks/man.rst deleted file mode 100644 index 5dc10195..00000000 --- a/cdist/conf/type/__package_luarocks/man.rst +++ /dev/null @@ -1,55 +0,0 @@ -cdist-type__package_luarocks(7) -=============================== - -NAME ----- -cdist-type__package_luarocks - Manage luarocks packages - - -DESCRIPTION ------------ -LuaRocks is a deployment and management system for Lua modules. - - -REQUIRED PARAMETERS -------------------- -None - - -OPTIONAL PARAMETERS -------------------- -name - If supplied, use the name and not the object id as the package name. - -state - Either "present" or "absent", defaults to "present" - - -EXAMPLES --------- - -.. code-block:: sh - - # Ensure luasocket is installed - __package_luarocks luasocket --state present - - # Remove package - __package_luarocks luasocket --state absent - - -SEE ALSO --------- -:strong:`cdist-type__package`\ (7) - - -AUTHORS -------- -Christian G. Warden - - -COPYING -------- -Copyright \(C) 2012 SwellPath, Inc. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__package_luarocks/manifest b/cdist/conf/type/__package_luarocks/manifest deleted file mode 100755 index 7d8262ca..00000000 --- a/cdist/conf/type/__package_luarocks/manifest +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -e -# -# 2012 SwellPath, Inc. -# Christian G. Warden -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -__package luarocks --state installed -__package make --state installed diff --git a/cdist/conf/type/__package_luarocks/nonparallel b/cdist/conf/type/__package_luarocks/nonparallel deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__package_luarocks/parameter/default/state b/cdist/conf/type/__package_luarocks/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__package_luarocks/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__package_luarocks/parameter/optional b/cdist/conf/type/__package_luarocks/parameter/optional deleted file mode 100644 index 1b423dc4..00000000 --- a/cdist/conf/type/__package_luarocks/parameter/optional +++ /dev/null @@ -1,2 +0,0 @@ -name -state diff --git a/cdist/conf/type/__package_opkg/gencode-remote b/cdist/conf/type/__package_opkg/gencode-remote deleted file mode 100755 index 269d5f49..00000000 --- a/cdist/conf/type/__package_opkg/gencode-remote +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/sh -e -# -# 2011,2013 Nico Schottelius (nico-cdist at schottelius.org) -# 2012 Giel van Schijndel (giel plus cdist at mortis dot eu) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Manage packages on OpenWRT and co. -# - -if [ -f "$__object/parameter/name" ]; then - name="$(cat "$__object/parameter/name")" -else - name="$__object_id" -fi - -state_should="$(cat "$__object/parameter/state")" - -state_is="$(cat "$__object/explorer/pkg_status")" -case "$state_is" in - absent*) - present="$(echo "$state_is" | cut -d ' ' -f 2)" - state_is="absent" - ;; -esac - -[ "$state_is" = "$state_should" ] && exit 0 - -case "$state_should" in - present) - if [ "$present" = "notpresent" ]; then - echo "opkg --verbosity=0 update" - fi - echo "opkg --verbosity=0 install '$name'" - echo "installed" >> "$__messages_out" - ;; - absent) - echo "opkg --verbosity=0 remove '$name'" - echo "removed" >> "$__messages_out" - ;; - *) - echo "Unknown state: ${state_should}" >&2 - exit 1 - ;; -esac diff --git a/cdist/conf/type/__package_opkg/man.rst b/cdist/conf/type/__package_opkg/man.rst deleted file mode 100644 index 0fd40b33..00000000 --- a/cdist/conf/type/__package_opkg/man.rst +++ /dev/null @@ -1,55 +0,0 @@ -cdist-type__package_opkg(7) -=========================== - -NAME ----- -cdist-type__package_opkg - Manage packages with opkg - - -DESCRIPTION ------------ -opkg is usually used on OpenWRT to manage packages. - - -REQUIRED PARAMETERS -------------------- -None - - -OPTIONAL PARAMETERS -------------------- -name - If supplied, use the name and not the object id as the package name. - -state - Either "present" or "absent", defaults to "present" - - -EXAMPLES --------- - -.. code-block:: sh - - # Ensure lsof is installed - __package_opkg lsof --state present - - # Remove obsolete package - __package_opkg dnsmasq --state absent - - -SEE ALSO --------- -:strong:`cdist-type__package`\ (7) - - -AUTHORS -------- -Giel van Schijndel - - -COPYING -------- -Copyright \(C) 2012 Giel van Schijndel. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__package_opkg/nonparallel b/cdist/conf/type/__package_opkg/nonparallel deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__package_opkg/parameter/default/state b/cdist/conf/type/__package_opkg/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__package_opkg/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__package_opkg/parameter/optional b/cdist/conf/type/__package_opkg/parameter/optional deleted file mode 100644 index 1b423dc4..00000000 --- a/cdist/conf/type/__package_opkg/parameter/optional +++ /dev/null @@ -1,2 +0,0 @@ -name -state diff --git a/cdist/conf/type/__package_pacman/man.rst b/cdist/conf/type/__package_pacman/man.rst deleted file mode 100644 index 2686202d..00000000 --- a/cdist/conf/type/__package_pacman/man.rst +++ /dev/null @@ -1,58 +0,0 @@ -cdist-type__package_pacman(7) -============================= - -NAME ----- -cdist-type__package_pacman - Manage packages with pacman - - -DESCRIPTION ------------ -Pacman is usually used on the Archlinux distribution to manage packages. - - -REQUIRED PARAMETERS -------------------- -None - - -OPTIONAL PARAMETERS -------------------- -name - If supplied, use the name and not the object id as the package name. - -state - Either "present" or "absent", defaults to "present" - - -EXAMPLES --------- - -.. code-block:: sh - - # Ensure zsh in installed - __package_pacman zsh --state present - - # If you don't want to follow pythonX packages, but always use python - __package_pacman python --state present --name python2 - - # Remove obsolete package - __package_pacman puppet --state absent - - -SEE ALSO --------- -:strong:`cdist-type__package`\ (7) - - -AUTHORS -------- -Nico Schottelius - - -COPYING -------- -Copyright \(C) 2011-2012 Nico Schottelius. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__package_pacman/nonparallel b/cdist/conf/type/__package_pacman/nonparallel deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__package_pacman/parameter/default/state b/cdist/conf/type/__package_pacman/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__package_pacman/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__package_pacman/parameter/optional b/cdist/conf/type/__package_pacman/parameter/optional deleted file mode 100644 index 1b423dc4..00000000 --- a/cdist/conf/type/__package_pacman/parameter/optional +++ /dev/null @@ -1,2 +0,0 @@ -name -state diff --git a/cdist/conf/type/__package_pip/explorer/state b/cdist/conf/type/__package_pip/explorer/state deleted file mode 100644 index 5be07280..00000000 --- a/cdist/conf/type/__package_pip/explorer/state +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh -# -# 2012 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Development supported by Local AG (www.local.ch) -# - -nameparam="$__object/parameter/name" -if [ -f "$nameparam" ]; then - name=$(cat "$nameparam") -else - name="$__object_id" -fi - -pipparam="$__object/parameter/pip" -if [ -f "$pipparam" ]; then - pip=$(cat "$pipparam") -else - pip="pip" -fi - -# If there is no pip, it may get created from somebody else. -# If it will be created, there is probably no package installed. -if ! command -v "$pip" >/dev/null 2>&1; then - echo absent -else - - if "$pip" freeze | grep -i -q "^$name=="; then - echo present - else - echo absent - fi -fi diff --git a/cdist/conf/type/__package_pip/gencode-remote b/cdist/conf/type/__package_pip/gencode-remote deleted file mode 100755 index dcc4fdf9..00000000 --- a/cdist/conf/type/__package_pip/gencode-remote +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/sh -e -# -# 2012 Nico Schottelius (nico-cdist at schottelius.org) -# 2016 Darko Poljak (darko.poljak at gmail.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Development supported by Local AG (www.local.ch) -# - -state_is=$(cat "$__object/explorer/state") -state_should="$(cat "$__object/parameter/state")" - -[ "$state_is" = "$state_should" ] && exit 0 - -nameparam="$__object/parameter/name" -if [ -f "$nameparam" ]; then - name=$(cat "$nameparam") -else - name="$__object_id" -fi - -pipparam="$__object/parameter/pip" -if [ -f "$pipparam" ]; then - pip=$(cat "$pipparam") -else - pip="pip" -fi - -runasparam="$__object/parameter/runas" -if [ -f "$runasparam" ] -then - runas=$(cat "$runasparam") -else - runas="" -fi - -case "$state_should" in - present) - if [ "$runas" ] - then - echo "su -c '$pip install -q $name' $runas" - else - echo $pip install -q "$name" - fi - echo "installed" >> "$__messages_out" - ;; - absent) - if [ "$runas" ] - then - echo "su -c '$pip uninstall -q -y $name' $runas" - else - echo $pip uninstall -q -y "$name" - fi - echo "removed" >> "$__messages_out" - ;; - *) - echo "Unknown state: $state_should" >&2 - exit 1 - ;; -esac diff --git a/cdist/conf/type/__package_pip/man.rst b/cdist/conf/type/__package_pip/man.rst deleted file mode 100644 index 234ceee2..00000000 --- a/cdist/conf/type/__package_pip/man.rst +++ /dev/null @@ -1,65 +0,0 @@ -cdist-type__package_pip(7) -========================== - -NAME ----- -cdist-type__package_pip - Manage packages with pip - - -DESCRIPTION ------------ -Pip is used in Python environments to install packages. -It is also included in the python virtualenv environment. - - -REQUIRED PARAMETERS -------------------- -None - - -OPTIONAL PARAMETERS -------------------- -name - If supplied, use the name and not the object id as the package name. - -pip - Instead of using pip from PATH, use the specific pip path. - -state - Either "present" or "absent", defaults to "present" - -runas - Run pip as specified user. By default it runs as root. - - -EXAMPLES --------- - -.. code-block:: sh - - # Install a package - __package_pip pyro --state present - - # Use pip in a virtualenv located at /root/shinken_virtualenv - __package_pip pyro --state present --pip /root/shinken_virtualenv/bin/pip - - # Use pip in a virtualenv located at /foo/shinken_virtualenv as user foo - __package_pip pyro --state present --pip /foo/shinken_virtualenv/bin/pip --runas foo - - -SEE ALSO --------- -:strong:`cdist-type__package`\ (7) - - -AUTHORS -------- -Nico Schottelius - - -COPYING -------- -Copyright \(C) 2012 Nico Schottelius. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__package_pip/nonparallel b/cdist/conf/type/__package_pip/nonparallel deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__package_pip/parameter/default/state b/cdist/conf/type/__package_pip/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__package_pip/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__package_pip/parameter/optional b/cdist/conf/type/__package_pip/parameter/optional deleted file mode 100644 index d909e790..00000000 --- a/cdist/conf/type/__package_pip/parameter/optional +++ /dev/null @@ -1,4 +0,0 @@ -name -pip -state -runas diff --git a/cdist/conf/type/__package_pkg_freebsd/explorer/pkg_version b/cdist/conf/type/__package_pkg_freebsd/explorer/pkg_version deleted file mode 100755 index 0a1ab75c..00000000 --- a/cdist/conf/type/__package_pkg_freebsd/explorer/pkg_version +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh -# -# 2012 Jake Guffey (jake.guffey at eprotex.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Retrieve the status of a package - parsed dpkg output -# - -if [ -f "$__object/parameter/name" ]; then - name="$(cat "$__object/parameter/name")" -else - name="$__object_id" -fi - -# Don't produce "no pkgs installed" output -- breaks things -PKG_OUTPUT=$(pkg_info 2>&1) -if [ ! "$PKG_OUTPUT" = "pkg_info: no packages installed" ]; then - printf "%s" "$(echo "$PKG_OUTPUT" \ - | awk '{print $1}' \ - | sed 's/^\(.*\)-\([^-]*\)$/name:\1 ver:\2/g' \ - | grep "name:$name ver:" \ - | sed 's/^.*ver:\(.*\)/\1/g')" -fi - diff --git a/cdist/conf/type/__package_pkg_freebsd/gencode-remote b/cdist/conf/type/__package_pkg_freebsd/gencode-remote deleted file mode 100755 index 3f88f6bc..00000000 --- a/cdist/conf/type/__package_pkg_freebsd/gencode-remote +++ /dev/null @@ -1,131 +0,0 @@ -#!/bin/sh -e -# -# 2012 Jake Guffey (jake.guffey at eprotex.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Manage packages with pkg on FreeBSD -# - -assert () # If condition false, -{ #+ exit from script with error message. - E_PARAM_ERR=98 - E_ASSERT_FAILED=99 - - if [ -z "$2" ] # Not enough parameters passed. - then - return $E_PARAM_ERR # No damage done. - fi - - lineno=$2 - - if [ ! "$1" ] - then - echo "Assertion failed: \"$1\"" - # shellcheck disable=SC2039 - echo "File \"$0\", line $lineno, called by $(caller 0)" - exit $E_ASSERT_FAILED - fi -} - -# Debug -#exec >&2 -#set -x - -if [ -f "$__object/parameter/name" ]; then - name="$(cat "$__object/parameter/name")" -else - name="$__object_id" -fi - -flavor="$(cat "$__object/parameter/flavor")" -version="$(cat "$__object/parameter/version")" -pkgsite="$(cat "$__object/parameter/pkgsite")" -state="$(cat "$__object/parameter/state")" -curr_version="$(cat "$__object/explorer/pkg_version")" -add_cmd="pkg_add" -rm_cmd="pkg_delete" -cmd="" - -# Print the command to be executed -# Parms: $1 -- mode, "remove" or "add" -# $2 -- the command to be echoed -# FIXME: This is ugly. -execcmd(){ - # Set the PACKAGESITE if we're ADDing a new package - if [ "$1" = "add" ] && [ -n "$pkgsite" ]; then - # Use http.../All/ if we know the exact version we want, use .../Latest/ otherwise - pkgsite="export PACKAGESITE=${pkgsite}" - [ -n "$version" ] && pkgsite="${pkgsite}/All/" || pkgsite="${pkgsite}/Latest/" - echo "${pkgsite}" - fi - echo "${2} 2>&- >&-" # Silence the output of the command - echo "status=\$?" - echo "if [ \"\$status\" -ne \"0\" ]; then" - echo " echo \"Error: ${cmd} exited nonzero with \$status\"'!' >&2" - echo " exit 1" - echo "fi" -} - -if [ -n "$curr_version" ]; then # PKG *is* installed - if [ "$state" = "absent" ]; then # Shouldn't be installed - if [ -n "$flavor" ]; then - cmd="${rm_cmd} ${name}-${flavor}-${curr_version}" - else - cmd="${rm_cmd} ${name}-${curr_version}" - fi - execcmd "remove" "${cmd}" - echo "removed" >> "$__messages_out" - exit 0 - else # Should be installed - if [ -n "$version" ]; then # Want a specific version - if [ "$version" = "$curr_version" ]; then # Current version is correct - exit 0 - else # Current version is wrong, fix - #updatepkg "$name" "$version" - # shellcheck disable=SC2039 - assert "! ${version} = ${curr_version}" $LINENO - cmd="${rm_cmd} ${name}-${curr_version}" - execcmd "remove" "${cmd}" - cmd="${add_cmd} -r ${name}-${version}" - execcmd "add" "${cmd}" - echo "installed" >> "$__messages_out" - fi - else # Don't care what version to use - exit 0 - fi - fi -else # PKG *isn't* installed - if [ "$state" = "absent" ]; then # Shouldn't be installed - exit 0 - elif [ "$state" = "present" ]; then # Is not currently installed, should be - if [ -n "$flavor" ]; then - cmd="${add_cmd} -r ${name}-${flavor}" - else - cmd="${add_cmd} -r ${name}" - fi - if [ -n "$version" ]; then - cmd="${cmd}-${version}" - fi - execcmd "add" "${cmd}" - echo "installed" >> "$__messages_out" - exit 0 - fi -fi - -# Debug -#set +x diff --git a/cdist/conf/type/__package_pkg_freebsd/man.rst b/cdist/conf/type/__package_pkg_freebsd/man.rst deleted file mode 100644 index b06c7faf..00000000 --- a/cdist/conf/type/__package_pkg_freebsd/man.rst +++ /dev/null @@ -1,70 +0,0 @@ -cdist-type__package_pkg_freebsd(7) -================================== - -NAME ----- -cdist-type__package_pkg_freebsd - Manage FreeBSD packages - - -DESCRIPTION ------------ -This type is usually used on FreeBSD to manage packages. - - -REQUIRED PARAMETERS -------------------- -None - - -OPTIONAL PARAMETERS -------------------- -name - If supplied, use the name and not the object id as the package name. - -flavor - If supplied, use to avoid ambiguity. - -version - If supplied, use to install a specific version of the package named. - -pkgsite - If supplied, use to install from a specific package repository. - -state - Either "present" or "absent", defaults to "present" - - -EXAMPLES --------- - -.. code-block:: sh - - # Ensure zsh is installed - __package_pkg_freebsd zsh --state present - - # Ensure vim is installed, use flavor no_x11 - __package_pkg_freebsd vim --state present --flavor no_x11 - - # If you don't want to follow pythonX packages, but always use python - __package_pkg_freebsd python --state present --name python2 - - # Remove obsolete package - __package_pkg_freebsd puppet --state absent - - -SEE ALSO --------- -:strong:`cdist-type__package`\ (7) - - -AUTHORS -------- -Jake Guffey - - -COPYING -------- -Copyright \(C) 2012 Jake Guffey. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__package_pkg_freebsd/nonparallel b/cdist/conf/type/__package_pkg_freebsd/nonparallel deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__package_pkg_freebsd/parameter/default/flavor b/cdist/conf/type/__package_pkg_freebsd/parameter/default/flavor deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__package_pkg_freebsd/parameter/default/pkgsite b/cdist/conf/type/__package_pkg_freebsd/parameter/default/pkgsite deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__package_pkg_freebsd/parameter/default/state b/cdist/conf/type/__package_pkg_freebsd/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__package_pkg_freebsd/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__package_pkg_freebsd/parameter/default/version b/cdist/conf/type/__package_pkg_freebsd/parameter/default/version deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__package_pkg_freebsd/parameter/optional b/cdist/conf/type/__package_pkg_freebsd/parameter/optional deleted file mode 100644 index 8cb68f98..00000000 --- a/cdist/conf/type/__package_pkg_freebsd/parameter/optional +++ /dev/null @@ -1,5 +0,0 @@ -name -flavor -version -pkgsite -state diff --git a/cdist/conf/type/__package_pkg_openbsd/explorer/pkg_state b/cdist/conf/type/__package_pkg_openbsd/explorer/pkg_state deleted file mode 100755 index 9cd17787..00000000 --- a/cdist/conf/type/__package_pkg_openbsd/explorer/pkg_state +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh -# -# Copyright 2018, Takashi Yoshi -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Retrieve the status of a package - parsed pkg_info output -# - -if [ -f "${__object}/parameter/name" ] -then - pkgid="$(cat "${__object}/parameter/name")" -else - pkgid="${__object_id}" -fi - -if [ -f "${__object}/parameter/version" ] -then - pkgid="${pkgid}-$(cat "${__object}/parameter/version")" -fi - -if [ -f "${__object}/parameter/flavor" ] -then - # If a flavor but no version is given we need to add another -, - # otherwise pkg_info confuses the flavor with the version. - [ -f "${__object}/parameter/version" ] || pkgid="${pkgid}-" - - pkgid="${pkgid}-$(cat "${__object}/parameter/flavor")" -fi - - -pkg_info -q -I "inst:${pkgid}" >/dev/null 2>&1 \ - && echo 'present' || echo 'absent' - -exit 0 diff --git a/cdist/conf/type/__package_pkg_openbsd/gencode-remote b/cdist/conf/type/__package_pkg_openbsd/gencode-remote deleted file mode 100755 index 5a21ce12..00000000 --- a/cdist/conf/type/__package_pkg_openbsd/gencode-remote +++ /dev/null @@ -1,118 +0,0 @@ -#!/bin/sh -e -# -# 2011 Andi Brönnimann (andi-cdist at v-net.ch) -# 2012 Nico Schottelius (nico-cdist at schottelius.org) -# 2018 Takashi Yoshi -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Manage packages with pkg on OpenBSD -# - -os_version=$(cat "${__global}/explorer/os_version") -machine=$(cat "${__global}/explorer/machine") - -if [ -f "${__object}/parameter/version" ]; then - version=$(cat "${__object}/parameter/version") -fi - -if [ -f "${__object}/parameter/flavor" ]; then - flavor=$(cat "${__object}/parameter/flavor") -fi - -# Do not show progress bar -pkgopts='-x' - -name="${__object_id}" -if [ -f "${__object}/parameter/name" ]; then - name=$(cat "${__object}/parameter/name") -fi - -if [ -n "${version}" ] && [ -n "${flavor}" ]; then - pkgid="${name}-${version}-${flavor}" -elif [ -n "${version}" ]; then - pkgid="${name}-${version}" -elif [ -f "${__object}/parameter/flavor" ]; then - pkgid="${name}--${flavor}" -else - pkgid="${name}" -fi - -state_should=$(cat "${__object}/parameter/state") - -if [ -f "${__object}/parameter/pkg_path" ]; then - pkg_path=$(cat "${__object}/parameter/pkg_path") -else - has_installurl=$(cat "${__object}/explorer/has_installurl") - if [ 'yes' != "${has_installurl}" ]; then - # There is no default PKG_PATH, try to provide one - pkg_path="ftp://ftp.openbsd.org/pub/OpenBSD/${os_version}/packages/${machine}/" - fi -fi - -state_is=$(cat "${__object}/explorer/pkg_state") -[ "${state_is}" = "${state_should}" ] && exit 0 - -case "${state_should}" in - present) - if [ -n "${pkg_path}" ]; then - echo "export PKG_PATH='${pkg_path}'" - fi - - # Use this because pkg_add doesn't properly handle errors - cat <&1 || true) - -if ! pkg_info -q -I 'inst:${pkgid}' | grep -q '^${name}-${version}.*${flavor}$' 2>/dev/null -then - # We didn't find the package in the list of 'installed packages', so it failed. - # This is necessary because pkg_add doesn't return properly - - if [ -z "\${status}" ]; then - status='Failed to add package, uncaught exception.' - fi - echo "Error: \${status}" >&2 - exit 1 -fi -EOF - echo 'installed' >> "${__messages_out}" - ;; - - absent) - # Use this because pkg_delete doesn't properly handle errors - cat <&1 || true) - -if pkg_info -q -I 'inst:${pkgid}' | grep -q '^${name}-${version}.*${flavor}' 2>/dev/null -then - # We found the package in the list of 'installed packages'. - # This would indicate that pkg_delete failed, send the output of pkg_delete - - if [ -z "\${status}" ]; then - status='Failed to remove package, uncaught exception.' - fi - echo "Error: \${status}" >&2 - exit 1 -fi -EOF - echo 'removed' >> "${__messages_out}" - ;; - *) - echo "Unknown state: ${state_should}" >&2 - exit 1 - ;; -esac diff --git a/cdist/conf/type/__package_pkg_openbsd/man.rst b/cdist/conf/type/__package_pkg_openbsd/man.rst deleted file mode 100644 index dcfd0719..00000000 --- a/cdist/conf/type/__package_pkg_openbsd/man.rst +++ /dev/null @@ -1,71 +0,0 @@ -cdist-type__package_pkg(7) -========================== - -NAME ----- -cdist-type__package_pkg - Manage OpenBSD packages - - -DESCRIPTION ------------ -This type is usually used on OpenBSD to manage packages. - - -REQUIRED PARAMETERS -------------------- -None - - -OPTIONAL PARAMETERS -------------------- -name - If supplied, use the name and not the object id as the package name. - -flavor - If supplied, use to avoid ambiguity. - -version - If supplied, use to avoid ambiguity. - -state - Either "present" or "absent", defaults to "present" - -pkg_path - Manually specify a PKG_PATH to add packages from. - -EXAMPLES --------- - -.. code-block:: sh - - # Ensure zsh is installed - __package_pkg_openbsd zsh --state present - - # Ensure vim is installed, use flavor no_x11 - __package_pkg_openbsd vim --state present --flavor no_x11 - - # If you don't want to follow pythonX packages, but always use python - __package_pkg_openbsd python --state present --name python2 - - # Remove obsolete package - __package_pkg_openbsd puppet --state absent - - # Add a package using a particular mirror - __package_pkg_openbsd bash \ - --pkg_path http://openbsd.mirrorcatalogs.com/snapshots/packages/amd64 - - -SEE ALSO --------- -:strong:`cdist-type__package`\ (7) - - -AUTHORS -------- -Andi Brönnimann - - -COPYING -------- -Copyright \(C) 2011 Andi Brönnimann. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__package_pkg_openbsd/nonparallel b/cdist/conf/type/__package_pkg_openbsd/nonparallel deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__package_pkg_openbsd/parameter/default/state b/cdist/conf/type/__package_pkg_openbsd/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__package_pkg_openbsd/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__package_pkg_openbsd/parameter/optional b/cdist/conf/type/__package_pkg_openbsd/parameter/optional deleted file mode 100644 index 6a5f9277..00000000 --- a/cdist/conf/type/__package_pkg_openbsd/parameter/optional +++ /dev/null @@ -1,5 +0,0 @@ -name -version -flavor -state -pkg_path diff --git a/cdist/conf/type/__package_pkgng_freebsd/explorer/pkg_version b/cdist/conf/type/__package_pkgng_freebsd/explorer/pkg_version deleted file mode 100755 index 92ce0623..00000000 --- a/cdist/conf/type/__package_pkgng_freebsd/explorer/pkg_version +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh -# -# 2014 Jake Guffey (jake.guffey at eprotex.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Retrieve the status of a package - parsed dpkg output -# - -if [ -f "$__object/parameter/name" ]; then - name="$(cat "$__object/parameter/name")" -else - name="$__object_id" -fi - -# Don't produce "no pkgs installed" output -- breaks things -PKG_OUTPUT=$(pkg info 2>&1) -printf "%s" "$(echo "$PKG_OUTPUT" \ - | awk '{print $1}' \ - | sed 's/^\(.*\)-\([^-]*\)$/name:\1 ver:\2/g' \ - | grep "name:$name ver:" \ - | sed 's/^.*ver:\(.*\)/\1/g')" - diff --git a/cdist/conf/type/__package_pkgng_freebsd/gencode-remote b/cdist/conf/type/__package_pkgng_freebsd/gencode-remote deleted file mode 100755 index dd36efda..00000000 --- a/cdist/conf/type/__package_pkgng_freebsd/gencode-remote +++ /dev/null @@ -1,130 +0,0 @@ -#!/bin/sh -e -# -# 2014 Jake Guffey (jake.guffey at eprotex.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Manage packages with pkg on FreeBSD -# - -# Debug -#exec >&2 -#set -x - -if [ -f "$__object/parameter/name" ]; then - name="$(cat "$__object/parameter/name")" -else - name="$__object_id" -fi - -flavor="$(cat "$__object/parameter/flavor")" -version="$(cat "$__object/parameter/version")" - -if [ -f "$__object/parameter/upgrade" ]; then - upgrade="true" -else - upgrade="false" -fi - -repo="$(cat "$__object/parameter/repo")" -state="$(cat "$__object/parameter/state")" -curr_version="$(cat "$__object/explorer/pkg_version")" -add_cmd="pkg install -y" -rm_cmd="pkg delete -y" -upg_cmd="pkg upgrade -y" -cmd="" - -# Print the command to be executed -# Parms: $1 -- mode, "rm", "add", or "upg" -# $2 -- the command to be echoed -execcmd(){ - _cmd="" - - case "$1" in - add) - _cmd="${add_cmd} $2" - echo "installed" >> "$__messages_out" - ;; - rm) - _cmd="${rm_cmd} $2" - echo "removed" >> "$__messages_out" - ;; - upg) - _cmd="${upg_cmd} $2" - echo "installed" >> "$__messages_out" - ;; - *) - printf "Error. Don't understand command: %s" "$1" >&2 - exit 1 - ;; - esac - - echo "$_cmd >/dev/null 2>&1" # Silence the output of the command - echo "status=\$?" - echo "if [ \"\$status\" -ne \"0\" ]; then" - echo " echo \"Error: ${_cmd} exited nonzero with \$status\"'!' >&2" - echo " exit 1" - echo "fi" -} - -if [ -n "$curr_version" ]; then # PKG *is* installed - if [ -n "$repo" ]; then - cmd="-r ${repo} ${name}" - else - cmd="${name}" - fi - if [ -n "$flavor" ]; then - cmd="${cmd}-${flavor}" - fi - # PKG is supposed to be removed - if [ "$state" = "absent" ]; then - execcmd "rm" "${cmd}" - # PKG is supposed to be installed to a particular version - elif [ -n "$version" ] && [ "$version" != "$curr_version" ]; then - if [ "$upgrade" = "true" ]; then - execcmd "upg" "${cmd}" - else - printf 'Version %s is already installed and pkg-ng cannot upgrade directly to version %s.\nTo upgrade to the latest version, use the --upgrade flag.\n' "$curr_version" "$version" >&2 - exit 1 - fi - # PKG is supposed to be installed to the latest version - else - : # Do nothing. - fi -else # PKG *isn't* installed - if [ "$state" = "absent" ]; then # Shouldn't be installed - exit 0 - else # Should be installed - if [ -n "$repo" ]; then - cmd="-r ${repo} ${name}" - else - cmd="${name}" - fi - if [ -n "$flavor" ]; then - cmd="${cmd}-${flavor}" - fi - if [ -n "$version" ]; then - cmd="${cmd}-${version}" - fi - - execcmd "add" "$cmd" - exit 0 - fi -fi - -# Debug -#set +x diff --git a/cdist/conf/type/__package_pkgng_freebsd/man.rst b/cdist/conf/type/__package_pkgng_freebsd/man.rst deleted file mode 100644 index 251e2c5f..00000000 --- a/cdist/conf/type/__package_pkgng_freebsd/man.rst +++ /dev/null @@ -1,101 +0,0 @@ -cdist-type__package_pkgng_freebsd(7) -==================================== - -NAME ----- -cdist-type__package_pkgng_freebsd - Manage FreeBSD packages with pkg-ng - - -DESCRIPTION ------------ -This type is usually used on FreeBSD to manage packages. - - -REQUIRED PARAMETERS -------------------- -None - - -OPTIONAL PARAMETERS -------------------- -name - If supplied, use the name and not the object id as the package name. - -flavor - If supplied, use to avoid ambiguity. - -version - If supplied, use to install a specific version of the package named. - -repo - If supplied, use to install the package named from a particular repo. - -state - Either "present" or "absent", defaults to "present" - - -BOOLEAN PARAMETERS ------------------- -upgrade - If supplied, allow upgrading to the latest version of a package. - - -CAVEATS -------- -This type requires that repository definitions already exist in /etc/pkg/\*.conf. -Ensure that they exist prior to use of this type with __file. - -pkg-ng can't upgrade a package to a specific version. If this type needs to -upgrade a package, it can only ugprade to the latest available version. If the -"upgrade" parameter is not given and an upgrade needs to occur, an error will result. - - -MESSAGES --------- -install - The package was installed -remove - The package was removed -upgrade - The package was upgraded -exist - The package was already present and thus not installed - - -EXAMPLES --------- - -.. code-block:: sh - - # Ensure zsh is installed - __package_pkgng_freebsd zsh --state present - - # Ensure vim is installed, use flavor no_x11 - __package_pkgng_freebsd vim --state present --flavor no_x11 - - # If you don't want to follow pythonX packages, but always use python - __package_pkgng_freebsd python --state present --name python2 - - # Install a package from a particular repository when multiples exist - __package_pkgng_freebsd bash --state present --repo myrepo - - # Remove obsolete package - __package_pkgng_freebsd puppet --state absent - - -SEE ALSO --------- -:strong:`cdist-type__package`\ (7) - - -AUTHORS -------- -Jake Guffey - - -COPYING -------- -Copyright \(C) 2014 Jake Guffey. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__package_pkgng_freebsd/nonparallel b/cdist/conf/type/__package_pkgng_freebsd/nonparallel deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__package_pkgng_freebsd/parameter/boolean b/cdist/conf/type/__package_pkgng_freebsd/parameter/boolean deleted file mode 100644 index 007ead00..00000000 --- a/cdist/conf/type/__package_pkgng_freebsd/parameter/boolean +++ /dev/null @@ -1 +0,0 @@ -upgrade \ No newline at end of file diff --git a/cdist/conf/type/__package_pkgng_freebsd/parameter/default/flavor b/cdist/conf/type/__package_pkgng_freebsd/parameter/default/flavor deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__package_pkgng_freebsd/parameter/default/repo b/cdist/conf/type/__package_pkgng_freebsd/parameter/default/repo deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__package_pkgng_freebsd/parameter/default/state b/cdist/conf/type/__package_pkgng_freebsd/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__package_pkgng_freebsd/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__package_pkgng_freebsd/parameter/default/version b/cdist/conf/type/__package_pkgng_freebsd/parameter/default/version deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__package_pkgng_freebsd/parameter/optional b/cdist/conf/type/__package_pkgng_freebsd/parameter/optional deleted file mode 100644 index 6e67f838..00000000 --- a/cdist/conf/type/__package_pkgng_freebsd/parameter/optional +++ /dev/null @@ -1,5 +0,0 @@ -name -flavor -version -repo -state diff --git a/cdist/conf/type/__package_rubygem/gencode-remote b/cdist/conf/type/__package_rubygem/gencode-remote deleted file mode 100755 index abb40653..00000000 --- a/cdist/conf/type/__package_rubygem/gencode-remote +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh -e -# -# 2011 Chase Allen James -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Manage Rubygem packages -# - -if [ -f "$__object/parameter/name" ]; then - name="$(cat "$__object/parameter/name")" -else - name="$__object_id" -fi - -state_should="$(cat "$__object/parameter/state")" - -if grep -q true "$__object/explorer/pkg_status"; then - state_is="present" -else - state_is="absent" -fi - -[ "$state_is" = "$state_should" ] && exit 0 - -case "$state_should" in - present) - echo "gem install '$name' --no-ri --no-rdoc" - echo "installed" >> "$__messages_out" - ;; - absent) - echo "gem uninstall '$name'" - echo "removed" >> "$__messages_out" - ;; - *) - echo "Unknown state: $state_should" >&2 - exit 1 - ;; -esac diff --git a/cdist/conf/type/__package_rubygem/man.rst b/cdist/conf/type/__package_rubygem/man.rst deleted file mode 100644 index 96ad21f7..00000000 --- a/cdist/conf/type/__package_rubygem/man.rst +++ /dev/null @@ -1,56 +0,0 @@ -cdist-type__package_rubygem(7) -============================== - -NAME ----- -cdist-type__package_rubygem - Manage rubygem packages - - -DESCRIPTION ------------ -Rubygems is the default package management system for the Ruby programming language. - - -REQUIRED PARAMETERS -------------------- -None - - -OPTIONAL PARAMETERS -------------------- -name - If supplied, use the name and not the object id as the package name. - -state - Either "present" or "absent", defaults to "present" - - -EXAMPLES --------- - -.. code-block:: sh - - # Ensure sinatra is installed - __package_rubygem sinatra --state present - - # Remove package - __package_rubygem rails --state absent - - -SEE ALSO --------- -:strong:`cdist-type__package`\ (7) - - -AUTHORS -------- -Chase Allen James - - -COPYING -------- - -Copyright \(C) 2011 Chase Allen James. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__package_rubygem/nonparallel b/cdist/conf/type/__package_rubygem/nonparallel deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__package_rubygem/parameter/default/state b/cdist/conf/type/__package_rubygem/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__package_rubygem/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__package_rubygem/parameter/optional b/cdist/conf/type/__package_rubygem/parameter/optional deleted file mode 100644 index 1b423dc4..00000000 --- a/cdist/conf/type/__package_rubygem/parameter/optional +++ /dev/null @@ -1,2 +0,0 @@ -name -state diff --git a/cdist/conf/type/__package_update_index/explorer/currage b/cdist/conf/type/__package_update_index/explorer/currage deleted file mode 100644 index 3539b8e1..00000000 --- a/cdist/conf/type/__package_update_index/explorer/currage +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh -# -# 2018 Thomas Eckert (tom at it-eckert.de) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . - -type="$("$__type_explorer/type")" - -case "$type" in - apt) - if [ -f "/var/cache/apt/pkgcache.bin" ]; then - echo $(($(date +"%s")-$(stat --format '%Y' /var/cache/apt/pkgcache.bin))) - else - echo 0 - fi - ;; - pacman) - if [ -d "/var/lib/pacman/sync" ]; then - echo $(($(date +"%s")-$(stat --format '%Y' /var/lib/pacman/sync))) - else - echo 0 - fi - ;; - *) echo "Your specified type ($type) is currently not supported." >&2 - echo "Please contribute an implementation for it if you can." >&2 - ;; -esac diff --git a/cdist/conf/type/__package_update_index/explorer/type b/cdist/conf/type/__package_update_index/explorer/type deleted file mode 100644 index 35254c5f..00000000 --- a/cdist/conf/type/__package_update_index/explorer/type +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh -# -# 2018 Stu Zhao (z12y12l12 at gmail.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . - -if [ -f "$__object/parameter/type" ]; then - cat "$__object/parameter/type" -else - # By default determine package manager based on operating system - os="$("$__explorer/os")" - case "$os" in - amazon|scientific|centos|fedora|redhat) echo "yum" ;; - debian|ubuntu|devuan) echo "apt" ;; - archlinux) echo "pacman" ;; - *) - echo "Don't know how to manage packages on: $os" >&2 - exit 1 - ;; - esac -fi diff --git a/cdist/conf/type/__package_update_index/gencode-remote b/cdist/conf/type/__package_update_index/gencode-remote deleted file mode 100755 index 738d38eb..00000000 --- a/cdist/conf/type/__package_update_index/gencode-remote +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh -e -# -# 2014 Ricardo Catalinas Jiménez (jimenezrick at gmail.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Update the package index with the appropriate package manager -# - -type=$(cat "$__object/explorer/type") -currage="$(cat "$__object/explorer/currage")" -if [ -f "$__object/parameter/maxage" ]; then - maxage="$(cat "$__object/parameter/maxage")" -fi - -if [ -n "$maxage" ]; then - if [ "$type" != "apt" ] && [ "$type" != "pacman" ]; then - echo "ERROR: \"--maxage\" only supported for \"apt\" or \"pacman\" pkg-manager." >&2 - exit 1 - elif [ "$currage" -lt "$maxage" ]; then - exit 0 # no need to update - fi -fi - - -case "$type" in - yum) ;; - apt) - echo "apt-get --quiet update" - echo "apt-cache updated (age was: $currage)" >> "$__messages_out" - ;; - pacman) - echo "pacman --noprogressbar --sync --refresh" - echo "pacman package database synced (age was: $currage)" >> "$__messages_out" - ;; - *) - echo "Don't know how to manage packages for type: $type" >&2 - exit 1 - ;; -esac diff --git a/cdist/conf/type/__package_update_index/man.rst b/cdist/conf/type/__package_update_index/man.rst deleted file mode 100644 index 3cd787b9..00000000 --- a/cdist/conf/type/__package_update_index/man.rst +++ /dev/null @@ -1,71 +0,0 @@ -cdist-type__package_update_index(7) -=================================== - -NAME ----- -cdist-type__update_index - Update the package index - - -DESCRIPTION ------------ -This cdist type allows you to update the package index on the target. -It will automatically use the appropriate package manager. - - -REQUIRED PARAMETERS -------------------- -None - - -OPTIONAL PARAMETERS -------------------- -type - The package manager to use. Default is determined based on the $os - explorer variable. - e.g. - * apt for Debian - * yum for Red Hat - * pacman for Arch Linux - -maxage - Available for package manager apt and pacman, max time in seconds since - last update. Repo update is skipped if maxage is not reached yet. - -MESSAGES --------- -apt-cache updated (age was: currage) - apt-cache was updated (run of `apt-get update`). `currage` is the time - in seconds since the previous run. - - -EXAMPLES --------- - -.. code-block:: sh - - # Update the package index on the target - __package_update_index - - # Force use of a specific package manager - __package_update_index --type apt - - # Only update every hour: - __package_update_index --maxage 3600 --type apt - - # same as above (on apt-type systems): - __package_update_index --maxage 3600 - -AUTHORS -------- -| Ricardo Catalinas Jiménez -| Thomas Eckert -| Stu Zhao - - -COPYING -------- - -Copyright \(C) 2014 Ricardo Catalinas Jiménez. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__package_update_index/nonparallel b/cdist/conf/type/__package_update_index/nonparallel deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__package_update_index/parameter/optional b/cdist/conf/type/__package_update_index/parameter/optional deleted file mode 100644 index 7a0be716..00000000 --- a/cdist/conf/type/__package_update_index/parameter/optional +++ /dev/null @@ -1,2 +0,0 @@ -type -maxage diff --git a/cdist/conf/type/__package_update_index/singleton b/cdist/conf/type/__package_update_index/singleton deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__package_upgrade_all/gencode-remote b/cdist/conf/type/__package_upgrade_all/gencode-remote deleted file mode 100755 index 38aa001e..00000000 --- a/cdist/conf/type/__package_upgrade_all/gencode-remote +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/sh -e -# -# 2014 Ricardo Catalinas Jiménez (jimenezrick at gmail.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Upgrade all the already installed packages with the appropriate package -# manager -# - -type="$__object/parameter/type" - -apt_clean="$__object/parameter/apt-clean" - -apt_dist_upgrade="$__object/parameter/apt-dist-upgrade" - -if [ -f "$type" ]; then - type="$(cat "$type")" -else - # By default determine package manager based on operating system - os="$(cat "$__global/explorer/os")" - case "$os" in - amazon|scientific|centos|fedora|redhat) type="yum" ;; - debian|ubuntu|devuan) type="apt" ;; - archlinux) type="pacman" ;; - *) - echo "Don't know how to manage packages on: $os" >&2 - exit 1 - ;; - esac -fi - -aptget="DEBIAN_FRONTEND=noninteractive apt-get --quiet --yes --no-install-recommends -o Dpkg::Options::=\"--force-confdef\" -o Dpkg::Options::=\"--force-confold\"" - -case "$type" in - yum) - echo "yum --quiet --assumeyes update" - echo "yum --quiet clean all" - ;; - apt) - if [ -f "$apt_dist_upgrade" ] - then echo "$aptget dist-upgrade" - else echo "$aptget upgrade" - fi - - if [ -f "$apt_clean" ] - then echo "apt-get --quiet clean" - else echo "apt-get --quiet autoclean" - fi - ;; - pacman) - echo "pacman --noprogressbar --noconfirm --sync --sysupgrade" - echo "pacman --noprogressbar --noconfirm --sync --clean" - ;; - *) - echo "Don't know how to manage packages on: $os" >&2 - exit 1 - ;; -esac diff --git a/cdist/conf/type/__package_upgrade_all/man.rst b/cdist/conf/type/__package_upgrade_all/man.rst deleted file mode 100644 index e9e2b8ce..00000000 --- a/cdist/conf/type/__package_upgrade_all/man.rst +++ /dev/null @@ -1,62 +0,0 @@ -cdist-type__package_upgrade_all(7) -================================== - -NAME ----- -cdist-type__package_upgrade_all - Upgrade all the installed packages - - -DESCRIPTION ------------ -This cdist type allows you to upgrade all the installed packages on the -target. It will automatically use the appropriate package manager. - - -REQUIRED PARAMETERS -------------------- -None - - -OPTIONAL PARAMETERS -------------------- -type - The package manager to use. Default is determined based on the $os - explorer variable. - e.g. - * apt for Debian - * yum for Red Hat - * pacman for Arch Linux - - -BOOLEAN PARAMETERS ------------------- -apt-dist-upgrade - Do dist-upgrade instead of upgrade. - -apt-clean - Clean out the local repository of retrieved package files. - - -EXAMPLES --------- - -.. code-block:: sh - - # Upgrade all the installed packages on the target - __package_upgrade_all - - # Force use of a specific package manager - __package_upgrade_all --type apt - - -AUTHORS -------- -Ricardo Catalinas Jiménez - -COPYING -------- - -Copyright \(C) 2014 Ricardo Catalinas Jiménez. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__package_upgrade_all/nonparallel b/cdist/conf/type/__package_upgrade_all/nonparallel deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__package_upgrade_all/parameter/boolean b/cdist/conf/type/__package_upgrade_all/parameter/boolean deleted file mode 100644 index 7a56a34b..00000000 --- a/cdist/conf/type/__package_upgrade_all/parameter/boolean +++ /dev/null @@ -1,2 +0,0 @@ -apt-clean -apt-dist-upgrade diff --git a/cdist/conf/type/__package_upgrade_all/parameter/optional b/cdist/conf/type/__package_upgrade_all/parameter/optional deleted file mode 100644 index aa80e646..00000000 --- a/cdist/conf/type/__package_upgrade_all/parameter/optional +++ /dev/null @@ -1 +0,0 @@ -type diff --git a/cdist/conf/type/__package_upgrade_all/singleton b/cdist/conf/type/__package_upgrade_all/singleton deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__package_yum/gencode-remote b/cdist/conf/type/__package_yum/gencode-remote deleted file mode 100755 index b52953f6..00000000 --- a/cdist/conf/type/__package_yum/gencode-remote +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/sh -e -# -# 2011-2014 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Manage packages with yum (mostly Fedora) -# - -if [ -f "$__object/parameter/name" ]; then - name="$(cat "$__object/parameter/name")" -else - name="$__object_id" -fi - -# Support installing from an URL -if [ -f "$__object/parameter/url" ]; then - install_name="$(cat "$__object/parameter/url")" -else - install_name="$name" -fi - - -state_should="$(cat "$__object/parameter/state")" - -if grep -q -E "(scientific|centos|redhat|amazon)" "$__global/explorer/os"; then - opts="-y --quiet" -else - opts="--assumeyes --quiet" -fi - -not_provided="^no package provides" -not_installed='is not installed$' - -if grep -q "$not_provided" "$__object/explorer/pkg_version"; then - if grep -q "$not_installed" "$__object/explorer/pkg_version"; then - state_is="absent" - else - state_is="present" - fi -else - state_is="present" -fi - -[ "$state_is" = "$state_should" ] && exit 0 - -case "$state_should" in - present) - echo "yum $opts install '$install_name'" - echo "installed" >> "$__messages_out" - ;; - absent) - echo "yum $opts remove '$name'" - echo "removed" >> "$__messages_out" - ;; - *) - echo "Unknown state: $state_should" >&2 - exit 1 - ;; -esac diff --git a/cdist/conf/type/__package_yum/man.rst b/cdist/conf/type/__package_yum/man.rst deleted file mode 100644 index 45ad9a55..00000000 --- a/cdist/conf/type/__package_yum/man.rst +++ /dev/null @@ -1,65 +0,0 @@ -cdist-type__package_yum(7) -========================== - -NAME ----- -cdist-type__package_yum - Manage packages with yum - - -DESCRIPTION ------------ -Yum is usually used on the Fedora distribution to manage packages. -If you specify an unknown package, yum will display the -slightly confusing error message "Error: Nothing to do". - - -REQUIRED PARAMETERS -------------------- -None - - -OPTIONAL PARAMETERS -------------------- -name - If supplied, use the name and not the object id as the package name. - -state - Either "present" or "absent", defaults to "present" -url - URL to use for the package - - -EXAMPLES --------- - -.. code-block:: sh - - # Ensure zsh in installed - __package_yum zsh --state present - - # If you don't want to follow pythonX packages, but always use python - __package_yum python --state present --name python2 - - # Remove obsolete package - __package_yum puppet --state absent - - __package epel-release-6-8 \ - --url http://mirror.switch.ch/ftp/mirror/epel/6/i386/epel-release-6-8.noarch.rpm - - -SEE ALSO --------- -:strong:`cdist-type__package`\ (7) - - -AUTHORS -------- -Nico Schottelius - - -COPYING -------- -Copyright \(C) 2011-2012 Nico Schottelius. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__package_yum/nonparallel b/cdist/conf/type/__package_yum/nonparallel deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__package_yum/parameter/default/state b/cdist/conf/type/__package_yum/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__package_yum/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__package_yum/parameter/optional b/cdist/conf/type/__package_yum/parameter/optional deleted file mode 100644 index 9293119d..00000000 --- a/cdist/conf/type/__package_yum/parameter/optional +++ /dev/null @@ -1,3 +0,0 @@ -name -state -url diff --git a/cdist/conf/type/__package_zypper/gencode-remote b/cdist/conf/type/__package_zypper/gencode-remote deleted file mode 100755 index e45dd9ff..00000000 --- a/cdist/conf/type/__package_zypper/gencode-remote +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/sh -e -# -# 2012 Nico Schottelius (nico-cdist at schottelius.org) -# 2013 Daniel Heule (hda at sfs.biz) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Manage packages with Zypper (mostly suse) -# - -# Debug -# exec >&2 -# set -x - -globalopts="--quiet --non-interactive" - -if [ -f "$__object/parameter/name" ]; then - name="$__object/parameter/name" -else - name="$__object_id" -fi - -state_should="$(cat "$__object/parameter/state")" -ptype="$(cat "$__object/parameter/ptype")" - -if [ -f "$__object/parameter/version" ]; then - version_should="$(cat "$__object/parameter/version")" - if [ "$ptype" != "package" ]; then - echo "version support only for type package implemented" >&2 - exit 2 - fi -else - version_should="" -fi - -pkg_version="$(cat "$__object/explorer/pkg_version")" -if [ -z "$pkg_version" ]; then - state_is="absent" - version_is="" -else - state_is="present" - version_is=${pkg_version##* } -fi - - -case "$state_should" in - present) - if [ -z "$version_should" ]; then - [ "$state_is" = "present" ] && exit 0 # if state is present, we dont need to do anything - echo "zypper $globalopts install --type '$ptype' --auto-agree-with-licenses '$name' >/dev/null" - echo "removed" >> "$__messages_out" - else - [ "$state_is" = "present" ] && [ "$version_should" = "$version_is" ] && exit 0 # if state is present and version is correct, we dont need to do anything - echo "zypper $globalopts install --oldpackage --type '$ptype' --auto-agree-with-licenses '$name' = '$version_should' >/dev/null" - echo "installed" >> "$__messages_out" - fi - ;; - absent) - [ "$state_is" = "absent" ] && exit 0 # if state is absent, we dont need to do anything - echo "zypper $globalopts remove --type '$ptype' '$name' >/dev/null" - echo "removed" >> "$__messages_out" - ;; - *) - echo "Unknown state: $state_should" >&2 - exit 1 - ;; -esac diff --git a/cdist/conf/type/__package_zypper/man.rst b/cdist/conf/type/__package_zypper/man.rst deleted file mode 100644 index 0051359b..00000000 --- a/cdist/conf/type/__package_zypper/man.rst +++ /dev/null @@ -1,73 +0,0 @@ -cdist-type__package_zypper(7) -============================= - -NAME ----- -cdist-type__package_zypper - Manage packages with zypper - - -DESCRIPTION ------------ -Zypper is usually used on the SuSE distribution to manage packages. - - -REQUIRED PARAMETERS -------------------- -None - - -OPTIONAL PARAMETERS -------------------- -name - If supplied, use the name and not the object id as the package name. - -state - Either "present" or "absent", defaults to "present" - -version - The version of the package to install. Default is to install the version - chosen by the local package manager. For a list of available versions, - have a look at the output of "zypper se -s packagename" - -ptype - Either "package", "patch", "pattern", "product" or "srcpackage", defaults to "package". For a description see man zypper. - - -EXAMPLES --------- - -.. code-block:: sh - - # Ensure zsh is installed - __package_zypper zsh --state present - - # If you don't want to follow pythonX packages, but always use python - __package_zypper python --state present --name python2 - - # Ensure binutils is installed and the version is forced to be 2.23.1-0.19.2 - __package_zypper binutils --state present --version 2.23.1-0.19.2 - - # Remove package - __package_zypper cfengine --state absent - - # install all packages which belongs to pattern x11 - __package_zypper x11 --ptype pattern --state present - - -SEE ALSO --------- -:strong:`cdist-type__package`\ (7) - - -AUTHORS -------- -Daniel Heule - - -COPYING -------- -Copyright \(C) 2012 Nico Schottelius. -Copyright \(C) 2013 Daniel Heule. -You can redistribute it and/or modify it under the terms of the -GNU General Public License as published by the Free Software Foundation, -either version 3 of the License, or (at your option) any later version. diff --git a/cdist/conf/type/__package_zypper/nonparallel b/cdist/conf/type/__package_zypper/nonparallel deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__package_zypper/parameter/default/ptype b/cdist/conf/type/__package_zypper/parameter/default/ptype deleted file mode 100644 index ba3bd787..00000000 --- a/cdist/conf/type/__package_zypper/parameter/default/ptype +++ /dev/null @@ -1 +0,0 @@ -package diff --git a/cdist/conf/type/__package_zypper/parameter/default/state b/cdist/conf/type/__package_zypper/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__package_zypper/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__package_zypper/parameter/optional b/cdist/conf/type/__package_zypper/parameter/optional deleted file mode 100644 index bc8565fc..00000000 --- a/cdist/conf/type/__package_zypper/parameter/optional +++ /dev/null @@ -1,4 +0,0 @@ -name -state -ptype -version diff --git a/cdist/conf/type/__pacman_conf/man.rst b/cdist/conf/type/__pacman_conf/man.rst deleted file mode 100644 index 6b8adfc9..00000000 --- a/cdist/conf/type/__pacman_conf/man.rst +++ /dev/null @@ -1,75 +0,0 @@ -cdist-type__pacman_conf(7) -========================== - -NAME ----- -cdist-type__pacman_conf - Manage pacman configuration - - -DESCRIPTION ------------ -The type allows you to configure options section, add or delete repositories and manage mirrorlists - - -REQUIRED PARAMETERS -------------------- -section - 'options' for configure options section - - Otherwise it specifies a repository or a plain file - -key - Specifies the key which will be set - - If section = 'options' or file is not set the key will - be checked against available keys from pacman.conf - -value - Specifies the value which will be set against the key - - -OPTIONAL PARAMETERS -------------------- -state - 'present' or 'absent', defaults to 'present' - -file - Specifies the filename. - - The managed file will be named like 'plain_file_filename' - - If supplied the key will not be checked. - - -EXAMPLES --------- - -.. code-block:: sh - - # Manage options section in pacman.conf - __pacman_conf options_Architecture --section options --key Architecture --value auto - - # Add new repository - __pacman_conf localrepo_Server --section localrepo --key Server --value "file:///var/cache/pacman/pkg" - - # Add mirror to a mirrorlist - __pacman_conf customlist_Server --file customlist --section customlist --key Server\ - --value "file:///var/cache/pacman/pkg" - - -SEE ALSO --------- -:strong:`grep`\ (1) - - -AUTHORS -------- -Dominique Roux - - -COPYING -------- -Copyright \(C) 2015 Dominique Roux. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__pacman_conf/manifest b/cdist/conf/type/__pacman_conf/manifest deleted file mode 100755 index a43f18a1..00000000 --- a/cdist/conf/type/__pacman_conf/manifest +++ /dev/null @@ -1,133 +0,0 @@ -#!/bin/sh -e -# -# 2015 Dominique Roux (dominique.roux4 at gmail.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -#get params -section=$(cat "$__object/parameter/section") -key=$(cat "$__object/parameter/key") -value=$(cat "$__object/parameter/value") -file=$(cat "$__object/parameter/file" 2>/dev/null) -state=$(cat "$__object/parameter/state" 2>/dev/null) - -#path variable default /etc/pacman.d -sec_path="/etc/pacman.d" - -#allowed keys (from man pacman.conf) -allowed_option_keys="RootDir DBPath CacheDir GPGDir LogFile HoldPkg IgnorePkg IgnoreGroup Include Architecture XferCommand NoUpgrade NoExtract CleanMethod SigLevel LocalFileSigLevel RemoteFileSigLevel" -boolean_option_keys="UseSyslog Color UseDelta TotalDownload CheckSpace VerbosePkgLists" -allowed_repo_keys="Include Server SigLevel Usage" - -#set global variables -MATCH=0 - -#function for check if array contain string -contains_element() { - - MATCH=0 - - target=$1 - shift - - for key in "$@"; do - if [ "${key}" = "${target}" ]; then - MATCH=1 - return 0 - fi - done - MATCH=0 -} - -if [ "${file}" ]; then - __file "${sec_path}/plain_file_${file}"\ - --state exists --mode 666 - - if [ "${state}" = "present" ]; then - - require="__file/${sec_path}/plain_file_${file}" __key_value "${file}_${key}" \ - --file "${sec_path}/plain_file_${file}" --key "${key}" --value "${value}" --delimiter ' = ' - - exit 0 - - elif [ "${state}" = "absent" ]; then - require="__file/${sec_path}/plain_file_${file}" __key_value "${file}_${key}" \ - --state absent - exit 0 - - else - echo "ERROR: Unknown state: ${state}" >&2 - exit 0 - fi -fi - -if [ "${section}" = "options" ]; then - - __file "${sec_path}/${section}"\ - --state exists --mode 666 --source - << eof -[${section}] -eof - #check if key is valid - #check for boolean value - contains_element "${key}" "${boolean_option_keys}" - - if [ "${MATCH}" -eq 1 ]; then - if [ "${value}" = "on" ]; then - require="__file/${sec_path}/${section}" __line "${key}_${value}" \ - --file "${sec_path}/${section}" --line "${key}" - elif [ "${value}" = "off" ]; then - require="__file/${sec_path}/${section}" __line "${key}_${value}" \ - --file "${sec_path}/${section}" --line "${key}" --state absent - fi - - else - contains_element "${key}" "${allowed_option_keys}" - - if [ "${MATCH}" -eq 1 ]; then - require="__file/${sec_path}/${section}" __key_value "${section}_${key}" \ - --file "${sec_path}/${section}" --key "${key}" --value "${value}" --delimiter ' = ' - else - echo "Key: ${key} is not valid. Have a look at man pacman.conf" >&2 - fi - fi - -else - __file "${sec_path}/repo_${section}"\ - --state exists --mode 666 --source - << eof -[${section}] -eof - if [ "${state}" = "present" ]; then - - #check if key is valid - contains_element "${key}" "${allowed_repo_keys}" - if [ ${MATCH} -eq 0 ]; then - exit - fi - - require="__file/${sec_path}/repo_${section}" __key_value "${section}_${key}" \ - --file "${sec_path}/repo_${section}" --key "${key}" --value "${value}" --delimiter ' = ' - - elif [ "${state}" = "absent" ]; then - - require="__file/${sec_path}/repo_${section}" __key_value "${section}_${key}" \ - --state absent - - else - echo "ERROR: Unknown state: ${state}" >&2 - fi - -fi diff --git a/cdist/conf/type/__pacman_conf/parameter/default/file b/cdist/conf/type/__pacman_conf/parameter/default/file deleted file mode 100644 index 139597f9..00000000 --- a/cdist/conf/type/__pacman_conf/parameter/default/file +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/cdist/conf/type/__pacman_conf/parameter/default/state b/cdist/conf/type/__pacman_conf/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__pacman_conf/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__pacman_conf/parameter/optional b/cdist/conf/type/__pacman_conf/parameter/optional deleted file mode 100644 index 5d52aa2e..00000000 --- a/cdist/conf/type/__pacman_conf/parameter/optional +++ /dev/null @@ -1,2 +0,0 @@ -file -state diff --git a/cdist/conf/type/__pacman_conf/parameter/required b/cdist/conf/type/__pacman_conf/parameter/required deleted file mode 100644 index 2f9d59e0..00000000 --- a/cdist/conf/type/__pacman_conf/parameter/required +++ /dev/null @@ -1,3 +0,0 @@ -section -key -value diff --git a/cdist/conf/type/__pacman_conf_integrate/files/mirrorlist b/cdist/conf/type/__pacman_conf_integrate/files/mirrorlist deleted file mode 100644 index a378fb50..00000000 --- a/cdist/conf/type/__pacman_conf_integrate/files/mirrorlist +++ /dev/null @@ -1,344 +0,0 @@ -## -## Arch Linux repository mirrorlist -## Generated on 2015-03-15 -## - -## Worldwide -#Server = http://mirror.rackspace.com/archlinux/$repo/os/$arch - -## Australia -#Server = http://mirror.aarnet.edu.au/pub/archlinux/$repo/os/$arch -#Server = http://archlinux.mirror.digitalpacific.com.au/$repo/os/$arch -#Server = http://ftp.iinet.net.au/pub/archlinux/$repo/os/$arch -#Server = http://mirror.internode.on.net/pub/archlinux/$repo/os/$arch -#Server = http://mirror.rackcentral.com.au/archlinux/$repo/os/$arch -#Server = http://ftp.swin.edu.au/archlinux/$repo/os/$arch -#Server = http://archlinux.mirror.uber.com.au/$repo/os/$arch - -## Austria -#Server = http://mirror.easyname.at/archlinux/$repo/os/$arch -#Server = http://mirror1.htu.tugraz.at/archlinux/$repo/os/$arch - -## Bangladesh -#Server = http://mirrors.ispros.com.bd/archlinux/$repo/os/$arch - -## Belarus -#Server = http://ftp.byfly.by/pub/archlinux/$repo/os/$arch -#Server = http://mirror.datacenter.by/pub/archlinux/$repo/os/$arch - -## Belgium -#Server = http://archlinux.cu.be/$repo/os/$arch -#Server = http://archlinux.mirror.kangaroot.net/$repo/os/$arch - -## Brazil -#Server = http://archlinux.c3sl.ufpr.br/$repo/os/$arch -#Server = http://www.las.ic.unicamp.br/pub/archlinux/$repo/os/$arch -#Server = http://pet.inf.ufsc.br/mirrors/archlinux/$repo/os/$arch - -## Bulgaria -#Server = http://mirror.telepoint.bg/archlinux/$repo/os/$arch - -## Canada -#Server = http://archlinux.dropswitch.net/archlinux/$repo/os/$arch -#Server = http://mirror.clibre.uqam.ca/archlinux/$repo/os/$arch -#Server = http://mirror.csclub.uwaterloo.ca/archlinux/$repo/os/$arch -#Server = http://mirror.its.dal.ca/archlinux/$repo/os/$arch -#Server = http://archlinux.mirror.rafal.ca/$repo/os/$arch -#Server = http://archlinux.mirror.vexxhost.com/$repo/os/$arch - -## Chile -#Server = http://mirror.archlinux.cl/$repo/os/$arch - -## China -#Server = http://mirrors.163.com/archlinux/$repo/os/$arch -#Server = http://mirror.bjtu.edu.cn/archlinux/$repo/os/$arch -#Server = http://mirrors.cqu.edu.cn/archlinux/$repo/os/$arch -#Server = http://mirrors.hust.edu.cn/archlinux/$repo/os/$arch -#Server = http://mirrors.hustunique.com/archlinux/$repo/os/$arch -#Server = http://mirrors.neusoft.edu.cn/archlinux/$repo/os/$arch -#Server = http://run.hit.edu.cn/archlinux/$repo/os/$arch -#Server = http://mirrors.tuna.tsinghua.edu.cn/archlinux/$repo/os/$arch -#Server = http://mirrors.ustc.edu.cn/archlinux/$repo/os/$arch -#Server = https://mirrors.ustc.edu.cn/archlinux/$repo/os/$arch -#Server = http://mirrors.zju.edu.cn/archlinux/$repo/os/$arch - -## Colombia -#Server = http://mirror.edatel.net.co/archlinux/$repo/os/$arch -#Server = http://www.laqee.unal.edu.co/archlinux/$repo/os/$arch - -## Croatia -#Server = http://archlinux.iskon.hr/$repo/os/$arch - -## Czech Republic -#Server = http://archlinux.mirror.dkm.cz/pub/archlinux/$repo/os/$arch -#Server = http://gluttony.sin.cvut.cz/arch/$repo/os/$arch -#Server = http://mirror.oss.maxcdn.com/archlinux/$repo/os/$arch -#Server = http://mirrors.nic.cz/archlinux/$repo/os/$arch -#Server = http://mirror.vpsfree.cz/archlinux/$repo/os/$arch - -## Denmark -#Server = http://mirrors.dotsrc.org/archlinux/$repo/os/$arch -#Server = http://mirror.one.com/archlinux/$repo/os/$arch - -## Ecuador -#Server = http://mirror.cedia.org.ec/archlinux/$repo/os/$arch -#Server = http://mirror.espoch.edu.ec/archlinux/$repo/os/$arch -#Server = http://mirror.uta.edu.ec/archlinux/$repo/os/$arch - -## Estonia -#Server = http://ftp.eenet.ee/pub/archlinux/$repo/os/$arch - -## France -#Server = http://archlinux.aubrac-medical.fr/$repo/os/$arch -#Server = http://mirror.archlinux.ikoula.com/archlinux/$repo/os/$arch -#Server = http://archlinux.vi-di.fr/$repo/os/$arch -#Server = http://mir.art-software.fr/arch/$repo/os/$arch -#Server = http://fooo.biz/archlinux/$repo/os/$arch -#Server = https://fooo.biz/archlinux/$repo/os/$arch -#Server = http://mirror.lastmikoi.net/archlinux/$repo/os/$arch -#Server = http://mirror.lightcone.eu/archlinux/$repo/os/$arch -#Server = http://archlinux.mailtunnel.eu/$repo/os/$arch -#Server = https://www.mailtunnel.eu/archlinux/$repo/os/$arch -#Server = http://mir.archlinux.fr/$repo/os/$arch -#Server = http://arch.nimukaito.net/$repo/os/$arch -#Server = http://archlinux.mirrors.ovh.net/archlinux/$repo/os/$arch -#Server = http://archlinux.mirror.pkern.at/$repo/os/$arch -#Server = https://archlinux.mirror.pkern.at/$repo/os/$arch -#Server = http://archlinux.polymorf.fr/$repo/os/$arch -#Server = http://arch.static.lu/$repo/os/$arch -#Server = https://arch.static.lu/$repo/os/$arch -#Server = http://arch.tamcore.eu/$repo/os/$arch -#Server = http://mirror.tyborek.pl/arch/$repo/os/$arch -#Server = http://ftp.u-strasbg.fr/linux/distributions/archlinux/$repo/os/$arch -#Server = http://arch.yourlabs.org/$repo/os/$arch - -## Germany -#Server = http://mirror.23media.de/archlinux/$repo/os/$arch -#Server = http://archlinux.limun.org/$repo/os/$arch -#Server = https://archlinux.limun.org/$repo/os/$arch -#Server = http://artfiles.org/archlinux.org/$repo/os/$arch -#Server = http://ftp.fau.de/archlinux/$repo/os/$arch -#Server = https://ftp.fau.de/archlinux/$repo/os/$arch -#Server = http://mirror.flipez.de/archlinux/$repo/os/$arch -#Server = http://mirror.fluxent.de/archlinux/$repo/os/$arch -#Server = http://mirror.gnomus.de/$repo/os/$arch -#Server = http://arch.packages.gnp-tec.net/$repo/os/$arch -#Server = http://ftp5.gwdg.de/pub/linux/archlinux/$repo/os/$arch -#Server = http://mirror.hactar.bz/$repo/os/$arch -#Server = http://ftp.hawo.stw.uni-erlangen.de/archlinux/$repo/os/$arch -#Server = http://ftp.hosteurope.de/mirror/ftp.archlinux.org/$repo/os/$arch -#Server = http://ftp-stud.hs-esslingen.de/pub/Mirrors/archlinux/$repo/os/$arch -#Server = http://mirror.js-webcoding.de/pub/archlinux/$repo/os/$arch -#Server = http://mirror.k42.ch/archlinux/$repo/os/$arch -#Server = http://mirror.de.leaseweb.net/archlinux/$repo/os/$arch -#Server = http://mirror.metalgamer.eu/archlinux/$repo/os/$arch -#Server = http://mirror.michael-eckert.net/archlinux/$repo/os/$arch -#Server = http://archlinux.my-universe.com/$repo/os/$arch -#Server = https://archlinux.my-universe.com/$repo/os/$arch -#Server = http://mirrors.n-ix.net/archlinux/$repo/os/$arch -#Server = http://mirror.netcologne.de/archlinux/$repo/os/$arch -#Server = http://mirrors.niyawe.de/archlinux/$repo/os/$arch -#Server = http://ftp.halifax.rwth-aachen.de/archlinux/$repo/os/$arch -#Server = http://linux.rz.rub.de/archlinux/$repo/os/$arch -#Server = http://mirror.selfnet.de/archlinux/$repo/os/$arch -#Server = http://ftp.spline.inf.fu-berlin.de/mirrors/archlinux/$repo/os/$arch -#Server = http://ftp.tu-chemnitz.de/pub/linux/archlinux/$repo/os/$arch -#Server = http://ftp.tuxdroid.org/archlinux/$repo/os/$arch -#Server = http://ftp.uni-bayreuth.de/linux/archlinux/$repo/os/$arch -#Server = http://ftp.uni-hannover.de/archlinux/$repo/os/$arch -#Server = http://ftp.uni-kl.de/pub/linux/archlinux/$repo/os/$arch -#Server = http://mirror.united-gameserver.de/archlinux/$repo/os/$arch - -## Greece -#Server = http://ftp.cc.uoc.gr/mirrors/linux/archlinux/$repo/os/$arch -#Server = http://foss.aueb.gr/mirrors/linux/archlinux/$repo/os/$arch -#Server = https://foss.aueb.gr/mirrors/linux/archlinux/$repo/os/$arch -#Server = http://mirrors.myaegean.gr/linux/archlinux/$repo/os/$arch -#Server = http://ftp.ntua.gr/pub/linux/archlinux/$repo/os/$arch -#Server = http://ftp.otenet.gr/linux/archlinux/$repo/os/$arch - -## Hungary -#Server = http://ftp.mfa.kfki.hu/pub/mirrors/ftp.archlinux.org/$repo/os/$arch - -## Iceland -#Server = http://mirror.system.is/arch/$repo/os/$arch -#Server = https://mirror.system.is/arch/$repo/os/$arch - -## India -#Server = http://mirror.cse.iitk.ac.in/archlinux/$repo/os/$arch -#Server = http://ftp.iitm.ac.in/archlinux/$repo/os/$arch - -## Indonesia -#Server = http://mirror.kavalinux.com/archlinux/$repo/os/$arch -#Server = http://mirror.poliwangi.ac.id/archlinux/$repo/os/$arch -#Server = http://suro.ubaya.ac.id/archlinux/$repo/os/$arch - -## Iran -#Server = http://mirror.yazd.ac.ir/arch/$repo/os/$arch - -## Ireland -#Server = http://ftp.heanet.ie/mirrors/ftp.archlinux.org/$repo/os/$arch - -## Israel -#Server = http://mirror.isoc.org.il/pub/archlinux/$repo/os/$arch - -## Italy -#Server = http://archlinux.openlabto.org/archlinux/$repo/os/$arch -#Server = http://archlinux.beccacervello.it/archlinux/$repo/os/$arch -#Server = http://mirrors.prometeus.net/archlinux/$repo/os/$arch - -## Japan -#Server = http://ftp.tsukuba.wide.ad.jp/Linux/archlinux/$repo/os/$arch -#Server = http://ftp.jaist.ac.jp/pub/Linux/ArchLinux/$repo/os/$arch - -## Kazakhstan -#Server = http://mirror.neolabs.kz/archlinux/$repo/os/$arch - -## Latvia -#Server = http://archlinux.koyanet.lv/archlinux/$repo/os/$arch - -## Lithuania -#Server = http://archlinux.akmc.lt/$repo/os/$arch -#Server = http://atviras.lt/veidrodziai/archlinux/$repo/os/$arch - -## Luxembourg -#Server = http://archlinux.mirror.root.lu/$repo/os/$arch - -## Macedonia -#Server = http://arch.softver.org.mk/archlinux/$repo/os/$arch -#Server = http://mirror.t-home.mk/archlinux/$repo/os/$arch - -## Netherlands -#Server = http://arch.apt-get.eu/$repo/os/$arch -#Server = http://mirror.i3d.net/pub/archlinux/$repo/os/$arch -#Server = https://mirror.i3d.net/pub/archlinux/$repo/os/$arch -#Server = http://mirror.nl.leaseweb.net/archlinux/$repo/os/$arch -#Server = http://ftp.nluug.nl/os/Linux/distr/archlinux/$repo/os/$arch -#Server = http://ftp.snt.utwente.nl/pub/os/linux/archlinux/$repo/os/$arch - -## New Caledonia -#Server = http://mirror.lagoon.nc/pub/archlinux/$repo/os/$arch -#Server = http://archlinux.nautile.nc/archlinux/$repo/os/$arch - -## New Zealand -#Server = http://mirror.xnet.co.nz/pub/archlinux/$repo/os/$arch - -## Norway -#Server = http://mirror.archlinux.no/$repo/os/$arch -#Server = http://archlinux.uib.no/$repo/os/$arch -#Server = http://archlinux.neuf.no/$repo/os/$arch - -## Philippines -#Server = http://mirror.pregi.net/pub/Linux/archlinux/$repo/os/$arch - -## Poland -#Server = http://mirror.chmuri.net/archmirror/$repo/os/$arch -#Server = http://arch.midov.pl/arch/$repo/os/$arch -#Server = http://piotrkosoft.net/pub/mirrors/ftp.archlinux.org/$repo/os/$arch -#Server = http://ftp.vectranet.pl/archlinux/$repo/os/$arch - -## Portugal -#Server = http://archlinux.dcc.fc.up.pt/$repo/os/$arch -#Server = http://ftp.rnl.tecnico.ulisboa.pt/pub/archlinux/$repo/os/$arch - -## Romania -#Server = http://mirror.archlinux.ro/archlinux/$repo/os/$arch -#Server = http://archlinux.mirrors.linux.ro/$repo/os/$arch - -## Russia -#Server = http://mirror.rol.ru/archlinux/$repo/os/$arch -#Server = http://mirror.yandex.ru/archlinux/$repo/os/$arch - -## Serbia -#Server = http://mirror.pmf.kg.ac.rs/archlinux/$repo/os/$arch - -## Singapore -#Server = http://download.nus.edu.sg/mirror/arch/$repo/os/$arch -#Server = http://mirror.nus.edu.sg/archlinux/$repo/os/$arch - -## Slovakia -#Server = http://mirror.lnx.sk/pub/linux/archlinux/$repo/os/$arch -#Server = http://tux.rainside.sk/archlinux/$repo/os/$arch - -## South Africa -#Server = http://ftp.wa.co.za/pub/archlinux/$repo/os/$arch - -## South Korea -#Server = http://ftp.kaist.ac.kr/ArchLinux/$repo/os/$arch -#Server = http://mirror.premi.st/archlinux/$repo/os/$arch - -## Spain -#Server = http://osl.ugr.es/archlinux/$repo/os/$arch -#Server = http://sunsite.rediris.es/mirror/archlinux/$repo/os/$arch - -## Sweden -#Server = http://ftp.df.lth.se/pub/archlinux/$repo/os/$arch -#Server = http://ftp.lysator.liu.se/pub/archlinux/$repo/os/$arch -#Server = https://ftp.lysator.liu.se/pub/archlinux/$repo/os/$arch -#Server = http://ftp.myrveln.se/pub/linux/archlinux/$repo/os/$arch -#Server = http://ftp.portlane.com/pub/os/linux/archlinux/$repo/os/$arch - -## Switzerland -#Server = http://archlinux.puzzle.ch/$repo/os/$arch - -## Taiwan -#Server = http://archlinux.cs.nctu.edu.tw/$repo/os/$arch -#Server = http://shadow.ind.ntou.edu.tw/archlinux/$repo/os/$arch -#Server = http://ftp.tku.edu.tw/Linux/ArchLinux/$repo/os/$arch -#Server = http://ftp.yzu.edu.tw/Linux/archlinux/$repo/os/$arch - -## Turkey -#Server = http://ftp.linux.org.tr/archlinux/$repo/os/$arch - -## Ukraine -#Server = http://mirrors.nix.org.ua/linux/archlinux/$repo/os/$arch - -## United Kingdom -#Server = http://mirror.bytemark.co.uk/archlinux/$repo/os/$arch -#Server = http://mirror.cinosure.com/archlinux/$repo/os/$arch -#Server = http://mirrors.manchester.m247.com/arch-linux/$repo/os/$arch -#Server = http://www.mirrorservice.org/sites/ftp.archlinux.org/$repo/os/$arch -#Server = http://arch.serverspace.co.uk/arch/$repo/os/$arch -#Server = http://archlinux.mirrors.uk2.net/$repo/os/$arch - -## United States -#Server = http://mirrors.abscission.net/archlinux/$repo/os/$arch -#Server = http://mirrors.acm.wpi.edu/archlinux/$repo/os/$arch -#Server = http://mirrors.advancedhosters.com/archlinux/$repo/os/$arch -#Server = http://mirrors.aggregate.org/archlinux/$repo/os/$arch -#Server = http://archlinux.surlyjake.com/archlinux/$repo/os/$arch -#Server = http://mirrors.cat.pdx.edu/archlinux/$repo/os/$arch -#Server = http://mirror.cc.columbia.edu/pub/linux/archlinux/$repo/os/$arch -#Server = http://mirrors.cdndepo.com/archlinux/$repo/os/$arch -#Server = https://mirrors.cdndepo.com/archlinux/$repo/os/$arch -#Server = http://mirrors.cecsresearch.org/archlinux/$repo/os/$arch -#Server = http://cosmos.cites.illinois.edu/pub/archlinux/$repo/os/$arch -#Server = http://mirror.cs.pitt.edu/archlinux/$repo/os/$arch -#Server = http://mirror.es.its.nyu.edu/archlinux/$repo/os/$arch -#Server = http://mirrors.gigenet.com/archlinux/$repo/os/$arch -#Server = http://mirror.grig.io/archlinux/$repo/os/$arch -#Server = http://www.gtlib.gatech.edu/pub/archlinux/$repo/os/$arch -#Server = http://mirror.ancl.hawaii.edu/linux/archlinux/$repo/os/$arch -#Server = http://mirror.jmu.edu/pub/archlinux/$repo/os/$arch -#Server = http://mirrors.kernel.org/archlinux/$repo/os/$arch -#Server = https://mirrors.kernel.org/archlinux/$repo/os/$arch -#Server = http://mirror.us.leaseweb.net/archlinux/$repo/os/$arch -#Server = http://mirrors.liquidweb.com/archlinux/$repo/os/$arch -#Server = http://arch.localmsp.org/arch/$repo/os/$arch -#Server = https://arch.localmsp.org/arch/$repo/os/$arch -#Server = http://lug.mtu.edu/archlinux/$repo/os/$arch -#Server = http://mirror.metrocast.net/archlinux/$repo/os/$arch -#Server = http://mirror.nexcess.net/archlinux/$repo/os/$arch -#Server = http://ftp.osuosl.org/pub/archlinux/$repo/os/$arch -#Server = http://archlinux.pallissard.net/archlinux/$repo/os/$arch -#Server = http://mirror.rit.edu/archlinux/$repo/os/$arch -#Server = http://mirrors.rutgers.edu/archlinux/$repo/os/$arch -#Server = http://mirror.umd.edu/archlinux/$repo/os/$arch -#Server = http://mirror.vtti.vt.edu/archlinux/$repo/os/$arch -#Server = http://mirrors.xmission.com/archlinux/$repo/os/$arch -#Server = http://mirror.yellowfiber.net/archlinux/$repo/os/$arch - -## Vietnam -#Server = http://f.archlinuxvn.org/archlinux/$repo/os/$arch -#Server = http://mirror-fpt-telecom.fpt.net/archlinux/$repo/os/$arch - diff --git a/cdist/conf/type/__pacman_conf_integrate/files/options b/cdist/conf/type/__pacman_conf_integrate/files/options deleted file mode 100644 index 68273e49..00000000 --- a/cdist/conf/type/__pacman_conf_integrate/files/options +++ /dev/null @@ -1,6 +0,0 @@ -[options] -HoldPkg = pacman glibc -Architecture = auto -CheckSpace -SigLevel = Required DatabaseOptional -LocalFileSigLevel = Optional diff --git a/cdist/conf/type/__pacman_conf_integrate/files/pacman.conf.cdist b/cdist/conf/type/__pacman_conf_integrate/files/pacman.conf.cdist deleted file mode 100644 index 88e6e623..00000000 --- a/cdist/conf/type/__pacman_conf_integrate/files/pacman.conf.cdist +++ /dev/null @@ -1,6 +0,0 @@ -# -# cdist managed - do not change -# -Include = /etc/pacman.d/options -Include = /etc/pacman.d/repo_* -Include = /etc/pacman.d/plain_file_* diff --git a/cdist/conf/type/__pacman_conf_integrate/files/pacman.conf.pacman b/cdist/conf/type/__pacman_conf_integrate/files/pacman.conf.pacman deleted file mode 100644 index f43fe397..00000000 --- a/cdist/conf/type/__pacman_conf_integrate/files/pacman.conf.pacman +++ /dev/null @@ -1,99 +0,0 @@ -# -# /etc/pacman.conf -# -# See the pacman.conf(5) manpage for option and repository directives - -# -# GENERAL OPTIONS -# -[options] -# The following paths are commented out with their default values listed. -# If you wish to use different paths, uncomment and update the paths. -#RootDir = / -#DBPath = /var/lib/pacman/ -#CacheDir = /var/cache/pacman/pkg/ -#LogFile = /var/log/pacman.log -#GPGDir = /etc/pacman.d/gnupg/ -HoldPkg = pacman glibc -#XferCommand = /usr/bin/curl -C - -f %u > %o -#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u -#CleanMethod = KeepInstalled -#UseDelta = 0.7 -Architecture = auto - -# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup -#IgnorePkg = -#IgnoreGroup = - -#NoUpgrade = -#NoExtract = - -# Misc options -#UseSyslog -#Color -#TotalDownload -CheckSpace -#VerbosePkgLists - -# By default, pacman accepts packages signed by keys that its local keyring -# trusts (see pacman-key and its man page), as well as unsigned packages. -SigLevel = Required DatabaseOptional -LocalFileSigLevel = Optional -#RemoteFileSigLevel = Required - -# NOTE: You must run `pacman-key --init` before first using pacman; the local -# keyring can then be populated with the keys of all official Arch Linux -# packagers with `pacman-key --populate archlinux`. - -# -# REPOSITORIES -# - can be defined here or included from another file -# - pacman will search repositories in the order defined here -# - local/custom mirrors can be added here or in separate files -# - repositories listed first will take precedence when packages -# have identical names, regardless of version number -# - URLs will have $repo replaced by the name of the current repo -# - URLs will have $arch replaced by the name of the architecture -# -# Repository entries are of the format: -# [repo-name] -# Server = ServerName -# Include = IncludePath -# -# The header [repo-name] is crucial - it must be present and -# uncommented to enable the repo. -# - -# The testing repositories are disabled by default. To enable, uncomment the -# repo name header and Include lines. You can add preferred servers immediately -# after the header, and they will be used before the default mirrors. - -#[testing] -#Include = /etc/pacman.d/mirrorlist - -[core] -Include = /etc/pacman.d/mirrorlist - -[extra] -Include = /etc/pacman.d/mirrorlist - -#[community-testing] -#Include = /etc/pacman.d/mirrorlist - -[community] -Include = /etc/pacman.d/mirrorlist - -# If you want to run 32 bit applications on your x86_64 system, -# enable the multilib repositories as required here. - -#[multilib-testing] -#Include = /etc/pacman.d/mirrorlist - -#[multilib] -#Include = /etc/pacman.d/mirrorlist - -# An example of a custom package repository. See the pacman manpage for -# tips on creating your own repositories. -#[custom] -#SigLevel = Optional TrustAll -#Server = file:///home/custompkgs diff --git a/cdist/conf/type/__pacman_conf_integrate/man.rst b/cdist/conf/type/__pacman_conf_integrate/man.rst deleted file mode 100644 index c21b56d8..00000000 --- a/cdist/conf/type/__pacman_conf_integrate/man.rst +++ /dev/null @@ -1,51 +0,0 @@ -cdist-type__pacman_conf_integrate(7) -==================================== - -NAME ----- -cdist-type__pacman_conf_integrate - Integrate default pacman.conf to cdist conform and vice versa - - -DESCRIPTION ------------ -The type allows you to convert the default pacman.conf to a cdist conform one and vice versa - - -REQUIRED PARAMETERS -------------------- -None. - -OPTIONAL PARAMETERS -------------------- -state - 'present' or 'absent', defaults to 'present' - - -EXAMPLES --------- - -.. code-block:: sh - - # Convert normal to cdist conform - __pacman_conf_integrate convert - - # Convert cdist conform to normal - __pacman_conf_integrate convert --state absent - - -SEE ALSO --------- -:strong:`grep`\ (1) - - -AUTHORS -------- -Dominique Roux - - -COPYING -------- -Copyright \(C) 2015 Dominique Roux. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__pacman_conf_integrate/manifest b/cdist/conf/type/__pacman_conf_integrate/manifest deleted file mode 100755 index 0ce0bee5..00000000 --- a/cdist/conf/type/__pacman_conf_integrate/manifest +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -e -# -# 2015 Dominique Roux (dominique.roux4 at gmail.com -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -state=$(cat "$__object/parameter/state" 2>/dev/null) - -if [ "${state}" = "present" ]; then - __file /etc/pacman.conf\ - --owner root --group root --mode 644 --source "$__type/files/pacman.conf.cdist" - - __file /etc/pacman.d/options\ - --owner root --group root --mode 644 --source "$__type/files/options" - - __file /etc/pacman.d/repo_empty_placeholder\ - --owner root --group root --mode 644 - - __file /etc/pacman.d/plain_file_empty_placeholder\ - --owner root --group root --mode 644 - -elif [ "${state}" = "absent" ]; then - - __file /etc/pacman.conf\ - --owner root --group root --mode 644 --source "$__type/files/pacman.conf.pacman" - - __file /etc/pacman.d/mirrorlist\ - --owner root --group root --mode 644 --source "$__type/files/mirrorlist" - - __file /etc/pacman.d/options\ - --state absent - - __file /etc/pacman.d/repo_empty_placeholder\ - --state absent - - __file /etc/pacman.d/plain_file_empty_placeholder\ - --state absent - -else - - echo "ERROR: Unknown state: ${state}" >&2 - -fi diff --git a/cdist/conf/type/__pacman_conf_integrate/parameter/default/state b/cdist/conf/type/__pacman_conf_integrate/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__pacman_conf_integrate/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__pf_apply/explorer/rcvar b/cdist/conf/type/__pf_apply/explorer/rcvar deleted file mode 100755 index 7c8d535f..00000000 --- a/cdist/conf/type/__pf_apply/explorer/rcvar +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -# -# 2012 Jake Guffey (jake.guffey at eprotex.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Get the location of the pf ruleset on the target host. -# - -# Debug -#exec >&2 -#set -x - -# Check /etc/rc.conf for pf's configuration file name. Default to /etc/pf.conf - -RC="/etc/rc.conf" -PFCONF="$(grep '^pf_rules=' ${RC} | cut -d= -f2 | sed 's/"//g')" -echo "${PFCONF:-"/etc/pf.conf"}" - -# Debug -#set +x - diff --git a/cdist/conf/type/__pf_apply/gencode-remote b/cdist/conf/type/__pf_apply/gencode-remote deleted file mode 100755 index c8f7a25a..00000000 --- a/cdist/conf/type/__pf_apply/gencode-remote +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh -e -# -# 2012 Jake Guffey (jake.guffey at eprotex.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Apply pf(4) ruleset on *BSD -# - -# Debug -#exec >&2 -#set -x - -rcvar=$(cat "$__object/explorer/rcvar") - -cat <&2 - fi -fi -EOF - -# Debug -#set +x - diff --git a/cdist/conf/type/__pf_apply/man.rst b/cdist/conf/type/__pf_apply/man.rst deleted file mode 100644 index eee345e7..00000000 --- a/cdist/conf/type/__pf_apply/man.rst +++ /dev/null @@ -1,55 +0,0 @@ -cdist-type__pf_apply(7) -======================= - -NAME ----- -cdist-type__pf_apply - Apply pf(4) ruleset on \*BSD - - -DESCRIPTION ------------ -This type is used on \*BSD systems to manage the pf firewall's active ruleset. - - -REQUIRED PARAMETERS -------------------- -NONE - - -OPTIONAL PARAMETERS -------------------- -NONE - - -EXAMPLES --------- - -.. code-block:: sh - - # Modify the ruleset on $__target_host: - __pf_ruleset --state present --source /my/pf/ruleset.conf - require="__pf_ruleset" \ - __pf_apply - - # Remove the ruleset on $__target_host (implies disabling pf(4): - __pf_ruleset --state absent - require="__pf_ruleset" \ - __pf_apply - - -SEE ALSO --------- -:strong:`pf`\ (4), :strong:`cdist-type__pf_ruleset`\ (7) - - -AUTHORS -------- -Jake Guffey - - -COPYING -------- -Copyright \(C) 2012 Jake Guffey. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__pf_apply/singleton b/cdist/conf/type/__pf_apply/singleton deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__pf_ruleset/explorer/cksum b/cdist/conf/type/__pf_ruleset/explorer/cksum deleted file mode 100755 index 9be6c901..00000000 --- a/cdist/conf/type/__pf_ruleset/explorer/cksum +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh -# -# 2012 Jake Guffey (jake.guffey at eprotex.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Get the 256 bit SHA2 checksum of the pf ruleset on the target host. -# - -# Debug -#exec >&2 -#set -x - -# Check /etc/rc.conf for pf's configuration file name. Default to /etc/pf.conf -# See if file exists and if so, get checksum - -RC="/etc/rc.conf" -TMP="$(grep '^pf_rules=' ${RC} | cut -d= -f2 | sed 's/"//g')" -PFCONF="${TMP:-"/etc/pf.conf"}" - -if [ -f "${PFCONF}" ]; then # The pf config file exists, find its cksum. - cksum -o 1 "${PFCONF}" | cut -d= -f2 | awk '{print $1}' -fi - -# Debug -#set +x - diff --git a/cdist/conf/type/__pf_ruleset/explorer/rcvar b/cdist/conf/type/__pf_ruleset/explorer/rcvar deleted file mode 100755 index 7c8d535f..00000000 --- a/cdist/conf/type/__pf_ruleset/explorer/rcvar +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -# -# 2012 Jake Guffey (jake.guffey at eprotex.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Get the location of the pf ruleset on the target host. -# - -# Debug -#exec >&2 -#set -x - -# Check /etc/rc.conf for pf's configuration file name. Default to /etc/pf.conf - -RC="/etc/rc.conf" -PFCONF="$(grep '^pf_rules=' ${RC} | cut -d= -f2 | sed 's/"//g')" -echo "${PFCONF:-"/etc/pf.conf"}" - -# Debug -#set +x - diff --git a/cdist/conf/type/__pf_ruleset/gencode-local b/cdist/conf/type/__pf_ruleset/gencode-local deleted file mode 100755 index 11bfb0b1..00000000 --- a/cdist/conf/type/__pf_ruleset/gencode-local +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/sh -e -# -# 2012 Jake Guffey (jake.guffey at eprotex.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Manage pf(4) on *BSD -# - -# Debug -#exec >&2 -#set -x - -# Send files to $__target_host via $__remote_copy - -uname=$(uname) # Need to know what the cdist host is running so we know how to compute the ruleset's checksum -state=$(cat "$__object/parameter/state") - -if [ "$state" = "absent" ]; then # There is nothing more for a *local* script to do - exit 0 -fi - -if [ -f "$__object/parameter/source" ]; then - source=$(cat "$__object/parameter/source") -fi - -rcvar=$(cat "$__object/explorer/rcvar") -cksum=$(cat "$__object/explorer/cksum") - - -cat <&2 - exit 1 - ;; -esac - -# IPv6 fix -if $(echo "${__target_host}" | grep -q -E '^[0-9a-fA-F:]+$') -then - my_target_host="[${__target_host}]" -else - my_target_host="${__target_host}" -fi - -if [ -n "${cksum}" ]; then - if [ ! "\${currentSum}" = "${cksum}" ]; then - $__remote_copy "${source}" "\${my_target_host}:${rcvar}.new" - fi -else # File just doesn't exist yet - $__remote_copy "${source}" "\${my_target_host}:${rcvar}.new" -fi -EOF - -# Debug -#exec +x - diff --git a/cdist/conf/type/__pf_ruleset/gencode-remote b/cdist/conf/type/__pf_ruleset/gencode-remote deleted file mode 100755 index 12760fdf..00000000 --- a/cdist/conf/type/__pf_ruleset/gencode-remote +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh -e -# -# 2012 Jake Guffey (jake.guffey at eprotex.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Manage pf(4) on *BSD -# - -# Debug -#exec >&2 -#set -x - -# Remove ${rcvar} in the case of --state absent - -state=$(cat "$__object/parameter/state") -rcvar=$(cat "$__object/explorer/rcvar") - -if [ "$state" = "present" ]; then # There is nothing more for a *remote* script to do - exit 0 -elif [ "$state" = "absent" ]; then - # --state absent, so ensure that .new doesn't exist and that conf is renamed to .old - cat <&2 - exit 1 -fi - diff --git a/cdist/conf/type/__pf_ruleset/man.rst b/cdist/conf/type/__pf_ruleset/man.rst deleted file mode 100644 index 5719e94e..00000000 --- a/cdist/conf/type/__pf_ruleset/man.rst +++ /dev/null @@ -1,55 +0,0 @@ -cdist-type__pf_ruleset(7) -========================= - -NAME ----- -cdist-type__pf_ruleset - Copy a pf(4) ruleset to $__target_host - - -DESCRIPTION ------------ -This type is used on \*BSD systems to manage the pf firewall's ruleset. - - -REQUIRED PARAMETERS -------------------- -state - Either "absent" (no ruleset at all) or "present", defaults to "present". - - -OPTIONAL PARAMETERS -------------------- -source - If supplied, use to define the ruleset to load onto the $__target_host for pf(4). - Note that this type is almost useless without a ruleset defined, but it's technically not - needed, e.g. for the case of disabling the firewall temporarily. - - -EXAMPLES --------- - -.. code-block:: sh - - # Remove the current ruleset in place - __pf_ruleset --state absent - - # Enable the firewall with the ruleset defined in $__manifest/files/pf.conf - __pf_ruleset --state present --source $__manifest/files/pf.conf - - -SEE ALSO --------- -:strong:`pf`\ (4) - - -AUTHORS -------- -Jake Guffey - - -COPYING -------- -Copyright \(C) 2012 Jake Guffey. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__pf_ruleset/parameter/default/state b/cdist/conf/type/__pf_ruleset/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__pf_ruleset/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__pf_ruleset/parameter/optional b/cdist/conf/type/__pf_ruleset/parameter/optional deleted file mode 100644 index d77f3048..00000000 --- a/cdist/conf/type/__pf_ruleset/parameter/optional +++ /dev/null @@ -1,2 +0,0 @@ -source -state diff --git a/cdist/conf/type/__pf_ruleset/singleton b/cdist/conf/type/__pf_ruleset/singleton deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__ping/gencode-remote b/cdist/conf/type/__ping/gencode-remote deleted file mode 100644 index 1341b954..00000000 --- a/cdist/conf/type/__ping/gencode-remote +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -e -# -# Copyright (C) 2018 Olliver Schinagl -# -# SPDX-License-Identifier: GPL-3.0+ -# - -set -eu - -echo "echo 'pong'" - -exit 0 diff --git a/cdist/conf/type/__ping/man.rst b/cdist/conf/type/__ping/man.rst deleted file mode 100644 index e08643dc..00000000 --- a/cdist/conf/type/__ping/man.rst +++ /dev/null @@ -1,43 +0,0 @@ -cdist-type__ping(7) -================================== - -NAME ----- -cdist-type__ping - Try to connect to host and return 'pong' on success - - -DESCRIPTION ------------ -A simple type which tries to connect to a remote host and runs a simple command -to ensure everything is working. - - -REQUIRED PARAMETERS -------------------- -None. - - -OPTIONAL PARAMETERS -------------------- -None. - - -EXAMPLES --------- - -.. code-block:: sh - - __ping - - -AUTHORS -------- -Olliver Schinagl - - -COPYING -------- -Copyright \(C) 2018 Schinagl. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__ping/singleton b/cdist/conf/type/__ping/singleton deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__postfix/man.rst b/cdist/conf/type/__postfix/man.rst deleted file mode 100644 index 43b158e0..00000000 --- a/cdist/conf/type/__postfix/man.rst +++ /dev/null @@ -1,42 +0,0 @@ -cdist-type__postfix(7) -====================== - -NAME ----- -cdist-type__postfix - Install postfix - - -DESCRIPTION ------------ -This space intentionally left blank. - - -REQUIRED PARAMETERS -------------------- -None. - - -OPTIONAL PARAMETERS -------------------- -None. - - -EXAMPLES --------- - -.. code-block:: sh - - __postfix - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2012 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__postfix/manifest b/cdist/conf/type/__postfix/manifest deleted file mode 100755 index f3616979..00000000 --- a/cdist/conf/type/__postfix/manifest +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh -e -# -# 2012-2014 Steven Armstrong (steven-cdist at armstrong.cc) -# 2019 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - - -os=$(cat "$__global/explorer/os") - -case "$os" in - alpine|ubuntu|debian|archlinux|suse|scientific|centos|devuan) - __package postfix --state present - ;; - *) - echo "Your operating system ($os) is currently not supported by this type (${__type##*/})." >&2 - echo "Please contribute an implementation for it if you can." >&2 - exit 1 - ;; -esac diff --git a/cdist/conf/type/__postfix/singleton b/cdist/conf/type/__postfix/singleton deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__postfix_master/explorer/entry b/cdist/conf/type/__postfix_master/explorer/entry deleted file mode 100755 index 9d6b1514..00000000 --- a/cdist/conf/type/__postfix_master/explorer/entry +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh -# -# 2011 - 2012 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -config="/etc/postfix/master.cf" - -# no master.cf, nothing we could do -[ -f "$config" ] || exit 0 - -# NOTE: keep variables in sync in manifest,explorer,gencode-* -prefix="#cdist:$__object_name" -suffix="#/cdist:$__object_name" -awk -v prefix="$prefix" -v suffix="$suffix" '{ - if (index($0,prefix)) { - triggered=1 - } - if (triggered) { - if (index($0,suffix)) { - triggered=0 - } - print - } -}' "$config" diff --git a/cdist/conf/type/__postfix_master/gencode-remote b/cdist/conf/type/__postfix_master/gencode-remote deleted file mode 100755 index 7c109a69..00000000 --- a/cdist/conf/type/__postfix_master/gencode-remote +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/sh -e -# -# 2012 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -config="/etc/postfix/master.cf" -entry="$__object/files/entry" -state_should="$(cat "$__object/parameter/state")" -if [ ! -s "$__object/explorer/entry" ]; then - state_is='absent' -else - state_is=$(diff -q "$entry" "$__object/explorer/entry" >/dev/null \ - && echo present \ - || echo changed - ) -fi - -if [ "$state_should" = "$state_is" ]; then - # Nothing to do, move along - exit 0 -fi - - -remove_entry() { - # NOTE: keep variables in sync in manifest/explorer/gencode-* - prefix="#cdist:$__object_name" - suffix="#/cdist:$__object_name" - cat << DONE -tmpfile=\$(mktemp ${config}.cdist.XXXXXXXXXX) -# preserve ownership and permissions of existing file -cp -p "$config" "\$tmpfile" -awk -v prefix="$prefix" -v suffix="$suffix" ' -{ - if (index(\$0,prefix)) { - triggered=1 - } - if (triggered) { - if (index(\$0,suffix)) { - triggered=0 - } - } else { - print - } -}' "$config" > "\$tmpfile" -mv -f "\$tmpfile" "$config" -DONE -} - -case "$state_should" in - present) - if [ "$state_is" = "changed" ]; then - remove_entry - fi - cat << DONE -cat >> "$config" << ${__type##*/}_DONE -$(cat "$entry") -${__type##*/}_DONE -DONE - ;; - absent) - remove_entry - ;; -esac diff --git a/cdist/conf/type/__postfix_master/man.rst b/cdist/conf/type/__postfix_master/man.rst deleted file mode 100644 index 07756f74..00000000 --- a/cdist/conf/type/__postfix_master/man.rst +++ /dev/null @@ -1,84 +0,0 @@ -cdist-type__postfix_master(7) -============================= - -NAME ----- -cdist-type__postfix_master - Configure postfix master.cf - - -DESCRIPTION ------------ -See master(5) for more information. - - -REQUIRED PARAMETERS -------------------- -type - See master(5) -command - See master(5) - - -BOOLEAN PARAMETERS ------------------- -noreload - don't reload postfix after changes - - -OPTIONAL PARAMETERS -------------------- -state - present or absent, defaults to present - -service - -private - -unpriv - -chroot - -wakeup - -maxproc - -option - Pass an option to a service. Same as using -o in master.cf. - Can be specified multiple times. - -comment - a textual comment to add with the master.cf entry - - -EXAMPLES --------- - -.. code-block:: sh - - __postfix_master smtp --type inet --command smtpd - - __postfix_master smtp --type inet --chroot y --command smtpd \ - --option smtpd_enforce_tls=yes \ - --option smtpd_sasl_auth_enable=yes \ - --option smtpd_client_restrictions=permit_sasl_authenticated,reject - - __postfix_master submission --type inet --command smtpd \ - --comment "Run alternative smtp on submission port" - - -SEE ALSO --------- -:strong:`master`\ (5) - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2012 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__postfix_master/manifest b/cdist/conf/type/__postfix_master/manifest deleted file mode 100755 index 0960ea41..00000000 --- a/cdist/conf/type/__postfix_master/manifest +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/sh -e -# -# 2012-2014 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - - -os=$(cat "$__global/explorer/os") - -case "$os" in - ubuntu|debian|archlinux|scientific|centos|devuan) - : - ;; - *) - echo "Your operating system ($os) is currently not supported by this type (${__type##*/})." >&2 - echo "Please contribute an implementation for it if you can." >&2 - exit 1 - ;; -esac - -__postfix - -# Default to object_id -service="$(cat "$__object/parameter/service" 2>/dev/null || echo "$__object_id")" - -# NOTE: keep variables in sync in manifest,explorer,gencode-* -prefix="#cdist:$__object_name" -suffix="#/cdist:$__object_name" - -# Generate entry for inclusion in master.cf -mkdir "$__object/files" -entry="$__object/files/entry" -( - echo "$prefix" - if [ -f "$__object/parameter/comment" ]; then - echo "# $(cat "$__object/parameter/comment")" - fi - printf "%s " "$service" - for parameter in type private unpriv chroot wakeup maxproc; do - printf "%s " "$(cat "$__object/parameter/$parameter")" - done - command="$(cat "$__object/parameter/command")" - # ensure we have a trailing newline - echo "$command" - options="$(cat "$__object/parameter/option" 2>/dev/null || true)" - for option in $options; do - echo " -o $option" - done - echo "$suffix" -) > "$entry" - -# Reload postfix after changes -if [ ! -f "$__object/parameter/noreload" ]; then - state_should="$(cat "$__object/parameter/state")" - if [ ! -s "$__object/explorer/entry" ]; then - state_is='absent' - else - state_is=$(diff -q "$entry" "$__object/explorer/entry" >/dev/null \ - && echo present \ - || echo changed - ) - fi - if [ "$state_is" != "$state_should" ]; then - require="$__object_name" __postfix_reload - fi -fi diff --git a/cdist/conf/type/__postfix_master/parameter/boolean b/cdist/conf/type/__postfix_master/parameter/boolean deleted file mode 100644 index 862edc87..00000000 --- a/cdist/conf/type/__postfix_master/parameter/boolean +++ /dev/null @@ -1 +0,0 @@ -noreload diff --git a/cdist/conf/type/__postfix_master/parameter/default/chroot b/cdist/conf/type/__postfix_master/parameter/default/chroot deleted file mode 100644 index 39cdd0de..00000000 --- a/cdist/conf/type/__postfix_master/parameter/default/chroot +++ /dev/null @@ -1 +0,0 @@ -- diff --git a/cdist/conf/type/__postfix_master/parameter/default/maxproc b/cdist/conf/type/__postfix_master/parameter/default/maxproc deleted file mode 100644 index 39cdd0de..00000000 --- a/cdist/conf/type/__postfix_master/parameter/default/maxproc +++ /dev/null @@ -1 +0,0 @@ -- diff --git a/cdist/conf/type/__postfix_master/parameter/default/private b/cdist/conf/type/__postfix_master/parameter/default/private deleted file mode 100644 index 39cdd0de..00000000 --- a/cdist/conf/type/__postfix_master/parameter/default/private +++ /dev/null @@ -1 +0,0 @@ -- diff --git a/cdist/conf/type/__postfix_master/parameter/default/state b/cdist/conf/type/__postfix_master/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__postfix_master/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__postfix_master/parameter/default/unpriv b/cdist/conf/type/__postfix_master/parameter/default/unpriv deleted file mode 100644 index 39cdd0de..00000000 --- a/cdist/conf/type/__postfix_master/parameter/default/unpriv +++ /dev/null @@ -1 +0,0 @@ -- diff --git a/cdist/conf/type/__postfix_master/parameter/default/wakeup b/cdist/conf/type/__postfix_master/parameter/default/wakeup deleted file mode 100644 index 39cdd0de..00000000 --- a/cdist/conf/type/__postfix_master/parameter/default/wakeup +++ /dev/null @@ -1 +0,0 @@ -- diff --git a/cdist/conf/type/__postfix_master/parameter/optional b/cdist/conf/type/__postfix_master/parameter/optional deleted file mode 100644 index 792b42c5..00000000 --- a/cdist/conf/type/__postfix_master/parameter/optional +++ /dev/null @@ -1,9 +0,0 @@ -service -private -unpriv -chroot -wakeup -maxproc -option -comment -state diff --git a/cdist/conf/type/__postfix_master/parameter/required b/cdist/conf/type/__postfix_master/parameter/required deleted file mode 100644 index 24c14146..00000000 --- a/cdist/conf/type/__postfix_master/parameter/required +++ /dev/null @@ -1,2 +0,0 @@ -type -command diff --git a/cdist/conf/type/__postfix_postconf/explorer/value b/cdist/conf/type/__postfix_postconf/explorer/value deleted file mode 100755 index 67dacad8..00000000 --- a/cdist/conf/type/__postfix_postconf/explorer/value +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh -# -# 2012-2014 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - - -os=$("$__explorer/os") - -case "$os" in - alpine|ubuntu|debian|archlinux|suse|scientific|centos|devuan) - : - ;; - *) - echo "Your operating system ($os) is currently not supported by this type (${__type##*/})." >&2 - echo "Please contribute an implementation for it if you can." >&2 - exit 1 - ;; -esac - -key="$(cat "$__object/parameter/key" 2>/dev/null || echo "$__object_id")" - -postconf -h "$key" diff --git a/cdist/conf/type/__postfix_postconf/gencode-remote b/cdist/conf/type/__postfix_postconf/gencode-remote deleted file mode 100755 index 279dddd4..00000000 --- a/cdist/conf/type/__postfix_postconf/gencode-remote +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/sh -e -# -# 2012-2014 Steven Armstrong (steven-cdist at armstrong.cc) -# 2019 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -os=$(cat "$__global/explorer/os") - -case "$os" in - alpine|archlinux|centos|debian|devuan|suse|scientific|ubuntu) - : - ;; - *) - echo "Your operating system ($os) is currently not supported by this type (${__type##*/})." >&2 - echo "Please contribute an implementation for it if you can." >&2 - exit 1 - ;; -esac - -state_should="$(cat "$__object/parameter/state")" -if [ ! -s "$__object/explorer/value" ]; then - state_is='absent' -else - state_is=$(diff -q "$__object/parameter/value" "$__object/explorer/value" >/dev/null \ - && echo present \ - || echo changed - ) -fi - -if [ "$state_should" = "$state_is" ]; then - # Nothing to do, move along - exit 0 -fi - -key="$(cat "$__object/parameter/key" 2>/dev/null || echo "$__object_id")" -value="$(cat "$__object/parameter/value")" - -case "$state_should" in - absent) - # revert parameter to its default value - echo "postconf -# $key" - ;; - present) - echo "postconf -e '$key=$value'" - ;; -esac diff --git a/cdist/conf/type/__postfix_postconf/man.rst b/cdist/conf/type/__postfix_postconf/man.rst deleted file mode 100644 index 3222d4a7..00000000 --- a/cdist/conf/type/__postfix_postconf/man.rst +++ /dev/null @@ -1,54 +0,0 @@ -cdist-type__postfix_postconf(7) -=============================== - -NAME ----- -cdist-type__postfix_postconf - Configure postfix main.cf - - -DESCRIPTION ------------ -See postconf(5) for possible keys and values. - -Note that this type directly runs the postconf executable. -It does not make changes to /etc/postfix/main.cf itself. - - -REQUIRED PARAMETERS -------------------- -value - the value for the postfix parameter - - -OPTIONAL PARAMETERS -------------------- -key - the name of the parameter. Defaults to __object_id - - -EXAMPLES --------- - -.. code-block:: sh - - __postfix_postconf mydomain --value somedomain.com - - __postfix_postconf bind-to-special-ip --key smtp_bind_address --value 127.0.0.5 - - -SEE ALSO --------- -:strong:`postconf`\ (5) - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2012 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__postfix_postconf/manifest b/cdist/conf/type/__postfix_postconf/manifest deleted file mode 100755 index a82e13d7..00000000 --- a/cdist/conf/type/__postfix_postconf/manifest +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -e -# -# 2012-2014 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -__postfix diff --git a/cdist/conf/type/__postfix_postconf/parameter/default/state b/cdist/conf/type/__postfix_postconf/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__postfix_postconf/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__postfix_postconf/parameter/optional b/cdist/conf/type/__postfix_postconf/parameter/optional deleted file mode 100644 index 6ada755a..00000000 --- a/cdist/conf/type/__postfix_postconf/parameter/optional +++ /dev/null @@ -1,2 +0,0 @@ -key -state diff --git a/cdist/conf/type/__postfix_postconf/parameter/required b/cdist/conf/type/__postfix_postconf/parameter/required deleted file mode 100644 index 6d4e1507..00000000 --- a/cdist/conf/type/__postfix_postconf/parameter/required +++ /dev/null @@ -1 +0,0 @@ -value diff --git a/cdist/conf/type/__postfix_postmap/gencode-remote b/cdist/conf/type/__postfix_postmap/gencode-remote deleted file mode 100755 index edb7711f..00000000 --- a/cdist/conf/type/__postfix_postmap/gencode-remote +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -e -# -# 2012 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -echo "postmap /$__object_id" diff --git a/cdist/conf/type/__postfix_postmap/man.rst b/cdist/conf/type/__postfix_postmap/man.rst deleted file mode 100644 index 2a82b44a..00000000 --- a/cdist/conf/type/__postfix_postmap/man.rst +++ /dev/null @@ -1,42 +0,0 @@ -cdist-type__postfix_postmap(7) -============================== - -NAME ----- -cdist-type__postfix_postmap - Run postmap on the given file - - -DESCRIPTION ------------ -This space intentionally left blank. - - -REQUIRED PARAMETERS -------------------- -None. - - -OPTIONAL PARAMETERS -------------------- -None. - - -EXAMPLES --------- - -.. code-block:: sh - - __postfix_postmap /etc/postfix/generic - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2012 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__postfix_postmap/manifest b/cdist/conf/type/__postfix_postmap/manifest deleted file mode 100755 index a82e13d7..00000000 --- a/cdist/conf/type/__postfix_postmap/manifest +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -e -# -# 2012-2014 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -__postfix diff --git a/cdist/conf/type/__postfix_reload/gencode-remote b/cdist/conf/type/__postfix_reload/gencode-remote deleted file mode 100755 index 7720dc49..00000000 --- a/cdist/conf/type/__postfix_reload/gencode-remote +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh -e -# -# 2012-2014 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - - -os=$(cat "$__global/explorer/os") - -case "$os" in - ubuntu|debian|archlinux|scientific|centos|devuan) - echo "postfix reload" - ;; - *) - echo "Your operating system ($os) is currently not supported by this type (${__type##*/})." >&2 - echo "Please contribute an implementation for it if you can." >&2 - exit 1 - ;; -esac diff --git a/cdist/conf/type/__postfix_reload/man.rst b/cdist/conf/type/__postfix_reload/man.rst deleted file mode 100644 index 944e22fa..00000000 --- a/cdist/conf/type/__postfix_reload/man.rst +++ /dev/null @@ -1,42 +0,0 @@ -cdist-type__postfix_reload(7) -============================= - -NAME ----- -cdist-type__postfix_reload - Tell postfix to reload its configuration - - -DESCRIPTION ------------ -This space intentionally left blank. - - -REQUIRED PARAMETERS -------------------- -None. - - -OPTIONAL PARAMETERS -------------------- -None. - - -EXAMPLES --------- - -.. code-block:: sh - - __postfix_reload - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2012 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__postfix_reload/manifest b/cdist/conf/type/__postfix_reload/manifest deleted file mode 100755 index a82e13d7..00000000 --- a/cdist/conf/type/__postfix_reload/manifest +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -e -# -# 2012-2014 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -__postfix diff --git a/cdist/conf/type/__postfix_reload/singleton b/cdist/conf/type/__postfix_reload/singleton deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__postgres_database/man.rst b/cdist/conf/type/__postgres_database/man.rst deleted file mode 100644 index acceec9b..00000000 --- a/cdist/conf/type/__postgres_database/man.rst +++ /dev/null @@ -1,46 +0,0 @@ -cdist-type__postgres_database(7) -================================ - -NAME ----- -cdist-type__postgres_database - Create/drop postgres databases - - -DESCRIPTION ------------ -This cdist type allows you to create or drop postgres databases. - - -OPTIONAL PARAMETERS -------------------- -state - either 'present' or 'absent', defaults to 'present'. - -owner - the role owning this database - - -EXAMPLES --------- - -.. code-block:: sh - - __postgres_database mydbname --owner mydbusername - - -SEE ALSO --------- -:strong:`cdist-type__postgres_role`\ (7) - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2011 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__postgres_database/parameter/default/state b/cdist/conf/type/__postgres_database/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__postgres_database/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__postgres_database/parameter/optional b/cdist/conf/type/__postgres_database/parameter/optional deleted file mode 100644 index d86b6469..00000000 --- a/cdist/conf/type/__postgres_database/parameter/optional +++ /dev/null @@ -1,2 +0,0 @@ -state -owner diff --git a/cdist/conf/type/__postgres_extension/gencode-remote b/cdist/conf/type/__postgres_extension/gencode-remote deleted file mode 100755 index af9c97f1..00000000 --- a/cdist/conf/type/__postgres_extension/gencode-remote +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh -e -# -# 2011 Steven Armstrong (steven-cdist at armstrong.cc) -# 2013 Tomas Pospisek (tpo_deb at sourcepole.ch) -# -# This type was created by Tomas Pospisek based on the -#__postgres_role type by Steven Armstrong -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -case "$(cat "${__global}/explorer/os")" -in - netbsd) - postgres_user='pgsql' - ;; - openbsd) - postgres_user='_postgresql' - ;; - *) - postgres_user='postgres' - ;; -esac - - -dbname=$( echo "$__object_id" | cut -d":" -f1 ) -extension=$( echo "$__object_id" | cut -d":" -f2 ) - -state_should=$( cat "$__object/parameter/state" ) - -case "$state_should" in - present) - cmd="CREATE EXTENSION IF NOT EXISTS $extension" - echo "su - '$postgres_user' -c 'psql -c \"$cmd\" \"$dbname\"'" - ;; - absent) - cmd="DROP EXTENSION IF EXISTS $extension" - echo "su - '$postgres_user' -c 'psql -c \"$cmd\" \"$dbname\"'" - ;; -esac diff --git a/cdist/conf/type/__postgres_extension/man.rst b/cdist/conf/type/__postgres_extension/man.rst deleted file mode 100644 index 79645b2b..00000000 --- a/cdist/conf/type/__postgres_extension/man.rst +++ /dev/null @@ -1,59 +0,0 @@ -cdist-type__postgres_extension(7) -================================= - -NAME ----- -cdist-type__postgres_extension - manage postgres extensions - - -DESCRIPTION ------------ -This cdist type allows you to create or drop postgres extensions. - -The object you need to pass to __postgres_extension consists of -the database name and the extension name joined by a colon in the -following form: - -.. code-block:: sh - - dbname:extension - -f.ex. - -.. code-block:: sh - - rails_test:unaccent - - -OPTIONAL PARAMETERS -------------------- -state - either "present" or "absent", defaults to "present" - - -EXAMPLES --------- - -.. code-block:: sh - - __postgres_extension rails_test:unaccent - __postgres_extension --present rails_test:unaccent - __postgres_extension --absent rails_test:unaccent - - -SEE ALSO --------- -:strong:`cdist-type__postgre_database`\ (7) - -Postgres "Create Extension" documentation at: . - -AUTHOR -------- -Tomas Pospisek - -COPYING -------- -Copyright \(C) 2014 Tomas Pospisek. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__postgres_extension/parameter/default/state b/cdist/conf/type/__postgres_extension/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__postgres_extension/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__postgres_role/gencode-remote b/cdist/conf/type/__postgres_role/gencode-remote deleted file mode 100755 index fd56e85d..00000000 --- a/cdist/conf/type/__postgres_role/gencode-remote +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/sh -e -# -# 2011 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -case "$(cat "${__global}/explorer/os")" -in - netbsd) - postgres_user='pgsql' - ;; - openbsd) - postgres_user='_postgresql' - ;; - *) - postgres_user='postgres' - ;; -esac - - -name="$__object_id" -state_is="$(cat "$__object/explorer/state")" -state_should="$(cat "$__object/parameter/state")" - -[ "$state_is" = "$state_should" ] && exit 0 - -case "$state_should" in - present) - if [ -f "$__object/parameter/password" ]; then - password="$(cat "$__object/parameter/password")" - fi - booleans="" - for boolean in login createdb createrole superuser; do - if [ ! -f "$__object/parameter/$boolean" ]; then - boolean="no${boolean}" - fi - upper=$(echo $boolean | tr '[:lower:]' '[:upper:]') - booleans="$booleans $upper" - done - - [ -n "$password" ] && password="PASSWORD '$password'" - - cmd="CREATE ROLE $name WITH $password $booleans" - echo "su - '$postgres_user' -c \"psql postgres -wc \\\"$cmd\\\"\"" - ;; - absent) - echo "su - '$postgres_user' -c \"dropuser \\\"$name\\\"\"" - ;; -esac diff --git a/cdist/conf/type/__postgres_role/man.rst b/cdist/conf/type/__postgres_role/man.rst deleted file mode 100644 index 11fd73d5..00000000 --- a/cdist/conf/type/__postgres_role/man.rst +++ /dev/null @@ -1,67 +0,0 @@ -cdist-type__postgres_role(7) -============================ - -NAME ----- -cdist-type__postgres_role - Manage postgres roles - - -DESCRIPTION ------------ -This cdist type allows you to create or drop postgres roles. - - -OPTIONAL PARAMETERS -------------------- -state - Either "present" or "absent", defaults to "present" - -All other parameters map directly to the corresponding postgres createrole -parameters. - -password - -BOOLEAN PARAMETERS ------------------- -All parameter map directly to the corresponding postgres createrole -parameters. - -login -createdb -createrole -superuser -inherit - -EXAMPLES --------- - -.. code-block:: sh - - __postgres_role myrole - - __postgres_role myrole --password 'secret' - - __postgres_role admin --password 'very-secret' --superuser - - __postgres_role dbcustomer --password 'bla' --createdb - - -SEE ALSO --------- -:strong:`cdist-type__postgres_database`\ (7) - -postgresql documentation at: -. - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2011 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__postgres_role/parameter/default/state b/cdist/conf/type/__postgres_role/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__postgres_role/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__postgres_role/parameter/optional b/cdist/conf/type/__postgres_role/parameter/optional deleted file mode 100644 index cb9b2c48..00000000 --- a/cdist/conf/type/__postgres_role/parameter/optional +++ /dev/null @@ -1,2 +0,0 @@ -state -password diff --git a/cdist/conf/type/__process/gencode-remote b/cdist/conf/type/__process/gencode-remote deleted file mode 100755 index ec9691b9..00000000 --- a/cdist/conf/type/__process/gencode-remote +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/sh -e -# -# 2011-2012 Nico Schottelius (nico-cdist at schottelius.org) -# 2014 Steven Armstrong (steven-cdist at armstrong.cc) -# 2017 Thomas Eckert (tom at it-eckert.de) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -if [ -f "$__object/parameter/name" ]; then - name="$(cat "$__object/parameter/name")" -else - name="$__object_id" -fi - -state_should="$(cat "$__object/parameter/state")" - -if [ -s "$__object/explorer/runs" ]; then - state_is="present" -else - state_is="absent" -fi - -if [ "$state_is" = "$state_should" ]; then - # nothing to do - exit 0 -fi - -case "$state_should" in - present) - if [ -f "$__object/parameter/start" ]; then - cat "$__object/parameter/start" - else - echo "$name" - fi - echo "started" >> "$__messages_out" - ;; - absent) - if [ -f "$__object/parameter/stop" ]; then - cat "$__object/parameter/stop" - else - echo kill "$(cat "$__object/parameter/runs")" - fi - echo "stopped" >> "$__messages_out" - ;; - *) - echo "Unknown state: $state_should" >&2 - exit 1 - ;; -esac diff --git a/cdist/conf/type/__process/man.rst b/cdist/conf/type/__process/man.rst deleted file mode 100644 index e7303c55..00000000 --- a/cdist/conf/type/__process/man.rst +++ /dev/null @@ -1,84 +0,0 @@ -cdist-type__process(7) -====================== - -NAME ----- -cdist-type__process - Start or stop process - - -DESCRIPTION ------------ -This cdist type allows you to define the state of a process. - - -OPTIONAL PARAMETERS -------------------- -state - Either "present" or "absent", defaults to "present" - -name - Process name to match on when using pgrep -f -x. - - This is useful, if the name starts with a "/", - because the leading slash is stripped away from - the object id by cdist. - -stop - Executable to use for stopping the process. - -start - Executable to use for starting the process. - - -MESSAGES --------- -started - The process was started. - -stopped - The process was stopped. - - -EXAMPLES --------- - -.. code-block:: sh - - # Start if not running - __process /usr/sbin/syslog-ng --state present - - # Start if not running with a different binary - __process /usr/sbin/nginx --state present --start "/etc/rc.d/nginx start" - - # Stop the process using kill (the type default) - DO NOT USE THIS - __process /usr/sbin/sshd --state absent - - # Stop the process using /etc/rc.d/sshd stop - THIS ONE NOT AS WELL - __process /usr/sbin/sshd --state absent --stop "/etc/rc.d/sshd stop" - - # Ensure cups is running, which runs with -C ...: - __process cups --start "/etc/rc.d/cups start" --state present \ - --name "/usr/sbin/cupsd -C /etc/cups/cupsd.conf" - - # Ensure rpc.statd is running (which usually runs with -L) using a regexp - __process rpcstatd --state present --start "/etc/init.d/statd start" \ - --name "rpc.statd.*" - - -SEE ALSO --------- -:strong:`cdist-type__start_on_boot`\ (7) - - -AUTHORS -------- -| Nico Schottelius -| Thomas Eckert - - -COPYING -------- -Copyright \(C) 2011-2012 Nico Schottelius. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__process/parameter/default/state b/cdist/conf/type/__process/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__process/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__prometheus_alertmanager/man.rst b/cdist/conf/type/__prometheus_alertmanager/man.rst deleted file mode 100644 index 67e97eaf..00000000 --- a/cdist/conf/type/__prometheus_alertmanager/man.rst +++ /dev/null @@ -1,61 +0,0 @@ -cdist-type__prometheus_alertmanager(7) -====================================== - -NAME ----- -cdist-type__prometheus_alertmanager - install Alertmanager - - -DESCRIPTION ------------ -Install and configure Prometheus Alertmanager (https://prometheus.io/docs/alerting/alertmanager/). - -Note that due to significant differences between Prometheus 1.x and 2.x, only 2.x is supported. It is your responsibility to make sure that your package manager installs 2.x. (On Devuan Ascii, the parameter `--install-from-backports` helps.) - - -REQUIRED PARAMETERS -------------------- -config - Alertmanager configuration file. It will be saved as /etc/alertmanager/alertmanager.yml on the target. - - -OPTIONAL PARAMETERS -------------------- -storage-path - Where to put data. Default: /data/alertmanager. (Directory will be created if needed.) -retention-days - How long to retain data. Default: 90 days. - - -BOOLEAN PARAMETERS ------------------- -install-from-backports - Valid on Devuan only. Will enable the backports apt source and install the package from there. Useful for getting a newer version. - - -EXAMPLES --------- - -.. code-block:: sh - - __prometheus_alertmanager \ - --install-from-backports \ - --config "$__manifest/files/alertmanager.yml" \ - --storage-path /data/alertmanager - - -SEE ALSO --------- -:strong:`cdist-type__prometheus_server`\ (7), :strong:`cdist-type__grafana_dashboard`\ (7), -Prometheus alerting documentation: https://prometheus.io/docs/alerting/overview/ - -AUTHORS -------- -Kamila Součková - -COPYING -------- -Copyright \(C) 2018 Kamila Součková. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__prometheus_alertmanager/manifest b/cdist/conf/type/__prometheus_alertmanager/manifest deleted file mode 100755 index 8ee818c3..00000000 --- a/cdist/conf/type/__prometheus_alertmanager/manifest +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/sh -e - -##### HARD-CODED CONFIG ##################################################### - -CONF_DIR=/etc/prometheus -CONF=$CONF_DIR/alertmanager.yml - -##### GET SETTINGS ########################################################## - -config="$(cat "$__object/parameter/config")" -retention_days="$(cat "$__object/parameter/retention-days")" -storage_path="$(cat "$__object/parameter/storage-path")" -# listen_address="$(cat "$__object/parameter/listen-address")" - -##### INSTALL THE PACKAGE ################################################### - -require_pkg="" # what to require if I want to require "the package" -require="" -if [ -f "$__object/parameter/install-from-backports" ]; then - os=$(cat "$__global/explorer/os") - os_version=$(cat "$__global/explorer/os_version") - - case $os in - devuan) - [ "$os_version" = "ascii/ceres" ] && os_version='ascii' # "ascii" used in the repo URLs - __apt_source backports --uri http://auto.mirror.devuan.org/merged --distribution $os_version-backports --component main - require="$require __apt_source/backports" __package_apt prometheus-alertmanager --target-release $os_version-backports - require_pkg="__package_apt/prometheus-alertmanager" - ;; - *) - echo "--install-from-backports is only supported on Devuan -- ignoring." >&2 - echo "Send a pull request if you require it." >&2 - ;; - esac -else - __package prometheus-alertmanager - require_pkg="__package/prometheus-alertmanager" -fi - -##### PREPARE PATHS AND SUCH ################################################ - -require="$require $require_pkg" __directory "$storage_path" --owner prometheus --parents - -# TODO this is a bug in the init script, patching it like this is awful and it should be reported -require="$require $require_pkg" \ -__key_value alertmanager_fix_init_script --file /etc/init.d/prometheus-alertmanager \ - --key "NAME" --value "prometheus-alertmanager" --delimiter "=" \ - --onchange "service prometheus-alertmanager restart" - -##### CONFIGURE ############################################################# - -FLAGS="--storage.path $storage_path --data.retention $((retention_days*24))h --web.listen-address [::]:9093 --cluster.advertise-address [::]:9093" - -require="$require $require_pkg" \ -__key_value alertmanager_args --file /etc/default/prometheus-alertmanager \ - --key "ARGS" --value "\"$FLAGS\"" --delimiter "=" \ - --onchange "service prometheus-alertmanager restart" - -require="$require __directory/$storage_path $require_pkg" \ -__config_file $CONF \ - --source "$config" \ - --group prometheus --mode 640 \ - --onchange "service prometheus-alertmanager reload" # TODO when a config-check tool is available, check config here - diff --git a/cdist/conf/type/__prometheus_alertmanager/parameter/boolean b/cdist/conf/type/__prometheus_alertmanager/parameter/boolean deleted file mode 100644 index 5d15e93d..00000000 --- a/cdist/conf/type/__prometheus_alertmanager/parameter/boolean +++ /dev/null @@ -1 +0,0 @@ -install-from-backports diff --git a/cdist/conf/type/__prometheus_alertmanager/parameter/default/retention-days b/cdist/conf/type/__prometheus_alertmanager/parameter/default/retention-days deleted file mode 100644 index d61f00d8..00000000 --- a/cdist/conf/type/__prometheus_alertmanager/parameter/default/retention-days +++ /dev/null @@ -1 +0,0 @@ -90 diff --git a/cdist/conf/type/__prometheus_alertmanager/parameter/default/storage-path b/cdist/conf/type/__prometheus_alertmanager/parameter/default/storage-path deleted file mode 100644 index 4f3e7559..00000000 --- a/cdist/conf/type/__prometheus_alertmanager/parameter/default/storage-path +++ /dev/null @@ -1 +0,0 @@ -/data/alertmanager diff --git a/cdist/conf/type/__prometheus_alertmanager/parameter/optional b/cdist/conf/type/__prometheus_alertmanager/parameter/optional deleted file mode 100644 index 7fe79009..00000000 --- a/cdist/conf/type/__prometheus_alertmanager/parameter/optional +++ /dev/null @@ -1,2 +0,0 @@ -storage-path -retention-days diff --git a/cdist/conf/type/__prometheus_alertmanager/parameter/required b/cdist/conf/type/__prometheus_alertmanager/parameter/required deleted file mode 100644 index 04204c7c..00000000 --- a/cdist/conf/type/__prometheus_alertmanager/parameter/required +++ /dev/null @@ -1 +0,0 @@ -config diff --git a/cdist/conf/type/__prometheus_alertmanager/singleton b/cdist/conf/type/__prometheus_alertmanager/singleton deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__prometheus_exporter/files/blackbox.yml b/cdist/conf/type/__prometheus_exporter/files/blackbox.yml deleted file mode 100644 index e567c127..00000000 --- a/cdist/conf/type/__prometheus_exporter/files/blackbox.yml +++ /dev/null @@ -1,63 +0,0 @@ -modules: - http_2xx: - prober: http - timeout: 3s - http: - method: GET - no_follow_redirects: false - fail_if_ssl: false - fail_if_not_ssl: false - # http_post_2xx: - # prober: http - # timeout: 5s - # http: - # method: POST - # headers: - # Content-Type: application/json - # body: '{}' - # tcp_connect_v4_example: - # prober: tcp - # timeout: 5s - # tcp: - # protocol: "tcp4" - # irc_banner_example: - # prober: tcp - # timeout: 5s - # tcp: - # query_response: - # - send: "NICK prober" - # - send: "USER prober prober prober :prober" - # - expect: "PING :([^ ]+)" - # send: "PONG ${1}" - # - expect: "^:[^ ]+ 001" - # icmp_example: - # prober: icmp - # timeout: 5s - # icmp: - # protocol: "icmp" - # preferred_ip_protocol: "ip4" - # dns_udp_example: - # prober: dns - # timeout: 5s - # dns: - # query_name: "www.prometheus.io" - # query_type: "A" - # valid_rcodes: - # - NOERROR - # validate_answer_rrs: - # fail_if_matches_regexp: - # - ".*127.0.0.1" - # fail_if_not_matches_regexp: - # - "www.prometheus.io.\t300\tIN\tA\t127.0.0.1" - # validate_authority_rrs: - # fail_if_matches_regexp: - # - ".*127.0.0.1" - # validate_additional_rrs: - # fail_if_matches_regexp: - # - ".*127.0.0.1" - # dns_tcp_example: - # prober: dns - # dns: - # protocol: "tcp" # accepts "tcp/tcp4/tcp6/udp/udp4/udp6", defaults to "udp" - # preferred_ip_protocol: "ip4" # used for "udp/tcp", defaults to "ip6" - # query_name: "www.prometheus.io" diff --git a/cdist/conf/type/__prometheus_exporter/man.rst b/cdist/conf/type/__prometheus_exporter/man.rst deleted file mode 100644 index 3b1ee4d7..00000000 --- a/cdist/conf/type/__prometheus_exporter/man.rst +++ /dev/null @@ -1,70 +0,0 @@ -cdist-type__prometheus_exporter(7) -================================== - -NAME ----- -cdist-type__prometheus_exporter - install some Prometheus exporters - - -DESCRIPTION ------------ -Install and configure some exporters to be used by the Prometheus monitoring system (https://prometheus.io/). - -This type creates a daemontools-compatible service directory under /service/$__object_id. -Daemontools (or something compatible) must be installed (in particular, the command `svc` must be executable). - -This type installs and builds the latest version from git, using go get. A recent version of golang as well -as build tools (make, g++, etc.) must be available. - -Currently supported exporters: - -- node -- blackbox -- ceph - - -REQUIRED PARAMETERS -------------------- -None - - -OPTIONAL PARAMETERS -------------------- -exporter - Which exporter to install and configure. Default: $__object_id. - Currently supported: node, blackbox, ceph. - - -BOOLEAN PARAMETERS ------------------- -add-consul-service - Add this exporter as a Consul service for automatic service discovery. - - -EXAMPLES --------- - -.. code-block:: sh - - __daemontools - __golang_from_vendor --version 1.9 # required for prometheus and many exporters - - require="__daemontools __golang_from_vendor" __prometheus_exporter node - - -SEE ALSO --------- -:strong:`cdist-type__daemontools`\ (7), :strong:`cdist-type__golang_from_vendor`\ (7), -:strong:`cdist-type__prometheus_server`\ (7), -Prometheus documentation: https://prometheus.io/docs/introduction/overview/ - -AUTHORS -------- -Kamila Součková - -COPYING -------- -Copyright \(C) 2017 Kamila Součková. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__prometheus_exporter/manifest b/cdist/conf/type/__prometheus_exporter/manifest deleted file mode 100644 index b9e14531..00000000 --- a/cdist/conf/type/__prometheus_exporter/manifest +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh - -export GOBIN=/opt/gocode/bin # where to find go binaries - -exporter="$(cat "$__object/parameter/exporter")" -[ -z "$exporter" ] && exporter="$__object_id" - -__user prometheus --system - -require="" -case $exporter in - node) - TEXTFILES=/service/node-exporter/textfiles # path for the textfiles collector - __directory $TEXTFILES --parents --mode 777 - require="$require __golang_from_vendor" __go_get github.com/prometheus/node_exporter - - port=9100 - run="setuidgid prometheus $GOBIN/node_exporter -web.listen-address :$port -collector.textfile.directory=$TEXTFILES" - ;; - blackbox) - require="$require __daemontools_service/${exporter}-exporter __user/prometheus" __config_file "/service/${exporter}-exporter/blackbox.yml" \ - --source "$__type/files/blackbox.yml" \ - --group prometheus --mode 640 \ - --onchange "svc -h /service/${exporter}-exporter" - require="$require __golang_from_vendor" __go_get github.com/prometheus/blackbox_exporter - - port=9115 - run="setuidgid prometheus $GOBIN/blackbox_exporter -config.file=/service/${exporter}-exporter/blackbox.yml" - ;; - ceph) - __package librados-dev # dependency of ceph_exporter - require="$require __golang_from_vendor __package/librados-dev" __go_get github.com/digitalocean/ceph_exporter - - port=9128 - run="setuidgid ceph $GOBIN/ceph_exporter -ceph.config /etc/ceph/ceph.conf -telemetry.addr :$port" - ;; - *) - echo "Unsupported exporter: $exporter." >&2 - exit 1 - ;; -esac - -require="$require __daemontools" __daemontools_service "${exporter}-exporter" --run "$run" -if [ -f "$__object/parameter/add-consul-service" ]; then - __consul_service "${exporter}-exporter" --port "$port" --check-http "http://localhost:$port/metrics" --check-interval 10s -fi - -#__daemontools --install-init-script -__daemontools -__golang_from_vendor --version 1.9 # required for many exporters diff --git a/cdist/conf/type/__prometheus_exporter/parameter/boolean b/cdist/conf/type/__prometheus_exporter/parameter/boolean deleted file mode 100644 index 004af844..00000000 --- a/cdist/conf/type/__prometheus_exporter/parameter/boolean +++ /dev/null @@ -1 +0,0 @@ -add-consul-service diff --git a/cdist/conf/type/__prometheus_exporter/parameter/default/exporter b/cdist/conf/type/__prometheus_exporter/parameter/default/exporter deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__prometheus_exporter/parameter/optional b/cdist/conf/type/__prometheus_exporter/parameter/optional deleted file mode 100644 index 9cfaec5a..00000000 --- a/cdist/conf/type/__prometheus_exporter/parameter/optional +++ /dev/null @@ -1 +0,0 @@ -exporter diff --git a/cdist/conf/type/__prometheus_server/man.rst b/cdist/conf/type/__prometheus_server/man.rst deleted file mode 100644 index ab6a3c9b..00000000 --- a/cdist/conf/type/__prometheus_server/man.rst +++ /dev/null @@ -1,67 +0,0 @@ -cdist-type__prometheus_server(7) -================================ - -NAME ----- -cdist-type__prometheus_server - install Prometheus - - -DESCRIPTION ------------ -Install and configure Prometheus (https://prometheus.io/). - -Note that due to significant differences between Prometheus 1.x and 2.x, only 2.x is supported. It is your responsibility to make sure that your package manager installs 2.x. (On Devuan Ascii, the parameter `--install-from-backports` helps.) - -REQUIRED PARAMETERS -------------------- -config - Prometheus configuration file. It will be saved as /etc/prometheus/prometheus.yml on the target. - - -OPTIONAL PARAMETERS -------------------- -retention-days - How long to keep data. Default: 30 -rule-files - Path to rule files. They will be installed under /etc/prometheus/. You need to include `rule_files: [/etc/prometheus/]` in the config file if you use this. -storage-path - Where to put data. Default: /data/prometheus. (Directory will be created if needed.) - - -BOOLEAN PARAMETERS ------------------- -install-from-backports - Valid on Devuan only. Will enable the backports apt source and install the package from there. Useful for getting a newer version. - - -EXAMPLES --------- - -.. code-block:: sh - - PROMPORT=9090 - ALERTPORT=9093 - - __prometheus_server \ - --install-from-backports \ - --config "$__manifest/files/prometheus.yml" \ - --retention-days 14 \ - --storage-path /data/prometheus \ - --rule-files "$__manifest/files/*.rules" - - -SEE ALSO --------- -:strong:`cdist-type__prometheus_alertmanager`\ (7), :strong:`cdist-type__grafana_dashboard`\ (7), -Prometheus documentation: https://prometheus.io/docs/introduction/overview/ - -AUTHORS -------- -Kamila Součková - -COPYING -------- -Copyright \(C) 2018 Kamila Součková. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__prometheus_server/manifest b/cdist/conf/type/__prometheus_server/manifest deleted file mode 100755 index 8685130f..00000000 --- a/cdist/conf/type/__prometheus_server/manifest +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/sh -e - -##### HARD-CODED CONFIG ##################################################### - -CONF_DIR=/etc/prometheus -CONF=$CONF_DIR/prometheus.yml - -##### GET SETTINGS ########################################################## - -config="$(cat "$__object/parameter/config")" -retention_days="$(cat "$__object/parameter/retention-days")" -storage_path="$(cat "$__object/parameter/storage-path")" -rule_files="$(cat "$__object/parameter/rule-files")" - -# explorer in kB => convert; by default we go with 1/2 RAM -[ "$target_heap_size" = "auto" ] && target_heap_size=$(($(cat "$__global/explorer/memory")*1024/2)) - -##### INSTALL THE PACKAGE ################################################### - -require_pkg="" # what to require if I want to require "the package" -require="" -if [ -f "$__object/parameter/install-from-backports" ]; then - os=$(cat "$__global/explorer/os") - os_version=$(cat "$__global/explorer/os_version") - - case $os in - devuan) - [ "$os_version" = "ascii/ceres" ] && os_version='ascii' # "ascii" used in the repo URLs - __apt_source backports --uri http://auto.mirror.devuan.org/merged --distribution $os_version-backports --component main - require="$require __apt_source/backports" __package_apt prometheus --target-release $os_version-backports - require_pkg="__package_apt/prometheus" - ;; - *) - echo "--install-from-backports is only supported on Devuan -- ignoring." >&2 - echo "Send a pull request if you require it." >&2 - ;; - esac -else - __package prometheus - require_pkg="__package/prometheus" -fi - -##### PREPARE PATHS AND SUCH ################################################ - -require="$require $require_pkg" __directory "$storage_path" --owner prometheus --parents - -##### CONFIGURE ############################################################# - -FLAGS="--storage.tsdb.path $storage_path --storage.tsdb.retention $((retention_days*24))h --web.listen-address [::]:9090" - -# TODO it would be neat to restart prometheus on change -- __key_value really should have an --onchange parameter -require="$require $require_pkg" \ -__key_value prometheus_args --file /etc/default/prometheus \ - --key "ARGS" --value "\"$FLAGS\"" --delimiter "=" \ - --onchange "service prometheus restart" - -require="$require __directory/$storage_path $require_pkg" \ -__config_file $CONF \ - --source "$config" \ - --group prometheus --mode 640 \ - --onchange "promtool check config $CONF && service prometheus reload" - -for file in $rule_files; do - dest=$CONF_DIR/$(basename "$file") - require="$require $require_pkg" \ - __config_file "$dest" \ - --source "$file" \ - --owner prometheus \ - --onchange "promtool check rules '$dest' && service prometheus reload" -done - diff --git a/cdist/conf/type/__prometheus_server/parameter/boolean b/cdist/conf/type/__prometheus_server/parameter/boolean deleted file mode 100644 index 5d15e93d..00000000 --- a/cdist/conf/type/__prometheus_server/parameter/boolean +++ /dev/null @@ -1 +0,0 @@ -install-from-backports diff --git a/cdist/conf/type/__prometheus_server/parameter/default/retention-days b/cdist/conf/type/__prometheus_server/parameter/default/retention-days deleted file mode 100644 index 64bb6b74..00000000 --- a/cdist/conf/type/__prometheus_server/parameter/default/retention-days +++ /dev/null @@ -1 +0,0 @@ -30 diff --git a/cdist/conf/type/__prometheus_server/parameter/default/rule-files b/cdist/conf/type/__prometheus_server/parameter/default/rule-files deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__prometheus_server/parameter/default/storage-path b/cdist/conf/type/__prometheus_server/parameter/default/storage-path deleted file mode 100644 index fc05f8f3..00000000 --- a/cdist/conf/type/__prometheus_server/parameter/default/storage-path +++ /dev/null @@ -1 +0,0 @@ -/data/prometheus diff --git a/cdist/conf/type/__prometheus_server/parameter/optional b/cdist/conf/type/__prometheus_server/parameter/optional deleted file mode 100644 index cb437211..00000000 --- a/cdist/conf/type/__prometheus_server/parameter/optional +++ /dev/null @@ -1,3 +0,0 @@ -retention-days -rule-files -storage-path diff --git a/cdist/conf/type/__prometheus_server/parameter/required b/cdist/conf/type/__prometheus_server/parameter/required deleted file mode 100644 index 04204c7c..00000000 --- a/cdist/conf/type/__prometheus_server/parameter/required +++ /dev/null @@ -1 +0,0 @@ -config diff --git a/cdist/conf/type/__prometheus_server/singleton b/cdist/conf/type/__prometheus_server/singleton deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__pyvenv/explorer/group b/cdist/conf/type/__pyvenv/explorer/group deleted file mode 100755 index a655bda7..00000000 --- a/cdist/conf/type/__pyvenv/explorer/group +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -destination="/$__object_id" - -stat --print "%G" "${destination}" 2>/dev/null || exit 0 diff --git a/cdist/conf/type/__pyvenv/explorer/owner b/cdist/conf/type/__pyvenv/explorer/owner deleted file mode 100755 index 8b3c7f8e..00000000 --- a/cdist/conf/type/__pyvenv/explorer/owner +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -destination="/$__object_id" - -stat --print "%U" "${destination}" 2>/dev/null || exit 0 diff --git a/cdist/conf/type/__pyvenv/explorer/state b/cdist/conf/type/__pyvenv/explorer/state deleted file mode 100755 index ffe3cbbd..00000000 --- a/cdist/conf/type/__pyvenv/explorer/state +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -destination="/$__object_id" - -if [ -d "$destination" ]; then - echo present -else - echo absent -fi diff --git a/cdist/conf/type/__pyvenv/gencode-remote b/cdist/conf/type/__pyvenv/gencode-remote deleted file mode 100755 index 04700683..00000000 --- a/cdist/conf/type/__pyvenv/gencode-remote +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/sh -e -# -# 2016 Darko Poljak (darko.poljak at gmail.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -state_is="$(cat "$__object/explorer/state")" -owner_is="$(cat "$__object/explorer/owner")" -group_is="$(cat "$__object/explorer/group")" - -state_should="$(cat "$__object/parameter/state")" - -owner="$(cat "$__object/parameter/owner")" -group="$(cat "$__object/parameter/group")" -mode="$(cat "$__object/parameter/mode")" - -[ "$state_should" = "$state_is" ] && \ -[ "$owner" = "$owner_is" ] && \ -[ "$group" = "$group_is" ] && \ -[ -n "$mode" ] && exit 0 - -destination="/$__object_id" -venvparams="$(cat "$__object/parameter/venvparams")" -pyvenvparam="$__object/parameter/pyvenv" -if [ -f "$pyvenvparam" ] -then - pyvenv=$(cat "$pyvenvparam") -else - pyvenv="pyvenv" -fi - -case $state_should in - present) - if [ "$state_should" != "$state_is" ]; then - echo "$pyvenv $venvparams $destination" - fi - if { [ -n "$owner" ] && [ "$owner_is" != "$owner" ]; } || \ - { [ -n "$group" ] && [ "$group_is" != "$group" ]; }; then - echo chown -R "${owner}:${group}" "$destination" - fi - if [ -n "$mode" ]; then - echo chmod -R "$mode" "$destination" - fi - ;; - absent) - ;; - - *) - echo "Unknown state: $state_should" >&2 - exit 1 - ;; -esac diff --git a/cdist/conf/type/__pyvenv/man.rst b/cdist/conf/type/__pyvenv/man.rst deleted file mode 100644 index d7de92fa..00000000 --- a/cdist/conf/type/__pyvenv/man.rst +++ /dev/null @@ -1,79 +0,0 @@ -cdist-type__pyvenv(7) -===================== - -NAME ----- -cdist-type__pyvenv - Create or remove python virtual environment - - -DESCRIPTION ------------ -This cdist type allows you to create or remove python virtual -environment using pyvenv. -It assumes pyvenv is already installed. Concrete package depends -on concrete OS and/or OS version/distribution. -Ensure this for e.g. in your init manifest as in the following example: - -.. code-block sh - - case "$__target_host" in - localhost) - __package python3-venv --state present - require="__package/python3-venv" __pyvenv /home/darko/testenv --pyvenv "pyvenv-3.4" --owner darko --group darko --mode 740 --state present - require="__pyvenv/home/darko/testenv" __package_pip docopt --pip /home/darko/testenv/bin/pip --runas darko --state present - ;; - esac - - -REQUIRED PARAMETERS -------------------- -None - -OPTIONAL PARAMETERS -------------------- -state - Either "present" or "absent", defaults to "present" - -group - Group to chgrp to - -mode - Unix permissions, suitable for chmod - -owner - User to chown to - -pyvenv - Use this specific pyvenv - -venvparams - Specific parameters to pass to pyvenv invocation - - -EXAMPLES --------- - -.. code-block:: sh - - __pyvenv /home/services/djangoenv - - # Use specific pyvenv - __pyvenv /home/foo/fooenv --pyvenv /usr/local/bin/pyvenv-3.4 - - # Create python virtualenv for user foo. - __pyvenv /home/foo/fooenv --group foo --user foo - - # Create python virtualenv with specific parameters. - __pyvenv /home/services/djangoenv --venvparams "--copies --system-site-packages" - - -AUTHORS -------- -Darko Poljak - - -COPYING -------- -Copyright \(C) 2016 Darko Poljak. Free use of this software is -granted under the terms of the GNU General Public License v3 or later (GPLv3+). - diff --git a/cdist/conf/type/__pyvenv/manifest b/cdist/conf/type/__pyvenv/manifest deleted file mode 100755 index 5d6a12e8..00000000 --- a/cdist/conf/type/__pyvenv/manifest +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh -e -# -# 2016 Darko Poljak (darko.poljak at gmail.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -# It assumes pyvenv is already installed. Concrete packages -# or installation procedures depend on concrete OS and/or OS -# version/distribution. - -state_should="$(cat "$__object/parameter/state")" -owner="$(cat "$__object/parameter/owner")" -group="$(cat "$__object/parameter/group")" -mode="$(cat "$__object/parameter/mode")" - -case "$state_should" in - present) - : - ;; - - absent) - __directory "$__object_id" --state absent \ - --owner "$owner" \ - --group "$group" \ - --mode "$mode" - ;; - - *) - echo "Unknown state: $state_should" >&2 - exit 1 - ;; -esac diff --git a/cdist/conf/type/__pyvenv/parameter/default/group b/cdist/conf/type/__pyvenv/parameter/default/group deleted file mode 100755 index 8b137891..00000000 --- a/cdist/conf/type/__pyvenv/parameter/default/group +++ /dev/null @@ -1 +0,0 @@ - diff --git a/cdist/conf/type/__pyvenv/parameter/default/mode b/cdist/conf/type/__pyvenv/parameter/default/mode deleted file mode 100755 index 8b137891..00000000 --- a/cdist/conf/type/__pyvenv/parameter/default/mode +++ /dev/null @@ -1 +0,0 @@ - diff --git a/cdist/conf/type/__pyvenv/parameter/default/owner b/cdist/conf/type/__pyvenv/parameter/default/owner deleted file mode 100755 index 8b137891..00000000 --- a/cdist/conf/type/__pyvenv/parameter/default/owner +++ /dev/null @@ -1 +0,0 @@ - diff --git a/cdist/conf/type/__pyvenv/parameter/default/state b/cdist/conf/type/__pyvenv/parameter/default/state deleted file mode 100755 index e7f6134f..00000000 --- a/cdist/conf/type/__pyvenv/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__pyvenv/parameter/default/venvparams b/cdist/conf/type/__pyvenv/parameter/default/venvparams deleted file mode 100644 index 8b137891..00000000 --- a/cdist/conf/type/__pyvenv/parameter/default/venvparams +++ /dev/null @@ -1 +0,0 @@ - diff --git a/cdist/conf/type/__pyvenv/parameter/optional b/cdist/conf/type/__pyvenv/parameter/optional deleted file mode 100755 index ed2218b1..00000000 --- a/cdist/conf/type/__pyvenv/parameter/optional +++ /dev/null @@ -1,6 +0,0 @@ -state -group -owner -mode -venvparams -pyvenv diff --git a/cdist/conf/type/__qemu_img/gencode-remote b/cdist/conf/type/__qemu_img/gencode-remote deleted file mode 100755 index 94816f58..00000000 --- a/cdist/conf/type/__qemu_img/gencode-remote +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -e -# -################################################################################ -# State: absent is handled by manifest - we need only to do stuff if image is -# not existing and state != absent -# -state="$(cat "$__object/parameter/state")" -[ "$state" = "absent" ] && exit 0 - -exists="$(cat "$__object/explorer/exists")" -[ "$exists" ] && exit 0 - -################################################################################ -# Still there? Create image -# - -format="$(cat "$__object/parameter/format")" -size="$(cat "$__object/parameter/size")" -diskimage="/$__object_id" - -echo "qemu-img create -f '$format' '$diskimage' '$size'" diff --git a/cdist/conf/type/__qemu_img/man.rst b/cdist/conf/type/__qemu_img/man.rst deleted file mode 100644 index 210c7f5f..00000000 --- a/cdist/conf/type/__qemu_img/man.rst +++ /dev/null @@ -1,53 +0,0 @@ -cdist-type__qemu_img(7) -======================= - -NAME ----- -cdist-type__qemu_img - Manage VM disk images - - -DESCRIPTION ------------ -The qemu-img program is used to create qemu images for -qemu and (qemu-)kvm. - - - -OPTIONAL PARAMETERS -------------------- -state - Either "present" or "absent", defaults to "present" -size - Size of the image in qemu-img compatible units. - - Required if state is "present". - - -EXAMPLES --------- - -.. code-block:: sh - - # Create a 50G size image - __qemu_img /home/services/kvm/vm/myvmname/system-disk --size 50G - - # Remove image - __qemu_img /home/services/kvm/vm/myoldvm/system-disk --state absent - - -SEE ALSO --------- -:strong:`qemu-img`\ (1) - - -AUTHORS -------- -Nico Schottelius - - -COPYING -------- -Copyright \(C) 2012-2014 Nico Schottelius. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__qemu_img/manifest b/cdist/conf/type/__qemu_img/manifest deleted file mode 100755 index 55f3bf16..00000000 --- a/cdist/conf/type/__qemu_img/manifest +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh -e -# -################################################################################ -# Default settings -# - -state_should="$(cat "$__object/parameter/state")" - -diskimage="/$__object_id" - -case "$state_should" in - present) - if [ ! -f "$__object/parameter/size" ]; then - echo "Size is required when state is present" >&2 - exit 1 - fi - ;; - absent) - # Absent is ensured by __file, present by gencode-remote - __file "$diskimage" --state absent - ;; - *) - echo "Unsupported state: $state_should" >&2 - exit 1 - ;; -esac diff --git a/cdist/conf/type/__qemu_img/parameter/default/format b/cdist/conf/type/__qemu_img/parameter/default/format deleted file mode 100644 index e0a90ab9..00000000 --- a/cdist/conf/type/__qemu_img/parameter/default/format +++ /dev/null @@ -1 +0,0 @@ -qcow2 diff --git a/cdist/conf/type/__qemu_img/parameter/default/state b/cdist/conf/type/__qemu_img/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__qemu_img/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__qemu_img/parameter/optional b/cdist/conf/type/__qemu_img/parameter/optional deleted file mode 100644 index 21aa421b..00000000 --- a/cdist/conf/type/__qemu_img/parameter/optional +++ /dev/null @@ -1,3 +0,0 @@ -format -state -size diff --git a/cdist/conf/type/__rbenv/man.rst b/cdist/conf/type/__rbenv/man.rst deleted file mode 100644 index 607019cf..00000000 --- a/cdist/conf/type/__rbenv/man.rst +++ /dev/null @@ -1,49 +0,0 @@ -cdist-type__rbenv(7) -==================== - -NAME ----- -cdist-type__rbenv - Manage rbenv installation - - -DESCRIPTION ------------ -This cdist type allows you to manage rbenv installations. -It also installs ruby-build. - - -OPTIONAL PARAMETERS -------------------- -state - Either "present" or "absent", defaults to "present" - -owner - Which user should own the rbenv installation, defaults to root - - -EXAMPLES --------- - -.. code-block:: sh - - # Install rbenv including ruby-build for nico - __rbenv /home/nico - - # Install rbenv including ruby-build for nico - __rbenv /home/nico --owner nico - - # Bastian does not need rbenv anymore, he began to code C99 - __rbenv /home/bastian --state absent - - -AUTHORS -------- -Nico Schottelius - - -COPYING -------- -Copyright \(C) 2012-2014 Nico Schottelius. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__rbenv/manifest b/cdist/conf/type/__rbenv/manifest deleted file mode 100755 index e5c3d2f8..00000000 --- a/cdist/conf/type/__rbenv/manifest +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh -e -# -# 2012-2014 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -homedir="$__object_id" - -state_should="$(cat "$__object/parameter/state")" -owner="$(cat "$__object/parameter/owner")" - -rbenvdir="$homedir/.rbenv" -rubybuilddir="$rbenvdir/plugins/ruby-build" - -__git "$rbenvdir" \ - --source git://github.com/sstephenson/rbenv.git \ - --owner "$owner" \ - --state "$state_should" - -require="__git/$rbenvdir" __git "$rubybuilddir" \ - --source git://github.com/sstephenson/ruby-build.git \ - --owner "$owner" \ - --state "$state_should" diff --git a/cdist/conf/type/__rbenv/parameter/default/state b/cdist/conf/type/__rbenv/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__rbenv/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__rbenv/parameter/optional b/cdist/conf/type/__rbenv/parameter/optional deleted file mode 100644 index ff72b5c7..00000000 --- a/cdist/conf/type/__rbenv/parameter/optional +++ /dev/null @@ -1 +0,0 @@ -state diff --git a/cdist/conf/type/__rsync/gencode-local b/cdist/conf/type/__rsync/gencode-local deleted file mode 100755 index e36ded2f..00000000 --- a/cdist/conf/type/__rsync/gencode-local +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh -e -# -# 2015 Dominique Roux (dominique.roux4 at gmail.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -source=$(cat "$__object/parameter/source") -remote_user=$(cat "$__object/parameter/remote-user") - -if [ -f "$__object/parameter/destination" ]; then - destination=$(cat "$__object/parameter/destination") -else - destination="/$__object_id" -fi - -set -- -if [ -f "$__object/parameter/rsync-opts" ]; then - while read -r opts; do - set -- "$@" "--$opts" - done < "$__object/parameter/rsync-opts" -fi - -echo rsync -a \ - --no-owner --no-group \ - -q "$@" "${source}/" "${remote_user}@${__target_host}:${destination}" diff --git a/cdist/conf/type/__rsync/man.rst b/cdist/conf/type/__rsync/man.rst deleted file mode 100644 index 94b06d63..00000000 --- a/cdist/conf/type/__rsync/man.rst +++ /dev/null @@ -1,114 +0,0 @@ -cdist-type__rsync(7) -==================== - -NAME ----- -cdist-type__rsync - Mirror directories using rsync - - -DESCRIPTION ------------ -WARNING: This type is of BETA quality: - -- it has not been tested widely -- interfaces *may* change -- if there is a better approach to solve the problem -> the type may even vanish - -If you are fine with these constraints, please read on. - - -This cdist type allows you to mirror local directories to the -target host using rsync. Rsync will be installed in the manifest of the type. -If group or owner are giveng, a recursive chown will be executed on the -target host. - -A slash will be appended to the source directory so that only the contents -of the directory are taken and not the directory name itself. - - -REQUIRED PARAMETERS -------------------- -source - Where to take files from - - -OPTIONAL PARAMETERS -------------------- -group - Group to chgrp to. - -owner - User to chown to. - -destination - Use this as the base destination instead of the object id - -remote-user - Use this user instead of the default "root" for rsync operations. - - -OPTIONAL MULTIPLE PARAMETERS ----------------------------- -rsync-opts - Use this option to give rsync options with. - See rsync(1) for available options. - Only "--" options are supported. - Write the options without the beginning "--" - Can be specified multiple times. - - -MESSAGES --------- -NONE - - -EXAMPLES --------- - -.. code-block:: sh - - # You can use any source directory - __rsync /tmp/testdir \ - --source /etc - - # Use source from type - __rsync /etc \ - --source "$__type/files/package" - - # Allow multiple __rsync objects to write to the same dir - __rsync mystuff \ - --destination /usr/local/bin \ - --source "$__type/files/package" - - __rsync otherstuff \ - --destination /usr/local/bin \ - --source "$__type/files/package2" - - # Use rsync option --exclude - __rsync /tmp/testdir \ - --source /etc \ - --rsync-opts exclude=sshd_conf - - # Use rsync with multiple options --exclude --dry-run - __rsync /tmp/testing \ - --source /home/tester \ - --rsync-opts exclude=id_rsa \ - --rsync-opts dry-run - - -SEE ALSO --------- -:strong:`rsync`\ (1) - - -AUTHORS -------- -Nico Schottelius - - -COPYING -------- -Copyright \(C) 2015 Nico Schottelius. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__rsync/parameter/default/remote-user b/cdist/conf/type/__rsync/parameter/default/remote-user deleted file mode 100644 index d8649da3..00000000 --- a/cdist/conf/type/__rsync/parameter/default/remote-user +++ /dev/null @@ -1 +0,0 @@ -root diff --git a/cdist/conf/type/__rsync/parameter/optional b/cdist/conf/type/__rsync/parameter/optional deleted file mode 100644 index ac2b2390..00000000 --- a/cdist/conf/type/__rsync/parameter/optional +++ /dev/null @@ -1,4 +0,0 @@ -destination -owner -group -remote-user diff --git a/cdist/conf/type/__rsync/parameter/optional_multiple b/cdist/conf/type/__rsync/parameter/optional_multiple deleted file mode 100644 index fdb7cd88..00000000 --- a/cdist/conf/type/__rsync/parameter/optional_multiple +++ /dev/null @@ -1 +0,0 @@ -rsync-opts diff --git a/cdist/conf/type/__rsync/parameter/required b/cdist/conf/type/__rsync/parameter/required deleted file mode 100644 index 5a18cd2f..00000000 --- a/cdist/conf/type/__rsync/parameter/required +++ /dev/null @@ -1 +0,0 @@ -source diff --git a/cdist/conf/type/__rvm/explorer/state b/cdist/conf/type/__rvm/explorer/state deleted file mode 100755 index 74d17048..00000000 --- a/cdist/conf/type/__rvm/explorer/state +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -# -# 2012 Evax Software -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -user="$__object_id" - -# RVM behaves differently if root is the username / uid == 0 -if [ "$user" = "root" ]; then - if [ -d /usr/local/rvm ]; then - echo present - else - echo absent - fi -else - if su - "$user" -c "[ -d \"\$HOME/.rvm\" ]" ; then - echo "present" - else - echo "absent" - fi -fi diff --git a/cdist/conf/type/__rvm/gencode-remote b/cdist/conf/type/__rvm/gencode-remote deleted file mode 100755 index 993191c1..00000000 --- a/cdist/conf/type/__rvm/gencode-remote +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh -e -# -# 2012 Evax Software -# 2012 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -user="$__object_id" -state_is="$(cat "$__object/explorer/state")" -state_should="$(cat "$__object/parameter/state")" - -[ "$state_is" = "$state_should" ] && exit 0 - -case "$state_should" in - present) - cat << DONE -su - $user -c "unset rvm_path; unset rvm_bin_path; unset rvm_prefix; unset rvm_version; curl -L get.rvm.io | bash -s stable" -DONE - ;; - absent) - cat << DONE -su - $user -c "rm -Rf \"\\\$HOME/.rvm\"; -sed '/rvm\\/scripts\\/rvm/d' \"\\\$HOME/.bashrc\" > \"\\\$HOME/.bashrc.cdist-tmp\" -mv \"\\\$HOME/.bashrc.cdist-tmp\" \"\\\$HOME/.bashrc\"" -DONE - ;; -esac diff --git a/cdist/conf/type/__rvm/man.rst b/cdist/conf/type/__rvm/man.rst deleted file mode 100644 index 3a914304..00000000 --- a/cdist/conf/type/__rvm/man.rst +++ /dev/null @@ -1,46 +0,0 @@ -cdist-type__rvm(7) -================== - -NAME ----- -cdist-type__rvm - Install rvm for a given user - - -DESCRIPTION ------------ -RVM is the Ruby enVironment Manager for the Ruby programming language. - - -REQUIRED PARAMETERS -------------------- -state - Either "present" or "absent", defaults to "present". - - -EXAMPLES --------- - -.. code-block:: sh - - # Install rvm for user billie - __rvm billie --state present - - # Remove rvm - __rvm billie --state absent - - -SEE ALSO --------- -:strong:`cdist-type__rvm_gem`\ (7), :strong:`cdist-type__rvm_gemset`\ (7), -:strong:`cdist-type__rvm_ruby`\ (7) - - -AUTHORS -------- -Evax Software - - -COPYING -------- -Copyright \(C) 2012 Evax Software. Free use of this software is granted under -the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__rvm/manifest b/cdist/conf/type/__rvm/manifest deleted file mode 100755 index 0230156b..00000000 --- a/cdist/conf/type/__rvm/manifest +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -e -# -# 2012 Evax Software -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -# rvm core dependencies -__package bash --state present -__package curl --state present -__package git-core --state present -__package patch --state present diff --git a/cdist/conf/type/__rvm/parameter/default/state b/cdist/conf/type/__rvm/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__rvm/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__rvm/parameter/optional b/cdist/conf/type/__rvm/parameter/optional deleted file mode 100644 index ff72b5c7..00000000 --- a/cdist/conf/type/__rvm/parameter/optional +++ /dev/null @@ -1 +0,0 @@ -state diff --git a/cdist/conf/type/__rvm_gem/explorer/state b/cdist/conf/type/__rvm_gem/explorer/state deleted file mode 100755 index 4146d666..00000000 --- a/cdist/conf/type/__rvm_gem/explorer/state +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh -# -# 2012 Evax Software -# 2012 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -gem="$__object_id" -gemset="$(cat "$__object/parameter/gemset")" -ruby="$(echo "$gemset" | cut -d '@' -f 1)" -gemsetname="$(echo "$gemset" | cut -d '@' -f2)" -user="$(cat "$__object/parameter/user")" -if su - "$user" -c "[ ! -d \"\$HOME/.rvm\" ]" ; then - echo "absent" - exit 0 -fi -if su - "$user" -c "source \"\$HOME/.rvm/scripts/rvm\" -rvm list | grep -q $ruby"; then - if su - "$user" -c "source \"\$HOME/.rvm/scripts/rvm\" -rvm use $ruby > /dev/null 2>&1; rvm gemset list | grep -q $gemsetname && -rvm use $gemset > /dev/null 2>&1 && gem list | grep -q $gem"; then - echo "present" - exit 0 - fi -fi -echo "absent" diff --git a/cdist/conf/type/__rvm_gem/gencode-remote b/cdist/conf/type/__rvm_gem/gencode-remote deleted file mode 100755 index 9212de91..00000000 --- a/cdist/conf/type/__rvm_gem/gencode-remote +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh # -# 2012 Evax Software -# 2012 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -gem="$__object_id" -gemset="$(cat "$__object/parameter/gemset")" -state_is="$(cat "$__object/explorer/state")" -user="$(cat "$__object/parameter/user")" -state_should="$(cat "$__object/parameter/state")" - -[ "$state_is" = "$state_should" ] && exit 0 - -case "$state_should" in - present) - cat << DONE -su - "$user" -c 'source ~/.rvm/scripts/rvm; rvm use "$gemset"; gem install "$gem"' -DONE - ;; - absent) - cat << DONE -su - "$user" -c 'source ~/.rvm/scripts/rvm; rvm use "$gemset"; gem uninstall "$gem"' -DONE - ;; -esac diff --git a/cdist/conf/type/__rvm_gem/man.rst b/cdist/conf/type/__rvm_gem/man.rst deleted file mode 100644 index 5f3fba97..00000000 --- a/cdist/conf/type/__rvm_gem/man.rst +++ /dev/null @@ -1,58 +0,0 @@ -cdist-type__rvm_gemset(7) -========================== - -NAME ----- -cdist-type__rvm_gemset - Manage Ruby gems through rvm - - -DESCRIPTION ------------ -RVM is the Ruby enVironment Manager for the Ruby programming language. - - -REQUIRED PARAMETERS -------------------- -user - The remote user account to use -gemset - The gemset to use -state - Either "present" or "absent", defaults to "present". - -OPTIONAL PARAMETERS -------------------- -default - Make the selected gemset the default - -EXAMPLES --------- - -.. code-block:: sh - - # Install the rails gem in gemset ruby-1.9.3-p0@myset for user bill - __rvm_gemset rails --gemset ruby-1.9.3-p0@myset --user bill --state present - - # Do the same and also make ruby-1.9.3-p0@myset the default gemset - __rvm_gemset rails --gemset ruby-1.9.3-p0@myset --user bill \ - --state present --default - - # Remove it - __rvm_ruby rails --gemset ruby-1.9.3-p0@myset --user bill --state absent - - -SEE ALSO --------- -:strong:`cdist-type__rvm`\ (7), :strong:`cdist-type__rvm_gemset`\ (7), -:strong:`cdist-type__rvm_ruby`\ (7) - - -AUTHORS -------- -Evax Software - - -COPYING -------- -Copyright \(C) 2012 Evax Software. Free use of this software is granted under -the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__rvm_gem/parameter/default/state b/cdist/conf/type/__rvm_gem/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__rvm_gem/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__rvm_gem/parameter/optional b/cdist/conf/type/__rvm_gem/parameter/optional deleted file mode 100644 index 96983811..00000000 --- a/cdist/conf/type/__rvm_gem/parameter/optional +++ /dev/null @@ -1,2 +0,0 @@ -default -state diff --git a/cdist/conf/type/__rvm_gem/parameter/required b/cdist/conf/type/__rvm_gem/parameter/required deleted file mode 100644 index 58243a95..00000000 --- a/cdist/conf/type/__rvm_gem/parameter/required +++ /dev/null @@ -1,2 +0,0 @@ -gemset -user diff --git a/cdist/conf/type/__rvm_gemset/explorer/state b/cdist/conf/type/__rvm_gemset/explorer/state deleted file mode 100755 index e300453b..00000000 --- a/cdist/conf/type/__rvm_gemset/explorer/state +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -# -# 2012 Evax Software -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -user="$(cat "$__object/parameter/user")" - -if [ ! -e "~$user/.rvm/scripts/rvm" ] ; then - echo "absent" - exit 0 -fi - -# shellcheck disable=SC2016 -if su - "$user" -c 'source ~/.rvm/scripts/rvm; rvm list strings | grep -q "^$ruby\$"'; then - # shellcheck disable=SC2016 - if su - "$user" -c 'source ~/.rvm/scripts/rvm; rvm use "$ruby" > /dev/null; rvm gemset list strings | cut -f 1 -d " " | grep -q "^$gemsetname\$"'; then - echo "present" - exit 0 - fi -fi -echo "absent" diff --git a/cdist/conf/type/__rvm_gemset/gencode-remote b/cdist/conf/type/__rvm_gemset/gencode-remote deleted file mode 100755 index 3cdc66a6..00000000 --- a/cdist/conf/type/__rvm_gemset/gencode-remote +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh -e -# -# 2012 Evax Software -# 2012 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -gemset="$__object_id" -ruby="$(echo "$gemset" | cut -d '@' -f 1)" -gemsetname="$(echo "$gemset" | cut -d '@' -f 2)" -state_is="$(cat "$__object/explorer/state")" -user="$(cat "$__object/parameter/user")" -state_should="$(cat "$__object/parameter/state")" - -[ "$state_is" = "$state_should" ] && exit 0 - -case "$state_should" in - present) - cat << DONE -su - "$user" -c "source ~/.rvm/scripts/rvm; rvm $gemset --create" -DONE - if [ -f "$__object/parameter/default" ]; then - cat << DONE -su - "$user" -c "source ~/.rvm/scripts/rvm; rvm use --default $gemset" -DONE - fi - - ;; - absent) - cat << DONE -su - "$user" -c "source ~/.rvm/scripts/rvm; rvm use $ruby; rvm --force gemset delete $gemsetname" -DONE - ;; -esac diff --git a/cdist/conf/type/__rvm_gemset/man.rst b/cdist/conf/type/__rvm_gemset/man.rst deleted file mode 100644 index fca4c36a..00000000 --- a/cdist/conf/type/__rvm_gemset/man.rst +++ /dev/null @@ -1,56 +0,0 @@ -cdist-type__rvm_gemset(7) -========================== - -NAME ----- -cdist-type__rvm_gemset - Manage gemsets through rvm - - -DESCRIPTION ------------ -RVM is the Ruby enVironment Manager for the Ruby programming language. - - -REQUIRED PARAMETERS -------------------- -user - The remote user account to use -state - Either "present" or "absent", defaults to "present". - -BOOLEAN PARAMETERS -------------------- -default - If present, set the given gemset as default. - - -EXAMPLES --------- - -.. code-block:: sh - - # Install the gemset @myset for user charles on based on ruby-1.9.3-0 - __rvm_gemset ruby-1.9.3-p0@myset --user charles --state present - - # Do the same and make ruby-1.9.3-p0@myset the default gemset - __rvm_gemset ruby-1.9.3-p0@myset --user charles --state present --default - - # Remove the gemset @myset for user john - __rvm_ruby ruby-1.9.3-p0@myset --user john --state absent - - -SEE ALSO --------- -:strong:`cdist-type__rvm`\ (7), :strong:`cdist-type__rvm_gem`\ (7), -:strong:`cdist-type__rvm_ruby`\ (7) - - -AUTHORS -------- -Evax Software - - -COPYING -------- -Copyright \(C) 2012 Evax Software. Free use of this software is granted under -the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__rvm_gemset/parameter/boolean b/cdist/conf/type/__rvm_gemset/parameter/boolean deleted file mode 100644 index 4ad96d51..00000000 --- a/cdist/conf/type/__rvm_gemset/parameter/boolean +++ /dev/null @@ -1 +0,0 @@ -default diff --git a/cdist/conf/type/__rvm_gemset/parameter/default/state b/cdist/conf/type/__rvm_gemset/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__rvm_gemset/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__rvm_gemset/parameter/optional b/cdist/conf/type/__rvm_gemset/parameter/optional deleted file mode 100644 index ff72b5c7..00000000 --- a/cdist/conf/type/__rvm_gemset/parameter/optional +++ /dev/null @@ -1 +0,0 @@ -state diff --git a/cdist/conf/type/__rvm_gemset/parameter/required b/cdist/conf/type/__rvm_gemset/parameter/required deleted file mode 100644 index 4eb8387f..00000000 --- a/cdist/conf/type/__rvm_gemset/parameter/required +++ /dev/null @@ -1 +0,0 @@ -user diff --git a/cdist/conf/type/__rvm_ruby/explorer/state b/cdist/conf/type/__rvm_ruby/explorer/state deleted file mode 100755 index 43dafd4f..00000000 --- a/cdist/conf/type/__rvm_ruby/explorer/state +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh -# -# 2012 Evax Software -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -ruby="$__object_id" -user="$(cat "$__object/parameter/user")" -if su - "$user" -c "[ ! -d \"\$HOME/.rvm\" ]" ; then - echo "absent" - exit 0 -fi -if su - "$user" -c "source \"\$HOME/.rvm/scripts/rvm\" -rvm list | grep -q $ruby"; then - echo "present" -else - echo "absent" -fi diff --git a/cdist/conf/type/__rvm_ruby/gencode-remote b/cdist/conf/type/__rvm_ruby/gencode-remote deleted file mode 100755 index f2fd41ef..00000000 --- a/cdist/conf/type/__rvm_ruby/gencode-remote +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh -e -# -# 2012 Evax Software -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -ruby="$__object_id" -state_is="$(cat "$__object/explorer/state")" -user="$(cat "$__object/parameter/user")" -state_should="$(cat "$__object/parameter/state")" - -[ "$state_is" = "$state_should" ] && exit 0 - -case "$state_should" in - present) - echo "su - \"$user\" -c \"source \\\$HOME/.rvm/scripts/rvm;"\ - "rvm install $ruby\"" - if [ -f "$__object/parameter/default" ]; then - echo "su - \"$user\" -c \"source \\\$HOME/.rvm/scripts/rvm;"\ - "rvm use --default $ruby\"" - fi - ;; - absent) - echo "su - \"$user\" -c \"source \\\$HOME/.rvm/scripts/rvm;"\ - "rvm remove $ruby\"" - ;; - - *) - echo "Unknown state $state_should" >&2 - exit 1 - ;; -esac diff --git a/cdist/conf/type/__rvm_ruby/man.rst b/cdist/conf/type/__rvm_ruby/man.rst deleted file mode 100644 index f6e71e12..00000000 --- a/cdist/conf/type/__rvm_ruby/man.rst +++ /dev/null @@ -1,57 +0,0 @@ -cdist-type__rvm_ruby(7) -======================= - -NAME ----- -cdist-type__rvm_ruby - Manage ruby installations through rvm - - -DESCRIPTION ------------ -RVM is the Ruby enVironment Manager for the Ruby programming language. - - -REQUIRED PARAMETERS -------------------- -user - The remote user account to use -state - Either "present" or "absent", defaults to "present". - - -BOOLEAN PARAMETERS ------------------- -default - Set the given version as default - - -EXAMPLES --------- - -.. code-block:: sh - - # Install ruby 1.9.3 through rvm for user thelonious - __rvm_ruby ruby-1.9.3-p0 --user thelonious --state present - - # Install ruby 1.9.3 through rvm for user ornette and make it the default - __rvm_ruby ruby-1.9.3-p0 --user ornette --state present --default - - # Remove ruby 1.9.3 for user john - __rvm_ruby ruby-1.9.3-p0 --user john --state absent - - -SEE ALSO --------- -:strong:`cdist-type__rvm`\ (7), :strong:`cdist-type__rvm_gem`\ (7), -:strong:`cdist-type__rvm_gemset`\ (7) - - -AUTHORS -------- -Evax Software - - -COPYING -------- -Copyright \(C) 2012 Evax Software. Free use of this software is granted under -the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__rvm_ruby/manifest b/cdist/conf/type/__rvm_ruby/manifest deleted file mode 100755 index 3f63eb11..00000000 --- a/cdist/conf/type/__rvm_ruby/manifest +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -e -# -# 2012 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -# Required packages for building ruby -for package in bzip2 gcc make; do - __package "$package" --state present -done diff --git a/cdist/conf/type/__rvm_ruby/parameter/boolean b/cdist/conf/type/__rvm_ruby/parameter/boolean deleted file mode 100644 index 4ad96d51..00000000 --- a/cdist/conf/type/__rvm_ruby/parameter/boolean +++ /dev/null @@ -1 +0,0 @@ -default diff --git a/cdist/conf/type/__rvm_ruby/parameter/default/state b/cdist/conf/type/__rvm_ruby/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__rvm_ruby/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__rvm_ruby/parameter/optional b/cdist/conf/type/__rvm_ruby/parameter/optional deleted file mode 100644 index ff72b5c7..00000000 --- a/cdist/conf/type/__rvm_ruby/parameter/optional +++ /dev/null @@ -1 +0,0 @@ -state diff --git a/cdist/conf/type/__rvm_ruby/parameter/required b/cdist/conf/type/__rvm_ruby/parameter/required deleted file mode 100644 index 4eb8387f..00000000 --- a/cdist/conf/type/__rvm_ruby/parameter/required +++ /dev/null @@ -1 +0,0 @@ -user diff --git a/cdist/conf/type/__ssh_authorized_key/explorer/entry b/cdist/conf/type/__ssh_authorized_key/explorer/entry deleted file mode 100755 index ccab0afc..00000000 --- a/cdist/conf/type/__ssh_authorized_key/explorer/entry +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh -# -# 2014 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -# extract the keytype and base64 encoded key ignoring any options and comment -type_and_key="$(tr ' ' '\n' < "$__object/parameter/key"| awk '/^(ssh|ecdsa)-[^ ]+/ { printf $1" "; getline; printf $1 }')" -# If type_and_key is empty, which is the case with an invalid key, do not grep $file because it results -# in greping everything in file and all entries from file are removed. -if [ -n "${type_and_key}" ] -then - file="$(cat "$__object/parameter/file")" - - # get any entries that match the type and key - - # NOTE: Do not match from the beginning of the line as there may be options - # preceeding the key. - grep "${type_and_key}\\([ \\n].*\\)*$" "$file" || true -fi diff --git a/cdist/conf/type/__ssh_authorized_key/gencode-remote b/cdist/conf/type/__ssh_authorized_key/gencode-remote deleted file mode 100755 index f37aa565..00000000 --- a/cdist/conf/type/__ssh_authorized_key/gencode-remote +++ /dev/null @@ -1,120 +0,0 @@ -#!/bin/sh -e -# -# 2014 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -set -u - -the_key="$(cat "$__object/parameter/key")" -# validate key -validated_key="$(echo "${the_key}" | tr ' ' '\n' | awk '/^(ssh|ecdsa)-[^ ]+/ { printf $1" "; getline; printf $1 }')" -if [ -z "${validated_key}" ] -then - echo "Key is invalid: \"${the_key}\"" >&2 - exit 1 -fi - -remove_line() { - file="$1" - line="$2" - cat << DONE -tmpfile=\$(mktemp ${file}.cdist.XXXXXXXXXX) -# preserve ownership and permissions of existing file -if [ -f "$file" ]; then - cp -p "$file" "\$tmpfile" -fi -grep -v -F -x '$line' '$file' > \$tmpfile || true -mv -f "\$tmpfile" "$file" -DONE -} - -add_line() { - file="$1" - line="$2" - # escape single quotes - line_sanitised=$(echo "$line" | sed -e "s/'/'\"'\"'/g") - printf '%s' "printf '%s\\n' '$line_sanitised' >> $file" -} - - -file="$(cat "$__object/parameter/file")" -mkdir "$__object/files" - -# Generate the entry as it should be -( - if [ -f "$__object/parameter/option" ]; then - # comma seperated list of options - options="$(tr '\n' ',' < "$__object/parameter/option")" - printf '%s ' "${options%*,}" - fi - if [ -f "$__object/parameter/comment" ]; then - # extract the keytype and base64 encoded key ignoring any options and comment - printf '%s ' "$(echo "${the_key}" | tr ' ' '\n' | awk '/^(ssh|ecdsa)-[^ ]+/ { printf $1" "; getline; printf $1 }')" - # override the comment with the one explicitly given - printf '%s' "$(cat "$__object/parameter/comment")" - else - printf '%s' "${the_key}" - fi - printf '\n' -) > "$__object/files/should" - -# Remove conflicting entries if any -if [ -s "$__object/explorer/entry" ]; then - # Note that the files have to be sorted for comparison with `comm`. - sort "$__object/explorer/entry" > "$__object/files/is" - comm -13 "$__object/files/should" "$__object/files/is" | { - while read -r entry; do - remove_line "$file" "$entry" - done - } -fi - -# Determine the current state -entry="$(cat "$__object/files/should")" -state_should="$(cat "$__object/parameter/state")" -num_existing_entries=$(grep -c -F -x "$entry" "$__object/explorer/entry" || true) -if [ "$num_existing_entries" -eq 1 ]; then - state_is="present" -else - # Posix grep does not define the -m option, so we can not remove a single - # occurence of a string from a file in the `remove_line` function. Instead - # _all_ occurences are removed. - # By using `comm` to detect conflicting entries this could lead to the - # situation that the key we want to add is actually removed. - # To workaround this we must treat 0 or more then 1 existing entries to - # mean current state is 'absent'. By doing this, the key is readded - # again after cleaning up conflicting entries. - state_is="absent" -fi - -# Manage the actual entry as it should be -if [ "$state_should" = "$state_is" ]; then - # Nothing to do - exit 0 -fi - -case "$state_should" in - present) - add_line "$file" "$entry" - echo "added to $file ($entry)" >> "$__messages_out" - ;; - absent) - remove_line "$file" "$entry" - echo "removed from $file ($entry)" >> "$__messages_out" - ;; -esac diff --git a/cdist/conf/type/__ssh_authorized_key/man.rst b/cdist/conf/type/__ssh_authorized_key/man.rst deleted file mode 100644 index 087a3dae..00000000 --- a/cdist/conf/type/__ssh_authorized_key/man.rst +++ /dev/null @@ -1,80 +0,0 @@ -cdist-type__ssh_authorized_key(7) -================================= - -NAME ----- -cdist-type__ssh_authorized_key - Manage a single ssh authorized key entry - - -DESCRIPTION ------------ -Manage a single authorized key entry in an authorized_key file. -This type was created to be used by the __ssh_authorized_keys type. - - -REQUIRED PARAMETERS -------------------- -file - the authorized_keys file to which the given key should be added - -key - a string containing the ssh keytype, base 64 encoded key and optional - trailing comment which shall be added to the given authorized_keys file. - - -OPTIONAL PARAMETERS -------------------- -comment - explicit comment instead of the one which may be trailing the given key - -option - an option to set for this authorized_key entry. - Can be specified multiple times. - See sshd(8) for available options. - -state - if the given keys should be 'present' or 'absent', defaults to 'present'. - - -MESSAGES --------- -added to `file` (`entry`) - The key `entry` (with optional comment) was added to `file`. - -removed from `file` (`entry`) - The key `entry` (with optional comment) was removed from `file`. - - -EXAMPLES --------- - -.. code-block:: sh - - __ssh_authorized_key some-id \ - --file "/home/user/.ssh/autorized_keys" \ - --key "$(cat ~/.ssh/id_rsa.pub)" - - __ssh_authorized_key some-id \ - --file "/home/user/.ssh/autorized_keys" \ - --key "$(cat ~/.ssh/id_rsa.pub)" \ - --option 'command="/path/to/script"' \ - --option 'environment="FOO=bar"' \ - --comment 'one to rule them all' - - -SEE ALSO --------- -:strong:`cdist__ssh_authorized_keys`\ (7), :strong:`sshd`\ (8) - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2014 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__ssh_authorized_key/parameter/default/state b/cdist/conf/type/__ssh_authorized_key/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__ssh_authorized_key/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__ssh_authorized_key/parameter/optional b/cdist/conf/type/__ssh_authorized_key/parameter/optional deleted file mode 100644 index 89e8d966..00000000 --- a/cdist/conf/type/__ssh_authorized_key/parameter/optional +++ /dev/null @@ -1,2 +0,0 @@ -comment -state diff --git a/cdist/conf/type/__ssh_authorized_key/parameter/optional_multiple b/cdist/conf/type/__ssh_authorized_key/parameter/optional_multiple deleted file mode 100644 index 01925a15..00000000 --- a/cdist/conf/type/__ssh_authorized_key/parameter/optional_multiple +++ /dev/null @@ -1 +0,0 @@ -option diff --git a/cdist/conf/type/__ssh_authorized_keys/explorer/group b/cdist/conf/type/__ssh_authorized_keys/explorer/group deleted file mode 100755 index 72a4e314..00000000 --- a/cdist/conf/type/__ssh_authorized_keys/explorer/group +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -# -# 2014 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -owner="$(cat "$__object/parameter/owner" 2>/dev/null || echo "$__object_id")" -gid="$(getent passwd "$owner" | cut -d':' -f 4)" -getent group "$gid" || true diff --git a/cdist/conf/type/__ssh_authorized_keys/man.rst b/cdist/conf/type/__ssh_authorized_keys/man.rst deleted file mode 100644 index ba310ff9..00000000 --- a/cdist/conf/type/__ssh_authorized_keys/man.rst +++ /dev/null @@ -1,121 +0,0 @@ -cdist-type__ssh_authorized_keys(7) -================================== - -NAME ----- -cdist-type__ssh_authorized_keys - Manage ssh authorized_keys files - - -DESCRIPTION ------------ -Adds or removes ssh keys from a authorized_keys file. - -This type uses the __ssh_dot_ssh type to manage the directory containing -the authorized_keys file. You can disable this feature with the --noparent -boolean parameter. - -The existence, ownership and permissions of the authorized_keys file itself are -also managed. This can be disabled with the --nofile boolean parameter. It is -then left to the user to ensure that the file exists and that ownership and -permissions work with ssh. - - -REQUIRED PARAMETERS -------------------- -key - the ssh key which shall be added to this authorized_keys file. - Must be a string and can be specified multiple times. - - -OPTIONAL PARAMETERS -------------------- -comment - explicit comment instead of the one which may be trailing the given key - -file - an alternative destination file, defaults to ~$owner/.ssh/authorized_keys - -option - an option to set for all created authorized_key entries. - Can be specified multiple times. - See sshd(8) for available options. - -owner - the user owning the authorized_keys file, defaults to object_id. - -state - if the given keys should be 'present' or 'absent', defaults to 'present'. - - -BOOLEAN PARAMETERS ------------------- -noparent - don't create or change ownership and permissions of the directory containing - the authorized_keys file - -nofile - don't manage existence, ownership and permissions of the the authorized_keys - file - - -EXAMPLES --------- - -.. code-block:: sh - - # add your ssh key to remote root's authorized_keys file - __ssh_authorized_keys root \ - --key "$(cat ~/.ssh/id_rsa.pub)" - - # allow key to login as user-name - __ssh_authorized_keys user-name \ - --key "ssh-rsa AXYZAAB3NzaC1yc2..." - - # allow key to login as user-name with options and expicit comment - __ssh_authorized_keys user-name \ - --key "ssh-rsa AXYZAAB3NzaC1yc2..." \ - --option no-agent-forwarding \ - --option 'from="*.example.com"' \ - --comment 'backup server' - - # same as above, but with explicit owner and two keys - # note that the options are set for all given keys - __ssh_authorized_keys some-fancy-id \ - --owner user-name \ - --key "ssh-rsa AXYZAAB3NzaC1yc2..." \ - --key "ssh-rsa AZXYAAB3NzaC1yc2..." \ - --option no-agent-forwarding \ - --option 'from="*.example.com"' \ - --comment 'backup server' - - # authorized_keys file in non standard location - __ssh_authorized_keys some-fancy-id \ - --file /etc/ssh/keys/user-name/authorized_keys \ - --owner user-name \ - --key "ssh-rsa AXYZAAB3NzaC1yc2..." - - # same as above, but directory and authorized_keys file is created elswhere - __ssh_authorized_keys some-fancy-id \ - --file /etc/ssh/keys/user-name/authorized_keys \ - --owner user-name \ - --noparent \ - --nofile \ - --key "ssh-rsa AXYZAAB3NzaC1yc2..." - - -SEE ALSO --------- -:strong:`sshd`\ (8) - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2012-2014 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__ssh_authorized_keys/manifest b/cdist/conf/type/__ssh_authorized_keys/manifest deleted file mode 100755 index b507c7ff..00000000 --- a/cdist/conf/type/__ssh_authorized_keys/manifest +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/sh -e -# -# 2012-2014 Steven Armstrong (steven-cdist at armstrong.cc) -# 2014 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -owner="$(cat "$__object/parameter/owner" 2>/dev/null || echo "$__object_id")" -state="$(cat "$__object/parameter/state" 2>/dev/null)" -file="$(cat "$__object/explorer/file")" - -if [ ! -f "$__object/parameter/noparent" ] || [ ! -f "$__object/parameter/nofile" ]; then - group="$(cut -d':' -f 1 "$__object/explorer/group")" - if [ -z "$group" ]; then - echo "Failed to get owners group from explorer." >&2 - exit 1 - fi - - if [ ! -f "$__object/parameter/noparent" ]; then - __ssh_dot_ssh "$owner" - export require="__ssh_dot_ssh/$owner" - fi - if [ ! -f "$__object/parameter/nofile" ]; then - # Ensure that authorized_keys file exists and has the right permissions. - __file "$file" \ - --owner "$owner" \ - --group "$group" \ - --mode 0600 \ - --state exists - export require="__file/$file" - fi -fi - -_cksum() { - echo "$1" | cksum | cut -d' ' -f 1 -} - -while read -r key; do - type_and_key="$(echo "$key" | tr ' ' '\n' | awk '/^(ssh|ecdsa)-[^ ]+/ { printf $1" "; getline; printf $1 }')" - object_id="$(_cksum "$file")-$(_cksum "$type_and_key")" - set -- "$object_id" - set -- "$@" --file "$file" - set -- "$@" --key "$key" - set -- "$@" --state "$state" - if [ -f "$__object/parameter/option" ]; then - # shellcheck disable=SC2046 - set -- "$@" $(printf -- '--option %s ' $(cat "$__object/parameter/option")) - fi - if [ -f "$__object/parameter/comment" ]; then - set -- "$@" --comment "$(cat "$__object/parameter/comment")" - fi - # Ensure __ssh_authorized_key does not read stdin - __ssh_authorized_key "$@" < /dev/null -done < "$__object/parameter/key" diff --git a/cdist/conf/type/__ssh_authorized_keys/parameter/boolean b/cdist/conf/type/__ssh_authorized_keys/parameter/boolean deleted file mode 100644 index 4bb126fe..00000000 --- a/cdist/conf/type/__ssh_authorized_keys/parameter/boolean +++ /dev/null @@ -1,2 +0,0 @@ -noparent -nofile diff --git a/cdist/conf/type/__ssh_authorized_keys/parameter/default/state b/cdist/conf/type/__ssh_authorized_keys/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__ssh_authorized_keys/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__ssh_authorized_keys/parameter/optional b/cdist/conf/type/__ssh_authorized_keys/parameter/optional deleted file mode 100644 index 21f9bc29..00000000 --- a/cdist/conf/type/__ssh_authorized_keys/parameter/optional +++ /dev/null @@ -1,5 +0,0 @@ -comment -file -option -owner -state diff --git a/cdist/conf/type/__ssh_dot_ssh/explorer/group b/cdist/conf/type/__ssh_dot_ssh/explorer/group deleted file mode 100755 index cdea6fe7..00000000 --- a/cdist/conf/type/__ssh_dot_ssh/explorer/group +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh -# -# 2014 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -gid="$("$__type_explorer/passwd" | cut -d':' -f 4)" -getent group "$gid" || true diff --git a/cdist/conf/type/__ssh_dot_ssh/explorer/passwd b/cdist/conf/type/__ssh_dot_ssh/explorer/passwd deleted file mode 100755 index 3fbad06f..00000000 --- a/cdist/conf/type/__ssh_dot_ssh/explorer/passwd +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -# -# 2012 Steven Armstrong (steven-cdist at armstrong.cc) -# 2014 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -owner="$__object_id" - -getent passwd "$owner" || true diff --git a/cdist/conf/type/__ssh_dot_ssh/man.rst b/cdist/conf/type/__ssh_dot_ssh/man.rst deleted file mode 100644 index 7d35affa..00000000 --- a/cdist/conf/type/__ssh_dot_ssh/man.rst +++ /dev/null @@ -1,49 +0,0 @@ -cdist-type__ssh_dot_ssh(7) -========================== - -NAME ----- -cdist-type__ssh_dot_ssh - Manage .ssh directory - - -DESCRIPTION ------------ -Adds or removes .ssh directory to a user home. - -This type is being used by __ssh_authorized_keys. - - -OPTIONAL PARAMETERS -------------------- -state - if the directory should be 'present' or 'absent', defaults to 'present'. - - -EXAMPLES --------- - -.. code-block:: sh - - # Ensure root has ~/.ssh with the right permissions - __ssh_dot_ssh root - - # Nico does not need ~/.ssh anymore - __ssh_dot_ssh nico --state absent - - -SEE ALSO --------- -:strong:`cdist-type__ssh_authorized_keys`\ (7) - - -AUTHORS -------- -Nico Schottelius - - -COPYING -------- -Copyright \(C) 2014 Nico Schottelius. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__ssh_dot_ssh/manifest b/cdist/conf/type/__ssh_dot_ssh/manifest deleted file mode 100755 index bc3a3952..00000000 --- a/cdist/conf/type/__ssh_dot_ssh/manifest +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/sh -e -# -# 2012-2014 Steven Armstrong (steven-cdist at armstrong.cc) -# 2014 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# Hacked in Kalamata, Greece -# - -owner="$__object_id" -state="$(cat "$__object/parameter/state")" - -group="$(cut -d':' -f 1 "$__object/explorer/group")" -if [ -z "$group" ]; then - echo "Failed to get owners group from explorer." >&2 - exit 1 -fi - -home="$(cut -d':' -f 6 "$__object/explorer/passwd")" -if [ -z "$home" ]; then - echo "Failed to get home directory from explorer." >&2 - exit 1 -fi -ssh_directory="${home}/.ssh" - -# Ensure that the directory in which the authorized_keys shall be exists and -# has the right permissions. -__directory "$ssh_directory" \ - --state "$state" \ - --owner "$owner" --group "$group" --mode 0700 diff --git a/cdist/conf/type/__ssh_dot_ssh/parameter/default/state b/cdist/conf/type/__ssh_dot_ssh/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__ssh_dot_ssh/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__ssh_dot_ssh/parameter/optional b/cdist/conf/type/__ssh_dot_ssh/parameter/optional deleted file mode 100644 index ff72b5c7..00000000 --- a/cdist/conf/type/__ssh_dot_ssh/parameter/optional +++ /dev/null @@ -1 +0,0 @@ -state diff --git a/cdist/conf/type/__staged_file/gencode-local b/cdist/conf/type/__staged_file/gencode-local deleted file mode 100755 index ba9e8798..00000000 --- a/cdist/conf/type/__staged_file/gencode-local +++ /dev/null @@ -1,104 +0,0 @@ -#!/bin/sh -e -# -# 2015 Steven Armstrong (steven-cdist at armstrong.cc) -# 2015 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -#set -x - -destination="$__object_id" -source="$(cat "$__object/parameter/source")" -stage_dir="$(cat "$__object/parameter/stage-dir")" -state="$(cat "$__object/parameter/state")" -fetch_command="$(cat "$__object/parameter/fetch-command")" -stage_file="${stage_dir}/${destination}" -stage_file_dir="${stage_file%/*}" -source_file_name="${source##*/}" - -if [ "$state" = "absent" ]; then - # nothing to do - exit 0 -fi - -#printf 'set -x\n' - -if [ ! -d "$stage_dir" ]; then - printf 'mkdir -p "%s"\n' "$stage_dir" - printf 'chmod 700 "%s"\n' "$stage_dir" -fi - -if [ ! -d "$stage_file_dir" ]; then - printf 'mkdir -p "%s"\n' "$stage_file_dir" -fi - - -get_file() { - if [ -f "$__object/parameter/prepare-command" ]; then - fetch_and_prepare_file - else - fetch_file - fi -} - -fetch_file() { - # shellcheck disable=SC2059 - printf "$fetch_command" "$source" - printf ' > "%s"\n' "$stage_file" -} - -fetch_and_prepare_file() { - # shellcheck disable=SC2016 - printf 'tmpdir="$(mktemp -d -p "/tmp" "%s")"\n' "${__type##*/}.XXXXXXXXXX" - # shellcheck disable=SC2016 - printf 'cd "$tmpdir"\n' - # shellcheck disable=SC2059 - printf "$fetch_command > \"%s\"\\n" "$source" "$source_file_name" - prepare_command="$(cat "$__object/parameter/prepare-command")" - # shellcheck disable=SC2059 - printf "$prepare_command > \"%s\"\\n" "$source_file_name" "$stage_file" - printf 'cd - >/dev/null\n' - # shellcheck disable=SC2016 - printf 'rm -rf "$tmpdir"\n' -} - -cat << DONE -verify_cksum() { - cksum_is="\$(cksum "$stage_file" | cut -d' ' -f1,2)" - cksum_should="$(cut -d' ' -f1,2 "$__object/parameter/cksum")" - if [ "\$cksum_is" = "\$cksum_should" ]; then - return 0 - else - return 1 - fi -} -DONE - -if [ ! -f "$stage_file" ]; then - get_file -else - printf 'verify_cksum || {\n' - get_file - printf '}\n' -fi - -cat << DONE -verify_cksum || { - echo "Failed to verify checksum for $__object_name" >&2 - exit 1 -} -DONE diff --git a/cdist/conf/type/__staged_file/man.rst b/cdist/conf/type/__staged_file/man.rst deleted file mode 100644 index 9a6ba732..00000000 --- a/cdist/conf/type/__staged_file/man.rst +++ /dev/null @@ -1,115 +0,0 @@ -cdist-type__staged_file(7) -========================== - -NAME ----- -cdist-type__staged_file - Manage staged files - - -DESCRIPTION ------------ -Manages a staged file that is downloaded on the server (the machine running -cdist) and then deployed to the target host using the __file type. - - -REQUIRED PARAMETERS -------------------- -source - the URL from which to retrieve the source file. - e.g. - - * https://dl.bintray.com/mitchellh/consul/0.4.1_linux_amd64.zip - * file:///path/to/local/file - -cksum - the output of running the command: `cksum $source-file` - e.g.:: - - $ echo foobar > /tmp/foobar - $ cksum /tmp/foobar - 857691210 7 /tmp/foobar - - If either checksum or file size has changed the file will be - (re)fetched from the --source. The file name can be omitted and is - ignored if given. - - -OPTIONAL PARAMETERS -------------------- -fetch-command - the command used to fetch the staged file using printf formatting. - Where a single %s will be replaced with the value of the given --source - parameter. The --fetch-command is expected to output the fetched file to - stdout. - Defaults to 'curl -s -L "%s"'. - -group - see cdist-type__file - -owner - see cdist-type__file - -mode - see cdist-type__file - -prepare-command - the optional command used to prepare or preprocess the staged file for later - use by the file type. - If given, it must be a string in printf formatting where a single %s will - be replaced with the last segment (filename) of the value of the given - --source parameter. - It is executed in the same directory into which the fetched file has been - saved. The --prepare-command is expected to output the final file to stdout. - - So for example given a --source of https://example.com/my-zip.zip, and a - --prepare-command of 'unzip -p "%s"', the code `unzip -p "my-zip.zip"` will - be executed in the folder containing the downloaded file my-zip.zip. - A more complex example might be --prepare-command 'tar -xz "%s"; cat path/from/archive' -stage-dir - the directory in which to store downloaded and prepared files. - Defaults to '/var/tmp/cdist/__staged_file' - -state - see cdist-type__file - - -EXAMPLES --------- - -.. code-block:: sh - - __staged_file /usr/local/bin/consul \ - --source file:///path/to/local/copy/consul \ - --cksum '428915666 15738724' \ - --state present \ - --group root \ - --owner root \ - --mode 755 - - __staged_file /usr/local/bin/consul \ - --source https://dl.bintray.com/mitchellh/consul/0.4.1_linux_amd64.zip \ - --cksum '428915666 15738724' \ - --fetch-command 'curl -s -L "%s"' \ - --prepare-command 'unzip -p "%s"' \ - --state present \ - --group root \ - --owner root \ - --mode 755 - - -SEE ALSO --------- -:strong:`cdist-type__file`\ (7) - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2015 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__staged_file/manifest b/cdist/conf/type/__staged_file/manifest deleted file mode 100755 index c8e1fbbb..00000000 --- a/cdist/conf/type/__staged_file/manifest +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh -e -# -# 2015 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -destination="$__object_id" -stage_dir="$(cat "$__object/parameter/stage-dir")" -stage_file="${stage_dir}/${destination}" - -set -- "/${destination}" -for param in owner group mode state; do - if [ -f "$__object/parameter/$param" ]; then - set -- "$@" "--${param}" "$(cat "$__object/parameter/$param")" - fi -done -set -- "$@" --source "$stage_file" - -require="$__object_name" \ - __file "$@" diff --git a/cdist/conf/type/__staged_file/parameter/default/fetch-command b/cdist/conf/type/__staged_file/parameter/default/fetch-command deleted file mode 100644 index b4dc1211..00000000 --- a/cdist/conf/type/__staged_file/parameter/default/fetch-command +++ /dev/null @@ -1 +0,0 @@ -curl -s -L "%s" diff --git a/cdist/conf/type/__staged_file/parameter/default/stage-dir b/cdist/conf/type/__staged_file/parameter/default/stage-dir deleted file mode 100644 index 9420b510..00000000 --- a/cdist/conf/type/__staged_file/parameter/default/stage-dir +++ /dev/null @@ -1 +0,0 @@ -/var/tmp/cdist/__staged_file diff --git a/cdist/conf/type/__staged_file/parameter/default/state b/cdist/conf/type/__staged_file/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__staged_file/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__staged_file/parameter/optional b/cdist/conf/type/__staged_file/parameter/optional deleted file mode 100644 index 18f4e87a..00000000 --- a/cdist/conf/type/__staged_file/parameter/optional +++ /dev/null @@ -1,7 +0,0 @@ -fetch-command -group -owner -mode -prepare-command -stage-dir -state diff --git a/cdist/conf/type/__staged_file/parameter/required b/cdist/conf/type/__staged_file/parameter/required deleted file mode 100644 index bfb1d5bf..00000000 --- a/cdist/conf/type/__staged_file/parameter/required +++ /dev/null @@ -1,2 +0,0 @@ -cksum -source diff --git a/cdist/conf/type/__start_on_boot/explorer/state b/cdist/conf/type/__start_on_boot/explorer/state deleted file mode 100644 index b7a6cf0f..00000000 --- a/cdist/conf/type/__start_on_boot/explorer/state +++ /dev/null @@ -1,104 +0,0 @@ -#!/bin/sh -# -# 2012-2019 Nico Schottelius (nico-cdist at schottelius.org) -# 2013 Daniel Heule (hda at sfs.biz) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Check whether the given name will be started on boot or not -# - -os=$("$__explorer/os") -runlevel=$("$__explorer/runlevel") -init=$("$__explorer/init") -target_runlevel="$(cat "$__object/parameter/target_runlevel")" -name="$__object_id" - -if [ "$init" = 'systemd' ]; then - # this handles ALL linux distros with systemd - # e.g. archlinux, gentoo, new RHEL and SLES versions - state=$(systemctl is-enabled "$name" >/dev/null 2>&1 \ - && echo present \ - || echo absent) - -else - case "$os" in - debian|openwrt|devuan) - state="absent" - for file in "/etc/rc$runlevel.d/S"??"$name" - do - if [ -f "$file" ] - then - state="present" - break - fi - done - ;; - ubuntu) - state="absent" - for file in "/etc/rc$runlevel.d/S"??"$name" - do - if [ -f "$file" ] - then - state="present" - break - fi - done - - [ -f "/etc/init/${name}.conf" ] && state="present" - ;; - - amazon|scientific|centos|fedora|owl|redhat) - state=$(chkconfig --level "$runlevel" "$name" || echo absent) - [ "$state" ] || state="present" - ;; - suse) - # check for target if set, usable for boot. services in runlevel B - if [ "$target_runlevel" != 'default' ]; then - runlevel="$target_runlevel" - fi - # suses chkconfig has the same name, but works different ... - state=$(chkconfig --check "$name" "$runlevel" || echo absent) - [ "$state" ] || state="present" - ;; - gentoo|alpine) - state="absent" - for d in /etc/runlevels/*; do - if [ -f "/etc/runlevels/${d}/${name}" ];then - state="present" - break - fi - done - ;; - freebsd) - state="absent" - service -e | grep "/$name$" && state="present" - ;; - openbsd) - state='absent' - # OpenBSD 5.7 and higher - rcctl ls on | grep "^${name}$" && state='present' - ;; - - *) - echo "Unsupported os: $os" >&2 - exit 1 - ;; - esac -fi - -echo $state diff --git a/cdist/conf/type/__start_on_boot/gencode-remote b/cdist/conf/type/__start_on_boot/gencode-remote deleted file mode 100755 index c900933f..00000000 --- a/cdist/conf/type/__start_on_boot/gencode-remote +++ /dev/null @@ -1,138 +0,0 @@ -#!/bin/sh -e -# -# 2012-2013 Nico Schottelius (nico-cdist at schottelius.org) -# 2016 Daniel Heule (hda at sfs.biz) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -state_should="$(cat "$__object/parameter/state")" -state_is=$(cat "$__object/explorer/state") -init=$(cat "$__global/explorer/init") -target_runlevel="$(cat "$__object/parameter/target_runlevel")" - -# Short circuit if nothing is to be done -[ "$state_should" = "$state_is" ] && exit 0 - -os=$(cat "$__global/explorer/os") -os_version=$(cat "$__global/explorer/os_version") -name="$__object_id" - -case "$state_should" in - present) - if [ "$init" = 'systemd' ]; then - # this handles ALL linux distros with systemd - # e.g. archlinux, gentoo in some cases, new RHEL and SLES versions - echo "systemctl -q enable '$name'" - else - case "$os" in - debian) - case "$os_version" in - [1-7]*) - echo "update-rc.d '$name' defaults >/dev/null" - ;; - 8*) - echo "systemctl enable '$name'" - ;; - *) - echo "Unsupported version $os_version of $os" >&2 - exit 1 - ;; - esac - ;; - devuan) - echo "update-rc.d '$name' defaults >/dev/null" - ;; - - alpine|gentoo) - echo "rc-update add '$name' '$target_runlevel'" - ;; - - amazon|scientific|centos|fedora|owl|redhat|suse) - echo "chkconfig '$name' on" - ;; - - openwrt) - # 'enable' can be successful and still return a non-zero exit - # code, deal with it by checking for success ourselves in that - # case (the || ... part). - echo "'/etc/init.d/$name' enable || [ -f /etc/rc.d/S??'$name' ]" - ;; - - ubuntu) - echo "update-rc.d '$name' defaults >/dev/null" - ;; - - freebsd) - : # handled in manifest - ;; - - openbsd) - # OpenBSD 5.7 and higher - echo "rcctl enable '$name'" - ;; - - *) - echo "Unsupported os: $os" >&2 - exit 1 - ;; - esac - fi - ;; - - absent) - if [ "$init" = 'systemd' ]; then - # this handles ALL linux distros with systemd - # e.g. archlinux, gentoo in some cases, new RHEL and SLES versions - echo "systemctl -q disable '$name'" - - else - case "$os" in - debian|ubuntu|devuan) - echo "update-rc.d -f '$name' remove" - ;; - - alpine|gentoo) - echo "rc-update del '$name' '$target_runlevel'" - ;; - - centos|fedora|owl|redhat|suse) - echo "chkconfig '$name' off" - ;; - - openwrt) - echo "'/etc/init.d/$name' disable" - ;; - - openbsd) - # OpenBSD 5.7 and higher - echo "rcctl disable '$name'" - ;; - - *) - echo "Unsupported os: $os" >&2 - exit 1 - ;; - esac - fi - ;; - - *) - echo "Unknown state: $state_should" >&2 - exit 1 - ;; -esac diff --git a/cdist/conf/type/__start_on_boot/man.rst b/cdist/conf/type/__start_on_boot/man.rst deleted file mode 100644 index b7c73ab1..00000000 --- a/cdist/conf/type/__start_on_boot/man.rst +++ /dev/null @@ -1,61 +0,0 @@ -cdist-type__start_on_boot(7) -============================ - -NAME ----- -cdist-type__start_on_boot - Manage stuff to be started at boot - - -DESCRIPTION ------------ -This cdist type allows you to enable or disable stuff to be started -at boot of your operating system. - -Warning: This type has not been tested intensively and is not fully -supported (i.e. \*BSD are not implemented). - - -REQUIRED PARAMETERS -------------------- -None. - - -OPTIONAL PARAMETERS -------------------- -state - Either "present" or "absent", defaults to "present" -target_runlevel - Runlevel which should be modified, defaults to "default" (only used on gentoo systems). - - -EXAMPLES --------- - -.. code-block:: sh - - # Ensure snmpd is started at boot - __start_on_boot snmpd - - # Same, but more explicit - __start_on_boot snmpd --state present - - # Ensure legacy configuration management will not be started - __start_on_boot puppet --state absent - - -SEE ALSO --------- -:strong:`cdist-type__process`\ (7) - - -AUTHORS -------- -Nico Schottelius - - -COPYING -------- -Copyright \(C) 2012-2019 Nico Schottelius. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__start_on_boot/manifest b/cdist/conf/type/__start_on_boot/manifest deleted file mode 100644 index c1c983ec..00000000 --- a/cdist/conf/type/__start_on_boot/manifest +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh -e - -state_should="$(cat "$__object/parameter/state")" -state_is=$(cat "$__object/explorer/state") -name="$__object_id" - -# Short circuit if nothing is to be done -[ "$state_should" = "$state_is" ] && exit 0 - -os=$(cat "$__global/explorer/os") - -case "$os" in - freebsd) - if [ "$state_should" = 'present' ]; then - value='YES' - else - value='NO' - fi - __key_value "rcconf-$name-enable" \ - --file /etc/rc.conf \ - --key "${name}_enable" \ - --value "\"$value\"" \ - --delimiter '=' - ;; - *) - : # handled in gencode-remote - ;; -esac diff --git a/cdist/conf/type/__start_on_boot/parameter/default/state b/cdist/conf/type/__start_on_boot/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__start_on_boot/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__start_on_boot/parameter/default/target_runlevel b/cdist/conf/type/__start_on_boot/parameter/default/target_runlevel deleted file mode 100644 index 4ad96d51..00000000 --- a/cdist/conf/type/__start_on_boot/parameter/default/target_runlevel +++ /dev/null @@ -1 +0,0 @@ -default diff --git a/cdist/conf/type/__start_on_boot/parameter/optional b/cdist/conf/type/__start_on_boot/parameter/optional deleted file mode 100644 index 91685caf..00000000 --- a/cdist/conf/type/__start_on_boot/parameter/optional +++ /dev/null @@ -1,2 +0,0 @@ -state -target_runlevel diff --git a/cdist/conf/type/__sysctl/explorer/conf-path b/cdist/conf/type/__sysctl/explorer/conf-path deleted file mode 100755 index ba35c4c6..00000000 --- a/cdist/conf/type/__sysctl/explorer/conf-path +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -# -# 2018 Darko Poljak (darko.poljak at gmail.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -if [ -d "/etc/sysctl.d" ]; then - echo "/etc/sysctl.d/99-Z-sysctl-cdist.conf"; -else - echo "/etc/sysctl.conf"; -fi diff --git a/cdist/conf/type/__sysctl/explorer/value b/cdist/conf/type/__sysctl/explorer/value deleted file mode 100755 index fc85b3d8..00000000 --- a/cdist/conf/type/__sysctl/explorer/value +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh -# -# 2014 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -# get the current runtime value -sysctl -n "$__object_id" || true diff --git a/cdist/conf/type/__sysctl/man.rst b/cdist/conf/type/__sysctl/man.rst deleted file mode 100644 index 6873003e..00000000 --- a/cdist/conf/type/__sysctl/man.rst +++ /dev/null @@ -1,39 +0,0 @@ -cdist-type__sysctl(7) -===================== - -NAME ----- -cdist-type__sysctl - manage sysctl settings - - -DESCRIPTION ------------ -Manages permanent as well as runtime sysctl settings. -Permament settings are set by managing entries in /etc/sysctl.conf. -Runtime settings are set by directly calling the sysctl executable. - - -REQUIRED PARAMETERS -------------------- -value - The value to set for the given key (object_id) - - -EXAMPLES --------- - -.. code-block:: sh - - __sysctl net.ipv4.ip_forward --value 1 - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2014 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 or -later (GPLv3+). diff --git a/cdist/conf/type/__sysctl/manifest b/cdist/conf/type/__sysctl/manifest deleted file mode 100755 index b4e2e902..00000000 --- a/cdist/conf/type/__sysctl/manifest +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh -e -# -# 2014 Steven Armstrong (steven-cdist at armstrong.cc) -# 2018 Takashi Yoshi (takashi at yoshi.email) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - - -os=$(cat "$__global/explorer/os") - -case "$os" in - # Linux - redhat|centos|ubuntu|debian|devuan|archlinux|coreos) - : - ;; - # BSD - freebsd|macosx|netbsd|openbsd) - : - ;; - *) - echo "Your operating system ($os) is currently not supported by this type (${__type##*/})." >&2 - echo "Please contribute an implementation for it if you can." >&2 - exit 1 - ;; -esac - -conf_path=$(cat "$__object/explorer/conf-path") - -__key_value "$__object_name" \ - --key "$__object_id" \ - --file "${conf_path}" \ - --value "$(cat "$__object/parameter/value")" \ - --delimiter '=' diff --git a/cdist/conf/type/__sysctl/parameter/required b/cdist/conf/type/__sysctl/parameter/required deleted file mode 100644 index 6d4e1507..00000000 --- a/cdist/conf/type/__sysctl/parameter/required +++ /dev/null @@ -1 +0,0 @@ -value diff --git a/cdist/conf/type/__systemd_unit/explorer/enablement-state b/cdist/conf/type/__systemd_unit/explorer/enablement-state deleted file mode 100644 index 5a5a4462..00000000 --- a/cdist/conf/type/__systemd_unit/explorer/enablement-state +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -# -# 2017 Ľubomír Kučera -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -systemctl is-enabled "${__object_id}" 2>/dev/null || true diff --git a/cdist/conf/type/__systemd_unit/explorer/systemctl-present b/cdist/conf/type/__systemd_unit/explorer/systemctl-present deleted file mode 100644 index 7218affc..00000000 --- a/cdist/conf/type/__systemd_unit/explorer/systemctl-present +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -# -# 2017 Ľubomír Kučera -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -command -v systemctl > /dev/null 2>&1 && echo 0 || echo 1 diff --git a/cdist/conf/type/__systemd_unit/explorer/unit-status b/cdist/conf/type/__systemd_unit/explorer/unit-status deleted file mode 100644 index b68e5169..00000000 --- a/cdist/conf/type/__systemd_unit/explorer/unit-status +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -# -# 2017 Ľubomír Kučera -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -systemctl is-active "${__object_id}" || true diff --git a/cdist/conf/type/__systemd_unit/gencode-remote b/cdist/conf/type/__systemd_unit/gencode-remote deleted file mode 100644 index 967a6c87..00000000 --- a/cdist/conf/type/__systemd_unit/gencode-remote +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/sh -e -# -# 2017 Ľubomír Kučera -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -name="${__object_id}" -state=$(cat "${__object}/parameter/state") -current_enablement_state=$(cat "${__object}/explorer/enablement-state") - -if [ "${state}" = "absent" ]; then - if [ -n "${current_enablement_state}" ]; then - echo "systemctl --now disable ${name}" - echo "rm -f /etc/systemd/system/${name}" - echo "systemctl daemon-reload" - fi - - exit 0 -fi - -unit_status=$(cat "${__object}/explorer/unit-status") -desired_enablement_state=$(cat "${__object}/parameter/enablement-state") - -if [ "${current_enablement_state}" = "masked" ] && \ - [ "${desired_enablement_state}" != "masked" ]; then - echo "systemctl unmask ${name}" -fi - -if [ -f "${__object}/parameter/restart" ]; then - if [ "${desired_enablement_state}" = "masked" ]; then - if [ "${unit_status}" = "active" ]; then - echo "systemctl stop ${name}" - fi - elif grep -q "^__file/etc/systemd/system/${name}" "${__messages_in}" || \ - [ "${unit_status}" != "active" ]; then - echo "systemctl restart ${name} || true" - fi -fi - -if [ "${current_enablement_state}" = "${desired_enablement_state}" ]; then - exit 0 -fi - -case "${desired_enablement_state}" in - "") - # Do nothing - : - ;; - enabled) - echo "systemctl enable ${name}" - ;; - disabled) - echo "systemctl disable ${name}" - ;; - masked) - echo "systemctl mask ${name}" - ;; - *) - echo "Unsupported unit status: ${desired_enablement_state}" >&2 - exit 1 - ;; -esac diff --git a/cdist/conf/type/__systemd_unit/man.rst b/cdist/conf/type/__systemd_unit/man.rst deleted file mode 100644 index 25a4e501..00000000 --- a/cdist/conf/type/__systemd_unit/man.rst +++ /dev/null @@ -1,89 +0,0 @@ -cdist-type__systemd_unit(7) -=========================== - -NAME ----- - -cdist-type__systemd_unit - Install a systemd unit - -DESCRIPTION ------------ - -This type manages systemd units in ``/etc/systemd/system/``. It can install, -enable and start a systemd unit. This is particularly useful on systems which -take advantage of systemd heavily (e.g., CoreOS). For more information about -systemd units, see SYSTEMD.UNIT(5). - -REQUIRED PARAMETERS -------------------- - -None. - -OPTIONAL PARAMETERS -------------------- - -enablement-state - 'enabled', 'disabled' or 'masked', where: - - enabled - enables the unit - disabled - disables the unit - masked - masks the unit - -source - Path to the config file. If source is '-' (dash), take what was written to - stdin as the config file content. - -state - 'present' or 'absent', defaults to 'present' where: - - present - the unit (or its mask) is installed - absent - The unit is stopped, disabled and uninstalled. If the unit was masked, - the mask is removed. - -BOOLEAN PARAMETERS ------------------- - -restart - Start the unit if it was inactive. Restart the unit if the unit file - changed. Stop the unit if new ``enablement-state`` is ``masked``. - -MESSAGES --------- - -None. - -EXAMPLES --------- - -.. code-block:: sh - - # Installs, enables and starts foobar.service - __systemd_unit foobar.service \ - --source "${__manifest}/files/foobar.service" \ - --enablement-state enabled \ - --restart - - # Disables the unit - __systemd_unit foobar.service --enablement-state disabled - - # Stops, disables and uninstalls foobar.service - __systemd_unit foobar.service --state absent - - -AUTHORS -------- - -Ľubomír Kučera - -COPYING -------- - -Copyright \(C) 2017 Ľubomír Kučera. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__systemd_unit/manifest b/cdist/conf/type/__systemd_unit/manifest deleted file mode 100644 index 688a00b1..00000000 --- a/cdist/conf/type/__systemd_unit/manifest +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/sh -e -# -# 2017 Ľubomír Kučera -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -systemctl_present=$(cat "${__object}/explorer/systemctl-present") - -if [ "${systemctl_present}" -ne 0 ]; then - echo "systemctl does not seem to be present on this system" >&2 - - exit 1 -fi - -name="${__object_id}" -source=$(cat "${__object}/parameter/source") -state=$(cat "${__object}/parameter/state") -enablement_state=$(cat "${__object}/parameter/enablement-state") - -# The unit must be disabled before removing its unit file. The unit file is -# therefore removed by gencode-remote of this type, not here. -if [ -z "${source}" ] || [ "${state}" = "absent" ]; then - exit 0 -fi - -# stdin is not propagated automatically to sub-objects -if [ "${source}" = "-" ]; then - source="${__object}/stdin" -fi - -unitfile_state="${state}" -if [ "${enablement_state}" = "masked" ]; then - # Masking creates a symlink from /etc/systemd/system/ to /dev/null. - # This process fails with "Failed to execute operation: Invalid argument" - # if file /etc/systemd/system/ already exists. We must therefore - # remove it. - unitfile_state="absent" -fi - -__config_file "/etc/systemd/system/${name}" \ - --mode 644 \ - --onchange "systemctl daemon-reload" \ - --source "${source}" \ - --state "${unitfile_state}" diff --git a/cdist/conf/type/__systemd_unit/parameter/boolean b/cdist/conf/type/__systemd_unit/parameter/boolean deleted file mode 100644 index eea5a271..00000000 --- a/cdist/conf/type/__systemd_unit/parameter/boolean +++ /dev/null @@ -1 +0,0 @@ -restart diff --git a/cdist/conf/type/__systemd_unit/parameter/default/enablement-state b/cdist/conf/type/__systemd_unit/parameter/default/enablement-state deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__systemd_unit/parameter/default/source b/cdist/conf/type/__systemd_unit/parameter/default/source deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__systemd_unit/parameter/default/state b/cdist/conf/type/__systemd_unit/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__systemd_unit/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__systemd_unit/parameter/optional b/cdist/conf/type/__systemd_unit/parameter/optional deleted file mode 100644 index e7cc7acf..00000000 --- a/cdist/conf/type/__systemd_unit/parameter/optional +++ /dev/null @@ -1,3 +0,0 @@ -enablement-state -source -state diff --git a/cdist/conf/type/__timezone/explorer/timezone_is b/cdist/conf/type/__timezone/explorer/timezone_is deleted file mode 100755 index a1aa813f..00000000 --- a/cdist/conf/type/__timezone/explorer/timezone_is +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -e -# -# 2017 Ander Punnar (cdist at kvlt.ee) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -[ -f /etc/timezone ] && cat /etc/timezone - -exit 0 diff --git a/cdist/conf/type/__timezone/gencode-remote b/cdist/conf/type/__timezone/gencode-remote deleted file mode 100755 index 5299f548..00000000 --- a/cdist/conf/type/__timezone/gencode-remote +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -e -# -# 2012 Steven Armstrong (steven-cdist at armstrong.cc) -# 2019 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# This type allows to configure the desired localtime timezone. - -timezone_is=$(cat "$__object/explorer/timezone_is") -timezone_should="$__object_id" -os=$(cat "$__global/explorer/os") - -if [ "$timezone_is" = "$timezone_should" ]; then - exit 0 -fi - -case "$os" in - ubuntu|debian|devuan|coreos|alpine) - echo "echo \"$timezone_should\" > /etc/timezone" - ;; -esac diff --git a/cdist/conf/type/__timezone/manifest b/cdist/conf/type/__timezone/manifest deleted file mode 100755 index 3d28ccba..00000000 --- a/cdist/conf/type/__timezone/manifest +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/sh -e -# -# 2011 Ramon Salvadó (rsalvado at gnuine dot com) -# 2012-2015 Steven Armstrong (steven-cdist at armstrong.cc) -# 2012-2019 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# This type allows to configure the desired localtime timezone. - -timezone="$__object_id" -os=$(cat "$__global/explorer/os") - -case "$os" in - archlinux|debian|ubuntu|devuan|alpine) - __package tzdata - export require="__package/tzdata" - ;; - suse) - __package timezone - export require="__package/timezone" - ;; - freebsd|netbsd|openbsd) - # whitelist - : - ;; - coreos) - # whitelist - : - ;; - scientific|centos) - __package tzdata --state present - export require="__package/tzdata" - __file /etc/sysconfig/clock \ - --owner root --group root --mode 644 \ - --state exists - require="__file/etc/sysconfig/clock" \ - __key_value ZONE \ - --file /etc/sysconfig/clock \ - --delimiter '=' \ - --value "\"$timezone\"" - ;; - *) - echo "Your operating system ($os) is currently not supported by this type (${__type##*/})." >&2 - echo "Please contribute an implementation for it if you can." >&2 - exit 1 - ;; -esac - -__link /etc/localtime \ - --source "/usr/share/zoneinfo/${timezone}" \ - --type symbolic diff --git a/cdist/conf/type/__ufw/gencode-remote b/cdist/conf/type/__ufw/gencode-remote deleted file mode 100644 index fc62b591..00000000 --- a/cdist/conf/type/__ufw/gencode-remote +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/sh -e -# -# 2019 Mark Polyakov (mark--@--markasoftware.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -state="$(cat "$__object/parameter/state")" - -case "$state" in - enabled) - echo 'ufw --force enable' - ;; - - present) - echo 'ufw --force disable' - ;; - # absent will be uninstalled in manifest -esac - -if [ "$state" != absent ]; then - if [ -f "$__object/parameter/logging" ]; then - logging="$(cat "$__object/parameter/logging")" - case "$logging" in - off|low|medium|high|full) - echo "ufw --force logging $logging" - ;; - *) - echo 'Logging parameter must be off, low, medium, high, or full!' >&2 - exit 1 - ;; - esac - fi - - for direction in incoming outgoing routed; do - if [ -f "$__object/parameter/default_$direction" ]; then - treatment="$(cat "$__object/parameter/default_$direction")" - case "$treatment" in - allow|deny|reject) - echo "ufw --force default $treatment $direction" - ;; - *) - echo 'UFW default policies must be either "allow", "deny", or "reject".' >&2 - exit 1 - ;; - esac - fi - done -fi diff --git a/cdist/conf/type/__ufw/man.rst b/cdist/conf/type/__ufw/man.rst deleted file mode 100644 index cc64fbb5..00000000 --- a/cdist/conf/type/__ufw/man.rst +++ /dev/null @@ -1,59 +0,0 @@ -cdist-type__ufw(7) -================== - -NAME ----- -cdist-type__ufw - Install the Uncomplicated FireWall - - -DESCRIPTION ------------ -Installs the Uncomplicated FireWall. Most modern distributions carry UFW in their main repositories, but on CentOS this type will automatically enable the EPEL repository. - -Some global configuration can also be set with this type. - -OPTIONAL PARAMETERS -------------------- -state - Either "enabled", "running", "present", or "absent". Defaults to "enabled", which registers UFW to start on boot. - -logging - Either "off", "low", "medium", "high", or "full". Will be passed to `ufw logging`. If not specified, logging level is not modified. - -default_incoming - Either "allow", "deny", or "reject". The default policy for dealing with ingress packets. - -default_outgoing - Either "allow", "deny", or "reject". The default policy for dealing with egress packets. - -default_routed - Either "allow", "deny", or "reject". The default policy for dealing with routed packets (passing through this machine). - - -EXAMPLES --------- - -.. code-block:: sh - - # Install UFW - __ufw - # Setup UFW with maximum logging and no restrictions on routed packets. - __ufw --logging full --default_routed allow - - -SEE ALSO --------- -:strong:`ufw`\ (8) - - -AUTHORS -------- -Mark Polyakov - - -COPYING -------- -Copyright \(C) 2019 Mark Polyakov. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__ufw/manifest b/cdist/conf/type/__ufw/manifest deleted file mode 100755 index 54309ff5..00000000 --- a/cdist/conf/type/__ufw/manifest +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/sh -e -# -# 2019 Mark Polyakov (mark--@--markasoftware.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -state="$(cat "$__object/parameter/state")" - -case "$state" in - present|enabled) - os="$(cat "$__global/explorer/os")" - - case "$os" in - centos) - # shellcheck source=/dev/null - if (. "$__global/explorer/os_release" && [ "${VERSION_ID}" = "7" ]); then - __package epel-release - require='__package/epel-release' __package ufw - else - echo 'CentOS version 7 is required!' - exit 1 - fi - ;; - *) - __package ufw - ;; - esac - - # ufw expects to always be enabled, then uses a switch in /etc to - # determine whether to "actually start" after the init system calls it. - # So, we have to both enable on bootup through init and run `ufw enable` - - # operators ae left-associative, so if !enabled it will never run - if [ "$(cat "$__global/explorer/os")" != ubuntu ] || \ - [ "$(cat "$__global/explorer/init")" != init ] && \ - [ "$state" = enabled ]; then - # Why don't we disable start_on_boot when state=present|absent? - # Because UFW should always be enabled at boot -- /etc/ufw/ufw.conf - # will stop it from "really" starting - require='__package/ufw' __start_on_boot ufw - fi - ;; - - absent) - __package ufw --state absent - ;; - - *) - echo 'State must be "enabled", "present", or "absent".' - exit 1 - ;; -esac - diff --git a/cdist/conf/type/__ufw/parameter/default/state b/cdist/conf/type/__ufw/parameter/default/state deleted file mode 100644 index 26ed6c9b..00000000 --- a/cdist/conf/type/__ufw/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -enabled \ No newline at end of file diff --git a/cdist/conf/type/__ufw/parameter/optional b/cdist/conf/type/__ufw/parameter/optional deleted file mode 100644 index 0a4dec97..00000000 --- a/cdist/conf/type/__ufw/parameter/optional +++ /dev/null @@ -1,5 +0,0 @@ -state -logging -default_incoming -default_outgoing -default_routed \ No newline at end of file diff --git a/cdist/conf/type/__ufw/singleton b/cdist/conf/type/__ufw/singleton deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/conf/type/__ufw_rule/gencode-remote b/cdist/conf/type/__ufw_rule/gencode-remote deleted file mode 100755 index 4f1bf2c9..00000000 --- a/cdist/conf/type/__ufw_rule/gencode-remote +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh -e -# -# 2019 Mark Polyakov (mark@markasoftware.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -# This type does not bother with checking the current state of the rules. -# While it is possible to retrieve the list of rules in a consistent format from -# `ufw status`, it is a completely different format than the one used on the -# command line. I also do not suspect it is any faster. - -ufw='ufw --force rule' - -case "$(cat "$__object/parameter/state")" in - present) ;; - absent) - ufw="$ufw delete" - ;; - *) - echo 'State must be "present" or "absent".' >&2 - exit 1 - ;; -esac - -if [ -f "$__object/parameter/rule" ]; then - ufw="$ufw $(cat "$__object/parameter/rule")" -else - ufw="$ufw allow $__object_id" -fi - -echo "$ufw" diff --git a/cdist/conf/type/__ufw_rule/man.rst b/cdist/conf/type/__ufw_rule/man.rst deleted file mode 100644 index 996557f8..00000000 --- a/cdist/conf/type/__ufw_rule/man.rst +++ /dev/null @@ -1,53 +0,0 @@ -cdist-type__ufw_rule(7) -======================= - -NAME ----- -cdist-type__ufw_rule - A single UFW rule - - -DESCRIPTION ------------ -Adds or removes a single UFW rule. This type supports adding and deleting rules for port ranges or applications. - -Understanding what is "to" and what is "from" can be confusing. If the rule is ingress (default), then "from" is the remote machine and "to" is the local one. The opposite is true for egress traffic (--out). - -OPTIONAL PARAMETERS -------------------- -state - Either "present" or "absent". Defaults to "present". If "absent", only removes rules that exactly match the rule expected. - -rule - A firewall rule in UFW syntax. This is what you would usually write after `ufw` on the command line. Defaults to "allow" followed by the object ID. You can use either the short syntax (just allow|deny|reject|limit followed by a port or application name) or the full syntax. Do not include `delete` in your command. Set `--state absent` instead. - -EXAMPLES --------- - -.. code-block:: sh - - # open port 80 (ufw allow 80) - __ufw_rule 80 - # Allow mosh application (if installed) - __ufw_rule mosh - # Allow all traffic from local network (ufw allow from 10.0.0.0/24) - __ufw_rule local --rule 'allow from 10.0.0.0/24' - # Block egress traffic from port 25 to 111.55.55.55 on interface eth0 - __ufw_rule block_smtp --rule 'deny out on eth0 from any port 25 to 111.55.55.55' - - -SEE ALSO --------- -:strong:`ufw`\ (8) - - -AUTHORS -------- -Mark Polyakov - - -COPYING -------- -Copyright \(C) 2019 Mark Polyakov. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__ufw_rule/parameter/default/state b/cdist/conf/type/__ufw_rule/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__ufw_rule/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__ufw_rule/parameter/optional b/cdist/conf/type/__ufw_rule/parameter/optional deleted file mode 100644 index 0732d53d..00000000 --- a/cdist/conf/type/__ufw_rule/parameter/optional +++ /dev/null @@ -1,2 +0,0 @@ -state -rule diff --git a/cdist/conf/type/__update_alternatives/gencode-remote b/cdist/conf/type/__update_alternatives/gencode-remote deleted file mode 100755 index 0e7b0d89..00000000 --- a/cdist/conf/type/__update_alternatives/gencode-remote +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh -e -# -# 2013 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Setup alternative - no standard way to create, always set -# - -path="$(cat "$__object/parameter/path")" -name="$__object_id" -echo "update-alternatives --quiet --set '$name' '$path'" diff --git a/cdist/conf/type/__update_alternatives/man.rst b/cdist/conf/type/__update_alternatives/man.rst deleted file mode 100644 index 73d82d11..00000000 --- a/cdist/conf/type/__update_alternatives/man.rst +++ /dev/null @@ -1,46 +0,0 @@ -cdist-type__update_alternatives(7) -================================== - -NAME ----- -cdist-type__update_alternatives - Configure alternatives - - -DESCRIPTION ------------ -On Debian and alike systems update-alternatives(1) can be used -to setup alternatives for various programs. -One of the most common used targets is the "editor". - - -REQUIRED PARAMETERS -------------------- -path - Use this path for the given alternative - - -EXAMPLES --------- - -.. code-block:: sh - - # Setup vim as the default editor - __update_alternatives editor --path /usr/bin/vim.basic - - -SEE ALSO --------- -:strong:`cdist-type__debconf_set_selections`\ (7), :strong:`update-alternatives`\ (8) - - -AUTHORS -------- -Nico Schottelius - - -COPYING -------- -Copyright \(C) 2013 Nico Schottelius. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__update_alternatives/parameter/required b/cdist/conf/type/__update_alternatives/parameter/required deleted file mode 100644 index e7a8fd4d..00000000 --- a/cdist/conf/type/__update_alternatives/parameter/required +++ /dev/null @@ -1 +0,0 @@ -path diff --git a/cdist/conf/type/__user/explorer/group b/cdist/conf/type/__user/explorer/group deleted file mode 100755 index 2aae2973..00000000 --- a/cdist/conf/type/__user/explorer/group +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh -# -# 2011 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Get an existing groups group entry. -# - -if [ -f "$__object/parameter/gid" ]; then - gid=$(cat "$__object/parameter/gid") - getent=$(command -v getent) - if [ X != X"${getent}" ]; then - "${getent}" group "$gid" || true - elif [ -f /etc/group ]; then - grep -E "^(${gid}|([^:]+:){2}${gid}):" /etc/group || true - fi -fi - diff --git a/cdist/conf/type/__user/explorer/shadow b/cdist/conf/type/__user/explorer/shadow deleted file mode 100755 index c49992d5..00000000 --- a/cdist/conf/type/__user/explorer/shadow +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh -# -# 2011 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Get an existing users shadow entry. -# - -name=$__object_id -os="$("$__explorer/os")" -# Default to using shadow passwords -database="shadow" - -case "$os" in - "freebsd"|"netbsd"|"openbsd") database="passwd";; -esac - - -getent=$(command -v getent) -if [ X != X"${getent}" ]; then - "${getent}" "$database" "$name" || true -elif [ -f /etc/shadow ]; then - grep "^${name}:" /etc/shadow || true -fi diff --git a/cdist/conf/type/__user/gencode-remote b/cdist/conf/type/__user/gencode-remote deleted file mode 100755 index ee18c18f..00000000 --- a/cdist/conf/type/__user/gencode-remote +++ /dev/null @@ -1,147 +0,0 @@ -#!/bin/sh -e -# -# 2011 Steven Armstrong (steven-cdist at armstrong.cc) -# 2011 Nico Schottelius (nico-cdist at schottelius.org) -# 2013 Daniel Heule (hda at sfs.biz) -# 2018 Thomas Eckert (tom at it-eckert.de) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Manage users. -# -#set -x - -name="$__object_id" - -os="$(cat "$__global/explorer/os")" - -state=$(cat "$__object/parameter/state") - -# We need to shorten options for both usermod and useradd since on some -# systems (such as *BSD, Darwin) those commands do not handle GNU style long -# options. -shorten_property() { - unset ret - case "$1" in - comment) ret="-c";; - home) ret="-d";; - gid) ret="-g";; - groups) ret="-G";; - password) ret="-p";; - shell) ret="-s";; - uid) ret="-u";; - create-home) ret="-m";; - system) ret="-r";; - esac - echo "$ret" -} - -if [ "$state" = "present" ]; then - cd "$__object/parameter" - if grep -q "^${name}:" "$__object/explorer/passwd"; then - for property in *; do - new_value="$(cat "$property")" - unset current_value - - file="$__object/explorer/passwd" - - case "$property" in - gid) - if echo "$new_value" | grep -q '^[0-9][0-9]*$'; then - field=4 - else - # We were passed a group name. Compare the gid in - # the user's /etc/passwd entry with the gid of the - # group returned by the group explorer. - gid_from_group=$(awk -F: '{ print $3 }' "$__object/explorer/group") - gid_from_passwd=$(awk -F: '{ print $4 }' "$file") - if [ "$gid_from_group" != "$gid_from_passwd" ]; then - current_value="$gid_from_passwd" - else - current_value="$new_value" - fi - fi - ;; - password) - field=2 - file="$__object/explorer/shadow" - ;; - comment) field=5 ;; - home) field=6 ;; - shell) field=7 ;; - uid) field=3 ;; - create-home) continue;; # Does not apply to user modification - system) continue;; # Does not apply to user modification - state) continue;; # Does not apply to user modification - remove-home) continue;; # Does not apply to user modification - esac - - # If we haven't already set $current_value above, pull it from the - # appropriate file/field. - if [ -z "$current_value" ]; then - export field - current_value="$(awk -F: '{ print $ENVIRON["field"] }' < "$file")" - fi - - if [ "$new_value" != "$current_value" ]; then - set -- "$@" "$(shorten_property "$property")" \'"$new_value"\' - fi - done - - if [ $# -gt 0 ]; then - echo mod >> "$__messages_out" - if [ "$os" = "freebsd" ]; then - echo pw usermod "$@" -n "$name" - else - echo usermod "$@" "$name" - fi - else - true - fi - else - echo add >> "$__messages_out" - for property in *; do - [ "$property" = "state" ] && continue - [ "$property" = "remove-home" ] && continue - new_value="$(cat "$property")" - if [ -z "$new_value" ];then # Boolean values have no value - set -- "$@" "$(shorten_property "$property")" - else - set -- "$@" "$(shorten_property "$property")" \'"$new_value"\' - fi - done - - if [ "$os" = "freebsd" ]; then - echo pw useradd "$@" -n "$name" - else - echo useradd "$@" "$name" - fi - fi -elif [ "$state" = "absent" ]; then - if grep -q "^${name}:" "$__object/explorer/passwd"; then - #user exists, but state != present, so delete it - if [ -f "$__object/parameter/remove-home" ]; then - printf "userdel -r '%s' >/dev/null 2>&1\\n" "${name}" - echo "userdel -r" >> "$__messages_out" - else - printf "userdel '%s' >/dev/null 2>&1\\n" "${name}" - echo "userdel" >> "$__messages_out" - fi - fi -else - echo "Invalid state $state" >&2 -fi diff --git a/cdist/conf/type/__user/man.rst b/cdist/conf/type/__user/man.rst deleted file mode 100644 index ef6b77af..00000000 --- a/cdist/conf/type/__user/man.rst +++ /dev/null @@ -1,105 +0,0 @@ -cdist-type__user(7) -=================== - -NAME ----- -cdist-type__user - Manage users - - -DESCRIPTION ------------ -This cdist type allows you to create or modify users on the target. - - -REQUIRED PARAMETERS -------------------- -None. - - -OPTIONAL PARAMETERS -------------------- -state - absent or present, defaults to present - -comment - see usermod(8) - -home - see above - -gid - see above - -password - see above - -shell - see above - -uid - see above - - -BOOLEAN PARAMETERS ------------------- -system - see useradd(8), apply only on user create - -create-home - see useradd(8), apply only on user create - -remove-home - see userdel(8), apply only on user delete - - -MESSAGES --------- -mod - User is modified - -add - New user added - -userdel -r - If user was deleted with homedir - -userdel - If user was deleted (keeping homedir) - -EXAMPLES --------- - -.. code-block:: sh - - # Create user account for foobar with operating system default settings - __user foobar - - # Same but with a different shell - __user foobar --shell /bin/zsh - - # Same but for a system account - __user foobar --system - - # Set explicit uid and home - __user foobar --uid 1001 --shell /bin/zsh --home /home/foobar - - # Drop user if exists - __user foobar --state absent - - -SEE ALSO --------- -:strong:`pw`\ (8), :strong:`usermod`\ (8) - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2011 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__user/manifest b/cdist/conf/type/__user/manifest deleted file mode 100644 index 8f10b38c..00000000 --- a/cdist/conf/type/__user/manifest +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh -e -# -# 2019 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Manage users. - -os=$(cat "$__global/explorer/os") - -case "$os" in - alpine) - __package shadow - ;; - *) - : - ;; -esac diff --git a/cdist/conf/type/__user/parameter/boolean b/cdist/conf/type/__user/parameter/boolean deleted file mode 100644 index 83afdebe..00000000 --- a/cdist/conf/type/__user/parameter/boolean +++ /dev/null @@ -1,3 +0,0 @@ -create-home -remove-home -system diff --git a/cdist/conf/type/__user/parameter/default/state b/cdist/conf/type/__user/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__user/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__user_groups/explorer/group b/cdist/conf/type/__user_groups/explorer/group deleted file mode 100755 index 5bad9a0b..00000000 --- a/cdist/conf/type/__user_groups/explorer/group +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -# -# 2012 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -user="$(cat "$__object/parameter/user" 2>/dev/null || echo "$__object_id")" - -(id -G -n "$user" | tr ' ' '\n' | sort) 2>/dev/null || true diff --git a/cdist/conf/type/__user_groups/explorer/oldusermod b/cdist/conf/type/__user_groups/explorer/oldusermod deleted file mode 100644 index 6ef25b13..00000000 --- a/cdist/conf/type/__user_groups/explorer/oldusermod +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -# -# 2015 Heule Daniel (hda at sfs.biz) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -usermod --help | grep -q -- '-A group' && echo true || echo false diff --git a/cdist/conf/type/__user_groups/gencode-remote b/cdist/conf/type/__user_groups/gencode-remote deleted file mode 100755 index 8120761a..00000000 --- a/cdist/conf/type/__user_groups/gencode-remote +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/sh -e -# -# 2012 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -user="$(cat "$__object/parameter/user" 2>/dev/null || echo "$__object_id")" -state_should="$(cat "$__object/parameter/state")" -oldusermod="$(cat "$__object/explorer/oldusermod")" -os=$(cat "$__global/explorer/os") - -mkdir "$__object/files" -# file has to be sorted for comparison with `comm` -sort "$__object/parameter/group" > "$__object/files/group.sorted" - -case "$state_should" in - present) - changed_groups="$(comm -13 "$__object/explorer/group" "$__object/files/group.sorted")" - ;; - absent) - changed_groups="$(comm -12 "$__object/explorer/group" "$__object/files/group.sorted")" - ;; -esac - -if [ -z "$changed_groups" ]; then - # Nothing to do, move along - exit 0 -fi - -for group in $changed_groups; do - if [ "$os" = "netbsd" ] || [ "$os" = "openbsd" ]; then - case "$state_should" in - present) echo "usermod -G \"$group\" \"$user\"" ;; - absent) echo 'NetBSD and OpenBSD do not have a command to remove a user from a group' >&2 ; exit 1 ;; - esac - elif [ "$os" = "freebsd" ]; then - case "$state_should" in - present) echo "pw groupmod \"$group\" -m \"$user\"" ;; - absent) echo "pw groupmod \"$group\" -d \"$user\"" ;; - esac - elif [ "$oldusermod" = "true" ]; then - case "$state_should" in - present) echo "usermod -A \"$group\" \"$user\"" ;; - absent) echo "usermod -R \"$group\" \"$user\"" ;; - esac - else - case "$state_should" in - present) echo "gpasswd -a \"$user\" \"$group\"" ;; - absent) echo "gpasswd -d \"$user\" \"$group\"" ;; - esac - fi -done diff --git a/cdist/conf/type/__user_groups/man.rst b/cdist/conf/type/__user_groups/man.rst deleted file mode 100644 index 6767b7a8..00000000 --- a/cdist/conf/type/__user_groups/man.rst +++ /dev/null @@ -1,52 +0,0 @@ -cdist-type__user_groups(7) -========================== - -NAME ----- -cdist-type__user_groups - Manage user groups - - -DESCRIPTION ------------ -Adds or removes a user from one or more groups. - - -REQUIRED PARAMETERS -------------------- -group - the group to which this user should be added or removed. - Can be specified multiple times. - - -OPTIONAL PARAMETERS -------------------- -user - the name of the user. Defaults to object_id - -state - absent or present. Defaults to present. - - -EXAMPLES --------- - -.. code-block:: sh - - __user_groups nginx --group webuser1 --group webuser2 - - # remove user nginx from groups webuser2 - __user_groups nginx-webuser2 --user nginx \ - --group webuser2 --state absent - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2012 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__user_groups/parameter/default/state b/cdist/conf/type/__user_groups/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__user_groups/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__user_groups/parameter/optional b/cdist/conf/type/__user_groups/parameter/optional deleted file mode 100644 index 7d9ecf60..00000000 --- a/cdist/conf/type/__user_groups/parameter/optional +++ /dev/null @@ -1,2 +0,0 @@ -user -state diff --git a/cdist/conf/type/__user_groups/parameter/required_multiple b/cdist/conf/type/__user_groups/parameter/required_multiple deleted file mode 100644 index 3a60ccec..00000000 --- a/cdist/conf/type/__user_groups/parameter/required_multiple +++ /dev/null @@ -1 +0,0 @@ -group diff --git a/cdist/conf/type/__yum_repo/files/repo.template b/cdist/conf/type/__yum_repo/files/repo.template deleted file mode 100755 index 18ea9d2b..00000000 --- a/cdist/conf/type/__yum_repo/files/repo.template +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/sh -set -u -cat << DONE -# Created by cdist ${__type##*/} -# Do not change. Changes will be overwritten. -# -[$repo_name] -DONE -# single value properties -single_value='name -metalink -mirrorlist -gpgcakey -gpgcheck -exclude -includepkgs -failovermethod -timeout -http_caching -retries -throttle -bandwidth -sslcacert -sslverify -sslclientcert -sslclientkey -ssl_check_cert_permissions -metadata_expire -mirrorlist_expire -proxy -proxy_username -proxy_password -username -password -cost' -for key in $single_value; do - if [ -f "$__object/parameter/$key" ]; then - printf '%s=%s\n' "$key" "$(cat "$__object/parameter/$key")" - fi -done -# multi value properties -for key in baseurl gpgkey; do - if [ -f "$__object/parameter/$key" ]; then - printf '%s=' "$key" - prefix='' - while read -r line; do - printf '%s%s\n' "$prefix" "$line" - prefix=' ' - done < "$__object/parameter/$key" - fi -done -# boolean properties -for key in enabled repo_gpgcheck keepalive skip_if_unavailable; do - if [ -f "$__object/parameter/$key" ]; then - printf '%s=1\n' "$key" - fi -done -# special cases -if [ -f "$__object/parameter/disablegroups" ]; then - printf 'enablegroups=0\n' -fi diff --git a/cdist/conf/type/__yum_repo/man.rst b/cdist/conf/type/__yum_repo/man.rst deleted file mode 100644 index 94366c3a..00000000 --- a/cdist/conf/type/__yum_repo/man.rst +++ /dev/null @@ -1,124 +0,0 @@ -cdist-type__yum_repo(7) -======================= - -NAME ----- -cdist-type__yum_repo - Manage yum repositories - - -DESCRIPTION ------------ -For all undocumented parameters see yum.conf(5). - - -REQUIRED PARAMETERS -------------------- -None. - - -OPTIONAL PARAMETERS -------------------- -state - 'present' or 'absent'. Defaults to 'present' - -repositoryid - Defaults to __object_id. - -name - -baseurl - Can be specified multiple times. - -metalink - -mirrorlist - -gpgkey - Can be specified multiple times. - -gpgcakey - -gpgcheck - -exclude - -includepkgs - -failovermethod - -timeout - -http_caching - -retries - -throttle - -bandwidth - -sslcacert - -sslverify - -sslclientcert - -sslclientkey - -ssl_check_cert_permissions - -metadata_expire - -mirrorlist_expire - -proxy - -proxy_username - -proxy_password - -username - -password - -cost - - -BOOLEAN PARAMETERS ------------------- -enabled - -repo_gpgcheck - -disablegroups - ! enablegroups - -keepalive - -skip_if_unavailable - - -EXAMPLES --------- - -.. code-block:: sh - - __yum_repo epel \ - --name 'Extra Packages for Enterprise Linux 6 - $basearch' \ - --mirrorlist 'https://mirrors.fedoraproject.org/metalink?repo=epel-$releasever&arch=$basearch' \ - --failovermethod priority \ - --enabled \ - --gpgcheck 1 \ - --gpgkey https://fedoraproject.org/static/0608B895.txt - - -AUTHORS -------- -Steven Armstrong - - -COPYING -------- -Copyright \(C) 2014 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__yum_repo/manifest b/cdist/conf/type/__yum_repo/manifest deleted file mode 100755 index 5f60d32c..00000000 --- a/cdist/conf/type/__yum_repo/manifest +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh -e -# -# 2014 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -os=$(cat "$__global/explorer/os") -state="$(cat "$__object/parameter/state")" - -case "$os" in - scientific|centos) - repo_name="$__object_id" - export repo_name - repo_file="/etc/yum.repos.d/${repo_name}.repo" - "$__type/files/repo.template" | \ - __file "$repo_file" \ - --owner root --group root --mode 644 \ - --state "$state" \ - --source - - ;; - *) - echo "Your operating system ($os) is currently not supported by this type (${__type##*/})." >&2 - echo "Please contribute an implementation for it if you can." >&2 - exit 1 - ;; -esac diff --git a/cdist/conf/type/__yum_repo/notes b/cdist/conf/type/__yum_repo/notes deleted file mode 100644 index 67fa617b..00000000 --- a/cdist/conf/type/__yum_repo/notes +++ /dev/null @@ -1,3 +0,0 @@ -https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/sec-Configuring_Yum_and_Yum_Repositories.html -https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux_OpenStack_Platform/2/html/Getting_Started_Guide/sect-Configuring_Software_Repositories.html -http://docs.puppetlabs.com/references/latest/type.html#yumrepo diff --git a/cdist/conf/type/__yum_repo/parameter/boolean b/cdist/conf/type/__yum_repo/parameter/boolean deleted file mode 100644 index 2eb49a93..00000000 --- a/cdist/conf/type/__yum_repo/parameter/boolean +++ /dev/null @@ -1,5 +0,0 @@ -enabled -repo_gpgcheck -disablegroups -keepalive -skip_if_unavailable diff --git a/cdist/conf/type/__yum_repo/parameter/default/state b/cdist/conf/type/__yum_repo/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__yum_repo/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__yum_repo/parameter/optional b/cdist/conf/type/__yum_repo/parameter/optional deleted file mode 100644 index 7e185701..00000000 --- a/cdist/conf/type/__yum_repo/parameter/optional +++ /dev/null @@ -1,27 +0,0 @@ -bandwidth -cost -exclude -failovermethod -gpgcakey -gpgcheck -http_caching -includepkgs -metadata_expire -mirrorlist -mirrorlist_expire -name -password -proxy -proxy_password -proxy_username -repositoryid -retries -sslcacert -ssl_check_cert_permissions -sslclientcert -sslclientkey -sslverify -state -throttle -timeout -username diff --git a/cdist/conf/type/__yum_repo/parameter/optional_multiple b/cdist/conf/type/__yum_repo/parameter/optional_multiple deleted file mode 100644 index 6467915b..00000000 --- a/cdist/conf/type/__yum_repo/parameter/optional_multiple +++ /dev/null @@ -1,2 +0,0 @@ -baseurl -gpgkey diff --git a/cdist/conf/type/__zypper_repo/explorer/all_repo_ids b/cdist/conf/type/__zypper_repo/explorer/all_repo_ids deleted file mode 100644 index 7953158a..00000000 --- a/cdist/conf/type/__zypper_repo/explorer/all_repo_ids +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -# -# 2013 Daniel Heule (hda at sfs.biz) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Retrieve all repo id nummbers - parsed zypper output -# -# -# shellcheck disable=SC2005,SC2046 -echo $(zypper lr | cut -d'|' -f 1 | grep -E '^[0-9]') diff --git a/cdist/conf/type/__zypper_repo/explorer/enabled_repo_ids b/cdist/conf/type/__zypper_repo/explorer/enabled_repo_ids deleted file mode 100644 index 261d6073..00000000 --- a/cdist/conf/type/__zypper_repo/explorer/enabled_repo_ids +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh -# -# 2013 Daniel Heule (hda at sfs.biz) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Retrieve all repo id nummbers from enabled repos - parsed zypper output -# -# -# simpler command which works only on SLES11 SP3 or newer: -# echo $(zypper lr -E | cut -d'|' -f 1 | grep -E '^[0-9]') -# -# shellcheck disable=SC2005,SC2046 -echo $(zypper lr | grep -E '^[0-9]([^|]+\|){3,3} Yes' | cut -d'|' -f 1) diff --git a/cdist/conf/type/__zypper_repo/explorer/repo_id b/cdist/conf/type/__zypper_repo/explorer/repo_id deleted file mode 100644 index d55a5cac..00000000 --- a/cdist/conf/type/__zypper_repo/explorer/repo_id +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -# -# 2013-2014 Daniel Heule (hda at sfs.biz) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Retrieve the id from the repo with the uri from parameter uri - parsed zypper output -# -# -if [ -f "$__object/parameter/uri" ]; then - uri="$(cat "$__object/parameter/uri")" -else - uri="$__object_id" -fi -# shellcheck disable=SC2005,SC2046 -echo $(zypper lr -u | grep -F "$uri" | cut -d'|' -f 1 | grep -E '^[0-9]') diff --git a/cdist/conf/type/__zypper_repo/gencode-remote b/cdist/conf/type/__zypper_repo/gencode-remote deleted file mode 100755 index 336488ae..00000000 --- a/cdist/conf/type/__zypper_repo/gencode-remote +++ /dev/null @@ -1,98 +0,0 @@ -#!/bin/sh -e -# -# 2013 Daniel Heule (hda at sfs.biz) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Manage repo services with Zypper (mostly suse) -# - -# Debug -#exec >&2 -#set -x - -zypper_def_opts=" -q --non-interactive --gpg-auto-import-keys " - -if [ -f "$__object/parameter/repo_desc" ]; then - desc="$(cat "$__object/parameter/repo_desc")" -else - desc="$__object_id" -fi - -if [ -f "$__object/parameter/uri" ]; then - uri="$(cat "$__object/parameter/uri")" -else - uri="$__object_id" -fi - -if [ -f "$__object/parameter/repo_id" ]; then - id="$(cat "$__object/parameter/repo_id")" -else - id="$__object_id" -fi - -state="$(cat "$__object/parameter/state")" - -repo_id="$(cat "$__object/explorer/repo_id")" - -act_id="" -if grep -q "$id" "$__object/explorer/all_repo_ids"; then - act_id="$id" -elif grep -q "$repo_id" "$__object/explorer/all_repo_ids"; then - act_id="$repo_id" -fi - -repostate="disabled" -if grep -q "$act_id" "$__object/explorer/enabled_repo_ids"; then - repostate="enabled" -fi - - -case "$state" in - present) - if [ -z "$desc" ] || [ -z "$uri" ]; then - echo "parameter repo_desc and uri for $state needed" >&2 - exit 4 - fi - if [ -z "$repo_id" ]; then - # Repo not present, so we need to create it - echo "zypper $zypper_def_opts addrepo '$uri' '$desc'" - fi - ;; - absent) - if [ -n "$act_id" ]; then - # Repo present (act_id not ""), so we ned to delete it - echo "zypper $zypper_def_opts removerepo $act_id" - fi - ;; - enabled) - if [ -n "$act_id" ] && [ "$repostate" = "disabled" ]; then - # Repo present (act_id not "") and repostate not enabled, so a enable call is needed - echo "zypper $zypper_def_opts modifyrepo -e $act_id" - fi - ;; - disabled) - if [ -n "$act_id" ] && [ "$repostate" = "enabled" ]; then - # Repo present (act_id not "") and repostate enabled, so a disable call is needed - echo "zypper $zypper_def_opts modifyrepo -d $act_id" - fi - ;; - *) - echo "Unknown state: $state" >&2 - exit 1 - ;; -esac diff --git a/cdist/conf/type/__zypper_repo/man.rst b/cdist/conf/type/__zypper_repo/man.rst deleted file mode 100644 index 73799d91..00000000 --- a/cdist/conf/type/__zypper_repo/man.rst +++ /dev/null @@ -1,73 +0,0 @@ -cdist-type__zypper_repo(7) -========================== - -NAME ----- -cdist-type__zypper_repo - Repository management with zypper - - -DESCRIPTION ------------ -zypper is usually used on the SuSE distribution to manage repositories. - - -REQUIRED PARAMETERS -------------------- -None - - -OPTIONAL PARAMETERS -------------------- -state - Either "present" or "absent" or "enabled" or "disabled", defaults to "present" - - * **present** - make sure that the repo is available, needs uri and repo_desc for all following states, the repo can be searched via repo_id or uri - * **absent** - drop the repo if found + - * **enabled** - a repo can have state disabled if installed via zypper service (ris), in this case, you can enable the repo - * **disabled** - instead of absent (drop), a repo can also set to disabled, which makes it inaccessible - -uri - If supplied, use the uri and not the object id as repo uri. - -repo_desc - If supplied, use the description and not the object id as repo description, only used if the state is present and the repo has to be created - -repo_id - If supplied, use the id and not the object id as repo id, can be used with state absent, enabled and disabled - - -EXAMPLES --------- - -.. code-block:: sh - - # Ensure testrepo in installed - __zypper_repo testrepo --state present --uri http://url.to.your.repo/with/path - - # Drop repo by repo uri - __zypper_repo testrepo --state absent --uri http://url.to.your.repo/with/path - - # Drop repo by id number (attention: repos are always numbered from 1 to max) - __zypper_repo testrepo --state absent --repo_id 1 - - # enable repo by id - __zypper_repo testrepo2 --state enabled --repo_id 2 - - # enable repo by uri - __zypper_repo testrepo3 --state enabled --uri http://url.to.your.repo/with/path - - # disable a repo works like enabling it - __zypper_repo testrepo4 --state disabled --repo_id 4 - - -AUTHORS -------- -Daniel Heule - - -COPYING -------- -Copyright \(C) 2013 Daniel Heule. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__zypper_repo/parameter/default/state b/cdist/conf/type/__zypper_repo/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__zypper_repo/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__zypper_repo/parameter/optional b/cdist/conf/type/__zypper_repo/parameter/optional deleted file mode 100644 index fe40e350..00000000 --- a/cdist/conf/type/__zypper_repo/parameter/optional +++ /dev/null @@ -1,4 +0,0 @@ -state -uri -repo_desc -repo_id diff --git a/cdist/conf/type/__zypper_service/explorer/repo_ids b/cdist/conf/type/__zypper_service/explorer/repo_ids deleted file mode 100644 index da506fea..00000000 --- a/cdist/conf/type/__zypper_service/explorer/repo_ids +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh -# -# 2013 Daniel Heule (hda at sfs.biz) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Manage services with Zypper (mostly suse) -# -# -# simpler command which works only on SLES11 SP3 or newer: -# echo $(zypper lr -u -E | cut -d'|' -f 1 | grep -E '^[0-9]') -# on older systems, zypper doesn't know the parameter -E -# -# shellcheck disable=SC2005,SC2046 -echo $(zypper lr -u | grep -E '^([^|]+\|){3,3} Yes' | cut -d'|' -f 1 | grep -E '^[0-9]') diff --git a/cdist/conf/type/__zypper_service/explorer/service_id b/cdist/conf/type/__zypper_service/explorer/service_id deleted file mode 100644 index fbb983c8..00000000 --- a/cdist/conf/type/__zypper_service/explorer/service_id +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh -# -# 2013 Daniel Heule (hda at sfs.biz) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Manage services with Zypper (mostly suse) -# -if [ -f "$__object/parameter/uri" ]; then - uri="$(cat "$__object/parameter/uri")" -else - uri="/$__object_id" -fi -# simpler command which works only on SLES11 SP3 or newer: -# echo $(zypper ls -u -E | grep -E "\<$uri\>" | cut -d'|' -f 1 ) -# -# shellcheck disable=SC2005,SC2046 -echo $(zypper ls -u | grep -E '^([^|]+\|){3,3} Yes' | grep -E "\\<$uri\\>" | cut -d'|' -f 1) diff --git a/cdist/conf/type/__zypper_service/explorer/service_ids b/cdist/conf/type/__zypper_service/explorer/service_ids deleted file mode 100644 index 5a26740e..00000000 --- a/cdist/conf/type/__zypper_service/explorer/service_ids +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh -# -# 2013 Daniel Heule (hda at sfs.biz) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Manage services with Zypper (mostly suse) -# -# simpler command which works only on SLES11 SP3 or newer: -# echo $(zypper ls -u -E | cut -d'|' -f 1 | grep -E '^[0-9]') -# -# shellcheck disable=SC2005,SC2046 -echo $(zypper ls -u | grep -E '^([^|]+\|){3,3} Yes' | cut -d'|' -f 1 | grep -E '^[0-9]') diff --git a/cdist/conf/type/__zypper_service/explorer/service_uri b/cdist/conf/type/__zypper_service/explorer/service_uri deleted file mode 100644 index 2f3d0f94..00000000 --- a/cdist/conf/type/__zypper_service/explorer/service_uri +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh -# -# 2013 Daniel Heule (hda at sfs.biz) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Manage services with Zypper (mostly suse) -# -if [ -f "$__object/parameter/uri" ]; then - uri="$(cat "$__object/parameter/uri")" -else - uri="/$__object_id" -fi -# shellcheck disable=SC2005,SC2046 -echo $(zypper ls -u | awk 'BEGIN { FS = "[ ]+\\|[ ]+" } ; $4 == "Yes" && $NF == "'"$uri"'" {print $NF}') diff --git a/cdist/conf/type/__zypper_service/gencode-remote b/cdist/conf/type/__zypper_service/gencode-remote deleted file mode 100755 index 4ccfe301..00000000 --- a/cdist/conf/type/__zypper_service/gencode-remote +++ /dev/null @@ -1,87 +0,0 @@ -#!/bin/sh -e -# -# 2013 Daniel Heule (hda at sfs.biz) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Manage services with Zypper (mostly suse) -# - -# Debug -#exec >&2 -#set -x - -zypper_def_opts=" -q --non-interactive --gpg-auto-import-keys " - -if [ -f "$__object/parameter/service_desc" ]; then - desc="$(cat "$__object/parameter/service_desc")" -else - desc="$__object_id" -fi - -if [ -f "$__object/parameter/uri" ]; then - uri="$(cat "$__object/parameter/uri")" -else - uri="$__object_id" -fi - -state_should="$(cat "$__object/parameter/state")" -stype="$(cat "$__object/parameter/type")" - -exp_uri="$(cat "$__object/explorer/service_uri")" -exp_id="$(cat "$__object/explorer/service_id")" - -# we need this list to remove ids, but we must do this in reverse order -exp_ids="$(rev "$__object/explorer/service_ids")" - -if [ "$uri" = "$exp_uri" ] ; then - state_is="present" -else - state_is="absent" -fi - -# remove all other services if needed ... -if [ -f "$__object/parameter/remove-all-other-services" ]; then - # file exists -> True - for i in $exp_ids; do - if [ "$i" != "$exp_id" ] ; then - echo "zypper $zypper_def_opts removeservice $i &>/dev/null" - fi - done - echo "zypper $zypper_def_opts refs &>/dev/null" -fi - - -# Exit if nothing is needed to be done -[ "$state_is" = "$state_should" ] && exit 0 - -case "$state_should" in - present) - echo "zypper $zypper_def_opts addservice -t $stype $uri '$desc'" - echo "zypper $zypper_def_opts refs" - echo "zypper $zypper_def_opts ref" - ;; - absent) - echo "zypper $zypper_def_opts removeservice $exp_id" - echo "zypper $zypper_def_opts refs" - echo "zypper $zypper_def_opts ref" - ;; - *) - echo "Unknown state: $state_should" >&2 - exit 1 - ;; -esac diff --git a/cdist/conf/type/__zypper_service/man.rst b/cdist/conf/type/__zypper_service/man.rst deleted file mode 100644 index e082dc02..00000000 --- a/cdist/conf/type/__zypper_service/man.rst +++ /dev/null @@ -1,66 +0,0 @@ -cdist-type__zypper_service(7) -============================= - -NAME ----- -cdist-type__zypper_service - Service management with zypper - - -DESCRIPTION ------------ -zypper is usually used on SuSE systems to manage services. - - -REQUIRED PARAMETERS -------------------- -uri - Uri of the service - - -OPTIONAL PARAMETERS -------------------- -service_desc - If supplied, use the service_desc and not the object id as description for the service. - -state - Either "present" or "absent", defaults to "present" - -type - Defaults to "ris", the standard type of services at SLES11. For other values, see manpage of zypper. - - -BOOLEAN PARAMETERS ------------------- -remove-all-other-services - Drop all other services found on the target host before adding the new one. - -remove-all-repos - If supplied, remove all existing repos prior to setup the new service. - - -EXAMPLES --------- - -.. code-block:: sh - - # Ensure that internal SLES11 SP3 RIS is in installed and all other services and repos are discarded - __zypper_service INTERNAL_SLES11_SP3 --service_desc "Internal SLES11 SP3 RIS" --uri "http://path/to/your/ris/dir" --remove-all-other-services --remove-all-repos - - # Ensure that internal SLES11 SP3 RIS is in installed, no changes to other services or repos - __zypper_service INTERNAL_SLES11_SP3 --service_desc "Internal SLES11 SP3 RIS" --uri "http://path/to/your/ris/dir" - - # Drop service by uri, no changes to other services or repos - __zypper_service INTERNAL_SLES11_SP3 --state absent --uri "http://path/to/your/ris/dir" - - -AUTHORS -------- -Daniel Heule - - -COPYING -------- -Copyright \(C) 2013 Daniel Heule. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. diff --git a/cdist/conf/type/__zypper_service/manifest b/cdist/conf/type/__zypper_service/manifest deleted file mode 100755 index 42a56830..00000000 --- a/cdist/conf/type/__zypper_service/manifest +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/sh -e -# -# 2013 Daniel Heule (hda at sfs.biz) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Manage services with Zypper (mostly suse) -# - -# Debug -#exec >&2 -#set -x - - -if [ -f "$__object/parameter/uri" ]; then - uri="$(cat "$__object/parameter/uri")" -else - uri="$__object_id" -fi - -state_should="$(cat "$__object/parameter/state")" - -exp_uri="$(cat "$__object/explorer/service_uri")" - -if [ "$uri" = "$exp_uri" ] ; then - state_is="present" -else - state_is="absent" -fi - - -# Exit if nothing is needed to be done -[ "$state_is" = "$state_should" ] && exit 0 - -# we need this list to remove ids, but we must do this in reverse order -exp_repos="$(rev "$__object/explorer/repo_ids")" - -# boolean parameter -if [ -f "$__object/parameter/remove-all-repos" ]; then - # file exists -> True - for i in $exp_repos; do - __zypper_repo "droprepo${i}" --state absent --repo_id "${i}" - done -fi diff --git a/cdist/conf/type/__zypper_service/parameter/boolean b/cdist/conf/type/__zypper_service/parameter/boolean deleted file mode 100644 index ca711ded..00000000 --- a/cdist/conf/type/__zypper_service/parameter/boolean +++ /dev/null @@ -1,2 +0,0 @@ -remove-all-other-services -remove-all-repos diff --git a/cdist/conf/type/__zypper_service/parameter/default/state b/cdist/conf/type/__zypper_service/parameter/default/state deleted file mode 100644 index e7f6134f..00000000 --- a/cdist/conf/type/__zypper_service/parameter/default/state +++ /dev/null @@ -1 +0,0 @@ -present diff --git a/cdist/conf/type/__zypper_service/parameter/default/type b/cdist/conf/type/__zypper_service/parameter/default/type deleted file mode 100644 index b928830f..00000000 --- a/cdist/conf/type/__zypper_service/parameter/default/type +++ /dev/null @@ -1 +0,0 @@ -ris diff --git a/cdist/conf/type/__zypper_service/parameter/optional b/cdist/conf/type/__zypper_service/parameter/optional deleted file mode 100644 index b26c78d8..00000000 --- a/cdist/conf/type/__zypper_service/parameter/optional +++ /dev/null @@ -1,3 +0,0 @@ -service_desc -state -type diff --git a/cdist/conf/type/__zypper_service/parameter/required b/cdist/conf/type/__zypper_service/parameter/required deleted file mode 100644 index c7954952..00000000 --- a/cdist/conf/type/__zypper_service/parameter/required +++ /dev/null @@ -1 +0,0 @@ -uri diff --git a/cdist/config.py b/cdist/config.py deleted file mode 100644 index 26d07fc4..00000000 --- a/cdist/config.py +++ /dev/null @@ -1,828 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# -# 2010-2015 Nico Schottelius (nico-cdist at schottelius.org) -# 2013-2017 Steven Armstrong (steven-cdist at armstrong.cc) -# 2016-2017 Darko Poljak (darko.poljak at gmail.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -import logging -import os -import sys -import time -import itertools -import tempfile -import multiprocessing -from cdist.mputil import mp_pool_run, mp_sig_handler -import atexit -import shutil -import socket -import cdist -import cdist.hostsource -import cdist.exec.local -import cdist.exec.remote -import cdist.util.ipaddr as ipaddr -import cdist.configuration -from cdist import core, inventory -from cdist.util.remoteutil import inspect_ssh_mux_opts - - -def graph_check_cycle(graph): - # Start from each node in the graph and check for cycle starting from it. - for node in graph: - # Cycle path. - path = [node] - has_cycle = _graph_dfs_cycle(graph, node, path) - if has_cycle: - return has_cycle, path - return False, None - - -def _graph_dfs_cycle(graph, node, path): - for neighbour in graph.get(node, ()): - # If node is already in path then this is cycle. - if neighbour in path: - path.append(neighbour) - return True - path.append(neighbour) - rv = _graph_dfs_cycle(graph, neighbour, path) - if rv: - return True - # Remove last item from list - neighbour whose DFS path we have have - # just checked. - del path[-1] - return False - - -class Config(object): - """Cdist main class to hold arbitrary data""" - - # list of paths (files and/or directories) that will be removed on finish - _paths_for_removal = [] - - @classmethod - def _register_path_for_removal(cls, path): - cls._paths_for_removal.append(path) - - @classmethod - def _remove_paths(cls): - while cls._paths_for_removal: - path = cls._paths_for_removal.pop() - if os.path.isfile(path): - os.remove(path) - else: - shutil.rmtree(path) - - def __init__(self, local, remote, dry_run=False, jobs=None, - cleanup_cmds=None, remove_remote_files_dirs=False): - - self.local = local - self.remote = remote - self._open_logger() - self.dry_run = dry_run - self.jobs = jobs - if cleanup_cmds: - self.cleanup_cmds = cleanup_cmds - else: - self.cleanup_cmds = [] - self.remove_remote_files_dirs = remove_remote_files_dirs - - self.explorer = core.Explorer(self.local.target_host, self.local, - self.remote, jobs=self.jobs, - dry_run=self.dry_run) - self.manifest = core.Manifest(self.local.target_host, self.local, - dry_run=self.dry_run) - self.code = core.Code(self.local.target_host, self.local, self.remote, - dry_run=self.dry_run) - - def _init_files_dirs(self): - """Prepare files and directories for the run""" - self.local.create_files_dirs() - self.remote.create_files_dirs() - - def _remove_remote_files_dirs(self): - """Remove remote files and directories for the run""" - self.remote.remove_files_dirs() - - def _remove_files_dirs(self): - """Remove files and directories for the run""" - if self.remove_remote_files_dirs: - self._remove_remote_files_dirs() - - @staticmethod - def hosts(source): - try: - yield from cdist.hostsource.HostSource(source)() - except (IOError, OSError, UnicodeError) as e: - raise cdist.Error( - "Error reading hosts from \'{}\': {}".format( - source, e)) - - @staticmethod - def construct_remote_exec_copy_patterns(args): - # default remote cmd patterns - args.remote_cmds_cleanup_pattern = "" - args.remote_exec_pattern = None - args.remote_copy_pattern = None - - # Determine forcing IPv4/IPv6 options if any, only for - # default remote commands. - if args.force_ipv: - force_addr_opt = " -{}".format(args.force_ipv) - else: - force_addr_opt = "" - - args_dict = vars(args) - # if remote-exec and/or remote-copy args are None then user - # didn't specify command line options nor env vars: - # inspect multiplexing options for default cdist.REMOTE_COPY/EXEC - if (args_dict['remote_copy'] is None or - args_dict['remote_exec'] is None): - mux_opts = inspect_ssh_mux_opts() - if args_dict['remote_exec'] is None: - args.remote_exec_pattern = (cdist.REMOTE_EXEC + - force_addr_opt + mux_opts) - if args_dict['remote_copy'] is None: - args.remote_copy_pattern = (cdist.REMOTE_COPY + - force_addr_opt + mux_opts) - if mux_opts: - cleanup_pattern = cdist.REMOTE_CMDS_CLEANUP_PATTERN - else: - cleanup_pattern = "" - args.remote_cmds_cleanup_pattern = cleanup_pattern - - @classmethod - def _check_and_prepare_args(cls, args): - if args.manifest == '-' and args.hostfile == '-': - raise cdist.Error(("Cannot read both, manifest and host file, " - "from stdin")) - - # if no host source is specified then read hosts from stdin - if not (args.hostfile or args.host): - args.hostfile = '-' - - if args.manifest == '-': - # read initial manifest from stdin - try: - handle, initial_manifest_temp_path = tempfile.mkstemp( - prefix='cdist.stdin.') - with os.fdopen(handle, 'w') as fd: - fd.write(sys.stdin.read()) - except (IOError, OSError) as e: - raise cdist.Error(("Creating tempfile for stdin data " - "failed: %s" % e)) - - args.manifest = initial_manifest_temp_path - atexit.register(lambda: os.remove(initial_manifest_temp_path)) - - @classmethod - def commandline(cls, args): - """Configure remote system""" - - if (args.parallel and args.parallel != 1) or args.jobs: - if args.timestamp: - cdist.log.setupTimestampingParallelLogging() - else: - cdist.log.setupParallelLogging() - elif args.timestamp: - cdist.log.setupTimestampingLogging() - log = logging.getLogger("config") - - # No new child process if only one host at a time. - if args.parallel == 1: - log.debug("Only 1 parallel process, doing it sequentially") - args.parallel = 0 - - if args.parallel: - import signal - - signal.signal(signal.SIGTERM, mp_sig_handler) - signal.signal(signal.SIGHUP, mp_sig_handler) - - cls._check_and_prepare_args(args) - - failed_hosts = [] - time_start = time.time() - - cls.construct_remote_exec_copy_patterns(args) - base_root_path = cls.create_base_root_path(args.out_path) - - hostcnt = 0 - - cfg = cdist.configuration.Configuration(args) - configuration = cfg.get_config(section='GLOBAL') - - if args.tag or args.all_tagged_hosts: - inventory.determine_default_inventory_dir(args, configuration) - if args.all_tagged_hosts: - inv_list = inventory.InventoryList( - hosts=None, istag=True, hostfile=None, - db_basedir=args.inventory_dir) - else: - inv_list = inventory.InventoryList( - hosts=args.host, istag=True, hostfile=args.hostfile, - db_basedir=args.inventory_dir, - has_all_tags=args.has_all_tags) - it = inv_list.entries() - else: - it = itertools.chain(cls.hosts(args.host), - cls.hosts(args.hostfile)) - - process_args = [] - if args.parallel: - log.trace("Processing hosts in parallel") - else: - log.trace("Processing hosts sequentially") - for entry in it: - if isinstance(entry, tuple): - # if configuring by specified tags - host = entry[0] - host_tags = entry[1] - else: - # if configuring by host then check inventory for tags - host = entry - inventory.determine_default_inventory_dir(args, configuration) - inv_list = inventory.InventoryList( - hosts=(host,), db_basedir=args.inventory_dir) - inv = tuple(inv_list.entries()) - if inv: - # host is present in inventory and has tags - host_tags = inv[0][1] - else: - # host is not present in inventory or has no tags - host_tags = None - host_base_path, hostdir = cls.create_host_base_dirs( - host, base_root_path) - log.debug("Base root path for target host \"{}\" is \"{}\"".format( - host, host_base_path)) - - hostcnt += 1 - if args.parallel: - pargs = (host, host_tags, host_base_path, hostdir, args, True, - configuration) - log.trace(("Args for multiprocessing operation " - "for host {}: {}".format(host, pargs))) - process_args.append(pargs) - else: - try: - cls.onehost(host, host_tags, host_base_path, hostdir, - args, parallel=False, - configuration=configuration) - except cdist.Error: - failed_hosts.append(host) - if args.parallel and len(process_args) == 1: - log.debug("Only 1 host for parallel processing, doing it " - "sequentially") - try: - cls.onehost(*process_args[0]) - except cdist.Error: - failed_hosts.append(host) - elif args.parallel: - log.trace("Multiprocessing start method is {}".format( - multiprocessing.get_start_method())) - log.trace(("Starting multiprocessing Pool for {} " - "parallel host operation".format(args.parallel))) - - results = mp_pool_run(cls.onehost, - process_args, - jobs=args.parallel) - log.trace(("Multiprocessing for parallel host operation " - "finished")) - log.trace("Multiprocessing for parallel host operation " - "results: %s", results) - - failed_hosts = [host for host, result in results if not result] - - time_end = time.time() - log.verbose("Total processing time for %s host(s): %s", hostcnt, - (time_end - time_start)) - - if len(failed_hosts) > 0: - raise cdist.Error("Failed to configure the following hosts: " + - " ".join(failed_hosts)) - elif not args.out_path: - # If tmp out path created then remove it, but only if no failed - # hosts. - shutil.rmtree(base_root_path) - - @classmethod - def _resolve_ssh_control_path(cls): - base_path = tempfile.mkdtemp() - cls._register_path_for_removal(base_path) - control_path = os.path.join(base_path, "s") - return control_path - - @classmethod - def _resolve_remote_cmds(cls, args): - if (args.remote_exec_pattern or - args.remote_copy_pattern or - args.remote_cmds_cleanup_pattern): - control_path = cls._resolve_ssh_control_path() - # If we constructed patterns for remote commands then there is - # placeholder for ssh ControlPath, format it and we have unique - # ControlPath for each host. - # - # If not then use args.remote_exec/copy that user specified. - if args.remote_exec_pattern: - remote_exec = args.remote_exec_pattern.format(control_path) - else: - remote_exec = args.remote_exec - if args.remote_copy_pattern: - remote_copy = args.remote_copy_pattern.format(control_path) - else: - remote_copy = args.remote_copy - if args.remote_cmds_cleanup_pattern: - remote_cmds_cleanup = args.remote_cmds_cleanup_pattern.format( - control_path) - else: - remote_cmds_cleanup = "" - return (remote_exec, remote_copy, remote_cmds_cleanup, ) - - @staticmethod - def _address_family(args): - if args.force_ipv == 4: - family = socket.AF_INET - elif args.force_ipv == 6: - family = socket.AF_INET6 - else: - family = 0 - return family - - @staticmethod - def resolve_target_addresses(host, family): - try: - return ipaddr.resolve_target_addresses(host, family) - except: - e = sys.exc_info()[1] - raise cdist.Error(("Error resolving target addresses for host '{}'" - ": {}").format(host, e)) - - @classmethod - def onehost(cls, host, host_tags, host_base_path, host_dir_name, args, - parallel, configuration, remove_remote_files_dirs=False): - """Configure ONE system. - If operating in parallel then return tuple (host, True|False, ) - so that main process knows for which host function was successful. - """ - - log = logging.getLogger(host) - - try: - remote_exec, remote_copy, cleanup_cmd = cls._resolve_remote_cmds( - args) - log.debug("remote_exec for host \"{}\": {}".format( - host, remote_exec)) - log.debug("remote_copy for host \"{}\": {}".format( - host, remote_copy)) - - family = cls._address_family(args) - log.debug("address family: {}".format(family)) - target_host = cls.resolve_target_addresses(host, family) - log.debug("target_host for host \"{}\": {}".format( - host, target_host)) - - local = cdist.exec.local.Local( - target_host=target_host, - target_host_tags=host_tags, - base_root_path=host_base_path, - host_dir_name=host_dir_name, - initial_manifest=args.manifest, - add_conf_dirs=args.conf_dir, - cache_path_pattern=args.cache_path_pattern, - quiet_mode=args.quiet, - configuration=configuration, - exec_path=sys.argv[0], - save_output_streams=args.save_output_streams) - - remote = cdist.exec.remote.Remote( - target_host=target_host, - remote_exec=remote_exec, - remote_copy=remote_copy, - base_path=args.remote_out_path, - quiet_mode=args.quiet, - archiving_mode=args.use_archiving, - configuration=configuration, - stdout_base_path=local.stdout_base_path, - stderr_base_path=local.stderr_base_path, - save_output_streams=args.save_output_streams) - - cleanup_cmds = [] - if cleanup_cmd: - cleanup_cmds.append(cleanup_cmd) - c = cls(local, remote, dry_run=args.dry_run, jobs=args.jobs, - cleanup_cmds=cleanup_cmds, - remove_remote_files_dirs=remove_remote_files_dirs) - c.run() - cls._remove_paths() - - except cdist.Error as e: - log.error(e) - if parallel: - return (host, False, ) - else: - raise - - if parallel: - return (host, True, ) - - @staticmethod - def create_base_root_path(out_path=None): - if out_path: - base_root_path = out_path - else: - base_root_path = tempfile.mkdtemp() - - return base_root_path - - @staticmethod - def create_host_base_dirs(host, base_root_path): - hostdir = cdist.str_hash(host) - host_base_path = os.path.join(base_root_path, hostdir) - - return (host_base_path, hostdir) - - def run(self): - """Do what is most often done: deploy & cleanup""" - start_time = time.time() - - self.log.info("Starting {} run".format( - 'dry' if self.dry_run else 'configuration')) - - self._init_files_dirs() - - self.explorer.run_global_explorers(self.local.global_explorer_out_path) - try: - self.manifest.run_initial_manifest(self.local.initial_manifest) - except cdist.Error as e: - which = "init" - stdout_path = os.path.join(self.local.stdout_base_path, which) - stderr_path = os.path.join(self.local.stderr_base_path, which) - raise cdist.InitialManifestError(self.local.initial_manifest, - stdout_path, stderr_path, e) - self.iterate_until_finished() - self.cleanup() - self._remove_files_dirs() - - self.local.save_cache(start_time) - self.log.info("Finished {} run in {:.2f} seconds".format( - 'dry' if self.dry_run else 'successful', - time.time() - start_time)) - - def cleanup(self): - self.log.debug("Running cleanup commands") - for cleanup_cmd in self.cleanup_cmds: - cmd = cleanup_cmd.split() - cmd.append(self.local.target_host[0]) - try: - if self.log.getEffectiveLevel() <= logging.DEBUG: - quiet_mode = False - else: - quiet_mode = True - self.local.run(cmd, return_output=False, save_output=False, - quiet_mode=quiet_mode) - except cdist.Error as e: - # Log warning but continue. - self.log.warning("Cleanup command failed: %s", e) - - def object_list(self): - """Short name for object list retrieval""" - for cdist_object in core.CdistObject.list_objects( - self.local.object_path, self.local.type_path, - self.local.object_marker_name): - if cdist_object.cdist_type.is_install: - self.log.debug(("Running in config mode, ignoring install " - "object: {0}").format(cdist_object)) - else: - yield cdist_object - - def iterate_once(self): - """ - Iterate over the objects once - helper method for - iterate_until_finished - """ - if self.jobs: - objects_changed = self._iterate_once_parallel() - else: - objects_changed = self._iterate_once_sequential() - return objects_changed - - def _iterate_once_sequential(self): - self.log.debug("Iteration in sequential mode") - objects_changed = False - - for cdist_object in self.object_list(): - if cdist_object.requirements_unfinished( - cdist_object.requirements): - """We cannot do anything for this poor object""" - continue - - if cdist_object.state == core.CdistObject.STATE_UNDEF: - """Prepare the virgin object""" - - self.object_prepare(cdist_object) - objects_changed = True - - if cdist_object.requirements_unfinished( - cdist_object.autorequire): - """The previous step created objects we depend on - - wait for them - """ - continue - - if cdist_object.state == core.CdistObject.STATE_PREPARED: - self.object_run(cdist_object) - objects_changed = True - - return objects_changed - - def _iterate_once_parallel(self): - self.log.debug("Iteration in parallel mode in {} jobs".format( - self.jobs)) - objects_changed = False - - cargo = [] - for cdist_object in self.object_list(): - if cdist_object.requirements_unfinished(cdist_object.requirements): - """We cannot do anything for this poor object""" - continue - - if cdist_object.state == core.CdistObject.STATE_UNDEF: - """Prepare the virgin object""" - - # self.object_prepare(cdist_object) - # objects_changed = True - cargo.append(cdist_object) - - n = len(cargo) - if n == 1: - self.log.debug("Only one object, preparing sequentially") - self.object_prepare(cargo[0]) - objects_changed = True - elif cargo: - self.log.trace("Multiprocessing start method is {}".format( - multiprocessing.get_start_method())) - - self.log.trace("Multiprocessing cargo: %s", cargo) - - cargo_types = set() - for c in cargo: - cargo_types.add(c.cdist_type) - self.log.trace("Multiprocessing cargo_types: %s", cargo_types) - nt = len(cargo_types) - if nt == 1: - self.log.debug(("Only one type, transferring explorers " - "sequentially")) - self.explorer.transfer_type_explorers(cargo_types.pop()) - else: - self.log.trace(("Starting multiprocessing Pool for {} " - "parallel types explorers transferring".format( - nt))) - args = [ - (ct, ) for ct in cargo_types - ] - mp_pool_run(self.explorer.transfer_type_explorers, args, - jobs=self.jobs) - self.log.trace(("Multiprocessing for parallel transferring " - "types' explorers finished")) - - self.log.trace(("Starting multiprocessing Pool for {} parallel " - "objects preparation".format(n))) - args = [ - (c, False, ) for c in cargo - ] - mp_pool_run(self.object_prepare, args, jobs=self.jobs) - self.log.trace(("Multiprocessing for parallel object " - "preparation finished")) - objects_changed = True - - del cargo[:] - for cdist_object in self.object_list(): - if cdist_object.requirements_unfinished(cdist_object.requirements): - """We cannot do anything for this poor object""" - continue - - if cdist_object.state == core.CdistObject.STATE_PREPARED: - if cdist_object.requirements_unfinished( - cdist_object.autorequire): - """The previous step created objects we depend on - - wait for them - """ - continue - - # self.object_run(cdist_object) - # objects_changed = True - - # put objects in chuncks of distinct types - # so that there is no more than one object - # of the same type in one chunk because there is a - # possibility of object's process locking which - # prevents parallel execution at remote - # and do this only for nonparallel marked types - for chunk in cargo: - for obj in chunk: - if (obj.cdist_type == cdist_object.cdist_type and - cdist_object.cdist_type.is_nonparallel): - break - else: - chunk.append(cdist_object) - break - else: - chunk = [cdist_object, ] - cargo.append(chunk) - - for chunk in cargo: - self.log.trace("Running chunk: %s", chunk) - n = len(chunk) - if n == 1: - self.log.debug("Only one object, running sequentially") - self.object_run(chunk[0]) - objects_changed = True - elif chunk: - self.log.trace("Multiprocessing start method is {}".format( - multiprocessing.get_start_method())) - self.log.trace(("Starting multiprocessing Pool for {} " - "parallel object run".format(n))) - args = [ - (c, ) for c in chunk - ] - mp_pool_run(self.object_run, args, jobs=self.jobs) - self.log.trace(("Multiprocessing for parallel object " - "run finished")) - objects_changed = True - - return objects_changed - - def _open_logger(self): - self.log = logging.getLogger(self.local.target_host[0]) - - # logger is not pickable, so remove it when we pickle - def __getstate__(self): - state = self.__dict__.copy() - if 'log' in state: - del state['log'] - return state - - # recreate logger when we unpickle - def __setstate__(self, state): - self.__dict__.update(state) - self._open_logger() - - def _validate_dependencies(self): - ''' - Build dependency graph for unfinished objects and - check for cycles. - ''' - graph = {} - for cdist_object in self.object_list(): - obj_name = cdist_object.name - if obj_name not in graph: - graph[obj_name] = [] - if cdist_object.state == cdist_object.STATE_DONE: - continue - - for requirement in cdist_object.requirements_unfinished( - cdist_object.requirements): - graph[obj_name].append(requirement.name) - - for requirement in cdist_object.requirements_unfinished( - cdist_object.autorequire): - graph[obj_name].append(requirement.name) - return graph_check_cycle(graph) - - def iterate_until_finished(self): - """ - Go through all objects and solve them - one after another - """ - - objects_changed = True - - while objects_changed: - # Check for cycles as early as possible. - has_cycle, path = self._validate_dependencies() - if has_cycle: - raise cdist.UnresolvableRequirementsError( - "Cycle detected in object dependencies:\n{}!".format( - " -> ".join(path))) - objects_changed = self.iterate_once() - - # Check whether all objects have been finished - unfinished_objects = [] - for cdist_object in self.object_list(): - if not cdist_object.state == cdist_object.STATE_DONE: - unfinished_objects.append(cdist_object) - - if unfinished_objects: - info_string = [] - - for cdist_object in unfinished_objects: - - requirement_names = [] - autorequire_names = [] - - for requirement in cdist_object.requirements_unfinished( - cdist_object.requirements): - requirement_names.append(requirement.name) - - for requirement in cdist_object.requirements_unfinished( - cdist_object.autorequire): - autorequire_names.append(requirement.name) - - requirements = "\n ".join(requirement_names) - autorequire = "\n ".join(autorequire_names) - info_string.append(("%s requires:\n" - " %s\n" - "%s ""autorequires:\n" - " %s" % ( - cdist_object.name, - requirements, cdist_object.name, - autorequire))) - - raise cdist.UnresolvableRequirementsError( - ("The requirements of the following objects could not be " - "resolved:\n%s") % ("\n".join(info_string))) - - def _handle_deprecation(self, cdist_object): - cdist_type = cdist_object.cdist_type - deprecated = cdist_type.deprecated - if deprecated is not None: - if deprecated: - self.log.warning("Type %s is deprecated: %s", cdist_type.name, - deprecated) - else: - self.log.warning("Type %s is deprecated.", cdist_type.name) - for param in cdist_object.parameters: - if param in cdist_type.deprecated_parameters: - msg = cdist_type.deprecated_parameters[param] - if msg: - format = "%s parameter of type %s is deprecated: %s" - args = [param, cdist_type.name, msg] - else: - format = "%s parameter of type %s is deprecated." - args = [param, cdist_type.name] - self.log.warning(format, *args) - - def object_prepare(self, cdist_object, transfer_type_explorers=True): - """Prepare object: Run type explorer + manifest""" - self._handle_deprecation(cdist_object) - self.log.verbose("Preparing object {}".format(cdist_object.name)) - self.log.verbose( - "Running manifest and explorers for " + cdist_object.name) - self.explorer.run_type_explorers(cdist_object, transfer_type_explorers) - try: - self.manifest.run_type_manifest(cdist_object) - cdist_object.state = core.CdistObject.STATE_PREPARED - except cdist.Error as e: - raise cdist.CdistObjectError(cdist_object, e) - - def object_run(self, cdist_object): - """Run gencode and code for an object""" - try: - self.log.verbose("Running object " + cdist_object.name) - if cdist_object.state == core.CdistObject.STATE_DONE: - raise cdist.Error(("Attempting to run an already finished " - "object: %s"), cdist_object) - - # Generate - self.log.debug("Generating code for %s" % (cdist_object.name)) - cdist_object.code_local = self.code.run_gencode_local(cdist_object) - cdist_object.code_remote = self.code.run_gencode_remote( - cdist_object) - if cdist_object.code_local or cdist_object.code_remote: - cdist_object.changed = True - - # Execute - if cdist_object.code_local or cdist_object.code_remote: - self.log.info("Processing %s" % (cdist_object.name)) - if not self.dry_run: - if cdist_object.code_local: - self.log.trace("Executing local code for %s" - % (cdist_object.name)) - self.code.run_code_local(cdist_object) - if cdist_object.code_remote: - self.log.trace("Executing remote code for %s" - % (cdist_object.name)) - self.code.transfer_code_remote(cdist_object) - self.code.run_code_remote(cdist_object) - - # Mark this object as done - self.log.trace("Finishing run of " + cdist_object.name) - cdist_object.state = core.CdistObject.STATE_DONE - except cdist.Error as e: - raise cdist.CdistObjectError(cdist_object, e) diff --git a/cdist/configuration.py b/cdist/configuration.py deleted file mode 100644 index f05a5963..00000000 --- a/cdist/configuration.py +++ /dev/null @@ -1,497 +0,0 @@ -# -*- coding: utf-8 -*- -# -# 2017 Darko Poljak (darko.poljak at gmail.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - - -import configparser -import os -import cdist -import cdist.argparse -import re -import multiprocessing -import logging - - -class Singleton(type): - instance = None - - def __call__(cls, *args, **kwargs): - if 'singleton' in kwargs and not kwargs['singleton']: - return super(Singleton, cls).__call__(*args, **kwargs) - else: - if not cls.instance: - cls.instance = super(Singleton, cls).__call__(*args, **kwargs) - return cls.instance - - -_VERBOSITY_VALUES = ( - 'ERROR', 'WARNING', 'INFO', 'VERBOSE', 'DEBUG', 'TRACE', 'OFF', -) -_ARCHIVING_VALUES = ( - 'tar', 'tgz', 'tbz2', 'txz', 'none', -) - - -class OptionBase: - def __init__(self, name): - self.name = name - - def get_converter(self, *args, **kwargs): - raise NotImplementedError('Subclass should implement this method') - - def translate(self, val): - return val - - def update_value(self, currval, newval, update_appends=False): - '''Update current option value currval with new option value newval. - If update_appends is True and if currval and newval are lists then - resulting list contains all values in currval plus all values in - newval. Otherwise, newval is returned. - ''' - if (isinstance(currval, list) and isinstance(newval, list) and - update_appends): - rv = [] - if currval: - rv.extend(currval) - if newval: - rv.extend(newval) - if not rv: - rv = None - return rv - else: - return newval - - def should_override(self, currval, newval): - return True - - -class StringOption(OptionBase): - def __init__(self, name): - super().__init__(name) - - def get_converter(self): - def string_converter(val): - return self.translate(str(val)) - return string_converter - - def translate(self, val): - if val: - return val - else: - return None - - -class BooleanOption(OptionBase): - BOOLEAN_STATES = configparser.ConfigParser.BOOLEAN_STATES - - # If default_overrides is False then previous config value will not be - # overriden with default_value. - def __init__(self, name, default_overrides=True, default_value=True): - super().__init__(name) - self.default_overrides = default_overrides - self.default_value = default_value - - def get_converter(self): - def boolean_converter(val): - v = val.lower() - if v not in self.BOOLEAN_STATES: - raise ValueError('Invalid {} boolean value: {}'.format( - self.name, val)) - return self.translate(v) - return boolean_converter - - def translate(self, val): - return self.BOOLEAN_STATES[val] - - def should_override(self, currval, newval): - if not self.default_overrides: - return newval != self.default_value - return True - - -class IntOption(OptionBase): - def __init__(self, name): - super().__init__(name) - - def get_converter(self): - def int_converter(val): - return self.translate(int(val)) - return int_converter - - -class LowerBoundIntOption(IntOption): - def __init__(self, name, lower_bound): - super().__init__(name) - self.lower_bound = lower_bound - - def get_converter(self): - def lower_bound_converter(val): - converted = super(LowerBoundIntOption, self).get_converter()(val) - if converted < self.lower_bound: - raise ValueError("Invalid {} value: {} < {}".format( - self.name, val, self.lower_bound)) - return converted - return lower_bound_converter - - -class SpecialCasesLowerBoundIntOption(LowerBoundIntOption): - def __init__(self, name, lower_bound, special_cases_mapping): - super().__init__(name, lower_bound) - self.special_cases_mapping = special_cases_mapping - - def translate(self, val): - if val in self.special_cases_mapping: - return self.special_cases_mapping[val] - else: - return val - - -class JobsOption(SpecialCasesLowerBoundIntOption): - def __init__(self, name): - super().__init__(name, -1, {-1: multiprocessing.cpu_count()}) - - -class SelectOption(OptionBase): - def __init__(self, name, valid_values): - super().__init__(name) - self.valid_values = valid_values - - def get_converter(self): - def select_converter(val): - if val in self.valid_values: - return self.translate(val) - else: - raise ValueError("Invalid {} value: {}.".format( - self.name, val)) - return select_converter - - -class VerbosityOption(SelectOption): - def __init__(self): - super().__init__('verbosity', _VERBOSITY_VALUES) - - def translate(self, val): - name = 'VERBOSE_' + val - verbose = getattr(cdist.argparse, name) - return verbose - - -class DelimitedValuesOption(OptionBase): - def __init__(self, name, delimiter): - super().__init__(name) - self.delimiter = delimiter - - def get_converter(self): - def delimited_values_converter(val): - vals = re.split(r'(?. -# -# - -from cdist.core.cdist_type import CdistType -from cdist.core.cdist_type import InvalidTypeError -from cdist.core.cdist_object import CdistObject -from cdist.core.cdist_object import IllegalObjectIdError -from cdist.core.explorer import Explorer -from cdist.core.manifest import Manifest -from cdist.core.code import Code -from cdist.core.util import listdir -from cdist.core.util import log_level_env_var_val, log_level_name_env_var_val diff --git a/cdist/core/cdist_object.py b/cdist/core/cdist_object.py deleted file mode 100644 index 237f0ddd..00000000 --- a/cdist/core/cdist_object.py +++ /dev/null @@ -1,276 +0,0 @@ -# -*- coding: utf-8 -*- -# -# 2011-2017 Steven Armstrong (steven-cdist at armstrong.cc) -# 2011-2015 Nico Schottelius (nico-cdist at schottelius.org) -# 2014 Daniel Heule (hda at sfs.biz) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -import os - -import cdist -import cdist.core -from cdist.util import fsproperty - - -class IllegalObjectIdError(cdist.Error): - def __init__(self, object_id, message=None): - self.object_id = object_id - self.message = message or 'Illegal object id' - - def __str__(self): - return '%s: %s' % (self.message, self.object_id) - - -class MissingObjectIdError(cdist.Error): - def __init__(self, type_name): - self.type_name = type_name - self.message = ("Type %s requires object id (is not a " - "singleton type)") % self.type_name - - def __str__(self): - return '%s' % (self.message) - - -class CdistObject(object): - """Represents a cdist object. - - All interaction with objects in cdist should be done through this class. - Directly accessing an object through the file system from python code is - a bug. - - """ - - # Constants for use with Object.state - STATE_UNDEF = "" - STATE_PREPARED = "prepared" - STATE_RUNNING = "running" - STATE_DONE = "done" - - def __init__(self, cdist_type, base_path, object_marker, object_id): - self.cdist_type = cdist_type # instance of Type - self.base_path = base_path - self.object_id = object_id - - self.object_marker = object_marker - - self.validate_object_id() - self.sanitise_object_id() - - self.name = self.join_name(self.cdist_type.name, self.object_id) - self.path = os.path.join(self.cdist_type.path, self.object_id, - self.object_marker) - - self.absolute_path = os.path.join(self.base_path, self.path) - self.code_local_path = os.path.join(self.path, "code-local") - self.code_remote_path = os.path.join(self.path, "code-remote") - self.parameter_path = os.path.join(self.path, "parameter") - self.stdout_path = os.path.join(self.absolute_path, "stdout") - self.stderr_path = os.path.join(self.absolute_path, "stderr") - - @classmethod - def list_objects(cls, object_base_path, type_base_path, object_marker): - """Return a list of object instances""" - for object_name in cls.list_object_names( - object_base_path, object_marker): - type_name, object_id = cls.split_name(object_name) - yield cls(cdist.core.CdistType(type_base_path, type_name), - base_path=object_base_path, - object_marker=object_marker, - object_id=object_id) - - @classmethod - def list_object_names(cls, object_base_path, object_marker): - """Return a list of object names""" - for path, dirs, files in os.walk(object_base_path): - if object_marker in dirs: - yield os.path.relpath(path, object_base_path) - - @classmethod - def list_type_names(cls, object_base_path): - """Return a list of type names""" - return cdist.core.listdir(object_base_path) - - @staticmethod - def split_name(object_name): - """split_name('__type_name/the/object_id') - -> - ('__type_name', 'the/object_id') - - Split the given object name into it's type and object_id parts. - - """ - type_name = object_name.split(os.sep)[0] - object_id = os.sep.join(object_name.split(os.sep)[1:]) - return type_name, object_id - - @staticmethod - def join_name(type_name, object_id): - """join_name('__type_name', 'the/object_id') - -> - __type_name/the/object_id' - - Join the given type_name and object_id into an object name. - - """ - return os.path.join(type_name, object_id) - - def validate_object_id(self): - if self.cdist_type.is_singleton and self.object_id: - raise IllegalObjectIdError(('singleton objects can\'t have an ' - 'object_id')) - - """Validate the given object_id and raise IllegalObjectIdError - if it's not valid. - """ - if self.object_id: - if self.object_marker in self.object_id.split(os.sep): - raise IllegalObjectIdError( - self.object_id, ('object_id may not contain ' - '\'%s\'') % self.object_marker) - if '//' in self.object_id: - raise IllegalObjectIdError( - self.object_id, 'object_id may not contain //') - - _invalid_object_ids = ('.', '/', ) - for ioid in _invalid_object_ids: - if self.object_id == ioid: - raise IllegalObjectIdError( - self.object_id, - 'object_id may not be a {}'.format(ioid)) - - # If no object_id and type is not singleton => error out - if not self.object_id and not self.cdist_type.is_singleton: - raise MissingObjectIdError(self.cdist_type.name) - - # Does not work: - # AttributeError: - # 'CdistObject' object has no attribute 'parameter_path' - - # "Type %s is not a singleton type - missing object id - # (parameters: %s)" % (self.cdist_type.name, self.parameters)) - - def object_from_name(self, object_name): - """Convenience method for creating an object instance from an object - name. - - Mainly intended to create objects when resolving requirements. - - e.g: - .object_from_name('__other/object') -> - - - """ - - base_path = self.base_path - type_path = self.cdist_type.base_path - object_marker = self.object_marker - - type_name, object_id = self.split_name(object_name) - - cdist_type = self.cdist_type.__class__(type_path, type_name) - - return self.__class__(cdist_type, base_path, object_marker, - object_id=object_id) - - def __repr__(self): - return '' % self.name - - def __eq__(self, other): - """define equality as 'name is the same'""" - return self.name == other.name - - def __hash__(self): - return hash(self.name) - - def __lt__(self, other): - return isinstance(other, self.__class__) and self.name < other.name - - def sanitise_object_id(self): - """ - Remove leading and trailing slash (one only) - """ - - # Allow empty object id for singletons - if self.object_id: - # Remove leading slash - if self.object_id[0] == '/': - self.object_id = self.object_id[1:] - - # Remove trailing slash - if self.object_id[-1] == '/': - self.object_id = self.object_id[:-1] - - # FIXME: still needed? - @property - def explorer_path(self): - """Create and return the relative path to this objects explorers""" - # create absolute path - path = os.path.join(self.absolute_path, "explorer") - if not os.path.isdir(path): - os.mkdir(path) - # return relative path - return os.path.join(self.path, "explorer") - - requirements = fsproperty.FileListProperty( - lambda obj: os.path.join(obj.absolute_path, 'require')) - autorequire = fsproperty.FileListProperty( - lambda obj: os.path.join(obj.absolute_path, 'autorequire')) - parameters = fsproperty.DirectoryDictProperty( - lambda obj: os.path.join(obj.base_path, obj.parameter_path)) - explorers = fsproperty.DirectoryDictProperty( - lambda obj: os.path.join(obj.base_path, obj.explorer_path)) - state = fsproperty.FileStringProperty( - lambda obj: os.path.join(obj.absolute_path, "state")) - source = fsproperty.FileListProperty( - lambda obj: os.path.join(obj.absolute_path, "source")) - code_local = fsproperty.FileStringProperty( - lambda obj: os.path.join(obj.base_path, obj.code_local_path)) - code_remote = fsproperty.FileStringProperty( - lambda obj: os.path.join(obj.base_path, obj.code_remote_path)) - - @property - def exists(self): - """Checks wether this cdist object exists on the file systems.""" - return os.path.exists(self.absolute_path) - - def create(self, allow_overwrite=False): - """Create this cdist object on the filesystem. - """ - try: - for path in (self.absolute_path, - os.path.join(self.base_path, self.parameter_path), - self.stdout_path, - self.stderr_path): - os.makedirs(path, exist_ok=allow_overwrite) - except EnvironmentError as error: - raise cdist.Error(('Error creating directories for cdist object: ' - '%s: %s') % (self, error)) - - def requirements_unfinished(self, requirements): - """Return state whether requirements are satisfied""" - - object_list = [] - - for requirement in requirements: - cdist_object = self.object_from_name(requirement) - - if not cdist_object.state == self.STATE_DONE: - object_list.append(cdist_object) - - return object_list diff --git a/cdist/core/cdist_type.py b/cdist/core/cdist_type.py deleted file mode 100644 index 4500f50d..00000000 --- a/cdist/core/cdist_type.py +++ /dev/null @@ -1,298 +0,0 @@ -# -*- coding: utf-8 -*- -# -# 2011 Steven Armstrong (steven-cdist at armstrong.cc) -# 2011 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -import os -import cdist -import cdist.core -import logging - - -class InvalidTypeError(cdist.Error): - def __init__(self, name, type_path, type_absolute_path): - self.name = name - self.type_path = type_path - self.type_absolute_path = type_absolute_path - self.source_path = os.path.realpath(self.type_absolute_path) - - def __str__(self): - return "Invalid type '%s' at '%s' defined at '%s'" % ( - self.type_path, self.type_absolute_path, self.source_path) - - -class CdistType(object): - """Represents a cdist type. - - All interaction with types in cdist should be done through this class. - Directly accessing an type through the file system from python code is - a bug. - - """ - - log = logging.getLogger("cdist-type") - - def __init__(self, base_path, name): - self.base_path = base_path - self.name = name - self.path = self.name - self.absolute_path = os.path.join(self.base_path, self.path) - if not os.path.isdir(self.absolute_path): - raise InvalidTypeError(self.name, self.path, self.absolute_path) - self.manifest_path = os.path.join(self.name, "manifest") - self.explorer_path = os.path.join(self.name, "explorer") - self.gencode_local_path = os.path.join(self.name, "gencode-local") - self.gencode_remote_path = os.path.join(self.name, "gencode-remote") - self.manifest_path = os.path.join(self.name, "manifest") - - self.__explorers = None - self.__required_parameters = None - self.__required_multiple_parameters = None - self.__optional_parameters = None - self.__optional_multiple_parameters = None - self.__boolean_parameters = None - self.__parameter_defaults = None - self.__deprecated_parameters = None - - def __hash__(self): - return hash(self.name) - - @classmethod - def list_types(cls, base_path): - """Return a list of type instances""" - for name in cls.list_type_names(base_path): - try: - yield cls(base_path, name) - except InvalidTypeError as e: - # ignore invalid type, log warning and continue - msg = "Ignoring invalid type '%s' at '%s' defined at '%s'" % ( - e.type_path, e.type_absolute_path, e.source_path) - cls.log.warning(msg) - # remove invalid from runtime conf dir - os.remove(e.type_absolute_path) - - @classmethod - def list_type_names(cls, base_path): - """Return a list of type names""" - return cdist.core.listdir(base_path) - - _instances = {} - - def __getnewargs__(self): - return self.base_path, self.name - - def __new__(cls, *args, **kwargs): - """only one instance of each named type may exist""" - # name is second argument - name = args[1] - if name not in cls._instances: - instance = super(CdistType, cls).__new__(cls) - cls._instances[name] = instance - # return instance so __init__ is called - return cls._instances[name] - - def __repr__(self): - return '' % self.name - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.name == other.name - - def __lt__(self, other): - return isinstance(other, self.__class__) and self.name < other.name - - @property - def is_singleton(self): - """Check whether a type is a singleton.""" - return os.path.isfile(os.path.join(self.absolute_path, "singleton")) - - @property - def is_install(self): - """Check whether a type is used for installation - (if not: for configuration)""" - return os.path.isfile(os.path.join(self.absolute_path, "install")) - - @property - def is_nonparallel(self): - """Check whether a type is a non parallel, i.e. its objects - cannot run in parallel.""" - return os.path.isfile(os.path.join(self.absolute_path, "nonparallel")) - - @property - def deprecated(self): - """Get type deprecation message. If message is None then type - is not deprecated.""" - deprecated_path = os.path.join(self.absolute_path, "deprecated") - try: - with open(deprecated_path, 'r') as f: - return f.read() - except FileNotFoundError: - return None - - @property - def explorers(self): - """Return a list of available explorers""" - if not self.__explorers: - try: - self.__explorers = cdist.core.listdir( - os.path.join(self.absolute_path, "explorer")) - except EnvironmentError: - # error ignored - self.__explorers = [] - return self.__explorers - - @property - def required_parameters(self): - """Return a list of required parameters""" - if not self.__required_parameters: - parameters = [] - try: - with open(os.path.join(self.absolute_path, - "parameter", - "required")) as fd: - for line in fd: - line = line.strip() - if line: - parameters.append(line) - except EnvironmentError: - # error ignored - pass - finally: - self.__required_parameters = parameters - return self.__required_parameters - - @property - def required_multiple_parameters(self): - """Return a list of required multiple parameters""" - if not self.__required_multiple_parameters: - parameters = [] - try: - with open(os.path.join(self.absolute_path, - "parameter", - "required_multiple")) as fd: - for line in fd: - line = line.strip() - if line: - parameters.append(line) - except EnvironmentError: - # error ignored - pass - finally: - self.__required_multiple_parameters = parameters - return self.__required_multiple_parameters - - @property - def optional_parameters(self): - """Return a list of optional parameters""" - if not self.__optional_parameters: - parameters = [] - try: - with open(os.path.join(self.absolute_path, - "parameter", - "optional")) as fd: - for line in fd: - line = line.strip() - if line: - parameters.append(line) - except EnvironmentError: - # error ignored - pass - finally: - self.__optional_parameters = parameters - return self.__optional_parameters - - @property - def optional_multiple_parameters(self): - """Return a list of optional multiple parameters""" - if not self.__optional_multiple_parameters: - parameters = [] - try: - with open(os.path.join(self.absolute_path, - "parameter", - "optional_multiple")) as fd: - for line in fd: - line = line.strip() - if line: - parameters.append(line) - except EnvironmentError: - # error ignored - pass - finally: - self.__optional_multiple_parameters = parameters - return self.__optional_multiple_parameters - - @property - def boolean_parameters(self): - """Return a list of boolean parameters""" - if not self.__boolean_parameters: - parameters = [] - try: - with open(os.path.join(self.absolute_path, - "parameter", - "boolean")) as fd: - for line in fd: - line = line.strip() - if line: - parameters.append(line) - except EnvironmentError: - # error ignored - pass - finally: - self.__boolean_parameters = parameters - return self.__boolean_parameters - - @property - def parameter_defaults(self): - if not self.__parameter_defaults: - defaults = {} - try: - defaults_dir = os.path.join(self.absolute_path, - "parameter", - "default") - for name in cdist.core.listdir(defaults_dir): - try: - with open(os.path.join(defaults_dir, name)) as fd: - defaults[name] = fd.read().strip() - except EnvironmentError: - pass # Swallow errors raised by open() or read() - except EnvironmentError: - pass # Swallow error raised by os.listdir() - finally: - self.__parameter_defaults = defaults - return self.__parameter_defaults - - @property - def deprecated_parameters(self): - if not self.__deprecated_parameters: - deprecated = {} - try: - deprecated_dir = os.path.join(self.absolute_path, - "parameter", - "deprecated") - for name in cdist.core.listdir(deprecated_dir): - try: - with open(os.path.join(deprecated_dir, name)) as fd: - deprecated[name] = fd.read().strip() - except EnvironmentError: - pass # Swallow errors raised by open() or read() - except EnvironmentError: - pass # Swallow error raised by os.listdir() - finally: - self.__deprecated_parameters = deprecated - return self.__deprecated_parameters diff --git a/cdist/core/code.py b/cdist/core/code.py deleted file mode 100644 index 1550880a..00000000 --- a/cdist/core/code.py +++ /dev/null @@ -1,202 +0,0 @@ -# -*- coding: utf-8 -*- -# -# 2011-2017 Steven Armstrong (steven-cdist at armstrong.cc) -# 2011-2013 Nico Schottelius (nico-cdist at schottelius.org) -# 2014 Daniel Heule (hda at sfs.biz) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -import os -from . import util - - -''' -common: - runs only locally, does not need remote - - env: - PATH: prepend directory with type emulator symlinks == local.bin_path - __target_host: the target host we are working on - __target_hostname: the target hostname provided from __target_host - __target_fqdn: the target's fully qualified domain name provided from - __target_host - __cdist_manifest: full qualified path of the manifest == script - __cdist_type_base_path: full qualified path to the directory where - types are defined for use in type emulator - == local.type_path - -gencode-local - script: full qualified path to a types gencode-local - - env: - __target_host: the target host we are working on - __target_hostname: the target hostname provided from __target_host - __target_fqdn: the target's fully qualified domain name provided from - __target_host - __global: full qualified path to the global - output dir == local.out_path - __object: full qualified path to the object's dir - __object_id: the objects id - __object_fq: full qualified object id, iow: $type.name + / + object_id - __type: full qualified path to the type's dir - __files: full qualified path to the files dir - __target_host_tags: comma spearated list of host tags - - returns: string containing the generated code or None - -gencode-remote - script: full qualified path to a types gencode-remote - - env: - __target_host: the target host we are working on - __target_hostname: the target hostname provided from __target_host - __target_fqdn: the target's fully qualified domain name provided from - __target_host - __global: full qualified path to the global - output dir == local.out_path - __object: full qualified path to the object's dir - __object_id: the objects id - __object_fq: full qualified object id, iow: $type.name + / + object_id - __type: full qualified path to the type's dir - __files: full qualified path to the files dir - __target_host_tags: comma spearated list of host tags - - returns: string containing the generated code or None - - -code-local - script: full qualified path to object's code-local - - run script localy - returns: string containing the output - -code-remote - script: full qualified path to object's code-remote - - copy script to remote - - run script remotely - returns: string containing the output -''' - - -class Code(object): - """Generates and executes cdist code scripts. - - """ - # target_host is tuple (target_host, target_hostname, target_fqdn) - def __init__(self, target_host, local, remote, dry_run=False): - self.target_host = target_host - self.local = local - self.remote = remote - self.env = { - '__target_host': self.target_host[0], - '__target_hostname': self.target_host[1], - '__target_fqdn': self.target_host[2], - '__global': self.local.base_path, - '__files': self.local.files_path, - '__target_host_tags': self.local.target_host_tags, - '__cdist_log_level': util.log_level_env_var_val(local.log), - '__cdist_log_level_name': util.log_level_name_env_var_val( - local.log), - } - - if dry_run: - self.env['__cdist_dry_run'] = '1' - - def _run_gencode(self, cdist_object, which): - cdist_type = cdist_object.cdist_type - script = os.path.join(self.local.type_path, - getattr(cdist_type, 'gencode_%s_path' % which)) - if os.path.isfile(script): - env = os.environ.copy() - env.update(self.env) - env.update({ - '__type': cdist_object.cdist_type.absolute_path, - '__object': cdist_object.absolute_path, - '__object_id': cdist_object.object_id, - '__object_name': cdist_object.name, - }) - message_prefix = cdist_object.name - if self.local.save_output_streams: - stderr_path = os.path.join(cdist_object.stderr_path, - 'gencode-' + which) - with open(stderr_path, 'ba+') as stderr: - return self.local.run_script(script, env=env, - return_output=True, - message_prefix=message_prefix, - stderr=stderr) - else: - return self.local.run_script(script, env=env, - return_output=True, - message_prefix=message_prefix) - - def run_gencode_local(self, cdist_object): - """Run the gencode-local script for the given cdist object.""" - return self._run_gencode(cdist_object, 'local') - - def run_gencode_remote(self, cdist_object): - """Run the gencode-remote script for the given cdist object.""" - return self._run_gencode(cdist_object, 'remote') - - def transfer_code_remote(self, cdist_object): - """Transfer the code_remote script for the given object to the - remote side.""" - source = os.path.join(self.local.object_path, - cdist_object.code_remote_path) - destination = os.path.join(self.remote.object_path, - cdist_object.code_remote_path) - self.remote.mkdir(os.path.dirname(destination)) - self.remote.transfer(source, destination) - - def _run_code(self, cdist_object, which, env=None): - which_exec = getattr(self, which) - script = os.path.join(which_exec.object_path, - getattr(cdist_object, 'code_%s_path' % which)) - if which_exec.save_output_streams: - stderr_path = os.path.join(cdist_object.stderr_path, - 'code-' + which) - stdout_path = os.path.join(cdist_object.stdout_path, - 'code-' + which) - with open(stderr_path, 'ba+') as stderr, \ - open(stdout_path, 'ba+') as stdout: - return which_exec.run_script(script, env=env, stdout=stdout, - stderr=stderr) - else: - return which_exec.run_script(script, env=env) - - def run_code_local(self, cdist_object): - """Run the code-local script for the given cdist object.""" - # Put some env vars, to allow read only access to the parameters - # over $__object - env = os.environ.copy() - env.update(self.env) - env.update({ - '__object': cdist_object.absolute_path, - '__object_id': cdist_object.object_id, - }) - return self._run_code(cdist_object, 'local', env=env) - - def run_code_remote(self, cdist_object): - """Run the code-remote script for the given cdist object on the - remote side.""" - # Put some env vars, to allow read only access to the parameters - # over $__object which is already on the remote side - env = { - '__object': os.path.join(self.remote.object_path, - cdist_object.path), - '__object_id': cdist_object.object_id, - } - return self._run_code(cdist_object, 'remote', env=env) diff --git a/cdist/core/explorer.py b/cdist/core/explorer.py deleted file mode 100644 index 353d7681..00000000 --- a/cdist/core/explorer.py +++ /dev/null @@ -1,257 +0,0 @@ -# -*- coding: utf-8 -*- -# -# 2011 Steven Armstrong (steven-cdist at armstrong.cc) -# 2011 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -import logging -import os -import glob -import multiprocessing -import cdist -from cdist.mputil import mp_pool_run -from . import util - -''' -common: - runs only remotely, needs local and remote to construct paths - - env: - __explorer: full qualified path to other global explorers on - remote side - -> remote.global_explorer_path - -a global explorer is: - - a script - - executed on the remote side - - returns its output as a string - - env: - - creates: nothing, returns output - -type explorer is: - - a script - - executed on the remote side for each object instance - - returns its output as a string - - env: - __object: full qualified path to the object's remote dir - __object_id: the objects id - __object_fq: full qualified object id, iow: $type.name + / + object_id - __type_explorer: full qualified path to the other type explorers on - remote side - - creates: nothing, returns output - -''' - - -class Explorer(object): - """Executes cdist explorers. - - """ - def __init__(self, target_host, local, remote, jobs=None, dry_run=False): - self.target_host = target_host - - self._open_logger() - - self.local = local - self.remote = remote - self.env = { - '__target_host': self.target_host[0], - '__target_hostname': self.target_host[1], - '__target_fqdn': self.target_host[2], - '__explorer': self.remote.global_explorer_path, - '__target_host_tags': self.local.target_host_tags, - '__cdist_log_level': util.log_level_env_var_val(self.log), - '__cdist_log_level_name': util.log_level_name_env_var_val( - self.log), - } - - if dry_run: - self.env['__cdist_dry_run'] = '1' - - self._type_explorers_transferred = [] - self.jobs = jobs - - def _open_logger(self): - self.log = logging.getLogger(self.target_host[0]) - - # global - - def list_global_explorer_names(self): - """Return a list of global explorer names.""" - return glob.glob1(self.local.global_explorer_path, '*') - - def run_global_explorers(self, out_path): - """Run global explorers and save output to files in the given - out_path directory. - - """ - self.log.verbose("Running global explorers") - self.transfer_global_explorers() - if self.jobs is None: - self._run_global_explorers_seq(out_path) - else: - self._run_global_explorers_parallel(out_path) - - def _run_global_explorer(self, explorer, out_path): - try: - path = os.path.join(out_path, explorer) - output = self.run_global_explorer(explorer) - with open(path, 'w') as fd: - fd.write(output) - except cdist.Error as e: - local_path = os.path.join(self.local.global_explorer_path, - explorer) - stderr_path = os.path.join(self.local.stderr_base_path, "remote") - raise cdist.GlobalExplorerError(explorer, local_path, stderr_path, - e) - - def _run_global_explorers_seq(self, out_path): - self.log.debug("Running global explorers sequentially") - for explorer in self.list_global_explorer_names(): - self._run_global_explorer(explorer, out_path) - - def _run_global_explorers_parallel(self, out_path): - self.log.debug("Running global explorers in {} parallel jobs".format( - self.jobs)) - self.log.trace("Multiprocessing start method is {}".format( - multiprocessing.get_start_method())) - self.log.trace(("Starting multiprocessing Pool for global " - "explorers run")) - args = [ - (e, out_path, ) for e in self.list_global_explorer_names() - ] - mp_pool_run(self._run_global_explorer, args, jobs=self.jobs) - self.log.trace(("Multiprocessing run for global explorers " - "finished")) - - # logger is not pickable, so remove it when we pickle - def __getstate__(self): - state = self.__dict__.copy() - if 'log' in state: - del state['log'] - return state - - # recreate logger when we unpickle - def __setstate__(self, state): - self.__dict__.update(state) - self._open_logger() - - def transfer_global_explorers(self): - """Transfer the global explorers to the remote side.""" - self.remote.transfer(self.local.global_explorer_path, - self.remote.global_explorer_path, - self.jobs) - self.remote.run(["chmod", "0700", - "%s/*" % (self.remote.global_explorer_path)]) - - def run_global_explorer(self, explorer): - """Run the given global explorer and return it's output.""" - script = os.path.join(self.remote.global_explorer_path, explorer) - return self.remote.run_script(script, env=self.env, return_output=True) - - # type - - def list_type_explorer_names(self, cdist_type): - """Return a list of explorer names for the given type.""" - source = os.path.join(self.local.type_path, cdist_type.explorer_path) - try: - return glob.glob1(source, '*') - except EnvironmentError: - return [] - - def run_type_explorers(self, cdist_object, transfer_type_explorers=True): - """Run the type explorers for the given object and save their output - in the object. - - """ - self.log.verbose("Running type explorers for {}".format( - cdist_object.cdist_type)) - if transfer_type_explorers: - self.log.trace("Transferring type explorers for type: %s", - cdist_object.cdist_type) - self.transfer_type_explorers(cdist_object.cdist_type) - else: - self.log.trace(("No need for transferring type explorers for " - "type: %s"), - cdist_object.cdist_type) - self.log.trace("Transferring object parameters for object: %s", - cdist_object.name) - self.transfer_object_parameters(cdist_object) - cdist_type = cdist_object.cdist_type - for explorer in self.list_type_explorer_names(cdist_type): - self.log.trace("Running type explorer '%s' for object '%s'", - explorer, cdist_object.name) - try: - output = self.run_type_explorer(explorer, cdist_object) - cdist_object.explorers[explorer] = output - except cdist.Error as e: - path = os.path.join(self.local.type_path, - cdist_type.explorer_path, - explorer) - stderr_path = os.path.join(self.local.stderr_base_path, - "remote") - raise cdist.CdistObjectExplorerError( - cdist_object, explorer, path, stderr_path, e) - - def run_type_explorer(self, explorer, cdist_object): - """Run the given type explorer for the given object and return - it's output.""" - cdist_type = cdist_object.cdist_type - env = self.env.copy() - env.update({ - '__object': os.path.join(self.remote.object_path, - cdist_object.path), - '__object_id': cdist_object.object_id, - '__object_name': cdist_object.name, - '__object_fq': cdist_object.path, - '__type_explorer': os.path.join(self.remote.type_path, - cdist_type.explorer_path) - }) - script = os.path.join(self.remote.type_path, cdist_type.explorer_path, - explorer) - return self.remote.run_script(script, env=env, return_output=True) - - def transfer_type_explorers(self, cdist_type): - """Transfer the type explorers for the given type to the - remote side.""" - if cdist_type.explorers: - if cdist_type.name in self._type_explorers_transferred: - self.log.trace(("Skipping retransfer of type explorers " - "for: %s"), cdist_type) - else: - source = os.path.join(self.local.type_path, - cdist_type.explorer_path) - destination = os.path.join(self.remote.type_path, - cdist_type.explorer_path) - self.remote.transfer(source, destination) - self.remote.run(["chmod", "0700", "%s/*" % (destination)]) - self._type_explorers_transferred.append(cdist_type.name) - - def transfer_object_parameters(self, cdist_object): - """Transfer the parameters for the given object to the remote side.""" - if cdist_object.parameters: - source = os.path.join(self.local.object_path, - cdist_object.parameter_path) - destination = os.path.join(self.remote.object_path, - cdist_object.parameter_path) - self.remote.transfer(source, destination) diff --git a/cdist/core/manifest.py b/cdist/core/manifest.py deleted file mode 100644 index 07af0ef8..00000000 --- a/cdist/core/manifest.py +++ /dev/null @@ -1,214 +0,0 @@ -# -*- coding: utf-8 -*- -# -# 2011-2013 Steven Armstrong (steven-cdist at armstrong.cc) -# 2011-2013 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -import logging -import os - -import cdist -from . import util - -''' -common: - runs only locally, does not need remote - - env: - PATH: prepend directory with type emulator symlinks == local.bin_path - __target_host: the target host we are working on - __target_hostname: the target hostname provided from __target_host - __target_fqdn: the target's fully qualified domain name provided from - __target_host - __global: full qualified path to the global - output dir == local.out_path - __cdist_manifest: full qualified path of the manifest == script - __cdist_type_base_path: full qualified path to the directory where - types are defined for use in type emulator - == local.type_path - __files: full qualified path to the files dir - __target_host_tags: comma spearated list of host tags - -initial manifest is: - script: full qualified path to the initial manifest - - env: - __manifest: path to .../conf/manifest/ == local.manifest_path - - creates: new objects through type emulator - -type manifeste is: - script: full qualified path to the type manifest - - env: - __object: full qualified path to the object's dir - __object_id: the objects id - __object_fq: full qualified object id, iow: $type.name + / + object_id - __type: full qualified path to the type's dir - - creates: new objects through type emulator -''' - - -class NoInitialManifestError(cdist.Error): - """ - Display missing initial manifest: - - Display path if user given - - try to resolve link if it is a link - - Omit path if default (is a linked path in temp directory without - much help) - """ - - def __init__(self, manifest_path, user_supplied): - msg_header = "Initial manifest missing" - - if user_supplied: - if os.path.islink(manifest_path): - self.message = "%s: %s -> %s" % ( - msg_header, manifest_path, - os.path.realpath(manifest_path)) - else: - self.message = "%s: %s" % (msg_header, manifest_path) - else: - self.message = "%s" % (msg_header) - - def __str__(self): - return repr(self.message) - - -class Manifest(object): - """Executes cdist manifests. - - """ - def __init__(self, target_host, local, dry_run=False): - self.target_host = target_host - self.local = local - - self._open_logger() - - self.env = { - 'PATH': "%s:%s" % (self.local.bin_path, os.environ['PATH']), - # for use in type emulator - '__cdist_type_base_path': self.local.type_path, - '__global': self.local.base_path, - '__target_host': self.target_host[0], - '__target_hostname': self.target_host[1], - '__target_fqdn': self.target_host[2], - '__files': self.local.files_path, - '__target_host_tags': self.local.target_host_tags, - '__cdist_log_level': util.log_level_env_var_val(self.log), - '__cdist_log_level_name': util.log_level_name_env_var_val( - self.log), - } - - if dry_run: - self.env['__cdist_dry_run'] = '1' - - def _open_logger(self): - self.log = logging.getLogger(self.target_host[0]) - - # logger is not pickable, so remove it when we pickle - def __getstate__(self): - state = self.__dict__.copy() - if 'log' in state: - del state['log'] - return state - - # recreate logger when we unpickle - def __setstate__(self, state): - self.__dict__.update(state) - self._open_logger() - - def env_initial_manifest(self, initial_manifest): - env = os.environ.copy() - env.update(self.env) - env['__cdist_manifest'] = initial_manifest - env['__manifest'] = self.local.manifest_path - env['__explorer'] = self.local.global_explorer_out_path - - return env - - def run_initial_manifest(self, initial_manifest=None): - if not initial_manifest: - initial_manifest = self.local.initial_manifest - user_supplied = False - else: - user_supplied = True - - if not os.path.isfile(initial_manifest): - raise NoInitialManifestError(initial_manifest, user_supplied) - - message_prefix = "initialmanifest" - self.log.verbose("Running initial manifest " + initial_manifest) - which = "init" - if self.local.save_output_streams: - stderr_path = os.path.join(self.local.stderr_base_path, which) - stdout_path = os.path.join(self.local.stdout_base_path, which) - with open(stderr_path, 'ba+') as stderr, \ - open(stdout_path, 'ba+') as stdout: - self.local.run_script( - initial_manifest, - env=self.env_initial_manifest(initial_manifest), - message_prefix=message_prefix, - stdout=stdout, stderr=stderr) - else: - self.local.run_script( - initial_manifest, - env=self.env_initial_manifest(initial_manifest), - message_prefix=message_prefix) - - def env_type_manifest(self, cdist_object): - type_manifest = os.path.join(self.local.type_path, - cdist_object.cdist_type.manifest_path) - env = os.environ.copy() - env.update(self.env) - env.update({ - '__cdist_manifest': type_manifest, - '__manifest': self.local.manifest_path, - '__object': cdist_object.absolute_path, - '__object_id': cdist_object.object_id, - '__object_name': cdist_object.name, - '__type': cdist_object.cdist_type.absolute_path, - }) - - return env - - def run_type_manifest(self, cdist_object): - type_manifest = os.path.join(self.local.type_path, - cdist_object.cdist_type.manifest_path) - message_prefix = cdist_object.name - which = 'manifest' - if os.path.isfile(type_manifest): - self.log.verbose("Running type manifest %s for object %s", - type_manifest, cdist_object.name) - if self.local.save_output_streams: - stderr_path = os.path.join(cdist_object.stderr_path, which) - stdout_path = os.path.join(cdist_object.stdout_path, which) - with open(stderr_path, 'ba+') as stderr, \ - open(stdout_path, 'ba+') as stdout: - self.local.run_script( - type_manifest, - env=self.env_type_manifest(cdist_object), - message_prefix=message_prefix, - stdout=stdout, stderr=stderr) - else: - self.local.run_script( - type_manifest, - env=self.env_type_manifest(cdist_object), - message_prefix=message_prefix) diff --git a/cdist/core/util.py b/cdist/core/util.py deleted file mode 100644 index 64570d34..00000000 --- a/cdist/core/util.py +++ /dev/null @@ -1,45 +0,0 @@ -# -*- coding: utf-8 -*- -# -# 2017 Darko Poljak (darko.poljak at gmail.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -import os -import logging - - -def listdir(path='.', include_dot=False): - """os.listdir but do not include entries whose names begin with a dot('.') - if include_dot is False. - """ - if include_dot: - return os.listdir(path) - else: - return [x for x in os.listdir(path) if not _ishidden(x)] - - -def _ishidden(path): - return path[0] in ('.', b'.'[0]) - - -def log_level_env_var_val(log): - return str(log.getEffectiveLevel()) - - -def log_level_name_env_var_val(log): - return logging.getLevelName(log.getEffectiveLevel()) diff --git a/cdist/emulator.py b/cdist/emulator.py deleted file mode 100644 index 3cf82f84..00000000 --- a/cdist/emulator.py +++ /dev/null @@ -1,381 +0,0 @@ -# -*- coding: utf-8 -*- -# -# 2011-2015 Nico Schottelius (nico-cdist at schottelius.org) -# 2012-2013 Steven Armstrong (steven-cdist at armstrong.cc) -# 2014 Daniel Heule (hda at sfs.biz) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -import argparse -import logging -import os -import sys - -import cdist -from cdist import core -from cdist import flock - - -class MissingRequiredEnvironmentVariableError(cdist.Error): - def __init__(self, name): - self.name = name - self.message = ("Emulator requires the environment variable %s to be " - "setup" % self.name) - - def __str__(self): - return self.message - - -class DefaultList(list): - """Helper class to allow default values for optional_multiple parameters. - - @see https://groups.google.com/forum/#!msg/comp.lang.python/sAUvkJEDpRc/RnRymrzJVDYJ - """ - def __copy__(self): - return [] - - @classmethod - def create(cls, initial=None): - if initial: - return cls(initial.split('\n')) - - -class Emulator(object): - def __init__(self, argv, stdin=sys.stdin.buffer, env=os.environ): - self.argv = argv - self.stdin = stdin - self.env = env - - self.object_id = '' - - try: - self.global_path = self.env['__global'] - self.target_host = ( - self.env['__target_host'], - self.env['__target_hostname'], - self.env['__target_fqdn'] - ) - - # Internal variables - self.object_source = self.env['__cdist_manifest'] - self.type_base_path = self.env['__cdist_type_base_path'] - self.object_marker = self.env['__cdist_object_marker'] - - except KeyError as e: - raise MissingRequiredEnvironmentVariableError(e.args[0]) - - self.object_base_path = os.path.join(self.global_path, "object") - self.typeorder_path = os.path.join(self.global_path, "typeorder") - - self.type_name = os.path.basename(argv[0]) - self.cdist_type = core.CdistType(self.type_base_path, self.type_name) - - # If set then object alreay exists and this var holds existing - # requirements. - self._existing_reqs = None - - self.__init_log() - - def run(self): - """Emulate type commands (i.e. __file and co)""" - - self.commandline() - self.init_object() - - # locking for parallel execution - with flock.Flock(self.flock_path): - self.setup_object() - self.save_stdin() - self.record_requirements() - self.record_auto_requirements() - self.log.trace("Finished %s %s" % ( - self.cdist_object.path, self.parameters)) - - def __init_log(self): - """Setup logging facility""" - - if '__cdist_log_level' in self.env: - try: - loglevel = self.env['__cdist_log_level'] - level = int(loglevel) - except ValueError: - level = logging.WARNING - else: - level = logging.WARNING - try: - logging.root.setLevel(level) - except (ValueError, TypeError): - # if invalid __cdist_log_level value - logging.root.setLevel(logging.WARNING) - - self.log = logging.getLogger(self.target_host[0]) - - def commandline(self): - """Parse command line""" - - parser = argparse.ArgumentParser(add_help=False, - argument_default=argparse.SUPPRESS) - - for parameter in self.cdist_type.required_parameters: - argument = "--" + parameter - parser.add_argument(argument, dest=parameter, action='store', - required=True) - for parameter in self.cdist_type.required_multiple_parameters: - argument = "--" + parameter - parser.add_argument(argument, dest=parameter, action='append', - required=True) - for parameter in self.cdist_type.optional_parameters: - argument = "--" + parameter - default = self.cdist_type.parameter_defaults.get(parameter, None) - parser.add_argument(argument, dest=parameter, action='store', - required=False, default=default) - for parameter in self.cdist_type.optional_multiple_parameters: - argument = "--" + parameter - default = DefaultList.create( - self.cdist_type.parameter_defaults.get( - parameter, None)) - parser.add_argument(argument, dest=parameter, action='append', - required=False, default=default) - for parameter in self.cdist_type.boolean_parameters: - argument = "--" + parameter - parser.add_argument(argument, dest=parameter, - action='store_const', const='') - - # If not singleton support one positional parameter - if not self.cdist_type.is_singleton: - parser.add_argument("object_id", nargs=1) - - # And finally parse/verify parameter - self.args = parser.parse_args(self.argv[1:]) - self.log.trace('Args: %s' % self.args) - - def init_object(self): - # Initialize object - and ensure it is not in args - if self.cdist_type.is_singleton: - self.object_id = '' - else: - self.object_id = self.args.object_id[0] - del self.args.object_id - - # Instantiate the cdist object we are defining - self.cdist_object = core.CdistObject( - self.cdist_type, self.object_base_path, self.object_marker, - self.object_id) - lockfname = ('.' + self.cdist_type.name + - self.object_id + '_' + - self.object_marker + '.lock') - lockfname = lockfname.replace(os.sep, '_') - self.flock_path = os.path.join(self.object_base_path, lockfname) - - def _object_params_in_context(self): - ''' Get cdist_object parameters dict adopted by context. - Context consists of cdist_type boolean, optional, required, - optional_multiple and required_multiple parameters. If parameter - is multiple parameter then its value is a list. - This adaptation works on cdist_object.parameters which are read from - directory based dict where it is unknown what kind of data is in - file. If there is only one line in the file it is unknown if this - is a value of required/optional parameter or if it is one value of - multiple values parameter. - ''' - params = {} - if self.cdist_object.exists: - for param in self.cdist_object.parameters: - value = ('' if param in self.cdist_type.boolean_parameters - else self.cdist_object.parameters[param]) - if ((param in self.cdist_type.required_multiple_parameters or - param in self.cdist_type.optional_multiple_parameters) and - not isinstance(value, list)): - value = [value] - params[param] = value - return params - - def setup_object(self): - # Create object with given parameters - self.parameters = {} - for key, value in vars(self.args).items(): - if value is not None: - self.parameters[key] = value - - if self.cdist_object.exists and 'CDIST_OVERRIDE' not in self.env: - # Make existing requirements a set so that we can compare it - # later with new requirements. - self._existing_reqs = set(self.cdist_object.requirements) - obj_params = self._object_params_in_context() - if obj_params != self.parameters: - errmsg = ("Object %s already exists with conflicting " - "parameters:\n%s: %s\n%s: %s" % ( - self.cdist_object.name, - " ".join(self.cdist_object.source), - obj_params, - self.object_source, - self.parameters)) - raise cdist.Error(errmsg) - else: - if self.cdist_object.exists: - self.log.debug(('Object %s override forced with ' - 'CDIST_OVERRIDE'), self.cdist_object.name) - self.cdist_object.create(True) - else: - self.cdist_object.create() - self.cdist_object.parameters = self.parameters - # record the created object in typeorder file - with open(self.typeorder_path, 'a') as typeorderfile: - print(self.cdist_object.name, file=typeorderfile) - - # Record / Append source - self.cdist_object.source.append(self.object_source) - - chunk_size = 65536 - - def _read_stdin(self): - return self.stdin.read(self.chunk_size) - - def save_stdin(self): - """If something is written to stdin, save it in the object as - $__object/stdin so it can be accessed in manifest and gencode-* - scripts. - """ - if not self.stdin.isatty(): - try: - # go directly to file instead of using CdistObject's api - # as that does not support streaming - path = os.path.join(self.cdist_object.absolute_path, 'stdin') - with open(path, 'wb') as fd: - chunk = self._read_stdin() - while chunk: - fd.write(chunk) - chunk = self._read_stdin() - except EnvironmentError as e: - raise cdist.Error('Failed to read from stdin: %s' % e) - - def record_requirement(self, requirement): - """record requirement and return recorded requirement""" - - # Raises an error, if object cannot be created - try: - cdist_object = self.cdist_object.object_from_name(requirement) - except core.cdist_type.InvalidTypeError as e: - self.log.error(("%s requires object %s, but type %s does not" - " exist. Defined at %s" % ( - self.cdist_object.name, - requirement, e.name, self.object_source))) - raise - except core.cdist_object.MissingObjectIdError: - self.log.error(("%s requires object %s without object id." - " Defined at %s" % (self.cdist_object.name, - requirement, - self.object_source))) - raise - - self.log.debug("Recording requirement %s for %s", - requirement, self.cdist_object.name) - - # Save the sanitised version, not the user supplied one - # (__file//bar => __file/bar) - # This ensures pattern matching is done against sanitised list - self.cdist_object.requirements.append(cdist_object.name) - - return cdist_object.name - - def record_requirements(self): - """Record requirements.""" - - # Inject the predecessor, but not if its an override - # (this would leed to an circular dependency) - if ("CDIST_ORDER_DEPENDENCY" in self.env and - 'CDIST_OVERRIDE' not in self.env): - # load object name created befor this one from typeorder file ... - with open(self.typeorder_path, 'r') as typecreationfile: - typecreationorder = typecreationfile.readlines() - # get the type created before this one ... - try: - lastcreatedtype = typecreationorder[-2].strip() - # __object_name is the name of the object whose type - # manifest is currently executed - __object_name = self.env.get('__object_name', None) - if lastcreatedtype == __object_name: - self.log.debug(("Not injecting require for " - "CDIST_ORDER_DEPENDENCY: %s for %s," - " %s's type manifest is currently" - " being executed"), - lastcreatedtype, - self.cdist_object.name, - lastcreatedtype) - else: - if 'require' in self.env: - appendix = " " + lastcreatedtype - if appendix not in self.env['require']: - self.env['require'] += appendix - else: - self.env['require'] = lastcreatedtype - self.log.debug(("Injecting require for " - "CDIST_ORDER_DEPENDENCY: %s for %s"), - lastcreatedtype, - self.cdist_object.name) - except IndexError: - # if no second last line, we are on the first type, - # so do not set a requirement - pass - - reqs = set() - if "require" in self.env: - requirements = self.env['require'] - self.log.debug("reqs = " + requirements) - for requirement in requirements.split(" "): - # Ignore empty fields - probably the only field anyway - if len(requirement) == 0: - continue - object_name = self.record_requirement(requirement) - reqs.add(object_name) - if self._existing_reqs is not None: - # If object exists then compare existing and new requirements. - if self._existing_reqs != reqs: - warnmsg = ("Object {} already exists with requirements:\n" - "{}: {}\n" - "{}: {}\n" - "Dependency resolver could not handle dependencies " - "as expected.".format( - self.cdist_object.name, - " ".join(self.cdist_object.source), - self._existing_reqs, - self.object_source, - reqs - )) - self.log.warning(warnmsg) - - def record_auto_requirements(self): - """An object shall automatically depend on all objects that it - defined in it's type manifest. - """ - # __object_name is the name of the object whose type manifest is - # currently executed - __object_name = self.env.get('__object_name', None) - if __object_name: - # The object whose type manifest is currently run - parent = self.cdist_object.object_from_name(__object_name) - # The object currently being defined - current_object = self.cdist_object - # As parent defined current_object it shall automatically - # depend on it. - # But only if the user hasn't said otherwise. - # Must prevent circular dependencies. - if parent.name not in current_object.requirements: - self.log.debug("Recording autorequirement %s for %s", - current_object.name, parent.name) - parent.autorequire.append(current_object.name) diff --git a/cdist/exec/__init__.py b/cdist/exec/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/exec/local.py b/cdist/exec/local.py deleted file mode 100644 index f83c85df..00000000 --- a/cdist/exec/local.py +++ /dev/null @@ -1,400 +0,0 @@ -# -*- coding: utf-8 -*- -# -# 2011-2017 Steven Armstrong (steven-cdist at armstrong.cc) -# 2011-2015 Nico Schottelius (nico-cdist at schottelius.org) -# 2016-2017 Darko Poljak (darko.poljak at gmail.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -import os -import sys -import re -import subprocess -import shutil -import logging -import tempfile -import time -import datetime - -import cdist -import cdist.message -from cdist import core -import cdist.exec.util as util - -CONF_SUBDIRS_LINKED = ["explorer", "files", "manifest", "type", ] - - -class Local(object): - """Execute commands locally. - - All interaction with the local side should be done through this class. - Directly accessing the local side from python code is a bug. - - """ - def __init__(self, - target_host, - target_host_tags, - base_root_path, - host_dir_name, - exec_path=sys.argv[0], - initial_manifest=None, - add_conf_dirs=None, - cache_path_pattern=None, - quiet_mode=False, - configuration=None, - save_output_streams=True): - - self.target_host = target_host - if target_host_tags is None: - self.target_host_tags = "" - else: - self.target_host_tags = ",".join(target_host_tags) - self.hostdir = host_dir_name - self.base_path = os.path.join(base_root_path, "data") - - self.exec_path = exec_path - self.custom_initial_manifest = initial_manifest - self._add_conf_dirs = add_conf_dirs - self.cache_path_pattern = cache_path_pattern - self.quiet_mode = quiet_mode - if configuration: - self.configuration = configuration - else: - self.configuration = {} - self.save_output_streams = save_output_streams - - self._init_log() - self._init_permissions() - self.mkdir(self.base_path) - self._init_cache_dir(None) - self._init_paths() - self._init_object_marker() - self._init_conf_dirs() - - @property - def dist_conf_dir(self): - return os.path.abspath(os.path.join(os.path.dirname(cdist.__file__), - "conf")) - - @property - def home_dir(self): - return cdist.home_dir() - - def _init_log(self): - self.log = logging.getLogger(self.target_host[0]) - - # logger is not pickable, so remove it when we pickle - def __getstate__(self): - state = self.__dict__.copy() - if 'log' in state: - del state['log'] - return state - - # recreate logger when we unpickle - def __setstate__(self, state): - self.__dict__.update(state) - self._init_log() - - def _init_permissions(self): - # Setup file permissions using umask - os.umask(0o077) - - def _init_paths(self): - # Depending on out_path - self.bin_path = os.path.join(self.base_path, "bin") - self.conf_path = os.path.join(self.base_path, "conf") - self.global_explorer_out_path = os.path.join(self.base_path, - "explorer") - self.object_path = os.path.join(self.base_path, "object") - self.messages_path = os.path.join(self.base_path, "messages") - self.stdout_base_path = os.path.join(self.base_path, "stdout") - self.stderr_base_path = os.path.join(self.base_path, "stderr") - - # Depending on conf_path - self.files_path = os.path.join(self.conf_path, "files") - self.global_explorer_path = os.path.join(self.conf_path, "explorer") - self.manifest_path = os.path.join(self.conf_path, "manifest") - self.initial_manifest = (self.custom_initial_manifest or - os.path.join(self.manifest_path, "init")) - - self.type_path = os.path.join(self.conf_path, "type") - - def _init_object_marker(self): - self.object_marker_file = os.path.join(self.base_path, "object_marker") - - # Does not need to be secure - just randomly different from .cdist - self.object_marker_name = tempfile.mktemp(prefix='.cdist-', dir='') - - def _init_conf_dirs(self): - self.conf_dirs = [] - - self.conf_dirs.append(self.dist_conf_dir) - - # Is the default place for user created explorer, type and manifest - if self.home_dir: - self.conf_dirs.append(self.home_dir) - - # Add directories defined in the CDIST_PATH environment variable - # if 'CDIST_PATH' in os.environ: - # cdist_path_dirs = re.split(r'(?. -# -# - -import os -import glob -import subprocess -import logging -import multiprocessing - -import cdist -import cdist.exec.util as util -import cdist.util.ipaddr as ipaddr -from cdist.mputil import mp_pool_run - - -def _wrap_addr(addr): - """If addr is IPv6 then return addr wrapped between '[' and ']', - otherwise return it intact.""" - if ipaddr.is_ipv6(addr): - return "".join(("[", addr, "]", )) - else: - return addr - - -class DecodeError(cdist.Error): - def __init__(self, command): - self.command = command - - def __str__(self): - return "Cannot decode output of " + " ".join(self.command) - - -class Remote(object): - """Execute commands remotely. - - All interaction with the remote side should be done through this class. - Directly accessing the remote side from python code is a bug. - - """ - def __init__(self, - target_host, - remote_exec, - remote_copy, - base_path=None, - quiet_mode=None, - archiving_mode=None, - configuration=None, - stdout_base_path=None, - stderr_base_path=None, - save_output_streams=True): - self.target_host = target_host - self._exec = remote_exec - self._copy = remote_copy - - if base_path: - self.base_path = base_path - else: - self.base_path = "/var/lib/cdist" - self.quiet_mode = quiet_mode - self.archiving_mode = archiving_mode - if configuration: - self.configuration = configuration - else: - self.configuration = {} - self.save_output_streams = save_output_streams - - self.stdout_base_path = stdout_base_path - self.stderr_base_path = stderr_base_path - - self.conf_path = os.path.join(self.base_path, "conf") - self.object_path = os.path.join(self.base_path, "object") - - self.type_path = os.path.join(self.conf_path, "type") - self.global_explorer_path = os.path.join(self.conf_path, "explorer") - - self._open_logger() - - self._init_env() - - def _open_logger(self): - self.log = logging.getLogger(self.target_host[0]) - - # logger is not pickable, so remove it when we pickle - def __getstate__(self): - state = self.__dict__.copy() - if 'log' in state: - del state['log'] - return state - - # recreate logger when we unpickle - def __setstate__(self, state): - self.__dict__.update(state) - self._open_logger() - - def _init_env(self): - """Setup environment for scripts.""" - # FIXME: better do so in exec functions that require it! - os.environ['__remote_copy'] = self._copy - os.environ['__remote_exec'] = self._exec - - def create_files_dirs(self): - self.rmdir(self.base_path) - self.mkdir(self.base_path) - self.run(["chmod", "0700", self.base_path]) - self.mkdir(self.conf_path) - - def remove_files_dirs(self): - self.rmdir(self.base_path) - - def rmfile(self, path): - """Remove file on the remote side.""" - self.log.trace("Remote rm: %s", path) - self.run(["rm", "-f", path]) - - def rmdir(self, path): - """Remove directory on the remote side.""" - self.log.trace("Remote rmdir: %s", path) - self.run(["rm", "-rf", path]) - - def mkdir(self, path): - """Create directory on the remote side.""" - self.log.trace("Remote mkdir: %s", path) - self.run(["mkdir", "-p", path]) - - def extract_archive(self, path, mode): - """Extract archive path on the remote side.""" - import cdist.autil as autil - - self.log.trace("Remote extract archive: %s", path) - command = ["tar", "-x", "-m", "-C", ] - directory = os.path.dirname(path) - command.append(directory) - xopt = autil.get_extract_option(mode) - if xopt: - command.append(xopt) - command.append("-f") - command.append(path) - self.run(command) - - def _transfer_file(self, source, destination): - command = self._copy.split() - command.extend([source, '{0}:{1}'.format( - _wrap_addr(self.target_host[0]), destination)]) - self._run_command(command) - - def transfer(self, source, destination, jobs=None): - """Transfer a file or directory to the remote side.""" - self.log.trace("Remote transfer: %s -> %s", source, destination) - # self.rmdir(destination) - if os.path.isdir(source): - self.mkdir(destination) - used_archiving = False - if self.archiving_mode: - self.log.trace("Remote transfer in archiving mode") - import cdist.autil as autil - - # create archive - tarpath, fcnt = autil.tar(source, self.archiving_mode) - if tarpath is None: - self.log.trace(("Files count {} is lower than {} limit, " - "skipping archiving").format( - fcnt, autil.FILES_LIMIT)) - else: - self.log.trace(("Archiving mode, tarpath: %s, file count: " - "%s"), tarpath, fcnt) - # get archive name - tarname = os.path.basename(tarpath) - self.log.trace("Archiving mode tarname: %s", tarname) - # archive path at the remote - desttarpath = os.path.join(destination, tarname) - self.log.trace( - "Archiving mode desttarpath: %s", desttarpath) - # transfer archive to the remote side - self.log.trace("Archiving mode: transferring") - self._transfer_file(tarpath, desttarpath) - # extract archive at the remote - self.log.trace("Archiving mode: extracting") - self.extract_archive(desttarpath, self.archiving_mode) - # remove remote archive - self.log.trace("Archiving mode: removing remote archive") - self.rmfile(desttarpath) - # remove local archive - self.log.trace("Archiving mode: removing local archive") - os.remove(tarpath) - used_archiving = True - if not used_archiving: - self._transfer_dir(source, destination) - elif jobs: - raise cdist.Error("Source {} is not a directory".format(source)) - else: - self._transfer_file(source, destination) - - def _transfer_dir(self, source, destination): - command = self._copy.split() - for f in glob.glob1(source, '*'): - path = os.path.join(source, f) - command.extend([path]) - command.extend(['{0}:{1}'.format( - _wrap_addr(self.target_host[0]), destination)]) - self._run_command(command) - - def run_script(self, script, env=None, return_output=False, stdout=None, - stderr=None): - """Run the given script with the given environment on the remote side. - Return the output as a string. - - """ - - command = [ - self.configuration.get('remote_shell', "/bin/sh"), - "-e" - ] - command.append(script) - - return self.run(command, env=env, return_output=return_output, - stdout=stdout, stderr=stderr) - - def run(self, command, env=None, return_output=False, stdout=None, - stderr=None): - """Run the given command with the given environment on the remote side. - Return the output as a string. - - """ - # prefix given command with remote_exec - cmd = self._exec.split() - cmd.append(self.target_host[0]) - - # can't pass environment to remote side, so prepend command with - # variable declarations - - # cdist command prepended with variable assignments expects - # POSIX shell (bourne, bash) at the remote as user default shell. - # If remote user shell isn't POSIX shell, but for e.g. csh/tcsh - # then these var assignments are not var assignments for this - # remote shell, it tries to execute it as a command and fails. - # So really do this by default: - # /bin/sh -c 'export ; command' - # so that constructed remote command isn't dependent on remote - # shell. Do this only if env is not None. env breaks this. - # Explicitly use /bin/sh, because var assignments assume POSIX - # shell already. - # This leaves the posibility to write script that needs to be run - # remotely in e.g. csh and setting up CDIST_REMOTE_SHELL to e.g. - # /bin/csh will execute this script in the right way. - if env: - remote_env = [" export %s=%s;" % item for item in env.items()] - string_cmd = ("/bin/sh -c '" + " ".join(remote_env) + - " ".join(command) + "'") - cmd.append(string_cmd) - else: - cmd.extend(command) - return self._run_command(cmd, env=env, return_output=return_output, - stdout=stdout, stderr=stderr) - - def _run_command(self, command, env=None, return_output=False, stdout=None, - stderr=None): - """Run the given command with the given environment. - Return the output as a string. - - """ - assert isinstance(command, (list, tuple)), ( - "list or tuple argument expected, got: %s" % command) - - if return_output and stdout is not subprocess.PIPE: - self.log.debug("return_output is True, ignoring stdout") - - close_stdout = False - close_stderr = False - if self.save_output_streams: - if not return_output and stdout is None: - stdout = util.get_std_fd(self.stdout_base_path, 'remote') - close_stdout = True - if stderr is None: - stderr = util.get_std_fd(self.stderr_base_path, 'remote') - close_stderr = True - - # export target_host, target_hostname, target_fqdn - # for use in __remote_{exec,copy} scripts - os_environ = os.environ.copy() - os_environ['__target_host'] = self.target_host[0] - os_environ['__target_hostname'] = self.target_host[1] - os_environ['__target_fqdn'] = self.target_host[2] - - self.log.trace("Remote run: %s", command) - try: - if self.quiet_mode: - stderr = subprocess.DEVNULL - close_stderr = False - if return_output: - output = subprocess.check_output(command, env=os_environ, - stderr=stderr).decode() - else: - subprocess.check_call(command, env=os_environ, stdout=stdout, - stderr=stderr) - output = None - - if self.save_output_streams: - util.log_std_fd(self.log, command, stderr, 'Remote stderr') - util.log_std_fd(self.log, command, stdout, 'Remote stdout') - - return output - except (OSError, subprocess.CalledProcessError) as error: - raise cdist.Error(" ".join(command) + ": " + str(error.args[1])) - except UnicodeDecodeError: - raise DecodeError(command) - finally: - if close_stdout: - stdout.close() - if close_stderr: - stderr.close() diff --git a/cdist/exec/util.py b/cdist/exec/util.py deleted file mode 100644 index c96f757b..00000000 --- a/cdist/exec/util.py +++ /dev/null @@ -1,177 +0,0 @@ -# -*- coding: utf-8 -*- -# -# 2016-2017 Darko Poljak (darko.poljak at gmail.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -import subprocess -import os -from tempfile import TemporaryFile - -import cdist - - -# IMPORTANT: -# with the code below in python 3.5 when command is executed and error -# occurs then stderr is not captured. -# As it seems from documentation, it is only captured when using -# subprocess.run method with stderr=subprocess.PIPE and is captured -# into CompletedProcess resulting object or into CalledProcessError -# in case of error (only if specified capturing). -# -# If using PIPE then the run is slow. run method uses communicate method -# and internally it uses buffering. -# -# For now we will use capturing only stdout. stderr is written directly to -# stderr from child process. -# -# STDERR_UNSUPPORTED = '' -# -# -# def call_get_output(command, env=None): -# """Run the given command with the given environment. -# Return the tuple of stdout and stderr output as a byte strings. -# """ -# -# assert isinstance(command, (list, tuple)), ( -# "list or tuple argument expected, got: {}".format(command)) -# -# if sys.version_info >= (3, 5): -# return call_get_out_err(command, env) -# else: -# return (call_get_stdout(command, env), STDERR_UNSUPPORTED) -# -# -# def handle_called_process_error(err, command): -# if sys.version_info >= (3, 5): -# errout = err.stderr -# else: -# errout = STDERR_UNSUPPORTED -# raise cdist.Error("Command failed: " + " ".join(command) + -# " with returncode: {} and stdout: {}, stderr: {}".format( -# err.returncode, err.output, errout)) -# -# -# def call_get_stdout(command, env=None): -# """Run the given command with the given environment. -# Return the stdout output as a byte string, stderr is ignored. -# """ -# assert isinstance(command, (list, tuple)), ( -# "list or tuple argument expected, got: {}".format(command)) -# -# with TemporaryFile() as fout: -# subprocess.check_call(command, env=env, stdout=fout) -# fout.seek(0) -# output = fout.read() -# -# return output -# -# -# def call_get_out_err(command, env=None): -# """Run the given command with the given environment. -# Return the tuple of stdout and stderr output as a byte strings. -# """ -# assert isinstance(command, (list, tuple)), ( -# "list or tuple argument expected, got: {}".format(command)) -# -# with TemporaryFile() as fout, TemporaryFile() as ferr: -# subprocess.check_call(command, env=env, -# stdout=fout, stderr=ferr) -# fout.seek(0) -# ferr.seek(0) -# output = (fout.read(), ferr.read()) -# -# return output - -# -# The code below with bufsize=0 does not work either, communicate -# internally uses buffering. It works in case of error, but if everything -# is ok and there is no output in stderr then execution is very very slow. -# -# def _call_get_out_err(command, env=None): -# """Run the given command with the given environment. -# Return the tuple of stdout and stderr output as a byte strings. -# """ -# assert isinstance(command, (list, tuple)), ( -# "list or tuple argument expected, got: {}".format(command)) -# -# result = subprocess.run(command, env=env, bufsize=0, -# stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=True) -# -# return (result.stdout, result.stderr) - - -# Currently not used. -def call_get_output(command, env=None, stderr=None): - """Run the given command with the given environment. - Return the tuple of stdout and stderr output as a byte strings. - """ - - assert isinstance(command, (list, tuple)), ( - "list or tuple argument expected, got: {}".format(command)) - return (_call_get_stdout(command, env, stderr), None) - - -# Currently not used. -def handle_called_process_error(err, command): - # Currently, stderr is not captured. - # errout = None - # raise cdist.Error("Command failed: " + " ".join(command) + - # (" with returncode: {}\n" - # "stdout: {}\n" - # "stderr: {}").format( - # err.returncode, err.output, errout)) - if err.output: - output = err.output - else: - output = '' - raise cdist.Error(("Command failed: '{}'\n" - "return code: {}\n" - "---- BEGIN stdout ----\n" - "{}" + ("\n" if output else "") + - "---- END stdout ----").format( - " ".join(command), err.returncode, output)) - - -# Currently not used. -def _call_get_stdout(command, env=None, stderr=None): - """Run the given command with the given environment. - Return the stdout output as a byte string, stderr is ignored. - """ - assert isinstance(command, (list, tuple)), ( - "list or tuple argument expected, got: {}".format(command)) - - with TemporaryFile() as fout: - subprocess.check_call(command, env=env, stdout=fout, stderr=stderr) - fout.seek(0) - output = fout.read() - - return output - - -def get_std_fd(base_path, name): - path = os.path.join(base_path, name) - stdfd = open(path, 'ba+') - return stdfd - - -def log_std_fd(log, command, stdfd, prefix): - if stdfd is not None and stdfd != subprocess.DEVNULL: - stdfd.seek(0, 0) - log.trace("Command: {}; {}: {}".format( - command, prefix, stdfd.read().decode())) diff --git a/cdist/flock.py b/cdist/flock.py deleted file mode 100644 index d8bac916..00000000 --- a/cdist/flock.py +++ /dev/null @@ -1,58 +0,0 @@ -# -*- coding: utf-8 -*- -# -# 2017 Darko Poljak (darko.poljak at gmail.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -import fcntl -import logging -import os - - -log = logging.getLogger('cdist-flock') - - -class Flock(): - def __init__(self, path): - self.path = path - self.lockfd = None - - def flock(self): - log.debug('Acquiring lock on %s', self.path) - self.lockfd = open(self.path, 'w+') - fcntl.flock(self.lockfd, fcntl.LOCK_EX) - log.debug('Acquired lock on %s', self.path) - - def funlock(self): - log.debug('Releasing lock on %s', self.path) - fcntl.flock(self.lockfd, fcntl.LOCK_UN) - self.lockfd.close() - self.lockfd = None - try: - os.remove(self.path) - except FileNotFoundError: - pass - log.debug('Released lock on %s', self.path) - - def __enter__(self): - self.flock() - return self - - def __exit__(self, *args): - self.funlock() - return False diff --git a/cdist/hostsource.py b/cdist/hostsource.py deleted file mode 100644 index a7b8f0b4..00000000 --- a/cdist/hostsource.py +++ /dev/null @@ -1,76 +0,0 @@ -# -*- coding: utf-8 -*- -# -# 2016-2017 Darko Poljak (darko.poljak at gmail.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -import fileinput - - -def hostfile_process_line(line, strip_func=str.strip): - """Return entry from read line or None if no entry present.""" - if not line: - return None - # remove comment if present - comment_index = line.find('#') - if comment_index >= 0: - foo = line[:comment_index] - else: - foo = line - # remove leading and trailing whitespaces - foo = strip_func(foo) - # skip empty lines - if foo: - return foo - else: - return None - - -class HostSource(object): - """ - Host source object. - Source can be a sequence or filename (stdin if \'-\'). - In case of filename each line represents one host. - """ - def __init__(self, source): - self.source = source - - def _process_file_line(self, line): - return hostfile_process_line(line) - - def _hosts_from_sequence(self): - for host in self.source: - yield host - - def _hosts_from_file(self): - for line in fileinput.input(files=(self.source)): - host = self._process_file_line(line) - if host: - yield host - - def hosts(self): - if not self.source: - return - - if isinstance(self.source, str): - yield from self._hosts_from_file() - else: - yield from self._hosts_from_sequence() - - def __call__(self): - yield from self.hosts() diff --git a/cdist/install.py b/cdist/install.py deleted file mode 100644 index b88ad016..00000000 --- a/cdist/install.py +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# -# 2013 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -import cdist.config -import cdist.core - - -class Install(cdist.config.Config): - def object_list(self): - """Short name for object list retrieval. - In install mode, we only care about install objects. - """ - for cdist_object in cdist.core.CdistObject.list_objects( - self.local.object_path, self.local.type_path, - self.local.object_marker_name): - if cdist_object.cdist_type.is_install: - yield cdist_object - else: - self.log.debug("Running in install mode, ignoring non install" - "object: {0}".format(cdist_object)) diff --git a/cdist/integration.py b/cdist/integration.py deleted file mode 100644 index ee742cc5..00000000 --- a/cdist/integration.py +++ /dev/null @@ -1,155 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# -# 2017 Darko Poljak (darko.poljak at gmail.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -import cdist -# needed for cdist.argparse -import cdist.banner -import cdist.config -import cdist.install -import cdist.shell -import cdist.inventory -import cdist.argparse -import cdist.log -import cdist.config -import cdist.install -import sys -import os -import os.path -import collections -import uuid -import shutil - - -def find_cdist_exec_in_path(): - """Search cdist executable in os.get_exec_path() entries. - """ - for path in os.get_exec_path(): - cdist_path = os.path.join(path, 'cdist') - if os.access(cdist_path, os.X_OK): - return cdist_path - return None - - -_mydir = os.path.dirname(__file__) - - -def find_cdist_exec(): - """Search cdist executable starting from local lib directory. - - Detect if ../scripts/cdist (from local lib direcotry) exists and - if it is executable. If not then try to find cdist exec path in - os.get_exec_path() entries. If no cdist path is found rasie - cdist.Error. - """ - cdist_path = os.path.abspath(os.path.join(_mydir, '..', 'scripts', - 'cdist')) - if os.access(cdist_path, os.X_OK): - return cdist_path - cdist_path = find_cdist_exec_in_path() - if not cdist_path: - raise cdist.Error('Cannot find cdist executable from local lib ' - 'directory: {}, nor in PATH: {}.'.format( - _mydir, os.environ.get('PATH'))) - return cdist_path - - -ACTION_CONFIG = 'config' -ACTION_INSTALL = 'install' - - -def _process_hosts_simple(action, host, manifest, verbose, - cdist_path=None): - """Perform cdist action ('config' or 'install') on hosts with specified - manifest using default other cdist options. host parameter can be a - string or iterbale of hosts. verbose is a desired verbosity level - which defaults to VERBOSE_INFO. cdist_path is path to cdist executable, - if it is None then integration lib tries to find it. - """ - if isinstance(host, str): - hosts = [host, ] - elif isinstance(host, collections.Iterable): - hosts = host - else: - raise cdist.Error('Invalid host argument: {}'.format(host)) - - # Setup sys.argv[0] since cdist relies on command line invocation. - if not cdist_path: - cdist_path = find_cdist_exec() - sys.argv[0] = cdist_path - - cname = action.title() - module = getattr(cdist, action) - theclass = getattr(module, cname) - - # Build argv for cdist and use argparse for argument parsing. - remote_out_dir_base = os.path.join('/', 'var', 'lib', 'cdist') - uid = str(uuid.uuid1()) - out_dir = remote_out_dir_base + uid - cache_path_pattern = '%h-' + uid - argv = [action, '-i', manifest, '-r', out_dir, '-C', cache_path_pattern, ] - for i in range(verbose): - argv.append('-v') - for x in hosts: - argv.append(x) - - parser, cfg = cdist.argparse.parse_and_configure(argv, singleton=False) - args = cfg.get_args() - configuration = cfg.get_config(section='GLOBAL') - - theclass.construct_remote_exec_copy_patterns(args) - base_root_path = theclass.create_base_root_path(None) - - for target_host in args.host: - host_base_path, hostdir = theclass.create_host_base_dirs( - target_host, base_root_path) - theclass.onehost(target_host, None, host_base_path, hostdir, args, - parallel=False, configuration=configuration, - remove_remote_files_dirs=True) - shutil.rmtree(base_root_path) - - -def configure_hosts_simple(host, manifest, - verbose=cdist.argparse.VERBOSE_INFO, - cdist_path=None): - """Configure hosts with specified manifest using default other cdist - options. host parameter can be a string or iterbale of hosts. verbose - is a desired verbosity level which defaults to VERBOSE_INFO. - cdist_path is path to cdist executable, if it is None then integration - lib tries to find it. - """ - _process_hosts_simple(action=ACTION_CONFIG, host=host, - manifest=manifest, verbose=verbose, - cdist_path=cdist_path) - - -def install_hosts_simple(host, manifest, - verbose=cdist.argparse.VERBOSE_INFO, - cdist_path=None): - """Install hosts with specified manifest using default other cdist - options. host parameter can be a string or iterbale of hosts. verbose - is a desired verbosity level which defaults to VERBOSE_INFO. - cdist_path is path to cdist executable, if it is None then integration - lib tries to find it. - """ - _process_hosts_simple(action=ACTION_INSTALL, host=host, - manifest=manifest, verbose=verbose, - cdist_path=cdist_path) diff --git a/cdist/inventory.py b/cdist/inventory.py deleted file mode 100644 index 138a2034..00000000 --- a/cdist/inventory.py +++ /dev/null @@ -1,405 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# -# 2016 Darko Poljak (darko.poljak at gmail.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -import cdist -import logging -import os -import os.path -import itertools -import sys -import cdist.configuration -from cdist.hostsource import hostfile_process_line - -DIST_INVENTORY_DB_NAME = "inventory" - -dist_inventory_db = os.path.abspath(os.path.join( - os.path.dirname(cdist.__file__), DIST_INVENTORY_DB_NAME)) - - -def determine_default_inventory_dir(args, configuration): - # The order of inventory dir setting by decreasing priority - # 1. inventory_dir from configuration - # 2. ~/.cdist/inventory if HOME env var is set - # 3. distribution inventory directory - inventory_dir_set = False - if 'inventory_dir' in configuration: - val = configuration['inventory_dir'] - if val: - args.inventory_dir = val - inventory_dir_set = True - if not inventory_dir_set: - home = cdist.home_dir() - if home: - args.inventory_dir = os.path.join(home, DIST_INVENTORY_DB_NAME) - else: - args.inventory_dir = dist_inventory_db - - -def contains_all(big, little): - """Return True if big contains all elements from little, - False otherwise. - """ - return set(little).issubset(set(big)) - - -def contains_any(big, little): - """Return True if big contains any element from little, - False otherwise. - """ - for x in little: - if x in big: - return True - return False - - -def check_always_true(x, y): - return True - - -def rstrip_nl(s): - '''str.rstrip "\n" from s''' - return str.rstrip(s, "\n") - - -class Inventory(object): - """Inventory main class""" - - def __init__(self, db_basedir=dist_inventory_db, configuration=None): - self.db_basedir = db_basedir - if configuration: - self.configuration = configuration - else: - self.configuration = {} - self.log = logging.getLogger("inventory") - self.init_db() - - def init_db(self): - self.log.trace("Init db: {}".format(self.db_basedir)) - if not os.path.exists(self.db_basedir): - os.makedirs(self.db_basedir, exist_ok=True) - elif not os.path.isdir(self.db_basedir): - raise cdist.Error(("Invalid inventory db basedir \'{}\'," - " must be a directory").format(self.db_basedir)) - - @staticmethod - def strlist_to_list(slist): - if slist: - result = [x for x in slist.split(',') if x] - else: - result = [] - return result - - def _input_values(self, source): - """Yield input values from source. - Source can be a sequence or filename (stdin if '-'). - In case of filename each line represents one input value. - """ - if isinstance(source, str): - import fileinput - try: - with fileinput.FileInput(files=(source)) as f: - for x in f: - result = hostfile_process_line(x, strip_func=rstrip_nl) - if result: - yield result - except (IOError, OSError) as e: - raise cdist.Error("Error reading from \'{}\'".format( - source)) - else: - if source: - for x in source: - if x: - yield x - - def _host_path(self, host): - hostpath = os.path.join(self.db_basedir, host) - return hostpath - - def _all_hosts(self): - return os.listdir(self.db_basedir) - - def _check_host(self, hostpath): - if not os.path.exists(hostpath): - return False - else: - if not os.path.isfile(hostpath): - raise cdist.Error(("Host path \'{}\' exists, but is not" - " a valid file").format(hostpath)) - return True - - def _read_host_tags(self, hostpath): - result = set() - with open(hostpath, "rt") as f: - for tag in f: - tag = tag.rstrip("\n") - if tag: - result.add(tag) - return result - - def _get_host_tags(self, host): - hostpath = self._host_path(host) - if self._check_host(hostpath): - return self._read_host_tags(hostpath) - else: - return None - - def _write_host_tags(self, host, tags): - hostpath = self._host_path(host) - if self._check_host(hostpath): - with open(hostpath, "wt") as f: - for tag in tags: - f.write("{}\n".format(tag)) - return True - else: - return False - - @classmethod - def commandline(cls, args): - """Manipulate inventory db""" - log = logging.getLogger("inventory") - if 'taglist' in args: - args.taglist = cls.strlist_to_list(args.taglist) - - cfg = cdist.configuration.Configuration(args) - configuration = cfg.get_config(section='GLOBAL') - determine_default_inventory_dir(args, configuration) - - log.debug("Using inventory: {}".format(args.inventory_dir)) - log.trace("Inventory args: {}".format(vars(args))) - log.trace("Inventory command: {}".format(args.subcommand)) - - if args.subcommand == "list": - c = InventoryList(hosts=args.host, istag=args.tag, - hostfile=args.hostfile, - db_basedir=args.inventory_dir, - list_only_host=args.list_only_host, - has_all_tags=args.has_all_tags, - configuration=configuration) - elif args.subcommand == "add-host": - c = InventoryHost(hosts=args.host, hostfile=args.hostfile, - db_basedir=args.inventory_dir, - configuration=configuration) - elif args.subcommand == "del-host": - c = InventoryHost(hosts=args.host, hostfile=args.hostfile, - all=args.all, db_basedir=args.inventory_dir, - action="del", configuration=configuration) - elif args.subcommand == "add-tag": - c = InventoryTag(hosts=args.host, tags=args.taglist, - hostfile=args.hostfile, tagfile=args.tagfile, - db_basedir=args.inventory_dir, - configuration=configuration) - elif args.subcommand == "del-tag": - c = InventoryTag(hosts=args.host, tags=args.taglist, - hostfile=args.hostfile, tagfile=args.tagfile, - all=args.all, db_basedir=args.inventory_dir, - action="del", configuration=configuration) - else: - raise cdist.Error("Unknown inventory command \'{}\'".format( - args.subcommand)) - c.run() - - -class InventoryList(Inventory): - def __init__(self, hosts=None, istag=False, hostfile=None, - list_only_host=False, has_all_tags=False, - db_basedir=dist_inventory_db, configuration=None): - super().__init__(db_basedir, configuration) - self.hosts = hosts - self.istag = istag - self.hostfile = hostfile - self.list_only_host = list_only_host - self.has_all_tags = has_all_tags - - def _print(self, host, tags): - if self.list_only_host: - print("{}".format(host)) - else: - print("{} {}".format(host, ",".join(sorted(tags)))) - - def _do_list(self, it_tags, it_hosts, check_func): - if (it_tags is not None): - param_tags = set(it_tags) - self.log.trace("param_tags: {}".format(param_tags)) - else: - param_tags = set() - for host in it_hosts: - self.log.trace("host: {}".format(host)) - tags = self._get_host_tags(host) - if tags is None: - self.log.debug("Host \'{}\' not found, skipped".format(host)) - continue - self.log.trace("tags: {}".format(tags)) - if check_func(tags, param_tags): - yield host, tags - - def entries(self): - if not self.hosts and not self.hostfile: - self.log.trace("Listing all hosts") - it_hosts = self._all_hosts() - it_tags = None - check_func = check_always_true - else: - it = itertools.chain(self._input_values(self.hosts), - self._input_values(self.hostfile)) - if self.istag: - self.log.trace("Listing by tag(s)") - it_hosts = self._all_hosts() - it_tags = it - if self.has_all_tags: - check_func = contains_all - else: - check_func = contains_any - else: - self.log.trace("Listing by host(s)") - it_hosts = it - it_tags = None - check_func = check_always_true - for host, tags in self._do_list(it_tags, it_hosts, check_func): - yield host, tags - - def host_entries(self): - for host, tags in self.entries(): - yield host - - def run(self): - for host, tags in self.entries(): - self._print(host, tags) - - -class InventoryHost(Inventory): - def __init__(self, hosts=None, hostfile=None, - db_basedir=dist_inventory_db, all=False, action="add", - configuration=None): - super().__init__(db_basedir, configuration) - self.actions = ("add", "del") - if action not in self.actions: - raise cdist.Error("Invalid action \'{}\', valid actions are:" - " {}\n".format(action, self.actions.keys())) - self.action = action - self.hosts = hosts - self.hostfile = hostfile - self.all = all - - if not self.hosts and not self.hostfile: - self.hostfile = "-" - - def _new_hostpath(self, hostpath): - # create empty file - with open(hostpath, "w"): - pass - - def _action(self, host): - if self.action == "add": - self.log.debug("Adding host \'{}\'".format(host)) - elif self.action == "del": - self.log.debug("Deleting host \'{}\'".format(host)) - hostpath = self._host_path(host) - self.log.trace("hostpath: {}".format(hostpath)) - if self.action == "add" and not os.path.exists(hostpath): - self._new_hostpath(hostpath) - else: - if not os.path.isfile(hostpath): - raise cdist.Error(("Host path \'{}\' is" - " not a valid file").format(hostpath)) - if self.action == "del": - os.remove(hostpath) - - def run(self): - if self.action == "del" and self.all: - self.log.trace("Doing for all hosts") - it = self._all_hosts() - else: - self.log.trace("Doing for specified hosts") - it = itertools.chain(self._input_values(self.hosts), - self._input_values(self.hostfile)) - for host in it: - self._action(host) - - -class InventoryTag(Inventory): - def __init__(self, hosts=None, tags=None, hostfile=None, tagfile=None, - db_basedir=dist_inventory_db, all=False, action="add", - configuration=None): - super().__init__(db_basedir, configuration) - self.actions = ("add", "del") - if action not in self.actions: - raise cdist.Error("Invalid action \'{}\', valid actions are:" - " {}\n".format(action, self.actions.keys())) - self.action = action - self.hosts = hosts - self.tags = tags - self.hostfile = hostfile - self.tagfile = tagfile - self.all = all - - if not self.hosts and not self.hostfile: - self.allhosts = True - else: - self.allhosts = False - if not self.tags and not self.tagfile: - self.tagfile = "-" - - if self.hostfile == "-" and self.tagfile == "-": - raise cdist.Error("Cannot read both, hosts and tags, from stdin") - - def _read_input_tags(self): - self.input_tags = set() - for tag in itertools.chain(self._input_values(self.tags), - self._input_values(self.tagfile)): - self.input_tags.add(tag) - - def _action(self, host): - host_tags = self._get_host_tags(host) - if host_tags is None: - print("Host \'{}\' does not exist, skipping".format(host), - file=sys.stderr) - return - self.log.trace("existing host_tags: {}".format(host_tags)) - if self.action == "del" and self.all: - host_tags = set() - else: - for tag in self.input_tags: - if self.action == "add": - self.log.debug("Adding tag \'{}\' for host \'{}\'".format( - tag, host)) - host_tags.add(tag) - elif self.action == "del": - self.log.debug("Deleting tag \'{}\' for host " - "\'{}\'".format(tag, host)) - if tag in host_tags: - host_tags.remove(tag) - self.log.trace("new host tags: {}".format(host_tags)) - if not self._write_host_tags(host, host_tags): - self.log.trace("{} does not exist, skipped".format(host)) - - def run(self): - if self.allhosts: - self.log.trace("Doing for all hosts") - it = self._all_hosts() - else: - self.log.trace("Doing for specified hosts") - it = itertools.chain(self._input_values(self.hosts), - self._input_values(self.hostfile)) - if not(self.action == "del" and self.all): - self._read_input_tags() - for host in it: - self._action(host) diff --git a/cdist/log.py b/cdist/log.py deleted file mode 100644 index 5d431130..00000000 --- a/cdist/log.py +++ /dev/null @@ -1,140 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# -# 2010-2013 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -import logging -import sys -import datetime - - -# Define additional cdist logging levels. -logging.OFF = logging.CRITICAL + 10 # disable logging -logging.addLevelName(logging.OFF, 'OFF') - -logging.VERBOSE = logging.INFO - 5 -logging.addLevelName(logging.VERBOSE, 'VERBOSE') - - -def _verbose(msg, *args, **kwargs): - logging.log(logging.VERBOSE, msg, *args, **kwargs) - - -logging.verbose = _verbose - -logging.TRACE = logging.DEBUG - 5 -logging.addLevelName(logging.TRACE, 'TRACE') - - -def _trace(msg, *args, **kwargs): - logging.log(logging.TRACE, msg, *args, **kwargs) - - -logging.trace = _trace - - -class DefaultLog(logging.Logger): - - FORMAT = '%(levelname)s: %(message)s' - - class StdoutFilter(logging.Filter): - def filter(self, rec): - return rec.levelno != logging.ERROR - - class StderrFilter(logging.Filter): - def filter(self, rec): - return rec.levelno == logging.ERROR - - def __init__(self, name): - super().__init__(name) - - formatter = logging.Formatter(self.FORMAT) - - self.addFilter(self) - - stdout_handler = logging.StreamHandler(sys.stdout) - stdout_handler.addFilter(self.StdoutFilter()) - stdout_handler.setLevel(logging.TRACE) - stdout_handler.setFormatter(formatter) - - stderr_handler = logging.StreamHandler(sys.stderr) - stderr_handler.addFilter(self.StderrFilter()) - stderr_handler.setLevel(logging.ERROR) - stderr_handler.setFormatter(formatter) - - self.addHandler(stdout_handler) - self.addHandler(stderr_handler) - - def filter(self, record): - """Prefix messages with logger name""" - - record.msg = self.name + ": " + str(record.msg) - - return True - - def verbose(self, msg, *args, **kwargs): - self.log(logging.VERBOSE, msg, *args, **kwargs) - - def trace(self, msg, *args, **kwargs): - self.log(logging.TRACE, msg, *args, **kwargs) - - -class TimestampingLog(DefaultLog): - - def filter(self, record): - """Add timestamp to messages""" - - super().filter(record) - now = datetime.datetime.now() - timestamp = now.strftime("%Y%m%d%H%M%S.%f") - record.msg = "[" + timestamp + "] " + str(record.msg) - - return True - - -class ParallelLog(DefaultLog): - FORMAT = '%(levelname)s: [%(process)d]: %(message)s' - - -class TimestampingParallelLog(TimestampingLog, ParallelLog): - pass - - -def setupDefaultLogging(): - del logging.getLogger().handlers[:] - logging.setLoggerClass(DefaultLog) - - -def setupTimestampingLogging(): - del logging.getLogger().handlers[:] - logging.setLoggerClass(TimestampingLog) - - -def setupTimestampingParallelLogging(): - del logging.getLogger().handlers[:] - logging.setLoggerClass(TimestampingParallelLog) - - -def setupParallelLogging(): - del logging.getLogger().handlers[:] - logging.setLoggerClass(ParallelLog) - - -setupDefaultLogging() diff --git a/cdist/message.py b/cdist/message.py deleted file mode 100644 index 450fc3c3..00000000 --- a/cdist/message.py +++ /dev/null @@ -1,77 +0,0 @@ -# -*- coding: utf-8 -*- -# -# 2013 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -import logging -import os -import shutil -import tempfile - -log = logging.getLogger(__name__) - - -class Message(object): - """Support messaging between types - - """ - def __init__(self, prefix, messages): - self.prefix = prefix - self.global_messages = messages - - in_fd, self.messages_in = tempfile.mkstemp(suffix='.cdist_message_in') - out_fd, self.messages_out = tempfile.mkstemp( - suffix='.cdist_message_out') - - os.close(in_fd) - os.close(out_fd) - - self._copy_messages() - - @property - def env(self): - env = {} - env['__messages_in'] = self.messages_in - env['__messages_out'] = self.messages_out - - return env - - def _copy_messages(self): - """Copy global contents into our copy""" - shutil.copyfile(self.global_messages, self.messages_in) - - def _cleanup(self): - """remove temporary files""" - if os.path.exists(self.messages_in): - os.remove(self.messages_in) - if os.path.exists(self.messages_out): - os.remove(self.messages_out) - - def _merge_messages(self): - """merge newly written lines into global file""" - with open(self.messages_out) as fd: - content = fd.readlines() - - with open(self.global_messages, 'a') as fd: - for line in content: - fd.write("%s:%s" % (self.prefix, line)) - - def merge_messages(self): - self._merge_messages() - self._cleanup() diff --git a/cdist/mputil.py b/cdist/mputil.py deleted file mode 100644 index 56fcfe39..00000000 --- a/cdist/mputil.py +++ /dev/null @@ -1,65 +0,0 @@ -# -*- coding: utf-8 -*- -# -# 2016-2017 Darko Poljak (darko.poljak at gmail.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - - -import multiprocessing -import concurrent.futures as cf -import itertools -import os -import signal -import logging - - -log = logging.getLogger("cdist-mputil") - - -def mp_sig_handler(signum, frame): - log.trace("signal %s, SIGKILL whole process group", signum) - os.killpg(os.getpgrp(), signal.SIGKILL) - - -def mp_pool_run(func, args=None, kwds=None, jobs=multiprocessing.cpu_count()): - """Run func using concurrent.futures.ProcessPoolExecutor with jobs jobs - and supplied iterables of args and kwds with one entry for each - parallel func instance. - Return list of results. - """ - if args and kwds: - fargs = zip(args, kwds) - elif args: - fargs = zip(args, itertools.repeat({})) - elif kwds: - fargs = zip(itertools.repeat(()), kwds) - else: - return [func(), ] - - retval = [] - with cf.ProcessPoolExecutor(jobs) as executor: - try: - results = [ - executor.submit(func, *a, **k) for a, k in fargs - ] - for f in cf.as_completed(results): - retval.append(f.result()) - return retval - except KeyboardInterrupt: - mp_sig_handler(signal.SIGINT, None) - raise diff --git a/cdist/shell.py b/cdist/shell.py deleted file mode 100644 index 60b6a9f0..00000000 --- a/cdist/shell.py +++ /dev/null @@ -1,98 +0,0 @@ -# -*- coding: utf-8 -*- -# -# 2013-2015 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -import logging -import os -import tempfile - -# initialise cdist -import cdist.exec.local - - -import cdist.config - -log = logging.getLogger(__name__) - - -class Shell(object): - - def __init__(self, shell=None): - - self.shell = shell - - self.target_host = ( - "cdist-shell-no-target-host", - "cdist-shell-no-target-host", - "cdist-shell-no-target-host", - ) - self.target_host_tags = "" - - host_dir_name = cdist.str_hash(self.target_host[0]) - base_root_path = tempfile.mkdtemp() - host_base_path = os.path.join(base_root_path, host_dir_name) - - self.local = cdist.exec.local.Local( - target_host=self.target_host, - target_host_tags=self.target_host_tags, - base_root_path=host_base_path, - host_dir_name=host_dir_name) - - def _init_shell(self): - """Select shell to execute, if not specified by user""" - - if not self.shell: - self.shell = os.environ.get('SHELL', "/bin/sh") - - def _init_files_dirs(self): - self.local.create_files_dirs() - - def _init_environment(self): - self.env = os.environ.copy() - additional_env = { - 'PATH': "%s:%s" % (self.local.bin_path, os.environ['PATH']), - # for use in type emulator - '__cdist_type_base_path': self.local.type_path, - '__cdist_manifest': "cdist shell", - '__global': self.local.base_path, - '__target_host': self.target_host[0], - '__target_hostname': self.target_host[1], - '__target_fqdn': self.target_host[2], - '__manifest': self.local.manifest_path, - '__explorer': self.local.global_explorer_path, - '__files': self.local.files_path, - '__target_host_tags': self.local.target_host_tags, - } - - self.env.update(additional_env) - - def run(self): - self._init_shell() - self._init_files_dirs() - self._init_environment() - - log.trace("Starting shell...") - self.local.run([self.shell], self.env, save_output=False) - log.trace("Finished shell.") - - @classmethod - def commandline(cls, args): - shell = cls(args.shell) - shell.run() diff --git a/cdist/sphinxext/__init__.py b/cdist/sphinxext/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/sphinxext/manpage.py b/cdist/sphinxext/manpage.py deleted file mode 100644 index 135fe22e..00000000 --- a/cdist/sphinxext/manpage.py +++ /dev/null @@ -1,83 +0,0 @@ -import sphinx.builders.manpage -import sphinx.writers.manpage -from docutils.frontend import OptionParser -from sphinx.util.console import bold, darkgreen -from six import string_types -from docutils.io import FileOutput -from os import path -from sphinx.util.nodes import inline_all_toctrees -from sphinx import addnodes - -""" - Extension based on sphinx builtin manpage. - It does not write its own .SH NAME based on config, - but leaves everything to actual reStructuredText file content. -""" - - -class ManualPageTranslator(sphinx.writers.manpage.ManualPageTranslator): - - def header(self): - tmpl = (".TH \"%(title_upper)s\" \"%(manual_section)s\"" - " \"%(date)s\" \"%(version)s\" \"%(manual_group)s\"\n") - return tmpl % self._docinfo - - -class ManualPageWriter(sphinx.writers.manpage.ManualPageWriter): - - def __init__(self, builder): - super().__init__(builder) - self.translator_class = ( - self.builder.translator_class or ManualPageTranslator) - - -class ManualPageBuilder(sphinx.builders.manpage.ManualPageBuilder): - - name = 'cman' - default_translator_class = ManualPageTranslator - - def write(self, *ignored): - docwriter = ManualPageWriter(self) - docsettings = OptionParser( - defaults=self.env.settings, - components=(docwriter,), - read_config_files=True).get_default_values() - - self.info(bold('writing... '), nonl=True) - - for info in self.config.man_pages: - docname, name, description, authors, section = info - if isinstance(authors, string_types): - if authors: - authors = [authors] - else: - authors = [] - - targetname = '%s.%s' % (name, section) - self.info(darkgreen(targetname) + ' { ', nonl=True) - destination = FileOutput( - destination_path=path.join(self.outdir, targetname), - encoding='utf-8') - - tree = self.env.get_doctree(docname) - docnames = set() - largetree = inline_all_toctrees(self, docnames, docname, tree, - darkgreen, [docname]) - self.info('} ', nonl=True) - self.env.resolve_references(largetree, docname, self) - # remove pending_xref nodes - for pendingnode in largetree.traverse(addnodes.pending_xref): - pendingnode.replace_self(pendingnode.children) - - largetree.settings = docsettings - largetree.settings.title = name - largetree.settings.subtitle = description - largetree.settings.authors = authors - largetree.settings.section = section - - docwriter.write(largetree, destination) - self.info() - - -def setup(app): - app.add_builder(ManualPageBuilder) diff --git a/cdist/test/__init__.py b/cdist/test/__init__.py deleted file mode 100644 index faa3686a..00000000 --- a/cdist/test/__init__.py +++ /dev/null @@ -1,51 +0,0 @@ -# -*- coding: utf-8 -*- -# -# 2011-2012 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -import os -import unittest -import tempfile - -cdist_base_path = os.path.abspath( - os.path.join(os.path.dirname(os.path.realpath(__file__)), "../../")) - -cdist_exec_path = os.path.join(cdist_base_path, "scripts/cdist") - -global_fixtures_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), - "fixtures")) - - -class CdistTestCase(unittest.TestCase): - - remote_exec = os.path.join(global_fixtures_dir, "remote", "exec") - remote_copy = os.path.join(global_fixtures_dir, "remote", "copy") - - target_host = ( - 'cdisttesthost', - 'cdisttesthost', - 'cdisttesthost', - ) - target_host_tags = "tag1,tag2,tag3" - - def mkdtemp(self, **kwargs): - return tempfile.mkdtemp(prefix='tmp.cdist.test.', **kwargs) - - def mkstemp(self, **kwargs): - return tempfile.mkstemp(prefix='tmp.cdist.test.', **kwargs) diff --git a/cdist/test/__main__.py b/cdist/test/__main__.py deleted file mode 100644 index c8c7df3b..00000000 --- a/cdist/test/__main__.py +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# -# 2011 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -import imp -import os -import sys -import unittest - -base_dir = os.path.dirname(os.path.realpath(__file__)) - -test_modules = [] -for possible_test in os.listdir(base_dir): - filename = "__init__.py" - mod_path = os.path.join(base_dir, possible_test, filename) - - if os.path.isfile(mod_path): - test_modules.append(possible_test) - -suites = [] -for test_module in test_modules: - module_parameters = imp.find_module(test_module, [base_dir]) - module = imp.load_module("cdist.test." + test_module, *module_parameters) - - suite = unittest.defaultTestLoader.loadTestsFromModule(module) - # print("Got suite: " + suite.__str__()) - suites.append(suite) - -all_suites = unittest.TestSuite(suites) -rv = unittest.TextTestRunner(verbosity=2).run(all_suites).wasSuccessful() -sys.exit(not rv) diff --git a/cdist/test/autil/__init__.py b/cdist/test/autil/__init__.py deleted file mode 100644 index a78feaad..00000000 --- a/cdist/test/autil/__init__.py +++ /dev/null @@ -1,57 +0,0 @@ -# -*- coding: utf-8 -*- -# -# 2017 Darko Poljak (darko.poljak at gmail.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -from cdist import test -import cdist.autil as autil -import os -import os.path as op -import tarfile - - -my_dir = op.abspath(op.dirname(__file__)) -fixtures = op.join(my_dir, 'fixtures') -explorers_path = op.join(fixtures, 'explorer') - - -class AUtilTestCase(test.CdistTestCase): - def test_tar(self): - test_modes = { - 'tar': 'r:', - 'tgz': 'r:gz', - 'tbz2': 'r:bz2', - 'txz': 'r:xz', - } - source = explorers_path - for mode in test_modes: - tarpath, fcnt = autil.tar(source, mode) - self.assertIsNotNone(tarpath) - fcnt = 0 - with tarfile.open(tarpath, test_modes[mode]) as tar: - for tarinfo in tar: - fcnt += 1 - os.remove(tarpath) - self.assertGreater(fcnt, 0) - - -if __name__ == "__main__": - import unittest - - unittest.main() diff --git a/cdist/test/autil/fixtures/explorer/cpu_cores b/cdist/test/autil/fixtures/explorer/cpu_cores deleted file mode 100755 index 7f7a955e..00000000 --- a/cdist/test/autil/fixtures/explorer/cpu_cores +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh -# -# 2014 Daniel Heule (hda at sfs.biz) -# 2014 Thomas Oettli (otho at sfs.biz) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -# FIXME: other system types (not linux ...) - -os=$("$__explorer/os") -case "$os" in - "macosx") - echo "$(sysctl -n hw.physicalcpu)" - ;; - - *) - if [ -r /proc/cpuinfo ]; then - cores="$(grep "core id" /proc/cpuinfo | sort | uniq | wc -l)" - if [ ${cores} -eq 0 ]; then - cores="1" - fi - echo "$cores" - fi - ;; -esac diff --git a/cdist/test/autil/fixtures/explorer/cpu_sockets b/cdist/test/autil/fixtures/explorer/cpu_sockets deleted file mode 100755 index 8a8194df..00000000 --- a/cdist/test/autil/fixtures/explorer/cpu_sockets +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh -# -# 2014 Daniel Heule (hda at sfs.biz) -# 2014 Thomas Oettli (otho at sfs.biz) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -# FIXME: other system types (not linux ...) - -os=$("$__explorer/os") -case "$os" in - "macosx") - echo "$(system_profiler SPHardwareDataType | grep "Number of Processors" | awk -F': ' '{print $2}')" - ;; - - *) - if [ -r /proc/cpuinfo ]; then - sockets="$(grep "physical id" /proc/cpuinfo | sort | uniq | wc -l)" - if [ ${sockets} -eq 0 ]; then - sockets="$(cat /proc/cpuinfo | grep "processor" | wc -l)" - fi - echo "${sockets}" - fi - ;; -esac diff --git a/cdist/test/autil/fixtures/explorer/disks b/cdist/test/autil/fixtures/explorer/disks deleted file mode 100644 index 52fef81e..00000000 --- a/cdist/test/autil/fixtures/explorer/disks +++ /dev/null @@ -1,2 +0,0 @@ -cd /dev -echo sd? hd? vd? diff --git a/cdist/test/autil/fixtures/explorer/hostname b/cdist/test/autil/fixtures/explorer/hostname deleted file mode 100755 index 7715c6b0..00000000 --- a/cdist/test/autil/fixtures/explorer/hostname +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -# -# 2010-2014 Nico Schottelius (nico-cdist at schottelius.org) -# 2012 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -if command -v uname >/dev/null; then - uname -n -fi diff --git a/cdist/test/autil/fixtures/explorer/init b/cdist/test/autil/fixtures/explorer/init deleted file mode 100755 index 2693a0d3..00000000 --- a/cdist/test/autil/fixtures/explorer/init +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -# -# 2016 Daniel Heule (hda at sfs.biz) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Returns the process name of pid 1 ( normaly the init system ) -# for example at linux this value is "init" or "systemd" in most cases -# - -uname_s="$(uname -s)" - -case "$uname_s" in - Linux|FreeBSD) - ps -o comm= -p 1 || true - ;; - *) - # return a empty string as unknown value - echo "" - ;; -esac diff --git a/cdist/test/autil/fixtures/explorer/interfaces b/cdist/test/autil/fixtures/explorer/interfaces deleted file mode 100755 index c1f2a57a..00000000 --- a/cdist/test/autil/fixtures/explorer/interfaces +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh -# -# 2012 Sébastien Gross -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# List all network interfaces in explorer/ifaces. One interface per line. -# -# If your OS is not supported please provide a ifconfig output -# - -# Use ip, if available -if command -v ip >/dev/null; then - ip -o link show | sed -n 's/^[0-9]\+: \(.\+\): <.*/\1/p' - exit 0 -fi - -if ! command -v ifconfig >/dev/null; then - # no ifconfig, nothing we could do - exit 0 -fi - -uname_s="$(uname -s)" -REGEXP='s/^(.*)(:[[:space:]]*flags=|Link encap).*/\1/p' - -case "$uname_s" in - Darwin) - ifconfig -a | sed -n -E "$REGEXP" - ;; - Linux|*BSD) - ifconfig -a | sed -n -r "$REGEXP" - ;; - *) - echo "Unsupported ifconfig output for $uname_s" >&2 - exit 1 - ;; -esac diff --git a/cdist/test/autil/fixtures/explorer/kernel_name b/cdist/test/autil/fixtures/explorer/kernel_name deleted file mode 100644 index 98ebac2a..00000000 --- a/cdist/test/autil/fixtures/explorer/kernel_name +++ /dev/null @@ -1 +0,0 @@ -uname -s diff --git a/cdist/test/autil/fixtures/explorer/lsb_codename b/cdist/test/autil/fixtures/explorer/lsb_codename deleted file mode 100755 index eebd3e0f..00000000 --- a/cdist/test/autil/fixtures/explorer/lsb_codename +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh -# -# 2011 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -set +e -case "$($__explorer/os)" in - openwrt) - (. /etc/openwrt_release && echo "$DISTRIB_CODENAME") - ;; - *) - lsb_release=$(command -v lsb_release) - if [ -x "$lsb_release" ]; then - $lsb_release --short --codename - fi - ;; -esac diff --git a/cdist/test/autil/fixtures/explorer/lsb_description b/cdist/test/autil/fixtures/explorer/lsb_description deleted file mode 100755 index 23f45421..00000000 --- a/cdist/test/autil/fixtures/explorer/lsb_description +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh -# -# 2011 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -set +e -case "$($__explorer/os)" in - openwrt) - (. /etc/openwrt_release && echo "$DISTRIB_DESCRIPTION") - ;; - *) - lsb_release=$(command -v lsb_release) - if [ -x "$lsb_release" ]; then - $lsb_release --short --description - fi - ;; -esac diff --git a/cdist/test/autil/fixtures/explorer/lsb_release b/cdist/test/autil/fixtures/explorer/lsb_release deleted file mode 100755 index 35b5547c..00000000 --- a/cdist/test/autil/fixtures/explorer/lsb_release +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh -# -# 2011 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -set +e -case "$($__explorer/os)" in - openwrt) - (. /etc/openwrt_release && echo "$DISTRIB_RELEASE") - ;; - *) - lsb_release=$(command -v lsb_release) - if [ -x "$lsb_release" ]; then - $lsb_release --short --release - fi - ;; -esac diff --git a/cdist/test/autil/fixtures/explorer/machine_type b/cdist/test/autil/fixtures/explorer/machine_type deleted file mode 100755 index eb3c9d36..00000000 --- a/cdist/test/autil/fixtures/explorer/machine_type +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/sh -# -# 2014 Daniel Heule (hda at sfs.biz) -# 2014 Thomas Oettli (otho at sfs.biz) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -# FIXME: other system types (not linux ...) - -if [ -d "/proc/vz" -a ! -d "/proc/bc" ]; then - echo openvz - exit -fi - -if [ -e "/proc/1/environ" ] && - cat "/proc/1/environ" | tr '\000' '\n' | grep -Eiq '^container='; then - echo lxc - exit -fi - -if [ -r /proc/cpuinfo ]; then - # this should only exist on virtual guest machines, - # tested on vmware, xen, kvm - if grep -q "hypervisor" /proc/cpuinfo; then - # this file is aviable in xen guest systems - if [ -r /sys/hypervisor/type ]; then - if grep -q -i "xen" /sys/hypervisor/type; then - echo virtual_by_xen - exit - fi - else - if [ -r /sys/class/dmi/id/product_name ]; then - if grep -q -i 'vmware' /sys/class/dmi/id/product_name; then - echo "virtual_by_vmware" - exit - elif grep -q -i 'bochs' /sys/class/dmi/id/product_name; then - echo "virtual_by_kvm" - exit - elif grep -q -i 'virtualbox' /sys/class/dmi/id/product_name; then - echo "virtual_by_virtualbox" - exit - fi - fi - fi - echo "virtual_by_unknown" - else - echo "physical" - fi -else - echo "unknown" -fi diff --git a/cdist/test/autil/fixtures/explorer/memory b/cdist/test/autil/fixtures/explorer/memory deleted file mode 100755 index 05db865f..00000000 --- a/cdist/test/autil/fixtures/explorer/memory +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -# -# 2014 Daniel Heule (hda at sfs.biz) -# 2014 Thomas Oettli (otho at sfs.biz) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -# FIXME: other system types (not linux ...) - -os=$("$__explorer/os") -case "$os" in - "macosx") - echo "$(sysctl -n hw.memsize)/1024" | bc - ;; - - *) - if [ -r /proc/meminfo ]; then - grep "MemTotal:" /proc/meminfo | awk '{print $2}' - fi - ;; -esac diff --git a/cdist/test/autil/fixtures/explorer/runlevel b/cdist/test/autil/fixtures/explorer/runlevel deleted file mode 100755 index 02d3a245..00000000 --- a/cdist/test/autil/fixtures/explorer/runlevel +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh -# -# 2012 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -set +e -executable=$(command -v runlevel) -if [ -x "$executable" ]; then - "$executable" | awk '{ print $2 }' -fi diff --git a/cdist/test/capture_output/__init__.py b/cdist/test/capture_output/__init__.py deleted file mode 100644 index 229cbf70..00000000 --- a/cdist/test/capture_output/__init__.py +++ /dev/null @@ -1,137 +0,0 @@ -# -*- coding: utf-8 -*- -# -# 2011-2013 Steven Armstrong (steven-cdist at armstrong.cc) -# 2012-2013 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -import os -import shutil - -import cdist -from cdist import core -from cdist import test -from cdist.exec import local -from cdist.exec import remote -from cdist.core import code -from cdist.core import manifest - -import os.path as op -my_dir = op.abspath(op.dirname(__file__)) -fixtures = op.join(my_dir, 'fixtures') -conf_dir = op.join(fixtures, 'conf') - - -class CaptureOutputTestCase(test.CdistTestCase): - - def setUp(self): - # logging.root.setLevel(logging.TRACE) - self.temp_dir = self.mkdtemp() - - self.local_dir = os.path.join(self.temp_dir, "local") - self.hostdir = cdist.str_hash(self.target_host[0]) - self.host_base_path = os.path.join(self.local_dir, self.hostdir) - os.makedirs(self.host_base_path) - self.local = local.Local( - target_host=self.target_host, - target_host_tags=None, - base_root_path=self.host_base_path, - host_dir_name=self.hostdir, - exec_path=cdist.test.cdist_exec_path, - add_conf_dirs=[conf_dir]) - self.local.create_files_dirs() - - self.remote_dir = self.mkdtemp() - remote_exec = self.remote_exec - remote_copy = self.remote_copy - self.remote = remote.Remote( - target_host=self.target_host, - remote_exec=remote_exec, - remote_copy=remote_copy, - base_path=self.remote_dir, - stdout_base_path=self.local.stdout_base_path, - stderr_base_path=self.local.stderr_base_path) - self.remote.create_files_dirs() - - self.code = code.Code(self.target_host, self.local, self.remote) - - self.manifest = manifest.Manifest(self.target_host, self.local) - - self.cdist_type = core.CdistType(self.local.type_path, - '__write_to_stdout_and_stderr') - self.cdist_object = core.CdistObject(self.cdist_type, - self.local.object_path, - self.local.object_marker_name, - '') - self.cdist_object.create() - self.output_dirs = { - 'object': { - 'stdout': os.path.join(self.cdist_object.absolute_path, - 'stdout'), - 'stderr': os.path.join(self.cdist_object.absolute_path, - 'stderr'), - }, - 'init': { - 'stdout': os.path.join(self.local.base_path, 'stdout'), - 'stderr': os.path.join(self.local.base_path, 'stderr'), - }, - } - - def tearDown(self): - shutil.rmtree(self.local_dir) - shutil.rmtree(self.remote_dir) - shutil.rmtree(self.temp_dir) - - def _test_output(self, which, target, streams=('stdout', 'stderr')): - for stream in streams: - _should = '{0}: {1}\n'.format(which, stream) - stream_path = os.path.join(self.output_dirs[target][stream], which) - with open(stream_path, 'r') as fd: - _is = fd.read() - self.assertEqual(_should, _is) - - def test_capture_code_output(self): - self.cdist_object.code_local = self.code.run_gencode_local( - self.cdist_object) - self._test_output('gencode-local', 'object', ('stderr',)) - - self.code.run_code_local(self.cdist_object) - self._test_output('code-local', 'object') - - self.cdist_object.code_remote = self.code.run_gencode_remote( - self.cdist_object) - self._test_output('gencode-remote', 'object', ('stderr',)) - - self.code.transfer_code_remote(self.cdist_object) - self.code.run_code_remote(self.cdist_object) - self._test_output('code-remote', 'object') - - def test_capture_manifest_output(self): - self.manifest.run_type_manifest(self.cdist_object) - self._test_output('manifest', 'object') - - def test_capture_init_manifest_output(self): - initial_manifest = os.path.join(conf_dir, 'manifest', 'init') - self.manifest.run_initial_manifest(initial_manifest) - self._test_output('init', 'init') - - -if __name__ == "__main__": - import unittest - - unittest.main() diff --git a/cdist/test/capture_output/fixtures/conf/manifest/init b/cdist/test/capture_output/fixtures/conf/manifest/init deleted file mode 100755 index 68d7da97..00000000 --- a/cdist/test/capture_output/fixtures/conf/manifest/init +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -echo "init: stdout" -echo "init: stderr" >&2 diff --git a/cdist/test/capture_output/fixtures/conf/type/__write_to_stdout_and_stderr/gencode-local b/cdist/test/capture_output/fixtures/conf/type/__write_to_stdout_and_stderr/gencode-local deleted file mode 100755 index 1946dbd3..00000000 --- a/cdist/test/capture_output/fixtures/conf/type/__write_to_stdout_and_stderr/gencode-local +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -echo "gencode-local: stderr" >&2 - -echo "echo \"code-local: stdout\"" -echo "echo \"code-local: stderr\" >&2" diff --git a/cdist/test/capture_output/fixtures/conf/type/__write_to_stdout_and_stderr/gencode-remote b/cdist/test/capture_output/fixtures/conf/type/__write_to_stdout_and_stderr/gencode-remote deleted file mode 100755 index f713b932..00000000 --- a/cdist/test/capture_output/fixtures/conf/type/__write_to_stdout_and_stderr/gencode-remote +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -echo "gencode-remote: stderr" >&2 - -echo "echo \"code-remote: stdout\"" -echo "echo \"code-remote: stderr\" >&2" diff --git a/cdist/test/capture_output/fixtures/conf/type/__write_to_stdout_and_stderr/manifest b/cdist/test/capture_output/fixtures/conf/type/__write_to_stdout_and_stderr/manifest deleted file mode 100755 index 4f122f25..00000000 --- a/cdist/test/capture_output/fixtures/conf/type/__write_to_stdout_and_stderr/manifest +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -echo "manifest: stdout" -echo "manifest: stderr" >&2 diff --git a/cdist/test/capture_output/fixtures/conf/type/__write_to_stdout_and_stderr/singleton b/cdist/test/capture_output/fixtures/conf/type/__write_to_stdout_and_stderr/singleton deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/capture_output_disabled/__init__.py b/cdist/test/capture_output_disabled/__init__.py deleted file mode 100644 index 828e80f1..00000000 --- a/cdist/test/capture_output_disabled/__init__.py +++ /dev/null @@ -1,140 +0,0 @@ -# -*- coding: utf-8 -*- -# -# 2018 Darko Poljak (darko.poljak at gmail.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -import os -import shutil - -import cdist -from cdist import core -from cdist import test -from cdist.exec import local -from cdist.exec import remote -from cdist.core import code -from cdist.core import manifest - -import os.path as op -my_dir = op.abspath(op.dirname(__file__)) -fixtures = op.join(my_dir, 'fixtures') -conf_dir = op.join(fixtures, 'conf') - - -class CaptureOutputDisabledTestCase(test.CdistTestCase): - - def setUp(self): - # logging.root.setLevel(logging.TRACE) - save_output_streams = False - self.temp_dir = self.mkdtemp() - - self.local_dir = os.path.join(self.temp_dir, "local") - self.hostdir = cdist.str_hash(self.target_host[0]) - self.host_base_path = os.path.join(self.local_dir, self.hostdir) - os.makedirs(self.host_base_path) - self.local = local.Local( - target_host=self.target_host, - target_host_tags=None, - base_root_path=self.host_base_path, - host_dir_name=self.hostdir, - exec_path=cdist.test.cdist_exec_path, - add_conf_dirs=[conf_dir], - save_output_streams=save_output_streams) - self.local.create_files_dirs() - - self.remote_dir = self.mkdtemp() - remote_exec = self.remote_exec - remote_copy = self.remote_copy - self.remote = remote.Remote( - target_host=self.target_host, - remote_exec=remote_exec, - remote_copy=remote_copy, - base_path=self.remote_dir, - stdout_base_path=self.local.stdout_base_path, - stderr_base_path=self.local.stderr_base_path, - save_output_streams=save_output_streams) - self.remote.create_files_dirs() - - self.code = code.Code(self.target_host, self.local, self.remote) - - self.manifest = manifest.Manifest(self.target_host, self.local) - - self.cdist_type = core.CdistType(self.local.type_path, - '__write_to_stdout_and_stderr') - self.cdist_object = core.CdistObject(self.cdist_type, - self.local.object_path, - self.local.object_marker_name, - '') - self.cdist_object.create() - self.output_dirs = { - 'object': { - 'stdout': os.path.join(self.cdist_object.absolute_path, - 'stdout'), - 'stderr': os.path.join(self.cdist_object.absolute_path, - 'stderr'), - }, - 'init': { - 'stdout': os.path.join(self.local.base_path, 'stdout'), - 'stderr': os.path.join(self.local.base_path, 'stderr'), - }, - } - - def tearDown(self): - shutil.rmtree(self.local_dir) - shutil.rmtree(self.remote_dir) - shutil.rmtree(self.temp_dir) - - def _test_output(self, which, target, streams=('stdout', 'stderr')): - for stream in streams: - stream_path = os.path.join(self.output_dirs[target][stream], which) - if os.path.exists(stream_path): - with open(stream_path, 'r') as fd: - _is = fd.read() - self.assertEqual("", _is) - # else ok when not exists - - def test_capture_code_output_disabled(self): - self.cdist_object.code_local = self.code.run_gencode_local( - self.cdist_object) - self._test_output('gencode-local', 'object', ('stderr',)) - - self.code.run_code_local(self.cdist_object) - self._test_output('code-local', 'object') - - self.cdist_object.code_remote = self.code.run_gencode_remote( - self.cdist_object) - self._test_output('gencode-remote', 'object', ('stderr',)) - - self.code.transfer_code_remote(self.cdist_object) - self.code.run_code_remote(self.cdist_object) - self._test_output('code-remote', 'object') - - def test_capture_manifest_output_disabled(self): - self.manifest.run_type_manifest(self.cdist_object) - self._test_output('manifest', 'object') - - def test_capture_init_manifest_output_disabled(self): - initial_manifest = os.path.join(conf_dir, 'manifest', 'init') - self.manifest.run_initial_manifest(initial_manifest) - self._test_output('init', 'init') - - -if __name__ == "__main__": - import unittest - - unittest.main() diff --git a/cdist/test/capture_output_disabled/fixtures/conf/manifest/init b/cdist/test/capture_output_disabled/fixtures/conf/manifest/init deleted file mode 100755 index 68d7da97..00000000 --- a/cdist/test/capture_output_disabled/fixtures/conf/manifest/init +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -echo "init: stdout" -echo "init: stderr" >&2 diff --git a/cdist/test/capture_output_disabled/fixtures/conf/type/__write_to_stdout_and_stderr/gencode-local b/cdist/test/capture_output_disabled/fixtures/conf/type/__write_to_stdout_and_stderr/gencode-local deleted file mode 100755 index 1946dbd3..00000000 --- a/cdist/test/capture_output_disabled/fixtures/conf/type/__write_to_stdout_and_stderr/gencode-local +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -echo "gencode-local: stderr" >&2 - -echo "echo \"code-local: stdout\"" -echo "echo \"code-local: stderr\" >&2" diff --git a/cdist/test/capture_output_disabled/fixtures/conf/type/__write_to_stdout_and_stderr/gencode-remote b/cdist/test/capture_output_disabled/fixtures/conf/type/__write_to_stdout_and_stderr/gencode-remote deleted file mode 100755 index f713b932..00000000 --- a/cdist/test/capture_output_disabled/fixtures/conf/type/__write_to_stdout_and_stderr/gencode-remote +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -echo "gencode-remote: stderr" >&2 - -echo "echo \"code-remote: stdout\"" -echo "echo \"code-remote: stderr\" >&2" diff --git a/cdist/test/capture_output_disabled/fixtures/conf/type/__write_to_stdout_and_stderr/manifest b/cdist/test/capture_output_disabled/fixtures/conf/type/__write_to_stdout_and_stderr/manifest deleted file mode 100755 index 4f122f25..00000000 --- a/cdist/test/capture_output_disabled/fixtures/conf/type/__write_to_stdout_and_stderr/manifest +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -echo "manifest: stdout" -echo "manifest: stderr" >&2 diff --git a/cdist/test/capture_output_disabled/fixtures/conf/type/__write_to_stdout_and_stderr/singleton b/cdist/test/capture_output_disabled/fixtures/conf/type/__write_to_stdout_and_stderr/singleton deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/cdist_object/__init__.py b/cdist/test/cdist_object/__init__.py deleted file mode 100644 index a9c20cd3..00000000 --- a/cdist/test/cdist_object/__init__.py +++ /dev/null @@ -1,311 +0,0 @@ -# -*- coding: utf-8 -*- -# -# 2010-2011 Steven Armstrong (steven-cdist at armstrong.cc) -# 2012-2015 Nico Schottelius (nico-cdist at schottelius.org) -# 2014 Daniel Heule (hda at sfs.biz) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -import os -import shutil -import tempfile - -from cdist import test -from cdist import core - -import cdist - -import os.path as op -my_dir = op.abspath(op.dirname(__file__)) -fixtures = op.join(my_dir, 'fixtures') -type_base_path = op.join(fixtures, 'type') - -OBJECT_MARKER_NAME = '.cdist-pseudo-random' - -expected_object_names = sorted([ - '__first/child', - '__first/dog', - '__first/man', - '__first/woman', - '__second/on-the', - '__second/under-the', - '__third/moon']) - - -class ObjectClassTestCase(test.CdistTestCase): - - def setUp(self): - - self.tempdir = tempfile.mkdtemp(prefix="cdist.test") - self.object_base_path = self.tempdir - - self.expected_objects = [] - for cdist_object_name in expected_object_names: - cdist_type, cdist_object_id = cdist_object_name.split("/", 1) - cdist_object = core.CdistObject(core.CdistType(type_base_path, - cdist_type), - self.object_base_path, - OBJECT_MARKER_NAME, - cdist_object_id) - cdist_object.create() - self.expected_objects.append(cdist_object) - - def tearDown(self): - shutil.rmtree(self.tempdir) - - def test_list_object_names(self): - found_object_names = sorted(list(core.CdistObject.list_object_names( - self.object_base_path, OBJECT_MARKER_NAME))) - self.assertEqual(found_object_names, expected_object_names) - - def test_list_type_names(self): - type_names = list(cdist.core.CdistObject.list_type_names( - self.object_base_path)) - self.assertEqual(sorted(type_names), - ['__first', '__second', '__third']) - - def test_list_objects(self): - found_objects = sorted(list(core.CdistObject.list_objects( - self.object_base_path, type_base_path, OBJECT_MARKER_NAME))) - self.assertEqual(found_objects, self.expected_objects) - - def test_create_singleton(self): - """Check whether creating an object without id (singleton) works""" - singleton = self.expected_objects[0].object_from_name( - "__test_singleton") - # came here - everything fine - - def test_create_singleton_not_singleton_type(self): - """try to create an object of a type that is not a singleton - without an object id""" - with self.assertRaises(cdist.core.cdist_object.MissingObjectIdError): - self.expected_objects[0].object_from_name("__first") - - -class ObjectIdTestCase(test.CdistTestCase): - - def setUp(self): - self.tempdir = tempfile.mkdtemp(prefix="cdist.test") - self.object_base_path = self.tempdir - - self.expected_objects = [] - for cdist_object_name in expected_object_names: - cdist_type, cdist_object_id = cdist_object_name.split("/", 1) - cdist_object = core.CdistObject(core.CdistType(type_base_path, - cdist_type), - self.object_base_path, - OBJECT_MARKER_NAME, - cdist_object_id) - cdist_object.create() - self.expected_objects.append(cdist_object) - - def tearDown(self): - shutil.rmtree(self.tempdir) - - def test_object_id_contains_double_slash(self): - cdist_type = core.CdistType(type_base_path, '__third') - illegal_object_id = '/object_id//may/not/contain/double/slash' - with self.assertRaises(core.IllegalObjectIdError): - core.CdistObject(cdist_type, self.object_base_path, - OBJECT_MARKER_NAME, illegal_object_id) - - def test_object_id_contains_object_marker(self): - cdist_type = core.CdistType(type_base_path, '__third') - illegal_object_id = ( - 'object_id/may/not/contain/%s/anywhere' % OBJECT_MARKER_NAME) - with self.assertRaises(core.IllegalObjectIdError): - core.CdistObject(cdist_type, self.object_base_path, - OBJECT_MARKER_NAME, illegal_object_id) - - def test_object_id_contains_object_marker_string(self): - cdist_type = core.CdistType(type_base_path, '__third') - illegal_object_id = ( - 'object_id/may/contain_%s_in_filename' % OBJECT_MARKER_NAME) - core.CdistObject(cdist_type, self.object_base_path, - OBJECT_MARKER_NAME, illegal_object_id) - # if we get here, the test passed - - def test_object_id_contains_only_dot(self): - cdist_type = core.CdistType(type_base_path, '__third') - illegal_object_id = '.' - with self.assertRaises(core.IllegalObjectIdError): - core.CdistObject(cdist_type, self.object_base_path, - OBJECT_MARKER_NAME, illegal_object_id) - - def test_object_id_equals_slash(self): - cdist_type = core.CdistType(type_base_path, '__third') - illegal_object_id = '/' - with self.assertRaises(core.IllegalObjectIdError): - core.CdistObject(cdist_type, self.object_base_path, - OBJECT_MARKER_NAME, illegal_object_id) - - def test_object_id_on_singleton_type(self): - cdist_type = core.CdistType(type_base_path, '__test_singleton') - illegal_object_id = 'object_id' - with self.assertRaises(core.IllegalObjectIdError): - core.CdistObject(cdist_type, self.object_base_path, - OBJECT_MARKER_NAME, illegal_object_id) - - -class ObjectTestCase(test.CdistTestCase): - - def setUp(self): - self.tempdir = tempfile.mkdtemp(prefix="cdist.test") - self.object_base_path = self.tempdir - - self.cdist_type = core.CdistType(type_base_path, '__third') - self.cdist_object = core.CdistObject(self.cdist_type, - self.object_base_path, - OBJECT_MARKER_NAME, 'moon') - self.cdist_object.create() - - self.cdist_object.parameters['planet'] = 'Saturn' - self.cdist_object.parameters['name'] = 'Prometheus' - - def tearDown(self): - self.cdist_object.prepared = False - self.cdist_object.ran = False - self.cdist_object.source = [] - self.cdist_object.code_local = '' - self.cdist_object.code_remote = '' - self.cdist_object.state = '' - - shutil.rmtree(self.tempdir) - - def test_name(self): - self.assertEqual(self.cdist_object.name, '__third/moon') - - def test_object_id(self): - self.assertEqual(self.cdist_object.object_id, 'moon') - - def test_path(self): - self.assertEqual(self.cdist_object.path, - "__third/moon/%s" % OBJECT_MARKER_NAME) - - def test_absolute_path(self): - self.assertEqual(self.cdist_object.absolute_path, - os.path.join(self.object_base_path, - "__third/moon/%s" % OBJECT_MARKER_NAME)) - - def test_code_local_path(self): - self.assertEqual(self.cdist_object.code_local_path, - "__third/moon/%s/code-local" % OBJECT_MARKER_NAME) - - def test_code_remote_path(self): - self.assertEqual(self.cdist_object.code_remote_path, - "__third/moon/%s/code-remote" % OBJECT_MARKER_NAME) - - def test_parameter_path(self): - self.assertEqual(self.cdist_object.parameter_path, - "__third/moon/%s/parameter" % OBJECT_MARKER_NAME) - - def test_explorer_path(self): - self.assertEqual(self.cdist_object.explorer_path, - "__third/moon/%s/explorer" % OBJECT_MARKER_NAME) - - def test_parameters(self): - expected_parameters = {'planet': 'Saturn', 'name': 'Prometheus'} - self.assertEqual(self.cdist_object.parameters, expected_parameters) - - def test_explorers(self): - self.assertEqual(self.cdist_object.explorers, {}) - - # FIXME: actually testing fsproperty.DirectoryDictProperty here, - # move to their own test case - def test_explorers_assign_dict(self): - expected = {'first': 'foo', 'second': 'bar'} - # when set, written to file - self.cdist_object.explorers = expected - object_explorer_path = os.path.join(self.cdist_object.base_path, - self.cdist_object.explorer_path) - self.assertTrue(os.path.isdir(object_explorer_path)) - # when accessed, read from file - self.assertEqual(self.cdist_object.explorers, expected) - # remove dynamically created folder - self.cdist_object.explorers = {} - os.rmdir(os.path.join(self.cdist_object.base_path, - self.cdist_object.explorer_path)) - - # FIXME: actually testing fsproperty.DirectoryDictProperty here, - # move to their own test case - def test_explorers_assign_key_value(self): - expected = {'first': 'foo', 'second': 'bar'} - object_explorer_path = os.path.join(self.cdist_object.base_path, - self.cdist_object.explorer_path) - for key, value in expected.items(): - # when set, written to file - self.cdist_object.explorers[key] = value - self.assertTrue(os.path.isfile(os.path.join(object_explorer_path, - key))) - # when accessed, read from file - self.assertEqual(self.cdist_object.explorers, expected) - # remove dynamically created folder - self.cdist_object.explorers = {} - os.rmdir(os.path.join(self.cdist_object.base_path, - self.cdist_object.explorer_path)) - - def test_requirements(self): - expected = [] - self.assertEqual(list(self.cdist_object.requirements), expected) - - def test_state(self): - self.assertEqual(self.cdist_object.state, '') - - def test_state_prepared(self): - self.cdist_object.state = core.CdistObject.STATE_PREPARED - self.assertEqual(self.cdist_object.state, - core.CdistObject.STATE_PREPARED) - - def test_state_running(self): - self.cdist_object.state = core.CdistObject.STATE_RUNNING - self.assertEqual(self.cdist_object.state, - core.CdistObject.STATE_RUNNING) - - def test_state_done(self): - self.cdist_object.state = core.CdistObject.STATE_DONE - self.assertEqual(self.cdist_object.state, - core.CdistObject.STATE_DONE) - - def test_source(self): - self.assertEqual(list(self.cdist_object.source), []) - - def test_source_after_changing(self): - self.cdist_object.source = ['/path/to/manifest'] - self.assertEqual(list(self.cdist_object.source), ['/path/to/manifest']) - - def test_code_local(self): - self.assertEqual(self.cdist_object.code_local, '') - - def test_code_local_after_changing(self): - self.cdist_object.code_local = 'Hello World' - self.assertEqual(self.cdist_object.code_local, 'Hello World') - - def test_code_remote(self): - self.assertEqual(self.cdist_object.code_remote, '') - - def test_code_remote_after_changing(self): - self.cdist_object.code_remote = 'Hello World' - self.assertEqual(self.cdist_object.code_remote, 'Hello World') - - def test_object_from_name(self): - self.cdist_object.code_remote = 'Hello World' - other_name = '__first/man' - other_object = self.cdist_object.object_from_name(other_name) - self.assertTrue(isinstance(other_object, core.CdistObject)) - self.assertEqual(other_object.cdist_type.name, '__first') - self.assertEqual(other_object.object_id, 'man') diff --git a/cdist/test/cdist_object/fixtures/type/__first/.keep b/cdist/test/cdist_object/fixtures/type/__first/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/cdist_object/fixtures/type/__second/.keep b/cdist/test/cdist_object/fixtures/type/__second/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/cdist_object/fixtures/type/__test_singleton/singleton b/cdist/test/cdist_object/fixtures/type/__test_singleton/singleton deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/cdist_object/fixtures/type/__third/.keep b/cdist/test/cdist_object/fixtures/type/__third/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/cdist_type/__init__.py b/cdist/test/cdist_type/__init__.py deleted file mode 100644 index a51a1e6f..00000000 --- a/cdist/test/cdist_type/__init__.py +++ /dev/null @@ -1,217 +0,0 @@ -# -*- coding: utf-8 -*- -# -# 2010-2011 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -import os - -from cdist import test -from cdist import core - -import os.path as op -my_dir = op.abspath(op.dirname(__file__)) -fixtures = op.join(my_dir, 'fixtures') - - -class TypeTestCase(test.CdistTestCase): - - def test_list_type_names(self): - base_path = op.join(fixtures, 'list_types') - type_names = core.CdistType.list_type_names(base_path) - self.assertEqual(sorted(type_names), - ['__first', '__second', '__third']) - - def test_list_types(self): - base_path = op.join(fixtures, 'list_types') - types = list(core.CdistType.list_types(base_path)) - types_expected = [ - core.CdistType(base_path, '__first'), - core.CdistType(base_path, '__second'), - core.CdistType(base_path, '__third'), - ] - self.assertEqual(sorted(types), types_expected) - - def test_only_one_instance(self): - base_path = fixtures - cdist_type1 = core.CdistType(base_path, '__name_path') - cdist_type2 = core.CdistType(base_path, '__name_path') - self.assertEqual(id(cdist_type1), id(cdist_type2)) - - def test_nonexistent_type(self): - base_path = fixtures - self.assertRaises(core.InvalidTypeError, core.CdistType, base_path, - '__i-dont-exist') - - def test_name(self): - base_path = fixtures - cdist_type = core.CdistType(base_path, '__name_path') - self.assertEqual(cdist_type.name, '__name_path') - - def test_path(self): - base_path = fixtures - cdist_type = core.CdistType(base_path, '__name_path') - self.assertEqual(cdist_type.path, '__name_path') - - def test_base_path(self): - base_path = fixtures - cdist_type = core.CdistType(base_path, '__name_path') - self.assertEqual(cdist_type.base_path, base_path) - - def test_absolute_path(self): - base_path = fixtures - cdist_type = core.CdistType(base_path, '__name_path') - self.assertEqual(cdist_type.absolute_path, - os.path.join(base_path, '__name_path')) - - def test_manifest_path(self): - base_path = fixtures - cdist_type = core.CdistType(base_path, '__name_path') - self.assertEqual(cdist_type.manifest_path, - os.path.join('__name_path', 'manifest')) - - def test_explorer_path(self): - base_path = fixtures - cdist_type = core.CdistType(base_path, '__name_path') - self.assertEqual(cdist_type.explorer_path, - os.path.join('__name_path', 'explorer')) - - def test_gencode_local_path(self): - base_path = fixtures - cdist_type = core.CdistType(base_path, '__name_path') - self.assertEqual(cdist_type.gencode_local_path, - os.path.join('__name_path', 'gencode-local')) - - def test_gencode_remote_path(self): - base_path = fixtures - cdist_type = core.CdistType(base_path, '__name_path') - self.assertEqual(cdist_type.gencode_remote_path, - os.path.join('__name_path', 'gencode-remote')) - - def test_singleton_is_singleton(self): - base_path = fixtures - cdist_type = core.CdistType(base_path, '__singleton') - self.assertTrue(cdist_type.is_singleton) - - def test_not_singleton_is_singleton(self): - base_path = fixtures - cdist_type = core.CdistType(base_path, '__not_singleton') - self.assertFalse(cdist_type.is_singleton) - - def test_nonparallel_is_nonparallel(self): - base_path = fixtures - cdist_type = core.CdistType(base_path, '__nonparallel') - self.assertTrue(cdist_type.is_nonparallel) - - def test_not_nonparallel_is_nonparallel(self): - base_path = fixtures - cdist_type = core.CdistType(base_path, '__not_nonparallel') - self.assertFalse(cdist_type.is_nonparallel) - - def test_deprecated(self): - base_path = fixtures - cdist_type = core.CdistType(base_path, '__deprecated') - self.assertIsNotNone(cdist_type.deprecated) - - def test_not_deprecated(self): - base_path = fixtures - cdist_type = core.CdistType(base_path, '__not_deprecated') - self.assertIsNone(cdist_type.deprecated) - - def test_install_is_install(self): - base_path = fixtures - cdist_type = core.CdistType(base_path, '__install') - self.assertTrue(cdist_type.is_install) - - def test_not_install_is_install(self): - base_path = fixtures - cdist_type = core.CdistType(base_path, '__not_install') - self.assertFalse(cdist_type.is_install) - - def test_with_explorers(self): - base_path = fixtures - cdist_type = core.CdistType(base_path, '__with_explorers') - self.assertEqual(cdist_type.explorers, ['whatever']) - - def test_without_explorers(self): - base_path = fixtures - cdist_type = core.CdistType(base_path, '__without_explorers') - self.assertEqual(cdist_type.explorers, []) - - def test_with_required_parameters(self): - base_path = fixtures - cdist_type = core.CdistType(base_path, '__with_required_parameters') - self.assertEqual(cdist_type.required_parameters, - ['required1', 'required2']) - - def test_without_required_parameters(self): - base_path = fixtures - cdist_type = core.CdistType(base_path, - '__without_required_parameters') - self.assertEqual(cdist_type.required_parameters, []) - - def test_with_optional_parameters(self): - base_path = fixtures - cdist_type = core.CdistType(base_path, '__with_optional_parameters') - self.assertEqual(cdist_type.optional_parameters, - ['optional1', 'optional2']) - - def test_without_optional_parameters(self): - base_path = fixtures - cdist_type = core.CdistType(base_path, '__without_optional_parameters') - self.assertEqual(cdist_type.optional_parameters, []) - - def test_with_boolean_parameters(self): - base_path = fixtures - cdist_type = core.CdistType(base_path, '__with_boolean_parameters') - self.assertEqual(cdist_type.boolean_parameters, - ['boolean1', 'boolean2']) - - def test_without_boolean_parameters(self): - base_path = fixtures - cdist_type = core.CdistType(base_path, '__without_boolean_parameters') - self.assertEqual(cdist_type.boolean_parameters, []) - - def test_with_parameter_defaults(self): - base_path = fixtures - cdist_type = core.CdistType(base_path, '__with_parameter_defaults') - self.assertTrue('optional1' in cdist_type.parameter_defaults) - self.assertFalse('optional2' in cdist_type.parameter_defaults) - self.assertEqual(cdist_type.parameter_defaults['optional1'], 'value1') - - def test_directory_in_default(self): - base_path = fixtures - cdist_type = core.CdistType(base_path, '__directory_in_default') - self.assertEqual( - list(sorted(cdist_type.parameter_defaults.keys())), - ['bar', 'foo']) - - def test_without_deprecated_parameters(self): - base_path = fixtures - cdist_type = core.CdistType(base_path, - '__without_deprecated_parameters') - self.assertEqual(cdist_type.deprecated_parameters, {}) - - def test_with_deprecated_parameters(self): - base_path = fixtures - cdist_type = core.CdistType(base_path, '__with_deprecated_parameters') - self.assertTrue('eggs' in cdist_type.deprecated_parameters) - self.assertTrue('spam' in cdist_type.deprecated_parameters) - self.assertEqual(cdist_type.deprecated_parameters['eggs'], - 'Deprecated') - self.assertEqual(cdist_type.deprecated_parameters['spam'], '') diff --git a/cdist/test/cdist_type/fixtures/__deprecated/deprecated b/cdist/test/cdist_type/fixtures/__deprecated/deprecated deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/cdist_type/fixtures/__directory_in_default/parameter/default/a/.gitkeep b/cdist/test/cdist_type/fixtures/__directory_in_default/parameter/default/a/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/cdist_type/fixtures/__directory_in_default/parameter/default/bar b/cdist/test/cdist_type/fixtures/__directory_in_default/parameter/default/bar deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/cdist_type/fixtures/__directory_in_default/parameter/default/foo b/cdist/test/cdist_type/fixtures/__directory_in_default/parameter/default/foo deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/cdist_type/fixtures/__directory_in_default/parameter/optional b/cdist/test/cdist_type/fixtures/__directory_in_default/parameter/optional deleted file mode 100644 index 3bd1f0e2..00000000 --- a/cdist/test/cdist_type/fixtures/__directory_in_default/parameter/optional +++ /dev/null @@ -1,2 +0,0 @@ -foo -bar diff --git a/cdist/test/cdist_type/fixtures/__install/install b/cdist/test/cdist_type/fixtures/__install/install deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/cdist_type/fixtures/__name_path/.keep b/cdist/test/cdist_type/fixtures/__name_path/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/cdist_type/fixtures/__nonparallel/nonparallel b/cdist/test/cdist_type/fixtures/__nonparallel/nonparallel deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/cdist_type/fixtures/__not_install/.keep b/cdist/test/cdist_type/fixtures/__not_install/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/cdist_type/fixtures/__not_nonparallel/.keep b/cdist/test/cdist_type/fixtures/__not_nonparallel/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/cdist_type/fixtures/__not_singleton/.keep b/cdist/test/cdist_type/fixtures/__not_singleton/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/cdist_type/fixtures/__singleton/singleton b/cdist/test/cdist_type/fixtures/__singleton/singleton deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/cdist_type/fixtures/__with_boolean_parameters/parameter/boolean b/cdist/test/cdist_type/fixtures/__with_boolean_parameters/parameter/boolean deleted file mode 100644 index 3215c409..00000000 --- a/cdist/test/cdist_type/fixtures/__with_boolean_parameters/parameter/boolean +++ /dev/null @@ -1,2 +0,0 @@ -boolean1 -boolean2 diff --git a/cdist/test/cdist_type/fixtures/__with_deprecated_parameters/parameter/deprecated/eggs b/cdist/test/cdist_type/fixtures/__with_deprecated_parameters/parameter/deprecated/eggs deleted file mode 100644 index 69d9f456..00000000 --- a/cdist/test/cdist_type/fixtures/__with_deprecated_parameters/parameter/deprecated/eggs +++ /dev/null @@ -1 +0,0 @@ -Deprecated diff --git a/cdist/test/cdist_type/fixtures/__with_deprecated_parameters/parameter/deprecated/spam b/cdist/test/cdist_type/fixtures/__with_deprecated_parameters/parameter/deprecated/spam deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/cdist_type/fixtures/__with_deprecated_parameters/parameter/optional b/cdist/test/cdist_type/fixtures/__with_deprecated_parameters/parameter/optional deleted file mode 100644 index bfe09199..00000000 --- a/cdist/test/cdist_type/fixtures/__with_deprecated_parameters/parameter/optional +++ /dev/null @@ -1,3 +0,0 @@ -spam -eggs -sausage diff --git a/cdist/test/cdist_type/fixtures/__with_explorers/explorer/whatever b/cdist/test/cdist_type/fixtures/__with_explorers/explorer/whatever deleted file mode 100755 index 01b7b61c..00000000 --- a/cdist/test/cdist_type/fixtures/__with_explorers/explorer/whatever +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -echo whatever diff --git a/cdist/test/cdist_type/fixtures/__with_optional_parameters/parameter/optional b/cdist/test/cdist_type/fixtures/__with_optional_parameters/parameter/optional deleted file mode 100644 index 8174d2a9..00000000 --- a/cdist/test/cdist_type/fixtures/__with_optional_parameters/parameter/optional +++ /dev/null @@ -1,2 +0,0 @@ -optional1 -optional2 diff --git a/cdist/test/cdist_type/fixtures/__with_parameter_defaults/parameter/default/optional1 b/cdist/test/cdist_type/fixtures/__with_parameter_defaults/parameter/default/optional1 deleted file mode 100644 index ef208405..00000000 --- a/cdist/test/cdist_type/fixtures/__with_parameter_defaults/parameter/default/optional1 +++ /dev/null @@ -1 +0,0 @@ -value1 diff --git a/cdist/test/cdist_type/fixtures/__with_parameter_defaults/parameter/optional b/cdist/test/cdist_type/fixtures/__with_parameter_defaults/parameter/optional deleted file mode 100644 index 8174d2a9..00000000 --- a/cdist/test/cdist_type/fixtures/__with_parameter_defaults/parameter/optional +++ /dev/null @@ -1,2 +0,0 @@ -optional1 -optional2 diff --git a/cdist/test/cdist_type/fixtures/__with_required_parameters/parameter/required b/cdist/test/cdist_type/fixtures/__with_required_parameters/parameter/required deleted file mode 100644 index e0fba2c9..00000000 --- a/cdist/test/cdist_type/fixtures/__with_required_parameters/parameter/required +++ /dev/null @@ -1,2 +0,0 @@ -required1 -required2 diff --git a/cdist/test/cdist_type/fixtures/__without_boolean_parameters/.keep b/cdist/test/cdist_type/fixtures/__without_boolean_parameters/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/cdist_type/fixtures/__without_explorers/.keep b/cdist/test/cdist_type/fixtures/__without_explorers/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/cdist_type/fixtures/__without_optional_parameters/.keep b/cdist/test/cdist_type/fixtures/__without_optional_parameters/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/cdist_type/fixtures/__without_required_parameters/.keep b/cdist/test/cdist_type/fixtures/__without_required_parameters/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/cdist_type/fixtures/list_types/__first/.keep b/cdist/test/cdist_type/fixtures/list_types/__first/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/cdist_type/fixtures/list_types/__second/.keep b/cdist/test/cdist_type/fixtures/list_types/__second/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/cdist_type/fixtures/list_types/__third/.keep b/cdist/test/cdist_type/fixtures/list_types/__third/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/code/__init__.py b/cdist/test/code/__init__.py deleted file mode 100644 index bf80110d..00000000 --- a/cdist/test/code/__init__.py +++ /dev/null @@ -1,160 +0,0 @@ -# -*- coding: utf-8 -*- -# -# 2011-2017 Steven Armstrong (steven-cdist at armstrong.cc) -# 2012-2015 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -import getpass -import os -import shutil -import logging - -import cdist -from cdist import core -from cdist import test -from cdist.exec import local -from cdist.exec import remote -from cdist.core import code - -import os.path as op -my_dir = op.abspath(op.dirname(__file__)) -fixtures = op.join(my_dir, 'fixtures') -conf_dir = op.join(fixtures, 'conf') - - -class CodeTestCase(test.CdistTestCase): - - def setUp(self): - self.local_dir = self.mkdtemp() - self.hostdir = cdist.str_hash(self.target_host[0]) - self.host_base_path = os.path.join(self.local_dir, self.hostdir) - - self.local = local.Local( - target_host=self.target_host, - target_host_tags=self.target_host_tags, - base_root_path=self.host_base_path, - host_dir_name=self.hostdir, - exec_path=cdist.test.cdist_exec_path, - add_conf_dirs=[conf_dir]) - self.local.create_files_dirs() - - self.remote_dir = self.mkdtemp() - remote_exec = self.remote_exec - remote_copy = self.remote_copy - self.remote = remote.Remote( - target_host=self.target_host, - remote_exec=remote_exec, - remote_copy=remote_copy, - base_path=self.remote_dir, - stdout_base_path=self.local.stdout_base_path, - stderr_base_path=self.local.stderr_base_path) - self.remote.create_files_dirs() - - self.code = code.Code(self.target_host, self.local, self.remote) - - self.cdist_type = core.CdistType(self.local.type_path, - '__dump_environment') - self.cdist_object = core.CdistObject( - self.cdist_type, self.local.object_path, 'whatever', - self.local.object_marker_name) - self.cdist_object.create() - - def tearDown(self): - shutil.rmtree(self.local_dir) - shutil.rmtree(self.remote_dir) - - def test_run_gencode_local_environment(self): - output_string = self.code.run_gencode_local(self.cdist_object) - output_dict = {} - for line in output_string.split('\n'): - if line: - junk, value = line.split(': ') - key = junk.split(' ')[1] - output_dict[key] = value - self.assertEqual(output_dict['__target_host'], - self.local.target_host[0]) - self.assertEqual(output_dict['__target_hostname'], - self.local.target_host[1]) - self.assertEqual(output_dict['__target_fqdn'], - self.local.target_host[2]) - self.assertEqual(output_dict['__global'], self.local.base_path) - self.assertEqual(output_dict['__type'], self.cdist_type.absolute_path) - self.assertEqual(output_dict['__object'], - self.cdist_object.absolute_path) - self.assertEqual(output_dict['__object_id'], - self.cdist_object.object_id) - self.assertEqual(output_dict['__object_name'], self.cdist_object.name) - self.assertEqual(output_dict['__files'], self.local.files_path) - self.assertEqual(output_dict['__target_host_tags'], - self.local.target_host_tags) - self.assertEqual(output_dict['__cdist_log_level'], - str(logging.WARNING)) - self.assertEqual(output_dict['__cdist_log_level_name'], 'WARNING') - - def test_run_gencode_remote_environment(self): - output_string = self.code.run_gencode_remote(self.cdist_object) - output_dict = {} - for line in output_string.split('\n'): - if line: - junk, value = line.split(': ') - key = junk.split(' ')[1] - output_dict[key] = value - self.assertEqual(output_dict['__target_host'], - self.local.target_host[0]) - self.assertEqual(output_dict['__target_hostname'], - self.local.target_host[1]) - self.assertEqual(output_dict['__target_fqdn'], - self.local.target_host[2]) - self.assertEqual(output_dict['__global'], self.local.base_path) - self.assertEqual(output_dict['__type'], self.cdist_type.absolute_path) - self.assertEqual(output_dict['__object'], - self.cdist_object.absolute_path) - self.assertEqual(output_dict['__object_id'], - self.cdist_object.object_id) - self.assertEqual(output_dict['__object_name'], self.cdist_object.name) - self.assertEqual(output_dict['__files'], self.local.files_path) - self.assertEqual(output_dict['__target_host_tags'], - self.local.target_host_tags) - self.assertEqual(output_dict['__cdist_log_level'], - str(logging.WARNING)) - self.assertEqual(output_dict['__cdist_log_level_name'], 'WARNING') - - def test_transfer_code_remote(self): - self.cdist_object.code_remote = self.code.run_gencode_remote( - self.cdist_object) - self.code.transfer_code_remote(self.cdist_object) - destination = os.path.join(self.remote.object_path, - self.cdist_object.code_remote_path) - self.assertTrue(os.path.isfile(destination)) - - def test_run_code_local(self): - self.cdist_object.code_local = self.code.run_gencode_local( - self.cdist_object) - self.code.run_code_local(self.cdist_object) - - def test_run_code_remote_environment(self): - self.cdist_object.code_remote = self.code.run_gencode_remote( - self.cdist_object) - self.code.transfer_code_remote(self.cdist_object) - self.code.run_code_remote(self.cdist_object) - - -if __name__ == '__main__': - import unittest - unittest.main() diff --git a/cdist/test/code/fixtures/conf/type/__dump_environment/gencode-local b/cdist/test/code/fixtures/conf/type/__dump_environment/gencode-local deleted file mode 100755 index 2829d633..00000000 --- a/cdist/test/code/fixtures/conf/type/__dump_environment/gencode-local +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -echo "echo __target_host: $__target_host" -echo "echo __target_hostname: $__target_hostname" -echo "echo __target_fqdn: $__target_fqdn" -echo "echo __global: $__global" -echo "echo __type: $__type" -echo "echo __object: $__object" -echo "echo __object_id: $__object_id" -echo "echo __object_name: $__object_name" -echo "echo __files: $__files" -echo "echo __target_host_tags: $__target_host_tags" -echo "echo __cdist_log_level: $__cdist_log_level" -echo "echo __cdist_log_level_name: $__cdist_log_level_name" diff --git a/cdist/test/code/fixtures/conf/type/__dump_environment/gencode-remote b/cdist/test/code/fixtures/conf/type/__dump_environment/gencode-remote deleted file mode 120000 index 7b427cac..00000000 --- a/cdist/test/code/fixtures/conf/type/__dump_environment/gencode-remote +++ /dev/null @@ -1 +0,0 @@ -gencode-local \ No newline at end of file diff --git a/cdist/test/config/__init__.py b/cdist/test/config/__init__.py deleted file mode 100644 index 499593e3..00000000 --- a/cdist/test/config/__init__.py +++ /dev/null @@ -1,311 +0,0 @@ -# -*- coding: utf-8 -*- -# -# 2010-2017 Steven Armstrong (steven-cdist at armstrong.cc) -# 2012-2015 Nico Schottelius (nico-cdist at schottelius.org) -# 2014 Daniel Heule (hda at sfs.biz) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -import os -import shutil - -from cdist import test -from cdist import core - -import cdist -import cdist.config -import cdist.core.cdist_type -import cdist.core.cdist_object - -import os.path as op -my_dir = op.abspath(op.dirname(__file__)) -fixtures = op.join(my_dir, 'fixtures') -type_base_path = op.join(fixtures, 'type') -add_conf_dir = op.join(fixtures, 'conf') - -expected_object_names = sorted([ - '__first/man', - '__second/on-the', - '__third/moon']) - - -class CdistObjectErrorContext(object): - def __init__(self, original_error): - self.original_error = original_error - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, tb): - if exc_type is not None: - if exc_value.original_error: - raise exc_value.original_error - - -class ConfigRunTestCase(test.CdistTestCase): - - def setUp(self): - - # Change env for context - self.orig_environ = os.environ - os.environ = os.environ.copy() - self.temp_dir = self.mkdtemp() - - self.local_dir = os.path.join(self.temp_dir, "local") - self.hostdir = cdist.str_hash(self.target_host[0]) - self.host_base_path = os.path.join(self.local_dir, self.hostdir) - os.makedirs(self.host_base_path) - self.local = cdist.exec.local.Local( - target_host=self.target_host, - target_host_tags=self.target_host_tags, - base_root_path=self.host_base_path, - host_dir_name=self.hostdir) - - # Setup test objects - self.object_base_path = op.join(self.temp_dir, 'object') - - self.objects = [] - for cdist_object_name in expected_object_names: - cdist_type, cdist_object_id = cdist_object_name.split("/", 1) - cdist_object = core.CdistObject(core.CdistType(type_base_path, - cdist_type), - self.object_base_path, - self.local.object_marker_name, - cdist_object_id) - cdist_object.create() - self.objects.append(cdist_object) - - self.object_index = dict((o.name, o) for o in self.objects) - self.object_names = [o.name for o in self.objects] - - self.remote_dir = os.path.join(self.temp_dir, "remote") - os.mkdir(self.remote_dir) - self.remote = cdist.exec.remote.Remote( - target_host=self.target_host, - remote_copy=self.remote_copy, - remote_exec=self.remote_exec, - base_path=self.remote_dir, - stdout_base_path=self.local.stdout_base_path, - stderr_base_path=self.local.stderr_base_path) - - self.local.object_path = self.object_base_path - self.local.type_path = type_base_path - - self.config = cdist.config.Config(self.local, self.remote) - - def tearDown(self): - for o in self.objects: - o.requirements = [] - o.state = "" - - os.environ = self.orig_environ - shutil.rmtree(self.temp_dir) - - def assertRaisesCdistObjectError(self, original_error, callable_obj): - """ - Test if a raised CdistObjectError was caused by the given - original_error. - """ - with self.assertRaises(original_error): - try: - callable_obj() - except cdist.CdistObjectError as e: - if e.original_error: - raise e.original_error - else: - raise - - def test_dependency_resolution(self): - first = self.object_index['__first/man'] - second = self.object_index['__second/on-the'] - third = self.object_index['__third/moon'] - - first.requirements = [second.name] - second.requirements = [third.name] - - # First run: - # solves first and maybe second (depending on the order in the set) - self.config.iterate_once() - self.assertTrue(third.state == third.STATE_DONE) - - self.config.iterate_once() - self.assertTrue(second.state == second.STATE_DONE) - - try: - self.config.iterate_once() - except cdist.Error: - # Allow failing, because the third run may or may not be - # unecessary already, - # depending on the order of the objects - pass - self.assertTrue(first.state == first.STATE_DONE) - - def test_unresolvable_requirements(self): - """Ensure an exception is thrown for unresolvable depedencies""" - - # Create to objects depending on each other - no solution possible - first = self.object_index['__first/man'] - second = self.object_index['__second/on-the'] - - first.requirements = [second.name] - second.requirements = [first.name] - - self.assertRaisesCdistObjectError( - cdist.UnresolvableRequirementsError, - self.config.iterate_until_finished) - - def test_missing_requirements(self): - """Throw an error if requiring something non-existing""" - first = self.object_index['__first/man'] - first.requirements = ['__first/not/exist'] - self.assertRaisesCdistObjectError( - cdist.UnresolvableRequirementsError, - self.config.iterate_until_finished) - - def test_requirement_broken_type(self): - """Unknown type should be detected in the resolving process""" - first = self.object_index['__first/man'] - first.requirements = ['__nosuchtype/not/exist'] - self.assertRaisesCdistObjectError( - cdist.core.cdist_type.InvalidTypeError, - self.config.iterate_until_finished) - - def test_requirement_singleton_where_no_singleton(self): - """Missing object id should be detected in the resolving process""" - first = self.object_index['__first/man'] - first.requirements = ['__first'] - self.assertRaisesCdistObjectError( - cdist.core.cdist_object.MissingObjectIdError, - self.config.iterate_until_finished) - - def test_dryrun(self): - """Test if the dryrun option is working like expected""" - drylocal = cdist.exec.local.Local( - target_host=self.target_host, - target_host_tags=self.target_host_tags, - base_root_path=self.host_base_path, - host_dir_name=self.hostdir, - # exec_path can not derivated from sys.argv in case of unittest - exec_path=os.path.abspath(os.path.join( - my_dir, '../../../scripts/cdist')), - initial_manifest=os.path.join(fixtures, - 'manifest/dryrun_manifest'), - add_conf_dirs=[fixtures]) - - dryrun = cdist.config.Config(drylocal, self.remote, dry_run=True) - dryrun.run() - # if we are here, dryrun works like expected - - def test_deps_resolver(self): - """Test to show dependency resolver warning message.""" - local = cdist.exec.local.Local( - target_host=self.target_host, - target_host_tags=self.target_host_tags, - base_root_path=self.host_base_path, - host_dir_name=self.hostdir, - exec_path=os.path.abspath(os.path.join( - my_dir, '../../../scripts/cdist')), - initial_manifest=os.path.join( - fixtures, 'manifest/init-deps-resolver'), - add_conf_dirs=[fixtures]) - - # dry_run is ok for dependency testing - config = cdist.config.Config(local, self.remote, dry_run=True) - config.run() - - def test_graph_check_cycle_empty(self): - graph = {} - has_cycle, path = cdist.config.graph_check_cycle(graph) - self.assertFalse(has_cycle) - - def test_graph_check_cycle_1(self): - # - # a -> b -> c - # | - # +--> d -> e - graph = { - 'a': ['b', ], - 'b': ['c', 'd', ], - 'd': ['e', ], - } - has_cycle, path = cdist.config.graph_check_cycle(graph) - self.assertFalse(has_cycle) - - def test_graph_check_cycle_2(self): - # - # a -> b -> c - # /\ | - # \ | - # +-------+ - graph = { - 'a': ['b', ], - 'b': ['c', ], - 'c': ['a', ], - } - has_cycle, path = cdist.config.graph_check_cycle(graph) - self.assertTrue(has_cycle) - self.assertGreater(path.count(path[-1]), 1) - - def test_graph_check_cycle_3(self): - # - # a -> b -> c - # \ \ - # \ +--> g - # \ /\ - # \ /| - # +-> d -> e | - # \ | - # + --> f - # - # h -> i --> j - # | /\ | - # \/ | \/ - # n m <- k - graph = { - 'a': ['b', 'd', ], - 'b': ['c', ], - 'c': ['g', ], - 'd': ['e', 'f', ], - 'e': ['g', ], - 'f': ['g', ], - 'h': ['i', 'n', ], - 'i': ['j', ], - 'j': ['k', ], - 'k': ['m', ], - 'm': ['i', ], - } - has_cycle, path = cdist.config.graph_check_cycle(graph) - self.assertTrue(has_cycle) - self.assertGreater(path.count(path[-1]), 1) - - -# Currently the resolving code will simply detect that this object does -# not exist. It should probably check if the type is a singleton as well -# - but maybe only in the emulator - to be discussed. -# -# def test_requirement_no_singleton_where_singleton(self): -# """Missing object id should be detected in the resolving process""" -# first = self.object_index['__first/man'] -# first.requirements = ['__singleton_test/foo'] -# with self.assertRaises(cdist.core.?????): -# self.config.iterate_until_finished() - -if __name__ == "__main__": - import unittest - - unittest.main() diff --git a/cdist/test/config/fixtures/manifest/dryrun_manifest b/cdist/test/config/fixtures/manifest/dryrun_manifest deleted file mode 100644 index 53bb9aa5..00000000 --- a/cdist/test/config/fixtures/manifest/dryrun_manifest +++ /dev/null @@ -1 +0,0 @@ -__dryrun_test testit diff --git a/cdist/test/config/fixtures/manifest/init-deps-resolver b/cdist/test/config/fixtures/manifest/init-deps-resolver deleted file mode 100644 index f67ab61c..00000000 --- a/cdist/test/config/fixtures/manifest/init-deps-resolver +++ /dev/null @@ -1,8 +0,0 @@ -__a a -require="__e/e" __b b -require="__f/f" __c c -__e e -__f f -require="__c/c" __d d -__g g -__h h diff --git a/cdist/test/config/fixtures/object/__first/.keep b/cdist/test/config/fixtures/object/__first/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/config/fixtures/object/__first/man/.cdist/.keep b/cdist/test/config/fixtures/object/__first/man/.cdist/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/config/fixtures/object/__second/.keep b/cdist/test/config/fixtures/object/__second/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/config/fixtures/object/__second/on-the/.cdist/.keep b/cdist/test/config/fixtures/object/__second/on-the/.cdist/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/config/fixtures/object/__third/.keep b/cdist/test/config/fixtures/object/__third/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/config/fixtures/object/__third/moon/.cdist/.keep b/cdist/test/config/fixtures/object/__third/moon/.cdist/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/config/fixtures/object/__third/moon/.cdist/parameter/name b/cdist/test/config/fixtures/object/__third/moon/.cdist/parameter/name deleted file mode 100644 index 4129a761..00000000 --- a/cdist/test/config/fixtures/object/__third/moon/.cdist/parameter/name +++ /dev/null @@ -1 +0,0 @@ -Prometheus diff --git a/cdist/test/config/fixtures/object/__third/moon/.cdist/parameter/planet b/cdist/test/config/fixtures/object/__third/moon/.cdist/parameter/planet deleted file mode 100644 index 8e6ee422..00000000 --- a/cdist/test/config/fixtures/object/__third/moon/.cdist/parameter/planet +++ /dev/null @@ -1 +0,0 @@ -Saturn diff --git a/cdist/test/config/fixtures/type/__a/.keep b/cdist/test/config/fixtures/type/__a/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/config/fixtures/type/__b/.keep b/cdist/test/config/fixtures/type/__b/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/config/fixtures/type/__c/.keep b/cdist/test/config/fixtures/type/__c/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/config/fixtures/type/__d/.keep b/cdist/test/config/fixtures/type/__d/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/config/fixtures/type/__dryrun_test/.keep b/cdist/test/config/fixtures/type/__dryrun_test/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/config/fixtures/type/__dryrun_test/gencode-local b/cdist/test/config/fixtures/type/__dryrun_test/gencode-local deleted file mode 100644 index ccd584bd..00000000 --- a/cdist/test/config/fixtures/type/__dryrun_test/gencode-local +++ /dev/null @@ -1,3 +0,0 @@ -# this type is only for testing the dryrun feature, it does nothing usefull -echo 'echo "This gencode-local script should never be executed >&2"' -echo 'exit 1' diff --git a/cdist/test/config/fixtures/type/__dryrun_test/gencode-remote b/cdist/test/config/fixtures/type/__dryrun_test/gencode-remote deleted file mode 100644 index e57e4e27..00000000 --- a/cdist/test/config/fixtures/type/__dryrun_test/gencode-remote +++ /dev/null @@ -1,3 +0,0 @@ -# this type is only for testing the dryrun feature, it does nothing usefull -echo 'echo "this gencode-remote script should never be executed >&2"' -echo 'exit 1' diff --git a/cdist/test/config/fixtures/type/__e/.keep b/cdist/test/config/fixtures/type/__e/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/config/fixtures/type/__f/.keep b/cdist/test/config/fixtures/type/__f/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/config/fixtures/type/__first/.keep b/cdist/test/config/fixtures/type/__first/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/config/fixtures/type/__g/.keep b/cdist/test/config/fixtures/type/__g/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/config/fixtures/type/__g/manifest b/cdist/test/config/fixtures/type/__g/manifest deleted file mode 100644 index 107dbda4..00000000 --- a/cdist/test/config/fixtures/type/__g/manifest +++ /dev/null @@ -1 +0,0 @@ -require="__c/c __d/d" __a a diff --git a/cdist/test/config/fixtures/type/__h/.keep b/cdist/test/config/fixtures/type/__h/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/config/fixtures/type/__h/manifest b/cdist/test/config/fixtures/type/__h/manifest deleted file mode 100644 index ce3d8fb7..00000000 --- a/cdist/test/config/fixtures/type/__h/manifest +++ /dev/null @@ -1,3 +0,0 @@ -# require="__b/b" __a a -require="__j/j" __i i -__j j diff --git a/cdist/test/config/fixtures/type/__i/.keep b/cdist/test/config/fixtures/type/__i/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/config/fixtures/type/__j/.keep b/cdist/test/config/fixtures/type/__j/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/config/fixtures/type/__second/.keep b/cdist/test/config/fixtures/type/__second/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/config/fixtures/type/__singleton_test/singleton b/cdist/test/config/fixtures/type/__singleton_test/singleton deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/config/fixtures/type/__third/.keep b/cdist/test/config/fixtures/type/__third/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/configuration/__init__.py b/cdist/test/configuration/__init__.py deleted file mode 100644 index 182868a6..00000000 --- a/cdist/test/configuration/__init__.py +++ /dev/null @@ -1,1415 +0,0 @@ -# -*- coding: utf-8 -*- -# -# 2017 Darko Poljak (darko.poljak at gmail.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -import configparser -import os -import multiprocessing -import cdist.configuration as cc -import os.path as op -import argparse -from cdist import test -import cdist.argparse as cap -import logging - -my_dir = op.abspath(op.dirname(__file__)) -fixtures = op.join(my_dir, 'fixtures') -interpolation_config_file = op.join(fixtures, "interpolation-test.cfg") - - -def newConfigParser(): - return configparser.ConfigParser(interpolation=None) - - -class ConfigurationOptionsTestCase(test.CdistTestCase): - - def test_OptionBase(self): - option = cc.OptionBase('test') - test_cases = ( - ([], [], True, None, ), - (['spam', 'eggs', ], [], True, ['spam', 'eggs', ], ), - ([], ['spam', 'eggs', ], True, ['spam', 'eggs', ], ), - ( - ['spam', 'eggs', ], - ['ham', 'spamspam', ], - True, - ['spam', 'eggs', 'ham', 'spamspam', ], - ), - (['spam', 'eggs', ], 'spam:eggs', True, 'spam:eggs', ), - ('spam:eggs', ['spam', 'eggs', ], True, ['spam', 'eggs', ], ), - ('spam', 'eggs', True, 'eggs', ), - - (['spam', 'eggs', ], 'spam:eggs', True, 'spam:eggs', ), - - ('spam:eggs', ['spam', 'eggs', ], False, ['spam', 'eggs', ], ), - ('spam', 'eggs', False, 'eggs', ), - ( - ['spam', 'eggs', ], - ['ham', 'spamspam', ], - False, - ['ham', 'spamspam', ], - ), - ) - for currval, newval, update_appends, expected in test_cases: - self.assertEqual( - option.update_value(currval, newval, - update_appends=update_appends), - expected) - - def test_StringOption(self): - option = cc.StringOption('test') - self.assertIsNone(option.translate('')) - self.assertEqual(option.translate('spam'), 'spam') - converter = option.get_converter() - self.assertEqual(converter('spam'), 'spam') - self.assertIsNone(converter('')) - - def test_BooleanOption(self): - option = cc.BooleanOption('test') - for x in cc.BooleanOption.BOOLEAN_STATES: - self.assertEqual(option.translate(x), - cc.BooleanOption.BOOLEAN_STATES[x]) - converter = option.get_converter() - self.assertRaises(ValueError, converter, 'of') - for x in cc.BooleanOption.BOOLEAN_STATES: - self.assertEqual(converter(x), cc.BooleanOption.BOOLEAN_STATES[x]) - - def test_IntOption(self): - option = cc.IntOption('test') - converter = option.get_converter() - self.assertRaises(ValueError, converter, 'x') - for x in range(-5, 10): - self.assertEqual(converter(str(x)), x) - - def test_LowerBoundIntOption(self): - option = cc.LowerBoundIntOption('test', -1) - converter = option.get_converter() - self.assertRaises(ValueError, converter, -2) - for x in range(-1, 10): - self.assertEqual(converter(str(x)), x) - - def test_SpecialCasesLowerBoundIntOption(self): - special_cases = { - -1: 8, - -2: 10, - } - option = cc.SpecialCasesLowerBoundIntOption('test', -1, special_cases) - for x in special_cases: - self.assertEqual(option.translate(x), special_cases[x]) - - def test_SelectOption(self): - valid_values = ('spam', 'eggs', 'ham', ) - option = cc.SelectOption('test', valid_values) - converter = option.get_converter() - self.assertRaises(ValueError, converter, 'spamspam') - for x in valid_values: - self.assertEqual(converter(x), x) - - def test_DelimitedValuesOption(self): - option = cc.DelimitedValuesOption('test', ':') - converter = option.get_converter() - value = 'spam:eggs::ham' - self.assertEqual(converter(value), ['spam', 'eggs', 'ham', ]) - self.assertIsNone(converter('')) - - def test_LogLevelOption(self): - option = cc.LogLevelOption() - converter = option.get_converter() - value = str(logging.DEBUG) - conv_val = converter(value) - self.assertEqual(conv_val, cap.VERBOSE_DEBUG) - value = str(logging.INFO) - conv_val = converter(value) - self.assertEqual(conv_val, cap.VERBOSE_INFO) - for value in ('11', '80', 'a'): - self.assertRaises(ValueError, converter, value) - - -class ConfigurationTestCase(test.CdistTestCase): - - def setUp(self): - # Create test config file. - config = newConfigParser() - config['GLOBAL'] = { - 'beta': 'off', - 'local_shell': '/bin/sh', - 'remote_shell': '/bin/sh', - 'inventory_dir': '', - 'cache_path_pattern': '', - 'conf_dir': '', - 'init_manifest': '', - 'out_path': '', - 'remote_out_path': '', - 'remote_copy': '', - 'remote_exec': '', - 'jobs': '0', - 'parallel': '-1', - 'verbosity': 'INFO', - 'archiving': 'none', - } - config_custom = newConfigParser() - config_custom['GLOBAL'] = { - 'parallel': '4', - 'archiving': 'txz', - } - - config_custom2 = newConfigParser() - config_custom2['GLOBAL'] = { - 'parallel': '16', - 'archiving': 'tbz2', - 'remote_copy': 'myscp', - } - - self.expected_config_dict = { - 'GLOBAL': { - 'beta': False, - 'local_shell': '/bin/sh', - 'remote_shell': '/bin/sh', - 'inventory_dir': None, - 'cache_path_pattern': None, - 'conf_dir': None, - 'init_manifest': None, - 'out_path': None, - 'remote_out_path': None, - 'remote_copy': None, - 'remote_exec': None, - 'jobs': 0, - 'parallel': multiprocessing.cpu_count(), - 'verbosity': cap.VERBOSE_INFO, - 'archiving': None, - }, - } - - self.config_file = os.path.join(fixtures, 'cdist.cfg') - with open(self.config_file, 'w') as f: - config.write(f) - - self.custom_config_file = os.path.join(fixtures, 'cdist_custom.cfg') - with open(self.custom_config_file, 'w') as f: - config_custom.write(f) - - self.custom_config_file2 = os.path.join(fixtures, 'cdist_custom2.cfg') - with open(self.custom_config_file2, 'w') as f: - config_custom2.write(f) - - config['TEST'] = {} - self.invalid_config_file1 = os.path.join(fixtures, - 'cdist_invalid1.cfg') - with open(self.invalid_config_file1, 'w') as f: - config.write(f) - - del config['TEST'] - config['GLOBAL']['test'] = 'test' - self.invalid_config_file2 = os.path.join(fixtures, - 'cdist_invalid2.cfg') - with open(self.invalid_config_file2, 'w') as f: - config.write(f) - - del config['GLOBAL']['test'] - config['GLOBAL']['archiving'] = 'zip' - self.invalid_config_file3 = os.path.join(fixtures, - 'cdist_invalid3.cfg') - with open(self.invalid_config_file3, 'w') as f: - config.write(f) - - self.maxDiff = None - - def tearDown(self): - os.remove(self.config_file) - os.remove(self.custom_config_file) - os.remove(self.custom_config_file2) - os.remove(self.invalid_config_file1) - os.remove(self.invalid_config_file2) - os.remove(self.invalid_config_file3) - - # remove files from tests - global_config_file = os.path.join(fixtures, 'cdist-global.cfg') - local_config_file = os.path.join(fixtures, 'cdist-local.cfg') - custom_config_file = os.path.join(fixtures, 'cdist-custom.cfg') - if os.path.exists(global_config_file): - os.remove(global_config_file) - if os.path.exists(local_config_file): - os.remove(local_config_file) - if os.path.exists(custom_config_file): - os.remove(custom_config_file) - - def test_singleton(self): - x = cc.Configuration(None, env={}, config_files=()) - args = argparse.Namespace() - args.a = 'a' - y = cc.Configuration(args, env={}, config_files=()) - self.assertIs(x, y) - - def test_non_singleton(self): - x = cc.Configuration(None, env={}, config_files=(), singleton=False) - args = argparse.Namespace() - args.a = 'a' - y = cc.Configuration(args, env={}, config_files=(), singleton=False) - self.assertIsNot(x, y) - - def test_read_config_file(self): - config = cc.Configuration(None, env={}, config_files=()) - d = config._read_config_file(self.config_file) - self.assertEqual(d, self.expected_config_dict) - - for x in range(1, 4): - config_file = getattr(self, 'invalid_config_file' + str(x)) - with self.assertRaises(ValueError): - config._read_config_file(config_file) - - def test_read_env_var_config(self): - config = cc.Configuration(None, env={}, config_files=()) - env = { - 'a': 'a', - 'CDIST_BETA': '1', - 'CDIST_PATH': '/usr/local/cdist:~/.cdist', - } - expected = { - 'beta': True, - 'conf_dir': ['/usr/local/cdist', '~/.cdist', ], - } - section = 'GLOBAL' - d = config._read_env_var_config(env, section) - self.assertEqual(d, expected) - - del env['CDIST_BETA'] - del expected['beta'] - d = config._read_env_var_config(env, section) - self.assertEqual(d, expected) - - def test_read_args_config(self): - config = cc.Configuration(None, env={}, config_files=()) - args = argparse.Namespace() - args.beta = False - args.conf_dir = ['/usr/local/cdist1', ] - args.verbose = 3 - args.tag = 'test' - - expected = { - 'conf_dir': ['/usr/local/cdist1', ], - 'verbosity': 3, - 'beta': False, - } - args_dict = vars(args) - d = config._read_args_config(args_dict) - self.assertEqual(d, expected) - self.assertNotEqual(d, args_dict) - - def test_update_config_dict(self): - config = { - 'GLOBAL': { - 'conf_dir': ['/usr/local/cdist', ], - 'parallel': -1, - }, - } - newconfig = { - 'GLOBAL': { - 'conf_dir': ['~/.cdist', ], - 'parallel': 2, - 'local_shell': '/usr/local/bin/sh', - }, - } - expected = { - 'GLOBAL': { - 'conf_dir': ['/usr/local/cdist', '~/.cdist', ], - 'parallel': 2, - 'local_shell': '/usr/local/bin/sh', - }, - } - configuration = cc.Configuration(None, env={}, config_files=()) - configuration._update_config_dict(config, newconfig, - update_appends=True) - self.assertEqual(config, expected) - expected = { - 'GLOBAL': { - 'conf_dir': ['~/.cdist', ], - 'parallel': 2, - 'local_shell': '/usr/local/bin/sh', - }, - } - configuration._update_config_dict(config, newconfig, - update_appends=False) - self.assertEqual(config, expected) - - def test_update_config_dict_section(self): - config = { - 'GLOBAL': { - 'conf_dir': ['/usr/local/cdist', ], - 'parallel': -1, - }, - } - newconfig = { - 'conf_dir': ['~/.cdist', ], - 'parallel': 2, - 'local_shell': '/usr/local/bin/sh', - } - expected = { - 'GLOBAL': { - 'conf_dir': ['/usr/local/cdist', '~/.cdist', ], - 'parallel': 2, - 'local_shell': '/usr/local/bin/sh', - }, - } - configuration = cc.Configuration(None, env={}, config_files=()) - configuration._update_config_dict_section('GLOBAL', config, newconfig, - update_appends=True) - self.assertEqual(config, expected) - expected = { - 'GLOBAL': { - 'conf_dir': ['~/.cdist', ], - 'parallel': 2, - 'local_shell': '/usr/local/bin/sh', - }, - } - configuration._update_config_dict_section('GLOBAL', config, newconfig, - update_appends=False) - self.assertEqual(config, expected) - - def test_configuration1(self): - env = { - 'PATH': '/usr/local/bin:/usr/bin:/bin', - 'TEST': 'test', - } - args = argparse.Namespace() - expected_config_dict = { - 'GLOBAL': { - 'verbosity': 0, - }, - } - - # bypass singleton so we can test further - cc.Configuration.instance = None - configuration = cc.Configuration(args, env=env, - config_files=('cdist.cfg')) - self.assertIsNotNone(configuration.args) - self.assertIsNotNone(configuration.env) - self.assertIsNotNone(configuration.config_files) - self.assertEqual(configuration.config, expected_config_dict) - - def test_configuration2(self): - env = { - 'PATH': '/usr/local/bin:/usr/bin:/bin', - 'TEST': 'test', - } - args = argparse.Namespace() - - config = newConfigParser() - config['GLOBAL'] = { - 'beta': 'off', - 'local_shell': '/bin/sh', - 'remote_shell': '/bin/sh', - 'inventory_dir': '', - 'cache_path_pattern': '', - 'conf_dir': '', - 'init_manifest': '', - 'out_path': '', - 'remote_out_path': '', - 'remote_copy': '', - 'remote_exec': '', - 'jobs': '0', - 'parallel': '-1', - 'verbosity': 'INFO', - 'archiving': 'none', - } - - global_config_file = os.path.join(fixtures, 'cdist-global.cfg') - with open(global_config_file, 'w') as f: - config.write(f) - - expected_config_dict = { - 'GLOBAL': { - 'beta': False, - 'local_shell': '/bin/sh', - 'remote_shell': '/bin/sh', - 'inventory_dir': None, - 'cache_path_pattern': None, - 'conf_dir': None, - 'init_manifest': None, - 'out_path': None, - 'remote_out_path': None, - 'remote_copy': None, - 'remote_exec': None, - 'jobs': 0, - 'parallel': multiprocessing.cpu_count(), - 'verbosity': cap.VERBOSE_INFO, - 'archiving': None, - }, - } - config_files = (global_config_file, ) - - # bypass singleton so we can test further - cc.Configuration.instance = None - - configuration = cc.Configuration(args, env=env, - config_files=config_files) - self.assertEqual(configuration.config, expected_config_dict) - - def test_configuration3(self): - env = { - 'PATH': '/usr/local/bin:/usr/bin:/bin', - 'TEST': 'test', - } - args = argparse.Namespace() - - config = newConfigParser() - config['GLOBAL'] = { - 'beta': 'off', - 'local_shell': '/bin/sh', - 'remote_shell': '/bin/sh', - 'inventory_dir': '', - 'cache_path_pattern': '', - 'conf_dir': '', - 'init_manifest': '', - 'out_path': '', - 'remote_out_path': '', - 'remote_copy': '', - 'remote_exec': '', - 'jobs': '0', - 'parallel': '-1', - 'verbosity': 'INFO', - 'archiving': 'none', - } - - global_config_file = os.path.join(fixtures, 'cdist-global.cfg') - with open(global_config_file, 'w') as f: - config.write(f) - - config = newConfigParser() - config['GLOBAL'] = { - 'beta': 'on', - 'local_shell': '/usr/bin/sh', - 'remote_shell': '/usr/bin/sh', - 'inventory_dir': '/var/db/cdist/inventory', - 'conf_dir': '/opt/cdist', - 'remote_copy': 'myscp', - 'remote_exec': 'myexec', - 'parallel': '-1', - 'archiving': 'tar', - } - - local_config_file = os.path.join(fixtures, 'cdist-local.cfg') - with open(local_config_file, 'w') as f: - config.write(f) - - expected_config_dict = { - 'GLOBAL': { - 'beta': True, - 'local_shell': '/usr/bin/sh', - 'remote_shell': '/usr/bin/sh', - 'inventory_dir': '/var/db/cdist/inventory', - 'cache_path_pattern': None, - 'conf_dir': ['/opt/cdist', ], - 'init_manifest': None, - 'out_path': None, - 'remote_out_path': None, - 'remote_copy': 'myscp', - 'remote_exec': 'myexec', - 'jobs': 0, - 'parallel': multiprocessing.cpu_count(), - 'verbosity': cap.VERBOSE_INFO, - 'archiving': 'tar', - }, - } - config_files = (global_config_file, local_config_file, ) - - # bypass singleton so we can test further - cc.Configuration.instance = None - - configuration = cc.Configuration(args, env=env, - config_files=config_files) - self.assertEqual(configuration.config, expected_config_dict) - - def test_configuration4(self): - env = { - 'PATH': '/usr/local/bin:/usr/bin:/bin', - 'TEST': 'test', - 'CDIST_PATH': '/opt/cdist/conf:/usr/local/share/cdist/conf', - 'REMOTE_COPY': 'scp', - 'REMOTE_EXEC': 'ssh', - 'CDIST_BETA': '1', - 'CDIST_LOCAL_SHELL': '/usr/bin/sh', - 'CDIST_REMOTE_SHELL': '/usr/bin/sh', - } - args = argparse.Namespace() - - config = newConfigParser() - config['GLOBAL'] = { - 'beta': 'off', - 'local_shell': '/bin/sh', - 'remote_shell': '/bin/sh', - 'inventory_dir': '', - 'cache_path_pattern': '', - 'conf_dir': '', - 'init_manifest': '', - 'out_path': '', - 'remote_out_path': '', - 'remote_copy': '', - 'remote_exec': '', - 'jobs': '0', - 'parallel': '-1', - 'verbosity': 'INFO', - 'archiving': 'none', - } - - global_config_file = os.path.join(fixtures, 'cdist-global.cfg') - with open(global_config_file, 'w') as f: - config.write(f) - - expected_config_dict = { - 'GLOBAL': { - 'beta': True, - 'local_shell': '/usr/bin/sh', - 'remote_shell': '/usr/bin/sh', - 'inventory_dir': None, - 'cache_path_pattern': None, - 'conf_dir': [ - '/opt/cdist/conf', - '/usr/local/share/cdist/conf', - ], - 'init_manifest': None, - 'out_path': None, - 'remote_out_path': None, - 'remote_copy': None, - 'remote_exec': None, - 'jobs': 0, - 'parallel': multiprocessing.cpu_count(), - 'verbosity': cap.VERBOSE_INFO, - 'archiving': None, - }, - } - config_files = (global_config_file, ) - - # bypass singleton so we can test further - cc.Configuration.instance = None - - configuration = cc.Configuration(args, env=env, - config_files=config_files) - self.assertEqual(configuration.config, expected_config_dict) - - def test_configuration5(self): - env = { - 'PATH': '/usr/local/bin:/usr/bin:/bin', - 'TEST': 'test', - 'CDIST_PATH': '/opt/cdist/conf:/usr/local/share/cdist/conf', - 'REMOTE_COPY': 'scp', - 'REMOTE_EXEC': 'ssh', - 'CDIST_BETA': '1', - 'CDIST_LOCAL_SHELL': '/usr/bin/sh', - 'CDIST_REMOTE_SHELL': '/usr/bin/sh', - } - args = argparse.Namespace() - - config = newConfigParser() - config['GLOBAL'] = { - 'beta': 'off', - 'local_shell': '/bin/sh', - 'remote_shell': '/bin/sh', - 'inventory_dir': '', - 'cache_path_pattern': '', - 'conf_dir': '', - 'init_manifest': '', - 'out_path': '', - 'remote_out_path': '', - 'remote_copy': '', - 'remote_exec': '', - 'jobs': '0', - 'parallel': '-1', - 'verbosity': 'INFO', - 'archiving': 'none', - } - - global_config_file = os.path.join(fixtures, 'cdist-global.cfg') - with open(global_config_file, 'w') as f: - config.write(f) - - config = newConfigParser() - config['GLOBAL'] = { - 'beta': 'on', - 'local_shell': '/usr/bin/sh', - 'remote_shell': '/usr/bin/sh', - 'inventory_dir': '/var/db/cdist/inventory', - 'conf_dir': '/opt/cdist', - 'remote_copy': 'myscp', - 'remote_exec': 'myexec', - 'parallel': '-1', - 'archiving': 'tar', - } - - local_config_file = os.path.join(fixtures, 'cdist-local.cfg') - with open(local_config_file, 'w') as f: - config.write(f) - - expected_config_dict = { - 'GLOBAL': { - 'beta': True, - 'local_shell': '/usr/bin/sh', - 'remote_shell': '/usr/bin/sh', - 'inventory_dir': '/var/db/cdist/inventory', - 'cache_path_pattern': None, - 'conf_dir': [ - '/opt/cdist/conf', - '/usr/local/share/cdist/conf', - ], - 'init_manifest': None, - 'out_path': None, - 'remote_out_path': None, - 'remote_copy': 'myscp', - 'remote_exec': 'myexec', - 'jobs': 0, - 'parallel': multiprocessing.cpu_count(), - 'verbosity': cap.VERBOSE_INFO, - 'archiving': 'tar', - }, - } - config_files = (global_config_file, local_config_file, ) - - # bypass singleton so we can test further - cc.Configuration.instance = None - - configuration = cc.Configuration(args, env=env, - config_files=config_files) - self.assertEqual(configuration.config, expected_config_dict) - - def test_update_defaults_for_unset(self): - config = { - 'GLOBAL': { - }, - } - expected_config = { - 'GLOBAL': { - 'verbosity': 0, - }, - } - cfg = cc.Configuration(None, env={}, config_files=()) - cfg._update_defaults_for_unset(config) - self.assertEqual(config, expected_config) - - def test_configuration6(self): - env = { - 'PATH': '/usr/local/bin:/usr/bin:/bin', - 'TEST': 'test', - 'CDIST_PATH': '/opt/cdist/conf:/usr/local/share/cdist/conf', - 'REMOTE_COPY': 'scp', - 'REMOTE_EXEC': 'ssh', - 'CDIST_BETA': '1', - 'CDIST_LOCAL_SHELL': '/usr/bin/sh', - 'CDIST_REMOTE_SHELL': '/usr/bin/sh', - } - args = argparse.Namespace() - - config = newConfigParser() - config['GLOBAL'] = { - 'beta': 'off', - 'local_shell': '/bin/sh', - 'remote_shell': '/bin/sh', - 'inventory_dir': '', - 'cache_path_pattern': '', - 'conf_dir': '', - 'init_manifest': '', - 'out_path': '', - 'remote_out_path': '', - 'remote_copy': '', - 'remote_exec': '', - 'jobs': '0', - 'parallel': '-1', - 'verbosity': 'INFO', - 'archiving': 'none', - } - - global_config_file = os.path.join(fixtures, 'cdist-global.cfg') - with open(global_config_file, 'w') as f: - config.write(f) - - config = newConfigParser() - config['GLOBAL'] = { - 'beta': 'on', - 'local_shell': '/usr/bin/sh', - 'remote_shell': '/usr/bin/sh', - 'inventory_dir': '/var/db/cdist/inventory', - 'conf_dir': '/opt/cdist', - 'remote_copy': 'myscp', - 'remote_exec': 'myexec', - 'parallel': '-1', - 'archiving': 'tar', - } - - local_config_file = os.path.join(fixtures, 'cdist-local.cfg') - with open(local_config_file, 'w') as f: - config.write(f) - - args.inventory_dir = '/opt/sysadmin/cdist/inventory' - args.conf_dir = ['/opt/sysadmin/cdist/conf', ] - args.manifest = '/opt/sysadmin/cdist/conf/manifest/init' - args.jobs = 10 - args.verbose = None - - expected_config_dict = { - 'GLOBAL': { - 'beta': True, - 'local_shell': '/usr/bin/sh', - 'remote_shell': '/usr/bin/sh', - 'inventory_dir': '/opt/sysadmin/cdist/inventory', - 'cache_path_pattern': None, - 'conf_dir': [ - '/opt/cdist/conf', - '/usr/local/share/cdist/conf', - '/opt/sysadmin/cdist/conf', - ], - 'init_manifest': '/opt/sysadmin/cdist/conf/manifest/init', - 'out_path': None, - 'remote_out_path': None, - 'remote_copy': 'myscp', - 'remote_exec': 'myexec', - 'jobs': 10, - 'parallel': multiprocessing.cpu_count(), - 'verbosity': cap.VERBOSE_INFO, - 'archiving': 'tar', - }, - } - config_files = (global_config_file, local_config_file, ) - - # bypass singleton so we can test further - cc.Configuration.instance = None - - configuration = cc.Configuration(args, env=env, - config_files=config_files) - self.assertEqual(configuration.config, expected_config_dict) - - def test_configuration7(self): - env = { - 'PATH': '/usr/local/bin:/usr/bin:/bin', - 'TEST': 'test', - 'CDIST_PATH': '/opt/cdist/conf:/usr/local/share/cdist/conf', - 'REMOTE_COPY': 'scp', - 'REMOTE_EXEC': 'ssh', - 'CDIST_BETA': '1', - 'CDIST_LOCAL_SHELL': '/usr/bin/sh', - 'CDIST_REMOTE_SHELL': '/usr/bin/sh', - } - args = argparse.Namespace() - - config = newConfigParser() - config['GLOBAL'] = { - 'beta': 'off', - 'local_shell': '/bin/sh', - 'remote_shell': '/bin/sh', - 'inventory_dir': '', - 'cache_path_pattern': '', - 'conf_dir': '', - 'init_manifest': '', - 'out_path': '', - 'remote_out_path': '', - 'remote_copy': '', - 'remote_exec': '', - 'jobs': '0', - 'parallel': '-1', - 'verbosity': 'INFO', - 'archiving': 'none', - } - - global_config_file = os.path.join(fixtures, 'cdist-global.cfg') - with open(global_config_file, 'w') as f: - config.write(f) - - config = newConfigParser() - config['GLOBAL'] = { - 'beta': 'on', - 'local_shell': '/usr/bin/sh', - 'remote_shell': '/usr/bin/sh', - 'inventory_dir': '/var/db/cdist/inventory', - 'conf_dir': '/opt/cdist', - 'remote_copy': 'myscp', - 'remote_exec': 'myexec', - 'parallel': '-1', - 'archiving': 'tar', - } - - local_config_file = os.path.join(fixtures, 'cdist-local.cfg') - with open(local_config_file, 'w') as f: - config.write(f) - - config = newConfigParser() - config['GLOBAL'] = { - 'conf_dir': '/opt/conf/cdist', - 'remote_copy': 'scpcustom', - 'remote_exec': 'sshcustom', - 'parallel': '15', - 'archiving': 'txz', - } - - custom_config_file = os.path.join(fixtures, 'cdist-custom.cfg') - with open(custom_config_file, 'w') as f: - config.write(f) - - expected_config_dict = { - 'GLOBAL': { - 'beta': True, - 'local_shell': '/usr/bin/sh', - 'remote_shell': '/usr/bin/sh', - 'inventory_dir': '/var/db/cdist/inventory', - 'cache_path_pattern': None, - 'conf_dir': [ - '/opt/conf/cdist', - ], - 'init_manifest': None, - 'out_path': None, - 'remote_out_path': None, - 'remote_copy': 'scpcustom', - 'remote_exec': 'sshcustom', - 'jobs': 0, - 'parallel': 15, - 'verbosity': cap.VERBOSE_INFO, - 'archiving': 'txz', - }, - } - - config_files = (global_config_file, local_config_file, ) - - args.config_file = custom_config_file - - # bypass singleton so we can test further - cc.Configuration.instance = None - - configuration = cc.Configuration(args, env=env, - config_files=config_files) - self.assertEqual(configuration.config, expected_config_dict) - - def test_configuration8(self): - env = { - 'PATH': '/usr/local/bin:/usr/bin:/bin', - 'TEST': 'test', - 'CDIST_PATH': '/opt/cdist/conf:/usr/local/share/cdist/conf', - 'REMOTE_COPY': 'scp', - 'REMOTE_EXEC': 'ssh', - 'CDIST_BETA': '1', - 'CDIST_LOCAL_SHELL': '/usr/bin/sh', - 'CDIST_REMOTE_SHELL': '/usr/bin/sh', - } - args = argparse.Namespace() - - config = newConfigParser() - config['GLOBAL'] = { - 'beta': 'off', - 'local_shell': '/bin/sh', - 'remote_shell': '/bin/sh', - 'inventory_dir': '', - 'cache_path_pattern': '', - 'conf_dir': '', - 'init_manifest': '', - 'out_path': '', - 'remote_out_path': '', - 'remote_copy': '', - 'remote_exec': '', - 'jobs': '0', - 'parallel': '-1', - 'verbosity': 'INFO', - 'archiving': 'none', - } - - global_config_file = os.path.join(fixtures, 'cdist-global.cfg') - with open(global_config_file, 'w') as f: - config.write(f) - - config = newConfigParser() - config['GLOBAL'] = { - 'beta': 'on', - 'local_shell': '/usr/bin/sh', - 'remote_shell': '/usr/bin/sh', - 'inventory_dir': '/var/db/cdist/inventory', - 'conf_dir': '/opt/cdist', - 'remote_copy': 'myscp', - 'remote_exec': 'myexec', - 'parallel': '-1', - 'archiving': 'tar', - } - - local_config_file = os.path.join(fixtures, 'cdist-local.cfg') - with open(local_config_file, 'w') as f: - config.write(f) - - config = newConfigParser() - config['GLOBAL'] = { - 'conf_dir': '/opt/conf/cdist', - 'remote_copy': 'scpcustom', - 'remote_exec': 'sshcustom', - 'parallel': '15', - 'archiving': 'txz', - } - - custom_config_file = os.path.join(fixtures, 'cdist-custom.cfg') - with open(custom_config_file, 'w') as f: - config.write(f) - - expected_config_dict = { - 'GLOBAL': { - 'beta': True, - 'local_shell': '/usr/bin/sh', - 'remote_shell': '/usr/bin/sh', - 'inventory_dir': '/var/db/cdist/inventory', - 'cache_path_pattern': None, - 'conf_dir': [ - '/opt/conf/cdist', - ], - 'init_manifest': None, - 'out_path': None, - 'remote_out_path': None, - 'remote_copy': 'scpcustom', - 'remote_exec': 'sshcustom', - 'jobs': 0, - 'parallel': 15, - 'verbosity': cap.VERBOSE_INFO, - 'archiving': 'txz', - }, - } - - config_files = (global_config_file, local_config_file, ) - - os.environ['CDIST_CONFIG_FILE'] = custom_config_file - - # bypass singleton so we can test further - cc.Configuration.instance = None - - configuration = cc.Configuration(args, env=env, - config_files=config_files) - self.assertEqual(configuration.config, expected_config_dict) - - def test_configuration_get_args(self): - env = { - 'PATH': '/usr/local/bin:/usr/bin:/bin', - 'TEST': 'test', - 'CDIST_PATH': '/opt/cdist/conf:/usr/local/share/cdist/conf', - 'REMOTE_COPY': 'scp', - 'REMOTE_EXEC': 'ssh', - 'CDIST_BETA': '1', - 'CDIST_LOCAL_SHELL': '/usr/bin/sh', - 'CDIST_REMOTE_SHELL': '/usr/bin/sh', - } - args = argparse.Namespace() - - config = newConfigParser() - config['GLOBAL'] = { - 'beta': 'off', - 'local_shell': '/bin/sh', - 'remote_shell': '/bin/sh', - 'inventory_dir': '', - 'cache_path_pattern': '', - 'conf_dir': '', - 'init_manifest': '', - 'out_path': '', - 'remote_out_path': '', - 'remote_copy': '', - 'remote_exec': '', - 'jobs': '0', - 'parallel': '-1', - 'verbosity': 'INFO', - 'archiving': 'none', - } - - global_config_file = os.path.join(fixtures, 'cdist-global.cfg') - with open(global_config_file, 'w') as f: - config.write(f) - - config = newConfigParser() - config['GLOBAL'] = { - 'beta': 'on', - 'local_shell': '/usr/bin/sh', - 'remote_shell': '/usr/bin/sh', - 'inventory_dir': '/var/db/cdist/inventory', - 'conf_dir': '/opt/cdist', - 'remote_copy': 'myscp', - 'remote_exec': 'myexec', - 'parallel': '-1', - 'archiving': 'tar', - } - - local_config_file = os.path.join(fixtures, 'cdist-local.cfg') - with open(local_config_file, 'w') as f: - config.write(f) - - config = newConfigParser() - config['GLOBAL'] = { - 'conf_dir': '/opt/conf/cdist', - 'remote_copy': 'scpcustom', - 'remote_exec': 'sshcustom', - 'parallel': '15', - 'archiving': 'txz', - } - - custom_config_file = os.path.join(fixtures, 'cdist-custom.cfg') - with open(custom_config_file, 'w') as f: - config.write(f) - - expected_config_dict = { - 'GLOBAL': { - 'beta': True, - 'local_shell': '/usr/bin/sh', - 'remote_shell': '/usr/bin/sh', - 'inventory_dir': '/var/db/cdist/inventory', - 'cache_path_pattern': None, - 'conf_dir': [ - '/opt/conf/cdist', - ], - 'init_manifest': None, - 'out_path': None, - 'remote_out_path': None, - 'remote_copy': 'scpcustom', - 'remote_exec': 'sshcustom', - 'jobs': 0, - 'parallel': 15, - 'verbosity': cap.VERBOSE_INFO, - 'archiving': 'txz', - }, - } - - config_files = (global_config_file, local_config_file, ) - - os.environ['CDIST_CONFIG_FILE'] = custom_config_file - - # bypass singleton so we can test further - cc.Configuration.instance = None - - configuration = cc.Configuration(args, env=env, - config_files=config_files) - self.assertEqual(configuration.config, expected_config_dict) - - args = configuration.get_args() - dargs = vars(args) - expected_args = { - 'beta': True, - 'inventory_dir': '/var/db/cdist/inventory', - 'cache_path_pattern': None, - 'conf_dir': [ - '/opt/conf/cdist', - ], - 'manifest': None, - 'out_path': None, - 'remote_out_path': None, - 'remote_copy': 'scpcustom', - 'remote_exec': 'sshcustom', - 'jobs': 0, - 'parallel': 15, - 'verbose': cap.VERBOSE_INFO, - 'use_archiving': 'txz', - } - - self.assertEqual(dargs, expected_args) - - def test_configuration_empty_value_in_file(self): - config = newConfigParser() - config['GLOBAL'] = { - 'inventory_dir': '', - 'conf_dir': '', - } - - config_file = os.path.join(fixtures, 'cdist-local.cfg') - with open(config_file, 'w') as f: - config.write(f) - - expected_config_dict = { - 'GLOBAL': { - 'inventory_dir': None, - 'conf_dir': None, - 'verbosity': 0, - }, - } - - config_files = (config_file, ) - - # bypass singleton so we can test further - cc.Configuration.instance = None - - args = argparse.Namespace() - configuration = cc.Configuration(args, env={}, - config_files=config_files) - self.assertEqual(configuration.config, expected_config_dict) - - def test_configuration_cdist_log_level_env_var(self): - env = { - '__cdist_log_level': str(logging.DEBUG), - } - args = argparse.Namespace() - - expected_config_dict = { - 'GLOBAL': { - 'verbosity': cap.VERBOSE_DEBUG, - }, - } - - # bypass singleton so we can test further - cc.Configuration.instance = None - - configuration = cc.Configuration(args, env=env, - config_files=()) - self.assertEqual(configuration.config, expected_config_dict) - - # bypass singleton so we can test further - cc.Configuration.instance = None - env['__cdist_log_level'] = '80' - with self.assertRaises(ValueError): - configuration = cc.Configuration(args, env=env, - config_files=()) - - # bypass singleton so we can test further - cc.Configuration.instance = None - env['__cdist_log_level'] = 'x' - with self.assertRaises(ValueError): - configuration = cc.Configuration(args, env=env, - config_files=()) - - def test_configuration_disable_saving_output_streams1(self): - config = newConfigParser() - config['GLOBAL'] = { - 'save_output_streams': 'True', - } - - global_config_file = os.path.join(fixtures, 'cdist-global.cfg') - with open(global_config_file, 'w') as f: - config.write(f) - - expected_config_dict = { - 'GLOBAL': { - 'save_output_streams': True, - 'verbosity': 0, - }, - } - - config_files = (global_config_file, ) - - # bypass singleton so we can test further - cc.Configuration.instance = None - - args = argparse.Namespace() - args.save_output_streams = True - configuration = cc.Configuration(args, env=None, - config_files=config_files) - self.assertEqual(configuration.config, expected_config_dict) - - def test_configuration_disable_saving_output_streams2(self): - config = newConfigParser() - config['GLOBAL'] = { - 'save_output_streams': 'False', - } - - global_config_file = os.path.join(fixtures, 'cdist-global.cfg') - with open(global_config_file, 'w') as f: - config.write(f) - - expected_config_dict = { - 'GLOBAL': { - 'save_output_streams': False, - 'verbosity': 0, - }, - } - - config_files = (global_config_file, ) - - # bypass singleton so we can test further - cc.Configuration.instance = None - - args = argparse.Namespace() - args.save_output_streams = True - configuration = cc.Configuration(args, env=None, - config_files=config_files) - self.assertEqual(configuration.config, expected_config_dict) - - def test_configuration_disable_saving_output_streams3(self): - config = newConfigParser() - config['GLOBAL'] = { - 'save_output_streams': 'False', - } - - global_config_file = os.path.join(fixtures, 'cdist-global.cfg') - with open(global_config_file, 'w') as f: - config.write(f) - - expected_config_dict = { - 'GLOBAL': { - 'save_output_streams': False, - 'verbosity': 0, - }, - } - - config_files = (global_config_file, ) - - # bypass singleton so we can test further - cc.Configuration.instance = None - - args = argparse.Namespace() - args.save_output_streams = False - configuration = cc.Configuration(args, env=None, - config_files=config_files) - self.assertEqual(configuration.config, expected_config_dict) - - def test_configuration_disable_saving_output_streams4(self): - config = newConfigParser() - config['GLOBAL'] = { - 'save_output_streams': 'True', - } - - global_config_file = os.path.join(fixtures, 'cdist-global.cfg') - with open(global_config_file, 'w') as f: - config.write(f) - - expected_config_dict = { - 'GLOBAL': { - 'save_output_streams': False, - 'verbosity': 0, - }, - } - - config_files = (global_config_file, ) - - # bypass singleton so we can test further - cc.Configuration.instance = None - - args = argparse.Namespace() - args.save_output_streams = False - configuration = cc.Configuration(args, env=None, - config_files=config_files) - self.assertEqual(configuration.config, expected_config_dict) - - def test_read_config_file_with_interpolation(self): - try: - config = cc.Configuration(None, env={}, config_files=()) - d = config._read_config_file(interpolation_config_file) - val = d['GLOBAL']['cache_path_pattern'] - self.assertIsNotNone(val) - self.assertEqual(val, '%N') - except configparser.InterpolationSyntaxError as e: - self.fail("Exception should not have been raised: {}".format( - e)) - - def test_configuration_timestamping_log_1(self): - config = newConfigParser() - config['GLOBAL'] = { - 'timestamp': 'True', - } - - global_config_file = os.path.join(fixtures, 'cdist-global.cfg') - with open(global_config_file, 'w') as f: - config.write(f) - - expected_config_dict = { - 'GLOBAL': { - 'timestamp': True, - 'verbosity': 0, - }, - } - - config_files = (global_config_file, ) - - # bypass singleton so we can test further - cc.Configuration.instance = None - - args = argparse.Namespace() - args.timestamp = True - configuration = cc.Configuration(args, env=None, - config_files=config_files) - self.assertEqual(configuration.config, expected_config_dict) - - def test_configuration_timestamping_log_2(self): - config = newConfigParser() - config['GLOBAL'] = { - 'timestamp': 'False', - } - - global_config_file = os.path.join(fixtures, 'cdist-global.cfg') - with open(global_config_file, 'w') as f: - config.write(f) - - expected_config_dict = { - 'GLOBAL': { - 'timestamp': True, - 'verbosity': 0, - }, - } - - config_files = (global_config_file, ) - - # bypass singleton so we can test further - cc.Configuration.instance = None - - args = argparse.Namespace() - args.timestamp = True - configuration = cc.Configuration(args, env=None, - config_files=config_files) - self.assertEqual(configuration.config, expected_config_dict) - - def test_configuration_timestamping_log_3(self): - config = newConfigParser() - config['GLOBAL'] = { - 'timestamp': 'False', - } - - global_config_file = os.path.join(fixtures, 'cdist-global.cfg') - with open(global_config_file, 'w') as f: - config.write(f) - - expected_config_dict = { - 'GLOBAL': { - 'timestamp': False, - 'verbosity': 0, - }, - } - - config_files = (global_config_file, ) - - # bypass singleton so we can test further - cc.Configuration.instance = None - - args = argparse.Namespace() - args.timestamp = False - configuration = cc.Configuration(args, env=None, - config_files=config_files) - self.assertEqual(configuration.config, expected_config_dict) - - def test_configuration_timestamping_log_4(self): - config = newConfigParser() - config['GLOBAL'] = { - 'timestamp': 'True', - } - - global_config_file = os.path.join(fixtures, 'cdist-global.cfg') - with open(global_config_file, 'w') as f: - config.write(f) - - expected_config_dict = { - 'GLOBAL': { - 'timestamp': False, - 'verbosity': 0, - }, - } - - config_files = (global_config_file, ) - - # bypass singleton so we can test further - cc.Configuration.instance = None - - args = argparse.Namespace() - args.timestamp = False - configuration = cc.Configuration(args, env=None, - config_files=config_files) - self.assertEqual(configuration.config, expected_config_dict) - - -if __name__ == "__main__": - import unittest - - unittest.main() diff --git a/cdist/test/configuration/fixtures/.nonempty b/cdist/test/configuration/fixtures/.nonempty deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/configuration/fixtures/interpolation-test.cfg b/cdist/test/configuration/fixtures/interpolation-test.cfg deleted file mode 100644 index df723121..00000000 --- a/cdist/test/configuration/fixtures/interpolation-test.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[GLOBAL] -cache_path_pattern = %N diff --git a/cdist/test/emulator/__init__.py b/cdist/test/emulator/__init__.py deleted file mode 100644 index 5691093c..00000000 --- a/cdist/test/emulator/__init__.py +++ /dev/null @@ -1,656 +0,0 @@ -# -*- coding: utf-8 -*- -# -# 2010-2011 Steven Armstrong (steven-cdist at armstrong.cc) -# 2012-2015 Nico Schottelius (nico-cdist at schottelius.org) -# 2014 Daniel Heule (hda at sfs.biz) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -import io -import os -import shutil -import string -import filecmp -import random -import logging - -import cdist -from cdist import test -from cdist.exec import local -from cdist import emulator -from cdist import core -from cdist import config - -import os.path as op -my_dir = op.abspath(op.dirname(__file__)) -fixtures = op.join(my_dir, 'fixtures') -conf_dir = op.join(fixtures, 'conf') - - -class EmulatorTestCase(test.CdistTestCase): - - def setUp(self): - self.temp_dir = self.mkdtemp() - handle, self.script = self.mkstemp(dir=self.temp_dir) - os.close(handle) - base_path = self.temp_dir - hostdir = cdist.str_hash(self.target_host[0]) - host_base_path = os.path.join(base_path, hostdir) - - self.local = local.Local( - target_host=self.target_host, - target_host_tags=self.target_host_tags, - base_root_path=host_base_path, - host_dir_name=hostdir, - exec_path=test.cdist_exec_path, - add_conf_dirs=[conf_dir]) - self.local.create_files_dirs() - - self.manifest = core.Manifest(self.target_host, self.local) - self.env = self.manifest.env_initial_manifest(self.script) - self.env['__cdist_object_marker'] = self.local.object_marker_name - if '__cdist_log_level' in self.env: - del self.env['__cdist_log_level'] - - def tearDown(self): - shutil.rmtree(self.temp_dir) - -# def test_missing_object_marker_variable(self): -# del self.env['__cdist_object_marker'] -# self.assertRaises(KeyError, emulator.Emulator, argv, env=self.env) - - def test_nonexistent_type_exec(self): - argv = ['__does-not-exist'] - self.assertRaises(core.cdist_type.InvalidTypeError, emulator.Emulator, - argv, env=self.env) - - def test_nonexistent_type_requirement(self): - argv = ['__file', '/tmp/foobar'] - self.env['require'] = '__does-not-exist/some-id' - emu = emulator.Emulator(argv, env=self.env) - self.assertRaises(core.cdist_type.InvalidTypeError, emu.run) - - def test_illegal_object_id_requirement(self): - argv = ['__file', '/tmp/foobar'] - self.env['require'] = ( - "__file/bad/id/with/%s/inside") % self.local.object_marker_name - emu = emulator.Emulator(argv, env=self.env) - self.assertRaises(core.IllegalObjectIdError, emu.run) - - def test_missing_object_id_requirement(self): - argv = ['__file', '/tmp/foobar'] - self.env['require'] = '__file' - emu = emulator.Emulator(argv, env=self.env) - self.assertRaises(core.cdist_object.MissingObjectIdError, emu.run) - - def test_no_singleton_no_requirement(self): - argv = ['__file', '/tmp/foobar'] - self.env['require'] = '__test_singleton' - emu = emulator.Emulator(argv, env=self.env) - emu.run() - # If reached here, everything is fine - - def test_singleton_object_requirement(self): - argv = ['__file', '/tmp/foobar'] - self.env['require'] = '__issue' - emu = emulator.Emulator(argv, env=self.env) - emu.run() - # if we get here all is fine - - def test_requirement_pattern(self): - argv = ['__file', '/tmp/foobar'] - self.env['require'] = '__file/etc/*' - emu = emulator.Emulator(argv, env=self.env) - # if we get here all is fine - - def test_loglevel(self): - argv = ['__file', '/tmp/foobar'] - self.env['require'] = '__file/etc/*' - emu = emulator.Emulator(argv, env=self.env) - emu_loglevel = emu.log.getEffectiveLevel() - self.assertEqual(emu_loglevel, logging.WARNING) - self.env['__cdist_log_level'] = str(logging.DEBUG) - emu = emulator.Emulator(argv, env=self.env) - emu_loglevel = emu.log.getEffectiveLevel() - self.assertEqual(emu_loglevel, logging.DEBUG) - del self.env['__cdist_log_level'] - - def test_invalid_loglevel_value(self): - argv = ['__file', '/tmp/foobar'] - self.env['require'] = '__file/etc/*' - emu = emulator.Emulator(argv, env=self.env) - emu_loglevel = emu.log.getEffectiveLevel() - self.assertEqual(emu_loglevel, logging.WARNING) - # lowercase is invalid - self.env['__cdist_log_level'] = 'debug' - emu = emulator.Emulator(argv, env=self.env) - emu_loglevel = emu.log.getEffectiveLevel() - self.assertEqual(emu_loglevel, logging.WARNING) - del self.env['__cdist_log_level'] - - def test_requirement_via_order_dependency(self): - self.env['CDIST_ORDER_DEPENDENCY'] = 'on' - argv = ['__planet', 'erde'] - emu = emulator.Emulator(argv, env=self.env) - emu.run() - argv = ['__planet', 'mars'] - emu = emulator.Emulator(argv, env=self.env) - emu.run() - # In real world, this is not shared over instances - del self.env['require'] - argv = ['__file', '/tmp/cdisttest'] - emu = emulator.Emulator(argv, env=self.env) - emu.run() - # now load the objects and verify the require parameter of the objects - cdist_type = core.CdistType(self.local.type_path, '__planet') - erde_object = core.CdistObject(cdist_type, self.local.object_path, - self.local.object_marker_name, 'erde') - mars_object = core.CdistObject(cdist_type, self.local.object_path, - self.local.object_marker_name, 'mars') - cdist_type = core.CdistType(self.local.type_path, '__file') - file_object = core.CdistObject(cdist_type, self.local.object_path, - self.local.object_marker_name, - '/tmp/cdisttest') - # now test the recorded requirements - self.assertTrue(len(erde_object.requirements) == 0) - self.assertEqual(list(mars_object.requirements), ['__planet/erde']) - self.assertEqual(list(file_object.requirements), ['__planet/mars']) - # if we get here all is fine - - -class EmulatorConflictingRequirementsTestCase(test.CdistTestCase): - - def setUp(self): - self.temp_dir = self.mkdtemp() - handle, self.script = self.mkstemp(dir=self.temp_dir) - os.close(handle) - base_path = self.temp_dir - hostdir = cdist.str_hash(self.target_host[0]) - host_base_path = os.path.join(base_path, hostdir) - - self.local = local.Local( - target_host=self.target_host, - target_host_tags=self.target_host_tags, - base_root_path=host_base_path, - host_dir_name=hostdir, - exec_path=test.cdist_exec_path, - add_conf_dirs=[conf_dir]) - self.local.create_files_dirs() - - self.manifest = core.Manifest(self.target_host, self.local) - self.env = self.manifest.env_initial_manifest(self.script) - self.env['__cdist_object_marker'] = self.local.object_marker_name - - def tearDown(self): - shutil.rmtree(self.temp_dir) - - def test_object_different_requirements_req_none(self): - argv = ['__directory', 'spam'] - emu = emulator.Emulator(argv, env=self.env) - emu.run() - argv = ['__file', 'eggs'] - self.env['require'] = '__directory/spam' - emu = emulator.Emulator(argv, env=self.env) - emu.run() - argv = ['__file', 'eggs'] - if 'require' in self.env: - del self.env['require'] - emu = emulator.Emulator(argv, env=self.env) - emu.run() - - cdist_type = core.CdistType(self.local.type_path, '__file') - cdist_object = core.CdistObject(cdist_type, self.local.object_path, - self.local.object_marker_name, 'eggs') - reqs = set(('__directory/spam',)) - self.assertEqual(reqs, set(cdist_object.requirements)) - - def test_object_different_requirements_none_req(self): - argv = ['__directory', 'spam'] - emu = emulator.Emulator(argv, env=self.env) - emu.run() - argv = ['__file', 'eggs'] - if 'require' in self.env: - del self.env['require'] - emu = emulator.Emulator(argv, env=self.env) - emu.run() - argv = ['__file', 'eggs'] - self.env['require'] = '__directory/spam' - emu = emulator.Emulator(argv, env=self.env) - emu.run() - - cdist_type = core.CdistType(self.local.type_path, '__file') - cdist_object = core.CdistObject(cdist_type, self.local.object_path, - self.local.object_marker_name, 'eggs') - reqs = set(('__directory/spam',)) - self.assertEqual(reqs, set(cdist_object.requirements)) - - def test_object_different_requirements(self): - argv = ['__directory', 'spam'] - emu = emulator.Emulator(argv, env=self.env) - emu.run() - argv = ['__directory', 'spameggs'] - emu = emulator.Emulator(argv, env=self.env) - emu.run() - - argv = ['__file', 'eggs'] - if 'require' in self.env: - del self.env['require'] - self.env['require'] = '__directory/spam' - emu = emulator.Emulator(argv, env=self.env) - emu.run() - - argv = ['__file', 'eggs'] - self.env['require'] = '__directory/spameggs' - emu = emulator.Emulator(argv, env=self.env) - emu.run() - - cdist_type = core.CdistType(self.local.type_path, '__file') - cdist_object = core.CdistObject(cdist_type, self.local.object_path, - self.local.object_marker_name, 'eggs') - reqs = set(('__directory/spam', '__directory/spameggs',)) - self.assertEqual(reqs, set(cdist_object.requirements)) - - -class AutoRequireEmulatorTestCase(test.CdistTestCase): - - def setUp(self): - self.temp_dir = self.mkdtemp() - base_path = os.path.join(self.temp_dir, "out") - hostdir = cdist.str_hash(self.target_host[0]) - host_base_path = os.path.join(base_path, hostdir) - - self.local = local.Local( - target_host=self.target_host, - target_host_tags=self.target_host_tags, - base_root_path=host_base_path, - host_dir_name=hostdir, - exec_path=test.cdist_exec_path, - add_conf_dirs=[conf_dir]) - self.local.create_files_dirs() - self.manifest = core.Manifest(self.target_host, self.local) - - def tearDown(self): - shutil.rmtree(self.temp_dir) - - def test_autorequire(self): - initial_manifest = os.path.join(self.local.manifest_path, "init") - self.manifest.run_initial_manifest(initial_manifest) - cdist_type = core.CdistType(self.local.type_path, '__saturn') - cdist_object = core.CdistObject(cdist_type, self.local.object_path, - self.local.object_marker_name, '') - self.manifest.run_type_manifest(cdist_object) - expected = ['__planet/Saturn', '__moon/Prometheus'] - self.assertEqual(sorted(cdist_object.autorequire), sorted(expected)) - - -class OverrideTestCase(test.CdistTestCase): - - def setUp(self): - self.temp_dir = self.mkdtemp() - handle, self.script = self.mkstemp(dir=self.temp_dir) - os.close(handle) - base_path = self.temp_dir - hostdir = cdist.str_hash(self.target_host[0]) - host_base_path = os.path.join(base_path, hostdir) - - self.local = local.Local( - target_host=self.target_host, - target_host_tags=self.target_host_tags, - base_root_path=host_base_path, - host_dir_name=hostdir, - exec_path=test.cdist_exec_path, - add_conf_dirs=[conf_dir]) - self.local.create_files_dirs() - - self.manifest = core.Manifest(self.target_host, self.local) - self.env = self.manifest.env_initial_manifest(self.script) - self.env['__cdist_object_marker'] = self.local.object_marker_name - - def tearDown(self): - shutil.rmtree(self.temp_dir) - - def test_override_negative(self): - argv = ['__file', '/tmp/foobar'] - emu = emulator.Emulator(argv, env=self.env) - emu.run() - argv = ['__file', '/tmp/foobar', '--mode', '404'] - emu = emulator.Emulator(argv, env=self.env) - self.assertRaises(cdist.Error, emu.run) - - def test_override_feature(self): - argv = ['__file', '/tmp/foobar'] - emu = emulator.Emulator(argv, env=self.env) - emu.run() - argv = ['__file', '/tmp/foobar', '--mode', '404'] - self.env['CDIST_OVERRIDE'] = 'on' - emu = emulator.Emulator(argv, env=self.env) - emu.run() - - -class ArgumentsTestCase(test.CdistTestCase): - - def setUp(self): - self.temp_dir = self.mkdtemp() - base_path = self.temp_dir - hostdir = cdist.str_hash(self.target_host[0]) - host_base_path = os.path.join(base_path, hostdir) - handle, self.script = self.mkstemp(dir=self.temp_dir) - os.close(handle) - - self.local = local.Local( - target_host=self.target_host, - target_host_tags=self.target_host_tags, - base_root_path=host_base_path, - host_dir_name=hostdir, - exec_path=test.cdist_exec_path, - add_conf_dirs=[conf_dir]) - self.local.create_files_dirs() - - self.manifest = core.Manifest(self.target_host, self.local) - self.env = self.manifest.env_initial_manifest(self.script) - self.env['__cdist_object_marker'] = self.local.object_marker_name - - def tearDown(self): - shutil.rmtree(self.temp_dir) - - def test_arguments_with_dashes(self): - argv = ['__arguments_with_dashes', 'some-id', '--with-dash', - 'some value'] - os.environ.update(self.env) - emu = emulator.Emulator(argv) - emu.run() - - cdist_type = core.CdistType(self.local.type_path, - '__arguments_with_dashes') - cdist_object = core.CdistObject(cdist_type, self.local.object_path, - self.local.object_marker_name, - 'some-id') - self.assertTrue('with-dash' in cdist_object.parameters) - - def test_boolean(self): - type_name = '__arguments_boolean' - object_id = 'some-id' - argv = [type_name, object_id, '--boolean1'] - os.environ.update(self.env) - emu = emulator.Emulator(argv) - emu.run() - - cdist_type = core.CdistType(self.local.type_path, type_name) - cdist_object = core.CdistObject(cdist_type, self.local.object_path, - self.local.object_marker_name, - object_id) - self.assertTrue('boolean1' in cdist_object.parameters) - self.assertFalse('boolean2' in cdist_object.parameters) - # empty file -> True - self.assertTrue(cdist_object.parameters['boolean1'] == '') - - def test_required_arguments(self): - """check whether assigning required parameter works""" - - type_name = '__arguments_required' - object_id = 'some-id' - value = 'some value' - argv = [type_name, object_id, '--required1', value, - '--required2', value] - os.environ.update(self.env) - emu = emulator.Emulator(argv) - emu.run() - - cdist_type = core.CdistType(self.local.type_path, type_name) - cdist_object = core.CdistObject(cdist_type, self.local.object_path, - self.local.object_marker_name, - object_id) - self.assertTrue('required1' in cdist_object.parameters) - self.assertTrue('required2' in cdist_object.parameters) - self.assertEqual(cdist_object.parameters['required1'], value) - self.assertEqual(cdist_object.parameters['required2'], value) - - def test_required_multiple_arguments(self): - """check whether assigning required multiple parameter works""" - - type_name = '__arguments_required_multiple' - object_id = 'some-id' - value1 = 'value1' - value2 = 'value2' - argv = [type_name, object_id, '--required1', value1, - '--required1', value2] - os.environ.update(self.env) - emu = emulator.Emulator(argv) - emu.run() - - cdist_type = core.CdistType(self.local.type_path, type_name) - cdist_object = core.CdistObject(cdist_type, self.local.object_path, - self.local.object_marker_name, - object_id) - self.assertTrue('required1' in cdist_object.parameters) - self.assertTrue(value1 in cdist_object.parameters['required1']) - self.assertTrue(value2 in cdist_object.parameters['required1']) - -# def test_required_missing(self): -# type_name = '__arguments_required' -# object_id = 'some-id' -# value = 'some value' -# argv = [type_name, object_id, '--required1', value] -# os.environ.update(self.env) -# emu = emulator.Emulator(argv) -# -# self.assertRaises(SystemExit, emu.run) - - def test_optional(self): - type_name = '__arguments_optional' - object_id = 'some-id' - value = 'some value' - argv = [type_name, object_id, '--optional1', value] - os.environ.update(self.env) - emu = emulator.Emulator(argv) - emu.run() - - cdist_type = core.CdistType(self.local.type_path, type_name) - cdist_object = core.CdistObject(cdist_type, self.local.object_path, - self.local.object_marker_name, - object_id) - self.assertTrue('optional1' in cdist_object.parameters) - self.assertFalse('optional2' in cdist_object.parameters) - self.assertEqual(cdist_object.parameters['optional1'], value) - - def test_optional_multiple(self): - type_name = '__arguments_optional_multiple' - object_id = 'some-id' - value1 = 'value1' - value2 = 'value2' - argv = [type_name, object_id, '--optional1', value1, '--optional1', - value2] - os.environ.update(self.env) - emu = emulator.Emulator(argv) - emu.run() - - cdist_type = core.CdistType(self.local.type_path, type_name) - cdist_object = core.CdistObject(cdist_type, self.local.object_path, - self.local.object_marker_name, - object_id) - self.assertTrue('optional1' in cdist_object.parameters) - self.assertTrue(value1 in cdist_object.parameters['optional1']) - self.assertTrue(value2 in cdist_object.parameters['optional1']) - - def test_argument_defaults(self): - type_name = '__argument_defaults' - object_id = 'some-id' - value = 'value1' - argv = [type_name, object_id] - os.environ.update(self.env) - emu = emulator.Emulator(argv) - emu.run() - - cdist_type = core.CdistType(self.local.type_path, type_name) - cdist_object = core.CdistObject(cdist_type, self.local.object_path, - self.local.object_marker_name, - object_id) - self.assertTrue('optional1' in cdist_object.parameters) - self.assertFalse('optional2' in cdist_object.parameters) - self.assertEqual(cdist_object.parameters['optional1'], value) - - def test_object_params_in_context(self): - type_name = '__arguments_all' - object_id = 'some-id' - argv = [type_name, object_id, '--opt', 'opt', '--req', 'req', - '--bool', '--optmul', 'val1', '--optmul', 'val2', - '--reqmul', 'val3', '--reqmul', 'val4', - '--optmul1', 'val5', '--reqmul1', 'val6'] - os.environ.update(self.env) - emu = emulator.Emulator(argv) - emu.run() - - obj_params = emu._object_params_in_context() - obj_params_expected = { - 'bool': '', - 'opt': 'opt', - 'optmul1': ['val5', ], - 'optmul': ['val1', 'val2', ], - 'req': 'req', - 'reqmul1': ['val6', ], - 'reqmul': ['val3', 'val4', ], - } - self.assertEqual(obj_params, obj_params_expected) - - -class StdinTestCase(test.CdistTestCase): - - def setUp(self): - self.orig_environ = os.environ - os.environ = os.environ.copy() - - self.temp_dir = self.mkdtemp() - base_path = os.path.join(self.temp_dir, "out") - hostdir = cdist.str_hash(self.target_host[0]) - host_base_path = os.path.join(base_path, hostdir) - - self.local = local.Local( - target_host=self.target_host, - target_host_tags=self.target_host_tags, - base_root_path=host_base_path, - host_dir_name=hostdir, - exec_path=test.cdist_exec_path, - add_conf_dirs=[conf_dir]) - - self.local.create_files_dirs() - - def tearDown(self): - os.environ = self.orig_environ - shutil.rmtree(self.temp_dir) - - def test_file_from_stdin(self): - """ - Test whether reading from stdin works - """ - - ###################################################################### - # Create string with random content - random_string = str(random.sample(range(1000), 800)) - random_buffer = io.BytesIO(bytes(random_string, 'utf-8')) - - ###################################################################### - # Prepare required args and environment for emulator - type_name = '__file' - object_id = "cdist-test-id" - argv = [type_name, object_id] - - env = os.environ.copy() - env['__cdist_manifest'] = "/cdist-test/path/that/does/not/exist" - env['__cdist_object_marker'] = self.local.object_marker_name - env['__cdist_type_base_path'] = self.local.type_path - env['__global'] = self.local.base_path - - ###################################################################### - # Create path where stdin should reside at - cdist_type = core.CdistType(self.local.type_path, type_name) - cdist_object = core.CdistObject(cdist_type, self.local.object_path, - self.local.object_marker_name, - object_id) - stdin_out_path = os.path.join(cdist_object.absolute_path, 'stdin') - - ###################################################################### - # Run emulator - emu = emulator.Emulator(argv, stdin=random_buffer, env=env) - emu.run() - - ###################################################################### - # Read where emulator should have placed stdin - with open(stdin_out_path, 'r') as fd: - stdin_saved_by_emulator = fd.read() - - self.assertEqual(random_string, stdin_saved_by_emulator) - - -class EmulatorAlreadyExistingRequirementsWarnTestCase(test.CdistTestCase): - - def setUp(self): - self.temp_dir = self.mkdtemp() - handle, self.script = self.mkstemp(dir=self.temp_dir) - os.close(handle) - base_path = self.temp_dir - hostdir = cdist.str_hash(self.target_host[0]) - host_base_path = os.path.join(base_path, hostdir) - - self.local = local.Local( - target_host=self.target_host, - target_host_tags=self.target_host_tags, - base_root_path=host_base_path, - host_dir_name=hostdir, - exec_path=test.cdist_exec_path, - add_conf_dirs=[conf_dir]) - self.local.create_files_dirs() - - self.manifest = core.Manifest(self.target_host, self.local) - self.env = self.manifest.env_initial_manifest(self.script) - self.env['__cdist_object_marker'] = self.local.object_marker_name - - def tearDown(self): - shutil.rmtree(self.temp_dir) - - def test_object_existing_requirements_req_none(self): - """Test to show dependency resolver warning message.""" - argv = ['__directory', 'spam'] - emu = emulator.Emulator(argv, env=self.env) - emu.run() - argv = ['__file', 'eggs'] - self.env['require'] = '__directory/spam' - emu = emulator.Emulator(argv, env=self.env) - emu.run() - argv = ['__file', 'eggs'] - if 'require' in self.env: - del self.env['require'] - emu = emulator.Emulator(argv, env=self.env) - - def test_object_existing_requirements_none_req(self): - """Test to show dependency resolver warning message.""" - argv = ['__directory', 'spam'] - emu = emulator.Emulator(argv, env=self.env) - emu.run() - argv = ['__file', 'eggs'] - if 'require' in self.env: - del self.env['require'] - emu = emulator.Emulator(argv, env=self.env) - emu.run() - argv = ['__file', 'eggs'] - self.env['require'] = '__directory/spam' - emu = emulator.Emulator(argv, env=self.env) - - -if __name__ == '__main__': - import unittest - unittest.main() diff --git a/cdist/test/emulator/fixtures/conf/explorer/.keep b/cdist/test/emulator/fixtures/conf/explorer/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/emulator/fixtures/conf/manifest/init b/cdist/test/emulator/fixtures/conf/manifest/init deleted file mode 100755 index 9fa1aa53..00000000 --- a/cdist/test/emulator/fixtures/conf/manifest/init +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -__saturn diff --git a/cdist/test/emulator/fixtures/conf/type/__argument_defaults/parameter/default/optional1 b/cdist/test/emulator/fixtures/conf/type/__argument_defaults/parameter/default/optional1 deleted file mode 100644 index ef208405..00000000 --- a/cdist/test/emulator/fixtures/conf/type/__argument_defaults/parameter/default/optional1 +++ /dev/null @@ -1 +0,0 @@ -value1 diff --git a/cdist/test/emulator/fixtures/conf/type/__argument_defaults/parameter/optional b/cdist/test/emulator/fixtures/conf/type/__argument_defaults/parameter/optional deleted file mode 100644 index 8174d2a9..00000000 --- a/cdist/test/emulator/fixtures/conf/type/__argument_defaults/parameter/optional +++ /dev/null @@ -1,2 +0,0 @@ -optional1 -optional2 diff --git a/cdist/test/emulator/fixtures/conf/type/__arguments_all/parameter/boolean b/cdist/test/emulator/fixtures/conf/type/__arguments_all/parameter/boolean deleted file mode 100644 index 46a27912..00000000 --- a/cdist/test/emulator/fixtures/conf/type/__arguments_all/parameter/boolean +++ /dev/null @@ -1 +0,0 @@ -bool diff --git a/cdist/test/emulator/fixtures/conf/type/__arguments_all/parameter/optional b/cdist/test/emulator/fixtures/conf/type/__arguments_all/parameter/optional deleted file mode 100644 index d6eba11a..00000000 --- a/cdist/test/emulator/fixtures/conf/type/__arguments_all/parameter/optional +++ /dev/null @@ -1 +0,0 @@ -opt diff --git a/cdist/test/emulator/fixtures/conf/type/__arguments_all/parameter/optional_multiple b/cdist/test/emulator/fixtures/conf/type/__arguments_all/parameter/optional_multiple deleted file mode 100644 index 04893522..00000000 --- a/cdist/test/emulator/fixtures/conf/type/__arguments_all/parameter/optional_multiple +++ /dev/null @@ -1,2 +0,0 @@ -optmul -optmul1 diff --git a/cdist/test/emulator/fixtures/conf/type/__arguments_all/parameter/required b/cdist/test/emulator/fixtures/conf/type/__arguments_all/parameter/required deleted file mode 100644 index da45f08d..00000000 --- a/cdist/test/emulator/fixtures/conf/type/__arguments_all/parameter/required +++ /dev/null @@ -1 +0,0 @@ -req diff --git a/cdist/test/emulator/fixtures/conf/type/__arguments_all/parameter/required_multiple b/cdist/test/emulator/fixtures/conf/type/__arguments_all/parameter/required_multiple deleted file mode 100644 index 28c1a19b..00000000 --- a/cdist/test/emulator/fixtures/conf/type/__arguments_all/parameter/required_multiple +++ /dev/null @@ -1,2 +0,0 @@ -reqmul -reqmul1 diff --git a/cdist/test/emulator/fixtures/conf/type/__arguments_boolean/parameter/boolean b/cdist/test/emulator/fixtures/conf/type/__arguments_boolean/parameter/boolean deleted file mode 100644 index 3215c409..00000000 --- a/cdist/test/emulator/fixtures/conf/type/__arguments_boolean/parameter/boolean +++ /dev/null @@ -1,2 +0,0 @@ -boolean1 -boolean2 diff --git a/cdist/test/emulator/fixtures/conf/type/__arguments_optional/parameter/optional b/cdist/test/emulator/fixtures/conf/type/__arguments_optional/parameter/optional deleted file mode 100644 index 31647628..00000000 --- a/cdist/test/emulator/fixtures/conf/type/__arguments_optional/parameter/optional +++ /dev/null @@ -1 +0,0 @@ -optional1 diff --git a/cdist/test/emulator/fixtures/conf/type/__arguments_optional_multiple/parameter/optional_multiple b/cdist/test/emulator/fixtures/conf/type/__arguments_optional_multiple/parameter/optional_multiple deleted file mode 100644 index 31647628..00000000 --- a/cdist/test/emulator/fixtures/conf/type/__arguments_optional_multiple/parameter/optional_multiple +++ /dev/null @@ -1 +0,0 @@ -optional1 diff --git a/cdist/test/emulator/fixtures/conf/type/__arguments_required/parameter/required b/cdist/test/emulator/fixtures/conf/type/__arguments_required/parameter/required deleted file mode 100644 index e0fba2c9..00000000 --- a/cdist/test/emulator/fixtures/conf/type/__arguments_required/parameter/required +++ /dev/null @@ -1,2 +0,0 @@ -required1 -required2 diff --git a/cdist/test/emulator/fixtures/conf/type/__arguments_required_multiple/parameter/required_multiple b/cdist/test/emulator/fixtures/conf/type/__arguments_required_multiple/parameter/required_multiple deleted file mode 100644 index 180d60c7..00000000 --- a/cdist/test/emulator/fixtures/conf/type/__arguments_required_multiple/parameter/required_multiple +++ /dev/null @@ -1 +0,0 @@ -required1 diff --git a/cdist/test/emulator/fixtures/conf/type/__arguments_with_dashes/parameter/required b/cdist/test/emulator/fixtures/conf/type/__arguments_with_dashes/parameter/required deleted file mode 100644 index 02fabce1..00000000 --- a/cdist/test/emulator/fixtures/conf/type/__arguments_with_dashes/parameter/required +++ /dev/null @@ -1 +0,0 @@ -with-dash diff --git a/cdist/test/emulator/fixtures/conf/type/__file_from_stdin/manifest b/cdist/test/emulator/fixtures/conf/type/__file_from_stdin/manifest deleted file mode 100755 index b4908cbf..00000000 --- a/cdist/test/emulator/fixtures/conf/type/__file_from_stdin/manifest +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -source="$(cat "$__object/parameter/source")" -cat "$source" | __file "/$__object_id" --source /dev/null diff --git a/cdist/test/emulator/fixtures/conf/type/__file_from_stdin/parameter/required b/cdist/test/emulator/fixtures/conf/type/__file_from_stdin/parameter/required deleted file mode 100644 index 5a18cd2f..00000000 --- a/cdist/test/emulator/fixtures/conf/type/__file_from_stdin/parameter/required +++ /dev/null @@ -1 +0,0 @@ -source diff --git a/cdist/test/emulator/fixtures/conf/type/__moon/manifest b/cdist/test/emulator/fixtures/conf/type/__moon/manifest deleted file mode 100755 index 362be5a1..00000000 --- a/cdist/test/emulator/fixtures/conf/type/__moon/manifest +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -if [ -f "$__object/parameter/name" ]; then - name="(cat "$__object/parameter/name")" -else - name="$__object_id" - echo "$name" > "$__object/parameter/name" -fi diff --git a/cdist/test/emulator/fixtures/conf/type/__moon/parameter/required b/cdist/test/emulator/fixtures/conf/type/__moon/parameter/required deleted file mode 100644 index 729a5167..00000000 --- a/cdist/test/emulator/fixtures/conf/type/__moon/parameter/required +++ /dev/null @@ -1 +0,0 @@ -planet diff --git a/cdist/test/emulator/fixtures/conf/type/__planet/manifest b/cdist/test/emulator/fixtures/conf/type/__planet/manifest deleted file mode 100755 index 362be5a1..00000000 --- a/cdist/test/emulator/fixtures/conf/type/__planet/manifest +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -if [ -f "$__object/parameter/name" ]; then - name="(cat "$__object/parameter/name")" -else - name="$__object_id" - echo "$name" > "$__object/parameter/name" -fi diff --git a/cdist/test/emulator/fixtures/conf/type/__planet/parameter/optional b/cdist/test/emulator/fixtures/conf/type/__planet/parameter/optional deleted file mode 100644 index f121bdbf..00000000 --- a/cdist/test/emulator/fixtures/conf/type/__planet/parameter/optional +++ /dev/null @@ -1 +0,0 @@ -name diff --git a/cdist/test/emulator/fixtures/conf/type/__saturn/manifest b/cdist/test/emulator/fixtures/conf/type/__saturn/manifest deleted file mode 100755 index 38b8cbf3..00000000 --- a/cdist/test/emulator/fixtures/conf/type/__saturn/manifest +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -__planet Saturn -require="__planet/Saturn" __moon Prometheus --planet Saturn diff --git a/cdist/test/emulator/fixtures/conf/type/__saturn/singleton b/cdist/test/emulator/fixtures/conf/type/__saturn/singleton deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/emulator/fixtures/conf/type/__test_singleton/singleton b/cdist/test/emulator/fixtures/conf/type/__test_singleton/singleton deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/exec/__init__.py b/cdist/test/exec/__init__.py deleted file mode 100644 index b55cffa9..00000000 --- a/cdist/test/exec/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -from .local import * - - -if __name__ == "__main__": - import unittest - - unittest.main() diff --git a/cdist/test/exec/fixtures/conf/type/__cdist_test_type/gencode-local b/cdist/test/exec/fixtures/conf/type/__cdist_test_type/gencode-local deleted file mode 100755 index 3d568ad3..00000000 --- a/cdist/test/exec/fixtures/conf/type/__cdist_test_type/gencode-local +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -echo "echo __target_host: $__target_host" -echo "echo __target_hostname: $__target_hostname" -echo "echo __target_fqdn: $__target_fqdn" -echo "echo __global: $__global" -echo "echo __type: $__type" -echo "echo __object: $__object" -echo "echo __object_id: $__object_id" -echo "echo __object_name: $__object_name" diff --git a/cdist/test/exec/fixtures/conf/type/__cdist_test_type/gencode-remote b/cdist/test/exec/fixtures/conf/type/__cdist_test_type/gencode-remote deleted file mode 120000 index 7b427cac..00000000 --- a/cdist/test/exec/fixtures/conf/type/__cdist_test_type/gencode-remote +++ /dev/null @@ -1 +0,0 @@ -gencode-local \ No newline at end of file diff --git a/cdist/test/exec/local.py b/cdist/test/exec/local.py deleted file mode 100644 index 0865b7dc..00000000 --- a/cdist/test/exec/local.py +++ /dev/null @@ -1,285 +0,0 @@ -# -*- coding: utf-8 -*- -# -# 2010-2011 Steven Armstrong (steven-cdist at armstrong.cc) -# 2012 Nico Schottelius (nico-cdist at schottelius.org) -# 2016 Darko Poljak (darko.poljak at gmail.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -import os -import getpass -import shutil -import string -import random -import time -import datetime -import argparse - -import cdist -import cdist.configuration as cc -from cdist import test -from cdist.exec import local - -import os.path as op -my_dir = op.abspath(op.dirname(__file__)) -fixtures = op.join(my_dir, 'fixtures') -conf_dir = op.join(fixtures, "conf") - -bin_true = "true" -bin_false = "false" - - -class LocalTestCase(test.CdistTestCase): - - def setUp(self): - - target_host = ( - 'localhost', - 'localhost', - 'localhost', - ) - self.temp_dir = self.mkdtemp() - self.out_parent_path = self.temp_dir - self.hostdir = cdist.str_hash(target_host[0]) - self.host_base_path = op.join(self.out_parent_path, self.hostdir) - self.out_path = op.join(self.host_base_path, "data") - - self.local = local.Local( - target_host=target_host, - target_host_tags=None, - base_root_path=self.host_base_path, - host_dir_name=self.hostdir, - exec_path=test.cdist_exec_path - ) - - self.home_dir = os.path.join(os.environ['HOME'], ".cdist") - - def tearDown(self): - shutil.rmtree(self.temp_dir) - - # test api - - def test_cache_path(self): - self.assertEqual(self.local.cache_path, - os.path.join(self.home_dir, "cache")) - - def test_conf_path(self): - self.assertEqual(self.local.conf_path, - os.path.join(self.out_path, "conf")) - - def test_out_path(self): - self.assertEqual(self.local.base_path, self.out_path) - - def test_bin_path(self): - self.assertEqual(self.local.bin_path, - os.path.join(self.out_path, "bin")) - - def test_global_explorer_out_path(self): - self.assertEqual(self.local.global_explorer_out_path, - os.path.join(self.out_path, "explorer")) - - def test_object_path(self): - self.assertEqual(self.local.object_path, - os.path.join(self.out_path, "object")) - - # /test api - - # test internal implementation - - def test_global_explorer_path(self): - self.assertEqual(self.local.global_explorer_path, - os.path.join(self.out_path, "conf", "explorer")) - - def test_manifest_path(self): - self.assertEqual(self.local.manifest_path, - os.path.join(self.out_path, "conf", "manifest")) - - def test_type_path(self): - self.assertEqual(self.local.type_path, - os.path.join(self.out_path, "conf", "type")) - - def test_dist_conf_dir_linking(self): - """Ensure that links are correctly created for types included - in distribution""" - - test_type = "__file" - - link_test_local = local.Local( - target_host=( - 'localhost', - 'localhost', - 'localhost', - ), - target_host_tags=None, - base_root_path=self.host_base_path, - host_dir_name=self.hostdir, - exec_path=test.cdist_exec_path, - ) - - link_test_local._create_conf_path_and_link_conf_dirs() - - our_type_dir = os.path.join(link_test_local.type_path, test_type) - - self.assertTrue(os.path.isdir(our_type_dir)) - - def test_added_conf_dir_linking(self): - """Ensure that links are correctly created for types in added conf - directories""" - - test_type = "__cdist_test_type" - - link_test_local = local.Local( - target_host=( - 'localhost', - 'localhost', - 'localhost', - ), - target_host_tags=None, - base_root_path=self.host_base_path, - host_dir_name=self.hostdir, - exec_path=test.cdist_exec_path, - add_conf_dirs=[conf_dir] - ) - - link_test_local._create_conf_path_and_link_conf_dirs() - - our_type_dir = os.path.join(link_test_local.type_path, test_type) - - self.assertTrue(os.path.isdir(our_type_dir)) - - def test_conf_dir_from_path_linking(self): - """Ensure that links are correctly created for types in conf - directories which are defined in CDIST_PATH""" - - test_type = "__cdist_test_type" - - os.environ['CDIST_PATH'] = conf_dir - - # bypass singleton from other tests if any - cc.Configuration.instance = None - - configuration = cc.Configuration(argparse.Namespace(), - env=os.environ) - - link_test_local = local.Local( - target_host=( - 'localhost', - 'localhost', - 'localhost', - ), - target_host_tags=None, - base_root_path=self.host_base_path, - host_dir_name=self.hostdir, - exec_path=test.cdist_exec_path, - configuration=configuration.get_config(section='GLOBAL') - ) - - link_test_local._create_conf_path_and_link_conf_dirs() - - our_type_dir = os.path.join(link_test_local.type_path, test_type) - - self.assertTrue(os.path.isdir(our_type_dir)) - - # other tests - - def test_run_success(self): - self.local.create_files_dirs() - self.local.run([bin_true]) - - def test_run_fail(self): - self.local.create_files_dirs() - self.assertRaises(cdist.Error, self.local.run, [bin_false]) - - def test_run_script_success(self): - self.local.create_files_dirs() - handle, script = self.mkstemp(dir=self.temp_dir) - with os.fdopen(handle, "w") as fd: - fd.writelines(["#!/bin/sh\n", bin_true]) - self.local.run_script(script) - - def test_run_script_fail(self): - self.local.create_files_dirs() - handle, script = self.mkstemp(dir=self.temp_dir) - with os.fdopen(handle, "w") as fd: - fd.writelines(["#!/bin/sh\n", bin_false]) - self.assertRaises(cdist.Error, self.local.run_script, script) - - def test_run_script_get_output(self): - self.local.create_files_dirs() - handle, script = self.mkstemp(dir=self.temp_dir) - with os.fdopen(handle, "w") as fd: - fd.writelines(["#!/bin/sh\n", "echo foobar"]) - self.assertEqual(self.local.run_script(script, return_output=True), - "foobar\n") - - def test_mkdir(self): - temp_dir = self.mkdtemp(dir=self.temp_dir) - os.rmdir(temp_dir) - self.local.mkdir(temp_dir) - self.assertTrue(os.path.isdir(temp_dir)) - - def test_rmdir(self): - temp_dir = self.mkdtemp(dir=self.temp_dir) - self.local.rmdir(temp_dir) - self.assertFalse(os.path.isdir(temp_dir)) - - def test_create_files_dirs(self): - self.local.create_files_dirs() - self.assertTrue(os.path.isdir(self.local.base_path)) - self.assertTrue(os.path.isdir(self.local.bin_path)) - self.assertTrue(os.path.isdir(self.local.conf_path)) - - def test_cache_subpath(self): - start_time = time.time() - dt = datetime.datetime.fromtimestamp(start_time) - pid = str(os.getpid()) - cases = [ - ['', self.local.hostdir, ], - ['/', self.local.hostdir, ], - ['//', self.local.hostdir, ], - ['/%%h', '%h', ], - ['%%h', '%h', ], - ['%P', pid, ], - ['x%P', 'x' + pid, ], - ['%h', self.hostdir, ], - ['%h/%Y-%m-%d/%H%M%S%f%P', - dt.strftime(self.hostdir + '/%Y-%m-%d/%H%M%S%f') + pid, ], - ['/%h/%Y-%m-%d/%H%M%S%f%P', - dt.strftime(self.hostdir + '/%Y-%m-%d/%H%M%S%f') + pid, ], - ['%Y-%m-%d/%H%M%S%f%P/%h', - dt.strftime('%Y-%m-%d/%H%M%S%f' + pid + os.sep + self.hostdir), ], - ['///%Y-%m-%d/%H%M%S%f%P/%h', - dt.strftime('%Y-%m-%d/%H%M%S%f' + pid + os.sep + self.hostdir), ], - ['%h/%Y-%m-%d/%H%M%S-%P', - dt.strftime(self.hostdir + '/%Y-%m-%d/%H%M%S-') + pid, ], - ['%Y-%m-%d/%H%M%S-%P/%h', - dt.strftime('%Y-%m-%d/%H%M%S-') + pid + os.sep + self.hostdir, ], - ['%N', self.local.target_host[0], ], - ] - for x in cases: - x.append(self.local._cache_subpath(start_time, x[0])) - # for fmt, expected, actual in cases: - # print('\'{}\' \'{}\' \'{}\''.format(fmt, expected, actual)) - for fmt, expected, actual in cases: - self.assertEqual(expected, actual) - - -if __name__ == "__main__": - import unittest - - unittest.main() diff --git a/cdist/test/exec/remote.py b/cdist/test/exec/remote.py deleted file mode 100644 index a7fe384d..00000000 --- a/cdist/test/exec/remote.py +++ /dev/null @@ -1,226 +0,0 @@ -# -*- coding: utf-8 -*- -# -# 2010-2011 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -import os -import getpass -import shutil -import multiprocessing - -import cdist -from cdist import test -from cdist.exec import remote - - -class RemoteTestCase(test.CdistTestCase): - - def setUp(self): - self.temp_dir = self.mkdtemp() - self.target_host = ( - 'localhost', - 'localhost', - 'localhost', - ) - # another temp dir for remote base path - self.base_path = self.mkdtemp() - self.remote = self.create_remote() - - def create_remote(self, *args, **kwargs): - if not args: - args = (self.target_host,) - kwargs.setdefault('base_path', self.base_path) - user = getpass.getuser() - kwargs.setdefault('remote_exec', 'ssh -o User=%s -q' % user) - kwargs.setdefault('remote_copy', 'scp -o User=%s -q' % user) - if 'stdout_base_path' not in kwargs: - stdout_path = os.path.join(self.temp_dir, 'stdout') - os.makedirs(stdout_path, exist_ok=True) - kwargs['stdout_base_path'] = stdout_path - if 'stderr_base_path' not in kwargs: - stderr_path = os.path.join(self.temp_dir, 'stderr') - os.makedirs(stderr_path, exist_ok=True) - kwargs['stderr_base_path'] = stderr_path - return remote.Remote(*args, **kwargs) - - def tearDown(self): - shutil.rmtree(self.temp_dir) - shutil.rmtree(self.base_path) - - # test api - - def test_conf_path(self): - self.assertEqual(self.remote.conf_path, - os.path.join(self.base_path, "conf")) - - def test_object_path(self): - self.assertEqual(self.remote.object_path, - os.path.join(self.base_path, "object")) - - def test_type_path(self): - self.assertEqual(self.remote.type_path, - os.path.join(self.base_path, "conf", "type")) - - def test_global_explorer_path(self): - self.assertEqual(self.remote.global_explorer_path, - os.path.join(self.base_path, "conf", "explorer")) - - # /test api - - def test_run_success(self): - self.remote.run(['true']) - - def test_run_fail(self): - self.assertRaises(cdist.Error, self.remote.run, ['false']) - - def test_run_script_success(self): - handle, script = self.mkstemp(dir=self.temp_dir) - with os.fdopen(handle, "w") as fd: - fd.writelines(["#!/bin/sh\n", "true"]) - self.remote.run_script(script) - - def test_run_script_fail(self): - handle, script = self.mkstemp(dir=self.temp_dir) - with os.fdopen(handle, "w") as fd: - fd.writelines(["#!/bin/sh\n", "false"]) - self.assertRaises(cdist.Error, self.remote.run_script, - script) - - def test_run_script_get_output(self): - handle, script = self.mkstemp(dir=self.temp_dir) - with os.fdopen(handle, "w") as fd: - fd.writelines(["#!/bin/sh\n", "echo foobar"]) - self.assertEqual(self.remote.run_script(script, return_output=True), - "foobar\n") - - def test_mkdir(self): - temp_dir = self.mkdtemp(dir=self.temp_dir) - os.rmdir(temp_dir) - self.remote.mkdir(temp_dir) - self.assertTrue(os.path.isdir(temp_dir)) - - def test_rmdir(self): - temp_dir = self.mkdtemp(dir=self.temp_dir) - self.remote.rmdir(temp_dir) - self.assertFalse(os.path.isdir(temp_dir)) - - def test_transfer_file(self): - handle, source = self.mkstemp(dir=self.temp_dir) - os.close(handle) - target = self.mkdtemp(dir=self.temp_dir) - self.remote.transfer(source, target) - self.assertTrue(os.path.isfile( - os.path.join(target, os.path.basename(source)))) - - def test_transfer_dir(self): - source = self.mkdtemp(dir=self.temp_dir) - # put a file in the directory as payload - handle, source_file = self.mkstemp(dir=source) - os.close(handle) - source_file_name = os.path.split(source_file)[-1] - target = self.mkdtemp(dir=self.temp_dir) - self.remote.transfer(source, target) - # test if the payload file is in the target directory - self.assertTrue(os.path.isfile(os.path.join(target, source_file_name))) - - def test_transfer_dir_parallel(self): - source = self.mkdtemp(dir=self.temp_dir) - # put 8 files in the directory as payload - filenames = [] - for x in range(8): - handle, source_file = self.mkstemp(dir=source) - os.close(handle) - source_file_name = os.path.split(source_file)[-1] - filenames.append(source_file_name) - target = self.mkdtemp(dir=self.temp_dir) - self.remote.transfer(source, target, - multiprocessing.cpu_count()) - # test if the payload files are in the target directory - for filename in filenames: - self.assertTrue(os.path.isfile(os.path.join(target, filename))) - - def test_create_files_dirs(self): - self.remote.create_files_dirs() - self.assertTrue(os.path.isdir(self.remote.base_path)) - self.assertTrue(os.path.isdir(self.remote.conf_path)) - - def test_run_target_host_in_env(self): - handle, remote_exec_path = self.mkstemp(dir=self.temp_dir) - with os.fdopen(handle, 'w') as fd: - fd.writelines(["#!/bin/sh\n", "echo $__target_host"]) - os.chmod(remote_exec_path, 0o755) - remote_exec = remote_exec_path - remote_copy = "echo" - r = self.create_remote(remote_exec=remote_exec, - remote_copy=remote_copy) - self.assertEqual(r.run('true', return_output=True), - "%s\n" % self.target_host[0]) - - def test_run_script_target_host_in_env(self): - handle, remote_exec_path = self.mkstemp(dir=self.temp_dir) - with os.fdopen(handle, 'w') as fd: - fd.writelines(["#!/bin/sh\n", "echo $__target_host"]) - os.chmod(remote_exec_path, 0o755) - remote_exec = remote_exec_path - remote_copy = "echo" - r = self.create_remote(remote_exec=remote_exec, - remote_copy=remote_copy) - handle, script = self.mkstemp(dir=self.temp_dir) - with os.fdopen(handle, "w") as fd: - fd.writelines(["#!/bin/sh\n", "true"]) - self.assertEqual(r.run_script(script, return_output=True), - "%s\n" % self.target_host[0]) - - def test_run_script_with_env_target_host_in_env(self): - handle, script = self.mkstemp(dir=self.temp_dir) - with os.fdopen(handle, "w") as fd: - fd.writelines([ - "#!/bin/sh\n", - ('if [ "$__object" ]; then echo $__object; ' - 'else echo no_env; fi\n')]) - os.chmod(script, 0o755) - handle, remote_exec_path = self.mkstemp(dir=self.temp_dir) - with os.fdopen(handle, 'w') as fd: - fd.writelines(["#!/bin/sh\n", 'shift; cmd=$1; shift; $cmd "$@"\n']) - os.chmod(remote_exec_path, 0o755) - remote_exec = remote_exec_path - remote_copy = "echo" - r = self.create_remote(remote_exec=remote_exec, - remote_copy=remote_copy) - output = r.run_script(script, return_output=True) - self.assertEqual(output, "no_env\n") - - handle, remote_exec_path = self.mkstemp(dir=self.temp_dir) - with os.fdopen(handle, 'w') as fd: - fd.writelines(["#!/bin/sh\n", 'shift; cmd=$1; eval $cmd\n']) - os.chmod(remote_exec_path, 0o755) - remote_exec = remote_exec_path - env = { - '__object': 'test_object', - } - r = self.create_remote(remote_exec=remote_exec, - remote_copy=remote_copy) - output = r.run_script(script, env=env, return_output=True) - self.assertEqual(output, "test_object\n") - - -if __name__ == '__main__': - import unittest - - unittest.main() diff --git a/cdist/test/explorer/__init__.py b/cdist/test/explorer/__init__.py deleted file mode 100644 index 1c4e4bc4..00000000 --- a/cdist/test/explorer/__init__.py +++ /dev/null @@ -1,247 +0,0 @@ -# -*- coding: utf-8 -*- -# -# 2010-2011 Steven Armstrong (steven-cdist at armstrong.cc) -# 2011-2013 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -import os -import shutil -import getpass -import multiprocessing - -import cdist -from cdist import core -from cdist import test -from cdist.exec import local -from cdist.exec import remote -from cdist.core import explorer -import logging - -import os.path as op -my_dir = op.abspath(op.dirname(__file__)) -fixtures = op.join(my_dir, 'fixtures') -conf_dir = op.join(fixtures, "conf") - - -class ExplorerClassTestCase(test.CdistTestCase): - - def setUp(self): - self.temp_dir = self.mkdtemp() - self.local_path = os.path.join(self.temp_dir, "local") - hostdir = cdist.str_hash(self.target_host[0]) - base_root_path = os.path.join(self.local_path, hostdir) - self.remote_base_path = os.path.join(self.temp_dir, "remote") - os.makedirs(self.remote_base_path) - - self.local = local.Local( - target_host=self.target_host, - target_host_tags=self.target_host_tags, - base_root_path=base_root_path, - host_dir_name=hostdir, - exec_path=test.cdist_exec_path, - add_conf_dirs=[conf_dir], - ) - - self.local.create_files_dirs() - - self.remote = remote.Remote( - target_host=self.target_host, - remote_exec=self.remote_exec, - remote_copy=self.remote_copy, - base_path=self.remote_base_path, - stdout_base_path=self.local.stdout_base_path, - stderr_base_path=self.local.stderr_base_path) - self.remote.create_files_dirs() - - self.explorer = explorer.Explorer( - self.target_host, - self.local, - self.remote) - - def tearDown(self): - shutil.rmtree(self.temp_dir) - - def test_list_global_explorer_names(self): - """Ensure that all explorers are listed""" - names = self.explorer.list_global_explorer_names() - self.assertIn("foobar", names) - self.assertIn("global", names) - - def test_transfer_global_explorers(self): - """Ensure transferring explorers to remote works""" - self.explorer.transfer_global_explorers() - source = self.local.global_explorer_path - destination = self.remote.global_explorer_path - self.assertEqual(sorted(os.listdir(source)), - sorted(os.listdir(destination))) - - def test_run_global_explorer(self): - """Checkt that running ONE global explorer works""" - self.explorer.transfer_global_explorers() - output = self.explorer.run_global_explorer('global') - self.assertEqual(output, 'global\n') - - def test_global_explorer_output(self): - """Ensure output is created for every global explorer""" - out_path = self.mkdtemp() - - self.explorer.run_global_explorers(out_path) - names = sorted(self.explorer.list_global_explorer_names()) - output = sorted(os.listdir(out_path)) - - self.assertEqual(names, output) - shutil.rmtree(out_path) - - def test_list_type_explorer_names(self): - cdist_type = core.CdistType(self.local.type_path, '__test_type') - expected = cdist_type.explorers - self.assertEqual(self.explorer.list_type_explorer_names(cdist_type), - expected) - - def test_transfer_type_explorers(self): - """Test if transferring type explorers works""" - cdist_type = core.CdistType(self.local.type_path, '__test_type') - self.explorer.transfer_type_explorers(cdist_type) - source = os.path.join(self.local.type_path, cdist_type.explorer_path) - destination = os.path.join(self.remote.type_path, - cdist_type.explorer_path) - self.assertEqual(os.listdir(source), os.listdir(destination)) - - def test_transfer_type_explorers_only_once(self): - cdist_type = core.CdistType(self.local.type_path, '__test_type') - # first transfer - self.explorer.transfer_type_explorers(cdist_type) - source = os.path.join(self.local.type_path, cdist_type.explorer_path) - destination = os.path.join(self.remote.type_path, - cdist_type.explorer_path) - self.assertEqual(os.listdir(source), os.listdir(destination)) - # nuke destination folder content, but recreate directory - shutil.rmtree(destination) - os.makedirs(destination) - # second transfer, should not happen - self.explorer.transfer_type_explorers(cdist_type) - self.assertFalse(os.listdir(destination)) - - def test_transfer_object_parameters(self): - cdist_type = core.CdistType(self.local.type_path, '__test_type') - cdist_object = core.CdistObject(cdist_type, self.local.object_path, - self.local.object_marker_name, - 'whatever') - cdist_object.create() - cdist_object.parameters = { - 'first': 'first value', - 'second': 'second value' - } - self.explorer.transfer_object_parameters(cdist_object) - source = os.path.join(self.local.object_path, - cdist_object.parameter_path) - destination = os.path.join(self.remote.object_path, - cdist_object.parameter_path) - self.assertEqual(sorted(os.listdir(source)), - sorted(os.listdir(destination))) - - def test_run_type_explorer(self): - cdist_type = core.CdistType(self.local.type_path, '__test_type') - cdist_object = core.CdistObject(cdist_type, self.local.object_path, - self.local.object_marker_name, - 'whatever') - self.explorer.transfer_type_explorers(cdist_type) - output = self.explorer.run_type_explorer('world', cdist_object) - self.assertEqual(output, 'hello\n') - - def test_run_type_explorers(self): - cdist_type = core.CdistType(self.local.type_path, '__test_type') - cdist_object = core.CdistObject(cdist_type, self.local.object_path, - self.local.object_marker_name, - 'whatever') - cdist_object.create() - self.explorer.run_type_explorers(cdist_object) - self.assertEqual(cdist_object.explorers, {'world': 'hello'}) - - def test_jobs_parameter(self): - self.assertIsNone(self.explorer.jobs) - expl = explorer.Explorer( - self.target_host, - self.local, - self.remote, - jobs=8) - self.assertEqual(expl.jobs, 8) - - def test_transfer_global_explorers_parallel(self): - expl = explorer.Explorer( - self.target_host, - self.local, - self.remote, - jobs=multiprocessing.cpu_count()) - self.assertIsNotNone(expl.jobs) - - expl.transfer_global_explorers() - source = self.local.global_explorer_path - destination = self.remote.global_explorer_path - self.assertEqual(sorted(os.listdir(source)), - sorted(os.listdir(destination))) - - def test_run_parallel_jobs(self): - expl = explorer.Explorer( - self.target_host, - self.local, - self.remote, - jobs=multiprocessing.cpu_count()) - self.assertIsNotNone(expl.jobs) - out_path = self.mkdtemp() - - expl.run_global_explorers(out_path) - names = sorted(expl.list_global_explorer_names()) - output = sorted(os.listdir(out_path)) - - self.assertEqual(names, output) - shutil.rmtree(out_path) - - def test_explorer_environment(self): - cdist_type = core.CdistType(self.local.type_path, '__dump_env') - cdist_object = core.CdistObject(cdist_type, self.local.object_path, - self.local.object_marker_name, - 'whatever') - self.explorer.transfer_type_explorers(cdist_type) - output = self.explorer.run_type_explorer('dump', cdist_object) - - output_dict = {} - for line in output.split('\n'): - if line: - key, value = line.split(': ') - output_dict[key] = value - self.assertEqual(output_dict['__target_host'], - self.local.target_host[0]) - self.assertEqual(output_dict['__target_hostname'], - self.local.target_host[1]) - self.assertEqual(output_dict['__target_fqdn'], - self.local.target_host[2]) - self.assertEqual(output_dict['__explorer'], - self.remote.global_explorer_path) - self.assertEqual(output_dict['__target_host_tags'], - self.local.target_host_tags) - self.assertEqual(output_dict['__cdist_log_level'], - str(logging.WARNING)) - self.assertEqual(output_dict['__cdist_log_level_name'], 'WARNING') - - -if __name__ == '__main__': - import unittest - - unittest.main() diff --git a/cdist/test/explorer/fixtures/conf/explorer/foobar b/cdist/test/explorer/fixtures/conf/explorer/foobar deleted file mode 100755 index 33533edd..00000000 --- a/cdist/test/explorer/fixtures/conf/explorer/foobar +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -echo foobar diff --git a/cdist/test/explorer/fixtures/conf/explorer/global b/cdist/test/explorer/fixtures/conf/explorer/global deleted file mode 100755 index 39c16ea8..00000000 --- a/cdist/test/explorer/fixtures/conf/explorer/global +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -echo global diff --git a/cdist/test/explorer/fixtures/conf/type/__dump_env/explorer/dump b/cdist/test/explorer/fixtures/conf/type/__dump_env/explorer/dump deleted file mode 100755 index 3682816b..00000000 --- a/cdist/test/explorer/fixtures/conf/type/__dump_env/explorer/dump +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -echo "__target_host: $__target_host" -echo "__target_hostname: $__target_hostname" -echo "__target_fqdn: $__target_fqdn" -echo "__explorer: $__explorer" -echo "__target_host_tags: $__target_host_tags" -echo "__cdist_log_level: $__cdist_log_level" -echo "__cdist_log_level_name: $__cdist_log_level_name" diff --git a/cdist/test/explorer/fixtures/conf/type/__test_type/explorer/world b/cdist/test/explorer/fixtures/conf/type/__test_type/explorer/world deleted file mode 100755 index 21ba6825..00000000 --- a/cdist/test/explorer/fixtures/conf/type/__test_type/explorer/world +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -echo hello diff --git a/cdist/test/explorer/fixtures/conf/type/__test_type_object_parameter/explorer/test_parameter b/cdist/test/explorer/fixtures/conf/type/__test_type_object_parameter/explorer/test_parameter deleted file mode 100755 index 0778907c..00000000 --- a/cdist/test/explorer/fixtures/conf/type/__test_type_object_parameter/explorer/test_parameter +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -cat "$__object/parameter/test" diff --git a/cdist/test/fixtures/remote/README b/cdist/test/fixtures/remote/README deleted file mode 100644 index cfd350f9..00000000 --- a/cdist/test/fixtures/remote/README +++ /dev/null @@ -1,3 +0,0 @@ -This effectively turns remote calling into local calling. - -Probably most useful for the unittesting. diff --git a/cdist/test/fixtures/remote/copy b/cdist/test/fixtures/remote/copy deleted file mode 100755 index 05f43eb1..00000000 --- a/cdist/test/fixtures/remote/copy +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -# -# 2012-2013 Nico Schottelius (nico-cdist schottelius.org) -# 2013-2014 Steven Armstrong (steven-cdist armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -code="$(echo "$@" | sed "s|\([[:space:]]\)$__target_host:|\1|g")" -cp -L $code diff --git a/cdist/test/inventory/__init__.py b/cdist/test/inventory/__init__.py deleted file mode 100644 index 287c855c..00000000 --- a/cdist/test/inventory/__init__.py +++ /dev/null @@ -1,477 +0,0 @@ -# -*- coding: utf-8 -*- -# -# 2016 Darko Poljak (darko.poljak at gmail.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -import os -import shutil -import cdist -import os.path as op -import unittest -import sys -from cdist import test -from cdist import inventory -from io import StringIO - -my_dir = op.abspath(op.dirname(__file__)) -fixtures = op.join(my_dir, 'fixtures') -inventory_dir = op.join(fixtures, "inventory") - - -class InventoryTestCase(test.CdistTestCase): - - def _create_host_with_tags(self, host, tags): - os.makedirs(inventory_dir, exist_ok=True) - hostfile = op.join(inventory_dir, host) - with open(hostfile, "w") as f: - for x in tags: - f.write("{}\n".format(x)) - - def setUp(self): - self.maxDiff = None - self.db = { - "loadbalancer1": ["loadbalancer", "all", "europe", ], - "loadbalancer2": ["loadbalancer", "all", "europe", ], - "loadbalancer3": ["loadbalancer", "all", "africa", ], - "loadbalancer4": ["loadbalancer", "all", "africa", ], - "web1": ["web", "all", "static", ], - "web2": ["web", "all", "dynamic", ], - "web3": ["web", "all", "dynamic", ], - "shell1": ["shell", "all", "free", ], - "shell2": ["shell", "all", "free", ], - "shell3": ["shell", "all", "charge", ], - "shell4": ["shell", "all", "charge", ], - "monty": ["web", "python", "shell", ], - "python": ["web", "python", "shell", ], - } - for x in self.db: - self.db[x] = sorted(self.db[x]) - for host in self.db: - self._create_host_with_tags(host, self.db[host]) - self.sys_stdout = sys.stdout - out = StringIO() - sys.stdout = out - - def _get_output(self): - sys.stdout.flush() - output = sys.stdout.getvalue().strip() - return output - - def tearDown(self): - sys.stdout = self.sys_stdout - shutil.rmtree(inventory_dir) - - def test_inventory_create_db(self): - dbdir = op.join(fixtures, "foo") - inv = inventory.Inventory(db_basedir=dbdir) - self.assertTrue(os.path.isdir(dbdir)) - self.assertEqual(inv.db_basedir, dbdir) - shutil.rmtree(inv.db_basedir) - - # InventoryList - def test_inventory_list_print(self): - invList = inventory.InventoryList(db_basedir=inventory_dir) - invList.run() - output = self._get_output() - self.assertTrue(' ' in output) - - def test_inventory_list_print_host_only(self): - invList = inventory.InventoryList(db_basedir=inventory_dir, - list_only_host=True) - invList.run() - output = self._get_output() - self.assertFalse(' ' in output) - - def test_inventory_list_all(self): - invList = inventory.InventoryList(db_basedir=inventory_dir) - entries = invList.entries() - db = {host: sorted(tags) for host, tags in entries} - self.assertEqual(db, self.db) - - def test_inventory_list_by_host_hosts(self): - hosts = ("web1", "web2", "web3",) - invList = inventory.InventoryList(db_basedir=inventory_dir, - hosts=hosts) - entries = invList.entries() - db = {host: sorted(tags) for host, tags in entries} - expected_db = {host: sorted(self.db[host]) for host in hosts} - self.assertEqual(db, expected_db) - - def test_inventory_list_by_host_hostfile(self): - hosts = ("web1", "web2", "web3",) - hostfile = op.join(fixtures, "hosts") - with open(hostfile, "w") as f: - for x in hosts: - f.write("{}\n".format(x)) - invList = inventory.InventoryList(db_basedir=inventory_dir, - hostfile=hostfile) - entries = invList.entries() - db = {host: sorted(tags) for host, tags in entries} - expected_db = {host: sorted(self.db[host]) for host in hosts} - self.assertEqual(db, expected_db) - os.remove(hostfile) - - def test_inventory_list_by_host_hosts_hostfile(self): - hosts = ("shell1", "shell4",) - hostsf = ("web1", "web2", "web3",) - hostfile = op.join(fixtures, "hosts") - with open(hostfile, "w") as f: - for x in hostsf: - f.write("{}\n".format(x)) - invList = inventory.InventoryList(db_basedir=inventory_dir, - hosts=hosts, hostfile=hostfile) - entries = invList.entries() - db = {host: sorted(tags) for host, tags in entries} - import itertools - expected_db = {host: sorted(self.db[host]) for host in - itertools.chain(hostsf, hosts)} - self.assertEqual(db, expected_db) - os.remove(hostfile) - - def _gen_expected_db_for_tags(self, tags): - db = {} - for host in self.db: - for tag in tags: - if tag in self.db[host]: - db[host] = self.db[host] - break - return db - - def _gen_expected_db_for_has_all_tags(self, tags): - db = {} - for host in self.db: - if set(tags).issubset(set(self.db[host])): - db[host] = self.db[host] - return db - - def test_inventory_list_by_tag_hosts(self): - tags = ("web", "shell",) - invList = inventory.InventoryList(db_basedir=inventory_dir, - istag=True, hosts=tags) - entries = invList.entries() - db = {host: sorted(tags) for host, tags in entries} - expected_db = self._gen_expected_db_for_tags(tags) - self.assertEqual(db, expected_db) - - def test_inventory_list_by_tag_hostfile(self): - tags = ("web", "shell",) - tagfile = op.join(fixtures, "tags") - with open(tagfile, "w") as f: - for x in tags: - f.write("{}\n".format(x)) - invList = inventory.InventoryList(db_basedir=inventory_dir, - istag=True, hostfile=tagfile) - entries = invList.entries() - db = {host: sorted(tags) for host, tags in entries} - expected_db = self._gen_expected_db_for_tags(tags) - self.assertEqual(db, expected_db) - os.remove(tagfile) - - def test_inventory_list_by_tag_hosts_hostfile(self): - tags = ("web", "shell",) - tagsf = ("dynamic", "europe",) - tagfile = op.join(fixtures, "tags") - with open(tagfile, "w") as f: - for x in tagsf: - f.write("{}\n".format(x)) - invList = inventory.InventoryList(db_basedir=inventory_dir, - istag=True, hosts=tags, - hostfile=tagfile) - entries = invList.entries() - db = {host: sorted(tags) for host, tags in entries} - import itertools - expected_db = self._gen_expected_db_for_tags(tags + tagsf) - self.assertEqual(db, expected_db) - os.remove(tagfile) - - def test_inventory_list_by_tag_has_all_tags(self): - tags = ("web", "python", "shell",) - invList = inventory.InventoryList(db_basedir=inventory_dir, - istag=True, hosts=tags, - has_all_tags=True) - entries = invList.entries() - db = {host: sorted(tags) for host, tags in entries} - expected_db = self._gen_expected_db_for_has_all_tags(tags) - self.assertEqual(db, expected_db) - - # InventoryHost - def test_inventory_host_add_hosts(self): - hosts = ("spam", "eggs", "foo",) - invHost = inventory.InventoryHost(db_basedir=inventory_dir, - action="add", hosts=hosts) - invHost.run() - invList = inventory.InventoryList(db_basedir=inventory_dir) - expected_hosts = tuple(x for x in invList.host_entries() if x in hosts) - self.assertEqual(sorted(hosts), sorted(expected_hosts)) - - def test_inventory_host_add_hostfile(self): - hosts = ("spam-new", "eggs-new", "foo-new",) - hostfile = op.join(fixtures, "hosts") - with open(hostfile, "w") as f: - for x in hosts: - f.write("{}\n".format(x)) - invHost = inventory.InventoryHost(db_basedir=inventory_dir, - action="add", hostfile=hostfile) - invHost.run() - invList = inventory.InventoryList(db_basedir=inventory_dir) - expected_hosts = tuple(x for x in invList.host_entries() if x in hosts) - self.assertEqual(sorted(hosts), sorted(expected_hosts)) - os.remove(hostfile) - - def test_inventory_host_add_hosts_hostfile(self): - hosts = ("spam-spam", "eggs-spam", "foo-spam",) - hostf = ("spam-eggs-spam", "spam-foo-spam",) - hostfile = op.join(fixtures, "hosts") - with open(hostfile, "w") as f: - for x in hostf: - f.write("{}\n".format(x)) - invHost = inventory.InventoryHost(db_basedir=inventory_dir, - action="add", hosts=hosts, - hostfile=hostfile) - invHost.run() - invList = inventory.InventoryList(db_basedir=inventory_dir, - hosts=hosts + hostf) - expected_hosts = tuple(invList.host_entries()) - self.assertEqual(sorted(hosts + hostf), sorted(expected_hosts)) - os.remove(hostfile) - - def test_inventory_host_del_hosts(self): - hosts = ("web1", "shell1",) - invHost = inventory.InventoryHost(db_basedir=inventory_dir, - action="del", hosts=hosts) - invHost.run() - invList = inventory.InventoryList(db_basedir=inventory_dir, - hosts=hosts) - expected_hosts = tuple(invList.host_entries()) - self.assertTupleEqual(expected_hosts, ()) - - def test_inventory_host_del_hostfile(self): - hosts = ("loadbalancer3", "loadbalancer4",) - hostfile = op.join(fixtures, "hosts") - with open(hostfile, "w") as f: - for x in hosts: - f.write("{}\n".format(x)) - invHost = inventory.InventoryHost(db_basedir=inventory_dir, - action="del", hostfile=hostfile) - invHost.run() - invList = inventory.InventoryList(db_basedir=inventory_dir, - hosts=hosts) - expected_hosts = tuple(invList.host_entries()) - self.assertTupleEqual(expected_hosts, ()) - os.remove(hostfile) - - def test_inventory_host_del_hosts_hostfile(self): - hosts = ("loadbalancer1", "loadbalancer2",) - hostf = ("web2", "shell2",) - hostfile = op.join(fixtures, "hosts") - with open(hostfile, "w") as f: - for x in hostf: - f.write("{}\n".format(x)) - invHost = inventory.InventoryHost(db_basedir=inventory_dir, - action="del", hosts=hosts, - hostfile=hostfile) - invHost.run() - invList = inventory.InventoryList(db_basedir=inventory_dir, - hosts=hosts + hostf) - expected_hosts = tuple(invList.host_entries()) - self.assertTupleEqual(expected_hosts, ()) - os.remove(hostfile) - - @unittest.expectedFailure - def test_inventory_host_invalid_host(self): - try: - invalid_hostfile = op.join(inventory_dir, "invalid") - os.mkdir(invalid_hostfile) - hosts = ("invalid",) - invHost = inventory.InventoryHost(db_basedir=inventory_dir, - action="del", hosts=hosts) - invHost.run() - except e: - os.rmdir(invalid_hostfile) - raise e - - # InventoryTag - def test_inventory_tag_init(self): - invTag = inventory.InventoryTag(db_basedir=inventory_dir, - action="add") - self.assertTrue(invTag.allhosts) - self.assertEqual(invTag.tagfile, "-") - - def test_inventory_tag_stdin_multiple_hosts(self): - try: - invTag = inventory.InventoryTag(db_basedir=inventory_dir, - action="add", tagfile="-", - hosts=("host1", "host2",)) - except e: - self.fail() - - def test_inventory_tag_stdin_hostfile(self): - try: - invTag = inventory.InventoryTag(db_basedir=inventory_dir, - action="add", tagfile="-", - hostfile="hosts") - except e: - self.fail() - - @unittest.expectedFailure - def test_inventory_tag_stdin_both(self): - invTag = inventory.InventoryTag(db_basedir=inventory_dir, - action="add", tagfile="-", - hostfile="-") - - def test_inventory_tag_add_for_all_hosts(self): - tags = ("spam-spam-spam", "spam-spam-eggs",) - tagsf = ("spam-spam-spam-eggs", "spam-spam-eggs-spam",) - tagfile = op.join(fixtures, "tags") - with open(tagfile, "w") as f: - for x in tagsf: - f.write("{}\n".format(x)) - invTag = inventory.InventoryTag(db_basedir=inventory_dir, - action="add", tags=tags, - tagfile=tagfile) - invTag.run() - invList = inventory.InventoryList(db_basedir=inventory_dir) - failed = False - for host, taglist in invList.entries(): - for x in tagsf + tags: - if x not in taglist: - failed = True - break - if failed: - break - os.remove(tagfile) - if failed: - self.fail() - - def test_inventory_tag_add(self): - tags = ("spam-spam-spam", "spam-spam-eggs",) - tagsf = ("spam-spam-spam-eggs", "spam-spam-eggs-spam",) - hosts = ("loadbalancer1", "loadbalancer2", "shell2",) - hostsf = ("web2", "web3",) - tagfile = op.join(fixtures, "tags") - with open(tagfile, "w") as f: - for x in tagsf: - f.write("{}\n".format(x)) - hostfile = op.join(fixtures, "hosts") - with open(hostfile, "w") as f: - for x in hostsf: - f.write("{}\n".format(x)) - invTag = inventory.InventoryTag(db_basedir=inventory_dir, - action="add", tags=tags, - tagfile=tagfile, hosts=hosts, - hostfile=hostfile) - invTag.run() - invList = inventory.InventoryList(db_basedir=inventory_dir, - hosts=hosts + hostsf) - failed = False - for host, taglist in invList.entries(): - if host not in hosts + hostsf: - failed = True - break - for x in tagsf + tags: - if x not in taglist: - failed = True - break - if failed: - break - os.remove(tagfile) - os.remove(hostfile) - if failed: - self.fail() - - def test_inventory_tag_del_for_all_hosts(self): - tags = ("all",) - tagsf = ("charge",) - tagfile = op.join(fixtures, "tags") - with open(tagfile, "w") as f: - for x in tagsf: - f.write("{}\n".format(x)) - invTag = inventory.InventoryTag(db_basedir=inventory_dir, - action="del", tags=tags, - tagfile=tagfile) - invTag.run() - invList = inventory.InventoryList(db_basedir=inventory_dir) - failed = False - for host, taglist in invList.entries(): - for x in tagsf + tags: - if x in taglist: - failed = True - break - if failed: - break - os.remove(tagfile) - if failed: - self.fail() - - def test_inventory_tag_del(self): - tags = ("europe", "africa",) - tagsf = ("free", ) - hosts = ("loadbalancer1", "loadbalancer2", "shell2",) - hostsf = ("web2", "web3",) - tagfile = op.join(fixtures, "tags") - with open(tagfile, "w") as f: - for x in tagsf: - f.write("{}\n".format(x)) - hostfile = op.join(fixtures, "hosts") - with open(hostfile, "w") as f: - for x in hostsf: - f.write("{}\n".format(x)) - invTag = inventory.InventoryTag(db_basedir=inventory_dir, - action="del", tags=tags, - tagfile=tagfile, hosts=hosts, - hostfile=hostfile) - invTag.run() - invList = inventory.InventoryList(db_basedir=inventory_dir, - hosts=hosts + hostsf) - failed = False - for host, taglist in invList.entries(): - if host not in hosts + hostsf: - failed = True - break - for x in tagsf + tags: - if x in taglist: - failed = True - break - if failed: - break - os.remove(tagfile) - os.remove(hostfile) - if failed: - self.fail() - - def test_inventory_tag_del_all_tags(self): - hosts = ("web3", "shell1",) - hostsf = ("shell2", "loadbalancer1",) - hostfile = op.join(fixtures, "hosts") - with open(hostfile, "w") as f: - for x in hostsf: - f.write("{}\n".format(x)) - invHost = inventory.InventoryHost(db_basedir=inventory_dir, - action="del", all=True, - hosts=hosts, hostfile=hostfile) - invHost.run() - invList = inventory.InventoryList(db_basedir=inventory_dir, - hosts=hosts + hostsf) - for host, htags in invList.entries(): - self.assertEqual(htags, ()) - os.remove(hostfile) - - -if __name__ == "__main__": - unittest.main() diff --git a/cdist/test/manifest/__init__.py b/cdist/test/manifest/__init__.py deleted file mode 100644 index 68e777a4..00000000 --- a/cdist/test/manifest/__init__.py +++ /dev/null @@ -1,164 +0,0 @@ -# -*- coding: utf-8 -*- -# -# 2010-2011 Steven Armstrong (steven-cdist at armstrong.cc) -# 2012 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -import os -import getpass -import shutil -import string -import random -import logging -import io -import sys - -import cdist -from cdist import test -from cdist.exec import local -from cdist import core -from cdist.core import manifest - -import os.path as op -my_dir = op.abspath(op.dirname(__file__)) -fixtures = op.join(my_dir, 'fixtures') -conf_dir = op.join(fixtures, 'conf') - - -class ManifestTestCase(test.CdistTestCase): - - def setUp(self): - self.orig_environ = os.environ - os.environ = os.environ.copy() - self.temp_dir = self.mkdtemp() - - out_path = self.temp_dir - hostdir = cdist.str_hash(self.target_host[0]) - base_root_path = os.path.join(out_path, hostdir) - self.local = local.Local( - target_host=self.target_host, - target_host_tags=self.target_host_tags, - base_root_path=base_root_path, - host_dir_name=hostdir, - exec_path=cdist.test.cdist_exec_path, - add_conf_dirs=[conf_dir]) - self.local.create_files_dirs() - - self.manifest = manifest.Manifest(self.target_host, self.local) - self.log = logging.getLogger(self.target_host[0]) - - def tearDown(self): - os.environ = self.orig_environ - shutil.rmtree(self.temp_dir) - - def test_initial_manifest_environment(self): - initial_manifest = os.path.join(self.local.manifest_path, - "dump_environment") - handle, output_file = self.mkstemp(dir=self.temp_dir) - os.close(handle) - os.environ['__cdist_test_out'] = output_file - old_loglevel = logging.root.getEffectiveLevel() - self.log.setLevel(logging.VERBOSE) - manifest = cdist.core.manifest.Manifest(self.target_host, self.local) - manifest.run_initial_manifest(initial_manifest) - - with open(output_file, 'r') as fd: - output_string = fd.read() - output_dict = {} - for line in output_string.split('\n'): - if line: - key, value = line.split(': ') - output_dict[key] = value - self.assertTrue(output_dict['PATH'].startswith(self.local.bin_path)) - self.assertEqual(output_dict['__target_host'], - self.local.target_host[0]) - self.assertEqual(output_dict['__target_hostname'], - self.local.target_host[1]) - self.assertEqual(output_dict['__target_fqdn'], - self.local.target_host[2]) - self.assertEqual(output_dict['__global'], self.local.base_path) - self.assertEqual(output_dict['__cdist_type_base_path'], - self.local.type_path) - self.assertEqual(output_dict['__manifest'], self.local.manifest_path) - self.assertEqual(output_dict['__files'], self.local.files_path) - self.assertEqual(output_dict['__target_host_tags'], - self.local.target_host_tags) - self.assertEqual(output_dict['__cdist_log_level'], - str(logging.VERBOSE)) - self.assertEqual(output_dict['__cdist_log_level_name'], 'VERBOSE') - self.log.setLevel(old_loglevel) - - def test_type_manifest_environment(self): - cdist_type = core.CdistType(self.local.type_path, '__dump_environment') - cdist_object = core.CdistObject(cdist_type, self.local.object_path, - self.local.object_marker_name, - 'whatever') - cdist_object.create() - handle, output_file = self.mkstemp(dir=self.temp_dir) - os.close(handle) - os.environ['__cdist_test_out'] = output_file - old_loglevel = self.log.getEffectiveLevel() - self.log.setLevel(logging.VERBOSE) - manifest = cdist.core.manifest.Manifest(self.target_host, self.local) - manifest.run_type_manifest(cdist_object) - - with open(output_file, 'r') as fd: - output_string = fd.read() - output_dict = {} - for line in output_string.split('\n'): - if line: - key, value = line.split(': ') - output_dict[key] = value - self.assertTrue(output_dict['PATH'].startswith(self.local.bin_path)) - self.assertEqual(output_dict['__target_host'], - self.local.target_host[0]) - self.assertEqual(output_dict['__target_hostname'], - self.local.target_host[1]) - self.assertEqual(output_dict['__target_fqdn'], - self.local.target_host[2]) - self.assertEqual(output_dict['__global'], self.local.base_path) - self.assertEqual(output_dict['__cdist_type_base_path'], - self.local.type_path) - self.assertEqual(output_dict['__type'], cdist_type.absolute_path) - self.assertEqual(output_dict['__object'], cdist_object.absolute_path) - self.assertEqual(output_dict['__object_id'], cdist_object.object_id) - self.assertEqual(output_dict['__object_name'], cdist_object.name) - self.assertEqual(output_dict['__files'], self.local.files_path) - self.assertEqual(output_dict['__target_host_tags'], - self.local.target_host_tags) - self.assertEqual(output_dict['__cdist_log_level'], - str(logging.VERBOSE)) - self.assertEqual(output_dict['__cdist_log_level_name'], 'VERBOSE') - self.log.setLevel(old_loglevel) - - def test_loglevel_env_setup(self): - current_level = self.log.getEffectiveLevel() - self.log.setLevel(logging.DEBUG) - manifest = cdist.core.manifest.Manifest(self.target_host, self.local) - self.assertTrue("__cdist_log_level" in manifest.env) - self.assertTrue("__cdist_log_level_name" in manifest.env) - self.assertEqual(manifest.env["__cdist_log_level"], - str(logging.DEBUG)) - self.assertEqual(manifest.env["__cdist_log_level_name"], 'DEBUG') - self.log.setLevel(current_level) - - -if __name__ == '__main__': - import unittest - unittest.main() diff --git a/cdist/test/manifest/fixtures/conf/manifest/dump_environment b/cdist/test/manifest/fixtures/conf/manifest/dump_environment deleted file mode 100755 index 8057ca42..00000000 --- a/cdist/test/manifest/fixtures/conf/manifest/dump_environment +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -cat > $__cdist_test_out << DONE -PATH: $PATH -__target_host: $__target_host -__target_hostname: $__target_hostname -__target_fqdn: $__target_fqdn -__global: $__global -__cdist_type_base_path: $__cdist_type_base_path -__manifest: $__manifest -__files: $__files -__target_host_tags: $__target_host_tags -__cdist_log_level: $__cdist_log_level -__cdist_log_level_name: $__cdist_log_level_name -DONE diff --git a/cdist/test/manifest/fixtures/conf/manifest/init b/cdist/test/manifest/fixtures/conf/manifest/init deleted file mode 100755 index 0bdb391a..00000000 --- a/cdist/test/manifest/fixtures/conf/manifest/init +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -__planet Saturn -__moon Prometheus --planet Saturn diff --git a/cdist/test/manifest/fixtures/conf/type/__dump_environment/manifest b/cdist/test/manifest/fixtures/conf/type/__dump_environment/manifest deleted file mode 100755 index a38050f9..00000000 --- a/cdist/test/manifest/fixtures/conf/type/__dump_environment/manifest +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -cat > $__cdist_test_out << DONE -PATH: $PATH -__target_host: $__target_host -__target_hostname: $__target_hostname -__target_fqdn: $__target_fqdn -__global: $__global -__cdist_type_base_path: $__cdist_type_base_path -__type: $__type -__self: $__self -__object: $__object -__object_id: $__object_id -__object_name: $__object_name -__files: $__files -__target_host_tags: $__target_host_tags -__cdist_log_level: $__cdist_log_level -__cdist_log_level_name: $__cdist_log_level_name -DONE diff --git a/cdist/test/manifest/fixtures/conf/type/__moon/.keep b/cdist/test/manifest/fixtures/conf/type/__moon/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/manifest/fixtures/conf/type/__moon/manifest b/cdist/test/manifest/fixtures/conf/type/__moon/manifest deleted file mode 100755 index 362be5a1..00000000 --- a/cdist/test/manifest/fixtures/conf/type/__moon/manifest +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -if [ -f "$__object/parameter/name" ]; then - name="(cat "$__object/parameter/name")" -else - name="$__object_id" - echo "$name" > "$__object/parameter/name" -fi diff --git a/cdist/test/manifest/fixtures/conf/type/__moon/parameter/optional b/cdist/test/manifest/fixtures/conf/type/__moon/parameter/optional deleted file mode 100644 index f121bdbf..00000000 --- a/cdist/test/manifest/fixtures/conf/type/__moon/parameter/optional +++ /dev/null @@ -1 +0,0 @@ -name diff --git a/cdist/test/manifest/fixtures/conf/type/__moon/parameter/required b/cdist/test/manifest/fixtures/conf/type/__moon/parameter/required deleted file mode 100644 index 729a5167..00000000 --- a/cdist/test/manifest/fixtures/conf/type/__moon/parameter/required +++ /dev/null @@ -1 +0,0 @@ -planet diff --git a/cdist/test/manifest/fixtures/conf/type/__planet/.keep b/cdist/test/manifest/fixtures/conf/type/__planet/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/manifest/fixtures/conf/type/__planet/manifest b/cdist/test/manifest/fixtures/conf/type/__planet/manifest deleted file mode 100755 index 362be5a1..00000000 --- a/cdist/test/manifest/fixtures/conf/type/__planet/manifest +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -if [ -f "$__object/parameter/name" ]; then - name="(cat "$__object/parameter/name")" -else - name="$__object_id" - echo "$name" > "$__object/parameter/name" -fi diff --git a/cdist/test/manifest/fixtures/conf/type/__planet/parameter/optional b/cdist/test/manifest/fixtures/conf/type/__planet/parameter/optional deleted file mode 100644 index f121bdbf..00000000 --- a/cdist/test/manifest/fixtures/conf/type/__planet/parameter/optional +++ /dev/null @@ -1 +0,0 @@ -name diff --git a/cdist/test/message/__init__.py b/cdist/test/message/__init__.py deleted file mode 100644 index 61cd5d97..00000000 --- a/cdist/test/message/__init__.py +++ /dev/null @@ -1,82 +0,0 @@ -# -*- coding: utf-8 -*- -# -# 2013 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -import os -import tempfile - -from cdist import test -import cdist.message - - -class MessageTestCase(test.CdistTestCase): - - def setUp(self): - self.prefix = "cdist-test" - self.content = "A very short story" - self.tempfile = tempfile.mkstemp()[1] - self.message = cdist.message.Message(prefix=self.prefix, - messages=self.tempfile) - - def tearDown(self): - os.remove(self.tempfile) - self.message._cleanup() - - def test_env(self): - """ - Ensure environment is correct - """ - - env = self.message.env - - self.assertIn('__messages_in', env) - self.assertIn('__messages_out', env) - - def test_copy_content(self): - """ - Ensure content copying is working - """ - - with open(self.tempfile, "w") as fd: - fd.write(self.content) - - self.message._copy_messages() - - with open(self.tempfile, "r") as fd: - testcontent = fd.read() - - self.assertEqual(self.content, testcontent) - - def test_message_merge_prefix(self): - """Ensure messages are merged and are prefixed""" - - expectedcontent = "%s:%s" % (self.prefix, self.content) - - out = self.message.env['__messages_out'] - - with open(out, "w") as fd: - fd.write(self.content) - - self.message._merge_messages() - - with open(self.tempfile, "r") as fd: - testcontent = fd.read() - - self.assertEqual(expectedcontent, testcontent) diff --git a/cdist/test/util/__init__.py b/cdist/test/util/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/test/util/fsproperty.py b/cdist/test/util/fsproperty.py deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/util/__init__.py b/cdist/util/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/cdist/util/fsproperty.py b/cdist/util/fsproperty.py deleted file mode 100644 index 5a27c9d7..00000000 --- a/cdist/util/fsproperty.py +++ /dev/null @@ -1,321 +0,0 @@ -# -*- coding: utf-8 -*- -# -# 2010-2011 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -import os -import collections - -import cdist - - -class AbsolutePathRequiredError(cdist.Error): - def __init__(self, path): - self.path = path - - def __str__(self): - return 'Absolute path required, got: %s' % self.path - - -class FileList(collections.MutableSequence): - """A list that stores it's state in a file. - - """ - def __init__(self, path, initial=None): - if not os.path.isabs(path): - raise AbsolutePathRequiredError(path) - self.path = path - if initial: - # delete existing file - try: - os.unlink(self.path) - except EnvironmentError: - # ignored - pass - for i in initial: - self.append(i) - - def __read(self): - lines = [] - # if file does not exist return empty list - try: - with open(self.path) as fd: - for line in fd: - lines.append(line.rstrip('\n')) - except EnvironmentError: - # error ignored - pass - return lines - - def __write(self, lines): - try: - with open(self.path, 'w') as fd: - for line in lines: - fd.write(str(line) + '\n') - except EnvironmentError as e: - # should never happen - raise cdist.Error(str(e)) - - def __repr__(self): - return repr(list(self)) - - def __getitem__(self, index): - return self.__read()[index] - - def __setitem__(self, index, value): - lines = self.__read() - lines[index] = value - self.__write(lines) - - def __delitem__(self, index): - lines = self.__read() - del lines[index] - self.__write(lines) - - def __len__(self): - lines = self.__read() - return len(lines) - - def insert(self, index, value): - lines = self.__read() - lines.insert(index, value) - self.__write(lines) - - def sort(self): - lines = sorted(self) - self.__write(lines) - - -class DirectoryDict(collections.MutableMapping): - """A dict that stores it's items as files in a directory. - - """ - def __init__(self, path, initial=None, **kwargs): - if not os.path.isabs(path): - raise AbsolutePathRequiredError(path) - self.path = path - try: - # create directory if it doesn't exist - if not os.path.isdir(self.path): - os.mkdir(self.path) - except EnvironmentError as e: - raise cdist.Error(str(e)) - if initial is not None: - self.update(initial) - if kwargs: - self.update(kwargs) - - def __repr__(self): - return repr(dict(self)) - - def __getitem__(self, key): - try: - with open(os.path.join(self.path, key), "r") as fd: - value = fd.read().splitlines() - # if there is no value/empty line then return '' - # if there is only one value then return that value - # if there are multiple lines in file then return list - if not value: - return '' - elif len(value) == 1: - return value[0] - else: - return value - except EnvironmentError: - raise KeyError(key) - - def __setitem__(self, key, value): - try: - with open(os.path.join(self.path, key), "w") as fd: - if (not hasattr(value, 'strip') and - (hasattr(value, '__getitem__') or - hasattr(value, '__iter__'))): - # if it looks like a sequence and quacks like a sequence, - # it is a sequence - for v in value: - fd.write(str(v) + '\n') - else: - fd.write(str(value)) - # ensure file ends with a single newline - if value and value[-1] != '\n': - fd.write('\n') - except EnvironmentError as e: - raise cdist.Error(str(e)) - - def __delitem__(self, key): - try: - os.remove(os.path.join(self.path, key)) - except EnvironmentError: - raise KeyError(key) - - def __iter__(self): - try: - return iter(os.listdir(self.path)) - except EnvironmentError as e: - raise cdist.Error(str(e)) - - def __len__(self): - try: - return len(os.listdir(self.path)) - except EnvironmentError as e: - raise cdist.Error(str(e)) - - -class FileBasedProperty(object): - attribute_class = None - - def __init__(self, path): - """ - :param path: string or callable - - Abstract super class. Subclass and set the class member - attribute_class accordingly. - - Usage with a sublcass: - - class Foo(object): - # note that the actual DirectoryDict is stored as __parameters - # on the instance - parameters = DirectoryDictProperty( - lambda instance: os.path.join(instance.absolute_path, - 'parameter')) - # note that the actual DirectoryDict is stored as __other_dict - # on the instance - other_dict = DirectoryDictProperty('/tmp/other_dict') - - def __init__(self): - self.absolute_path = '/tmp/foo' - - """ - self.path = path - - def _get_path(self, instance): - path = self.path - if callable(path): - path = path(instance) - return path - - def _get_property_name(self, owner): - for name, prop in owner.__dict__.items(): - if self == prop: - return name - - def _get_attribute(self, instance, owner): - name = self._get_property_name(owner) - attribute_name = '__%s' % name - if not hasattr(instance, attribute_name): - path = self._get_path(instance) - attribute_instance = self.attribute_class(path) - setattr(instance, attribute_name, attribute_instance) - return getattr(instance, attribute_name) - - def __get__(self, instance, owner): - if instance is None: - return self - return self._get_attribute(instance, owner) - - def __delete__(self, instance): - raise AttributeError("can't delete attribute") - - -class DirectoryDictProperty(FileBasedProperty): - attribute_class = DirectoryDict - - def __set__(self, instance, value): - attribute_instance = self._get_attribute(instance, instance.__class__) - for name in attribute_instance.keys(): - del attribute_instance[name] - attribute_instance.update(value) - - -class FileListProperty(FileBasedProperty): - attribute_class = FileList - - def __set__(self, instance, value): - path = self._get_path(instance) - try: - os.unlink(path) - except EnvironmentError: - # ignored - pass - attribute_instance = self._get_attribute(instance, instance.__class__) - for item in value: - attribute_instance.append(item) - - -class FileBooleanProperty(FileBasedProperty): - """A boolean property which uses a file to represent its value. - - File exists -> True - File does not exists -> False - """ - # Descriptor Protocol - def __get__(self, instance, owner): - if instance is None: - return self - path = self._get_path(instance) - return os.path.isfile(path) - - def __set__(self, instance, value): - path = self._get_path(instance) - if value: - try: - open(path, "w").close() - except EnvironmentError as e: - raise cdist.Error(str(e)) - else: - try: - os.remove(path) - except EnvironmentError: - # ignore - pass - - -class FileStringProperty(FileBasedProperty): - """A string property which stores its value in a file. - """ - # Descriptor Protocol - def __get__(self, instance, owner): - if instance is None: - return self - path = self._get_path(instance) - value = "" - try: - with open(path, "r") as fd: - value = fd.read().rstrip('\n') - except EnvironmentError: - pass - return value - - def __set__(self, instance, value): - path = self._get_path(instance) - if value: - try: - with open(path, "w") as fd: - fd.write(str(value)) - # ensure file ends with a single newline - if value[-1] != '\n': - fd.write('\n') - except EnvironmentError as e: - raise cdist.Error(str(e)) - else: - try: - os.remove(path) - except EnvironmentError: - pass diff --git a/cdist/util/ipaddr.py b/cdist/util/ipaddr.py deleted file mode 100644 index 9b730225..00000000 --- a/cdist/util/ipaddr.py +++ /dev/null @@ -1,92 +0,0 @@ -# -*- coding: utf-8 -*- -# -# 2016 Darko Poljak (darko.poljak at gmail.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -import socket -import logging - - -def resolve_target_addresses(host, family=0): - host_name = resolve_target_host_name(host, family) - host_fqdn = resolve_target_fqdn(host) - return (host, host_name, host_fqdn) - - -def resolve_target_host_name(host, family=0): - log = logging.getLogger(host) - try: - # getaddrinfo returns a list of 5-tuples: - # (family, type, proto, canonname, sockaddr) - # where sockaddr is: - # (address, port) for AF_INET, - # (address, port, flow_info, scopeid) for AF_INET6 - ip_addr = socket.getaddrinfo( - host, None, family=family, type=socket.SOCK_STREAM)[0][4][0] - # gethostbyaddr returns triple - # (hostname, aliaslist, ipaddrlist) - host_name = socket.gethostbyaddr(ip_addr)[0] - log.debug("derived host_name for host \"{}\": {}".format( - host, host_name)) - except (socket.gaierror, socket.herror) as e: - log.warning("Could not derive host_name for {}" - ", $host_name will be empty. Error is: {}".format(host, e)) - # in case of error provide empty value - host_name = '' - return host_name - - -def resolve_target_fqdn(host): - log = logging.getLogger(host) - try: - host_fqdn = socket.getfqdn(host) - log.debug("derived host_fqdn for host \"{}\": {}".format( - host, host_fqdn)) - except socket.herror as e: - log.warning("Could not derive host_fqdn for {}" - ", $host_fqdn will be empty. Error is: {}".format(host, e)) - # in case of error provide empty value - host_fqdn = '' - return host_fqdn - - -# check whether addr is IPv6 -try: - # python 3.3+ - import ipaddress - - def is_ipv6(addr): - try: - return ipaddress.ip_address(addr).version == 6 - except ValueError: - return False -except ImportError: - # fallback for older python versions - def is_ipv6(addr): - try: - socket.inet_aton(addr) - return False - except socket.error: - pass - try: - socket.inet_pton(socket.AF_INET6, addr) - return True - except socket.error: - pass - return False diff --git a/cdist/util/remoteutil.py b/cdist/util/remoteutil.py deleted file mode 100644 index 505c4598..00000000 --- a/cdist/util/remoteutil.py +++ /dev/null @@ -1,50 +0,0 @@ -# -*- coding: utf-8 -*- -# -# 2016 Darko Poljak (darko.poljak at gmail.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - - -def inspect_ssh_mux_opts(): - """Inspect whether or not ssh supports multiplexing options. - - Return string containing multiplexing options if supported. - If ControlPath is supported then placeholder for that path is - specified and can be used for final string formatting. - For example, this function can return string: - "-o ControlMaster=auto -o ControlPersist=125 -o ControlPath={}". - Then it can be formatted: - mux_opts_string.format('/tmp/tmpxxxxxx/ssh-control-path'). - """ - import subprocess - - wanted_mux_opts = { - "ControlPath": "{}", - "ControlMaster": "auto", - "ControlPersist": "2h", - } - mux_opts = " ".join([" -o {}={}".format( - x, wanted_mux_opts[x]) for x in wanted_mux_opts]) - try: - subprocess.check_output("ssh {}".format(mux_opts), - stderr=subprocess.STDOUT, shell=True) - except subprocess.CalledProcessError as e: - subproc_output = e.output.decode().lower() - if "bad configuration option" in subproc_output: - return "" - return mux_opts diff --git a/completions/bash/cdist-completion.bash b/completions/bash/cdist-completion.bash deleted file mode 100644 index 1311384a..00000000 --- a/completions/bash/cdist-completion.bash +++ /dev/null @@ -1,102 +0,0 @@ -_cdist() -{ - local cur prev prevprev opts cmds projects - COMPREPLY=() - cur="${COMP_WORDS[COMP_CWORD]}" - prev="${COMP_WORDS[COMP_CWORD-1]}" - prevprev="${COMP_WORDS[COMP_CWORD-2]}" - opts="-h --help -q --quiet -v --verbose -V --version" - cmds="banner config install inventory shell" - - case "${prevprev}" in - shell) - case "${prev}" in - -s|--shell) - shells=$(grep -v '^#' /etc/shells) - COMPREPLY=( $(compgen -W "${shells}" -- ${cur}) ) - return 0 - ;; - esac - ;; - inventory) - case "${prev}" in - list) - opts="-h --help -q --quiet -v --verbose -b --beta \ - -I --invento/y -a --all -f --file -H --host-only \ - -t --tag" - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - add-host) - opts="-h --help -q --quiet -v --verbose -b --beta \ - -I --inventory -f --file" - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - del-host) - opts="-h --help -q --quiet -v --verbose -b --beta \ - -I --inventory -a --all -f --file" - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - add-tag) - opts="-h --help -q --quiet -v --verbose -b --beta \ - -I --inventory -f --file -T --tag-file -t --taglist" - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - del-tag) - opts="-h --help -q --quiet -v --verbose -b --beta \ - -I --inventory -a --all -f --file -T --tag-file -t --taglist" - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - esac - ;; - esac - - case "${prev}" in - -*) - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - banner) - opts="-h --help -q --quiet -v --verbose" - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - shell) - opts="-h --help -q --quiet -v --verbose -s --shell" - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - config|install) - opts="-h --help -q --quiet -v --verbose -b --beta \ - -I --inventory -C --cache-path-pattern -c --conf-dir \ - -f --file -i --initial-manifest -A --all-tagged \ - -j --jobs -n --dry-run -o --out-dir -p --parallel \ - -r --remote-out-dir \ - -s --sequential --remote-copy --remote-exec -t --tag -a --all" - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - inventory) - cmds="list add-host del-host add-tag del-tag" - opts="-h --help -q --quiet -v --verbose" - COMPREPLY=( $(compgen -W "${opts} ${cmds}" -- ${cur}) ) - return 0 - ;; - *) - ;; - esac - - if [[ ${cur} == -* ]]; then - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - fi - - COMPREPLY=( $(compgen -W "${cmds}" -- ${cur}) ) - return 0 -} - -complete -F _cdist cdist diff --git a/completions/zsh/_cdist b/completions/zsh/_cdist deleted file mode 100644 index 405023ed..00000000 --- a/completions/zsh/_cdist +++ /dev/null @@ -1,77 +0,0 @@ -#compdef cdist - -_cdist() -{ - local curcontext="$curcontext" state line - typeset -A opt_args - - _arguments \ - '1: :->opts_cmds'\ - '*: :->opts' - - case $state in - opts_cmds) - _arguments '1:Options and commands:(banner config install inventory shell -h --help -q --quiet -v --verbose -V --version)' - ;; - *) - case $words[2] in - -*) - opts=(-h --help -q --quiet -v --verbose -V --version) - compadd "$@" -- $opts - ;; - banner) - opts=(-h --help -q --quiet -v --verbose) - compadd "$@" -- $opts - ;; - shell) - case $words[3] in - -s|--shell) - shells=($(grep -v '^#' /etc/shells)) - compadd "$@" -- $shells - ;; - *) - opts=(-h --help -q --quiet -v --verbose -s --shell) - compadd "$@" -- $opts - ;; - esac - ;; - config|install) - opts=(-h --help -q --quiet -v --verbose -a --all -b --beta -C --cache-path-pattern -c --conf-dir -f --file -i --initial-manifest -j --jobs -n --dry-run -o --out-dir -p --parallel -r --remote-out-dir -s --sequential --remote-copy --remote-exec -t --tag -I --inventory -A --all-tagged) - compadd "$@" -- $opts - ;; - inventory) - case $words[3] in - list) - opts=(-h --help -q --quiet -v --verbose -b --beta -I --inventory -a --all -f --file -H --host-only -t --tag) - compadd "$@" -- $opts - ;; - add-host) - opts=(-h --help -q --quiet -v --verbose -b --beta -I --inventory -f --file) - compadd "$@" -- $opts - ;; - del-host) - opts=(-h --help -q --quiet -v --verbose -b --beta -I --inventory -a --all -f --file) - compadd "$@" -- $opts - ;; - add-tag) - opts=(-h --help -q --quiet -v --verbose -b --beta -I --inventory -f --file -T --tag-file -t --taglist) - compadd "$@" -- $opts - ;; - del-tag) - opts=(-h --help -q --quiet -v --verbose -b --beta -I --inventory -a --all -f --file -T --tag-file -t --taglist) - compadd "$@" -- $opts - ;; - *) - cmds=(list add-host del-host add-tag del-tag) - opts=(-h --help -q --quiet -v --verbose) - compadd "$@" -- $cmds $opts - ;; - esac - ;; - *) - ;; - esac - esac -} - -_cdist "$@" diff --git a/cdist/conf/.gitignore b/conf/.gitignore similarity index 100% rename from cdist/conf/.gitignore rename to conf/.gitignore diff --git a/cdist/conf/README b/conf/README similarity index 100% rename from cdist/conf/README rename to conf/README diff --git a/cdist/conf/type/__rsync/manifest b/conf/explorer/hostname similarity index 88% rename from cdist/conf/type/__rsync/manifest rename to conf/explorer/hostname index 9bd44c6d..a3ae4e15 100755 --- a/cdist/conf/type/__rsync/manifest +++ b/conf/explorer/hostname @@ -1,6 +1,6 @@ -#!/bin/sh -e +#!/bin/sh # -# 2015 Dominique Roux (dominique.roux4 at gmail.com) +# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -17,5 +17,6 @@ # You should have received a copy of the GNU General Public License # along with cdist. If not, see . # +# -__package rsync +hostname diff --git a/cdist/test/autil/fixtures/explorer/machine b/conf/explorer/machine similarity index 92% rename from cdist/test/autil/fixtures/explorer/machine rename to conf/explorer/machine index d4a0e106..25fc76a9 100755 --- a/cdist/test/autil/fixtures/explorer/machine +++ b/conf/explorer/machine @@ -22,6 +22,4 @@ # # -if command -v uname 2>&1 >/dev/null; then - uname -m -fi +uname -m diff --git a/cdist/test/autil/fixtures/explorer/os b/conf/explorer/os similarity index 63% rename from cdist/test/autil/fixtures/explorer/os rename to conf/explorer/os index 094685ea..6684ff78 100755 --- a/cdist/test/autil/fixtures/explorer/os +++ b/conf/explorer/os @@ -18,14 +18,13 @@ # along with cdist. If not, see . # # -# All os variables are lower case. Keep this file in alphabetical -# order by os variable except in cases where order otherwise matters, -# in which case keep the primary os and its derivatives together in -# a block (see Debian and Redhat examples below). +# All os variables are lower case +# # -if grep -q ^Amazon /etc/system-release 2>/dev/null; then - echo amazon +# 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 @@ -34,85 +33,38 @@ if [ -f /etc/arch-release ]; then exit 0 fi -if [ -f /etc/cdist-preos ]; then - echo cdist-preos - exit 0 -fi - -if [ -d /gnu/store ]; then - echo guixsd - exit 0 -fi - -### Debian and derivatives -if grep -q ^DISTRIB_ID=Ubuntu /etc/lsb-release 2>/dev/null; then - echo ubuntu - exit 0 -fi - if [ -f /etc/debian_version ]; then echo debian exit 0 fi -if [ -f /etc/devuan_version ]; then - echo devuan - exit 0 -fi -### - if [ -f /etc/gentoo-release ]; then echo gentoo exit 0 fi -if [ -f /etc/openwrt_version ]; then - echo openwrt - exit 0 -fi - -if [ -f /etc/owl-release ]; then - echo owl - exit 0 -fi - -### Redhat and derivatives -if grep -q ^Scientific /etc/redhat-release 2>/dev/null; then - echo scientific - exit 0 -fi - -if grep -q ^CentOS /etc/redhat-release 2>/dev/null; then - echo centos - exit 0 -fi - +# Fedora is also Redhat, thus return before redhat! if grep -q ^Fedora /etc/redhat-release 2>/dev/null; then echo fedora exit 0 fi -if grep -q ^Mitel /etc/redhat-release 2>/dev/null; then - echo mitel - exit 0 +# CentOS is also based on Redhat, this return before redhat! +if grep -q ^CentOS /etc/redhat-release 2>/dev/null; then + echo centos + exit 0 fi if [ -f /etc/redhat-release ]; then echo redhat exit 0 fi -### if [ -f /etc/SuSE-release ]; then echo suse exit 0 fi -if [ -f /etc/slackware-version ]; then - echo slackware - exit 0 -fi - uname_s="$(uname -s)" # Assume there is no tr on the client -> do lower case ourselves diff --git a/cdist/test/autil/fixtures/explorer/os_version b/conf/explorer/os_version similarity index 75% rename from cdist/test/autil/fixtures/explorer/os_version rename to conf/explorer/os_version index 380782cc..08fda60b 100755 --- a/cdist/test/autil/fixtures/explorer/os_version +++ b/conf/explorer/os_version @@ -23,9 +23,6 @@ # case "$($__explorer/os)" in - amazon) - cat /etc/system-release - ;; archlinux) # empty, but well... cat /etc/arch-release @@ -33,9 +30,6 @@ case "$($__explorer/os)" in debian) cat /etc/debian_version ;; - devuan) - cat /etc/devuan_version - ;; fedora) cat /etc/fedora-release ;; @@ -48,24 +42,11 @@ case "$($__explorer/os)" in *bsd|solaris) uname -r ;; - openwrt) - cat /etc/openwrt_version - ;; - owl) - cat /etc/owl-release - ;; - redhat|centos|mitel|scientific) + redhat|centos) cat /etc/redhat-release ;; - slackware) - cat /etc/slackware-version - ;; suse) - if [ -f /etc/os-release ]; then - cat /etc/os-release - else - cat /etc/SuSE-release - fi + cat /etc/SuSE-release ;; ubuntu) lsb_release -sr diff --git a/conf/manifest/init.sample b/conf/manifest/init.sample new file mode 100755 index 00000000..fca959e2 --- /dev/null +++ b/conf/manifest/init.sample @@ -0,0 +1,69 @@ +# +# This is a sample manifest, but used in real world +# + +# This is debug and should not be in a production environment +# echo "We could access other manifests in $__manifest" + +# Every machine becomes a marker, so sysadmins know that automatic +# configurations are happening +__file /etc/cdist-configured + +case "$__target_host" in + # Everybody has this + localhost) + require="__file/etc/cdist-configured" __link /tmp/cdist-testfile \ + --source /etc/cdist-configured --type symbolic + require="__directory/tmp/cdist-test-dir" __file /tmp/cdist-test-dir/test-file \ + --mode 0750 --owner nobody --group root + __directory /tmp/cdist-test-dir --mode 4777 + + require="__file/etc/cdist-configured __link/tmp/cdist-testfile" \ + __file /tmp/cdist-another-testfile + + ;; + + # + # Examples using different types + # + + # + # Use an alias in /etc/hosts for localhost to use these hosts: + # + # 127.0.0.1 localhost.localdomain localhost cdist-archlinux + # + cdist-archlinux) + # This is the specific package type for pacman + __package_pacman zsh --state installed + + # The __package type autoselect the right type based on the os + __package vim --state installed + + # If the type is a singleton, it does not take an object id + __issue + ;; + # This is how it would look like on gentoo + cdist-gentoo) + # Same stuff for gentoo + __package tree --state installed + ;; + + cdist-debian) + __package_apt atop --state installed + __package apache2 --state removed + ;; + + cdist-redhat) + __issue + __motd + ;; + + # Real machines may be used with their hostname or fqdn, + # depending on how you call cdist-deploy-to + # machine) + # ... + # ;; + # machine.example.org) + # ... + # ;; +esac diff --git a/cdist/conf/type/__package_emerge/explorer/pkg_version b/conf/type/__addifnosuchline/explorer/findline old mode 100644 new mode 100755 similarity index 65% rename from cdist/conf/type/__package_emerge/explorer/pkg_version rename to conf/type/__addifnosuchline/explorer/findline index d02b9d6b..c1633626 --- a/cdist/conf/type/__package_emerge/explorer/pkg_version +++ b/conf/type/__addifnosuchline/explorer/findline @@ -1,6 +1,6 @@ #!/bin/sh # -# 2013 Thomas Oettli (otho at sfs.biz) +# 2010-2011 Daniel Roth (dani-cdist@d-roth.li) # # This file is part of cdist. # @@ -18,19 +18,21 @@ # along with cdist. If not, see . # # -# Retrieve the status of a package -# -if [ ! -x /usr/bin/equery ]; then - echo "gentoolkit not installed!" 1>&2 - exit 1 -fi - -if [ -f "$__object/parameter/name" ]; then - name="$(cat "$__object/parameter/name")" +if [ -f "$__object/parameter/file" ]; then + file=$(cat "$__object/parameter/file") else - name="$__object_id" + file="/$__object_id" fi -# shellcheck disable=SC2016 -equery -q l -F '$cp $fullversion' "$name" || true +regex=$(cat "$__object/parameter/line") +if [ -f "$file" ]; then + grep -q "^$regex\$" "$file" + if [ $? -eq 1 ]; then + echo "NOTFOUND" + else + echo "FOUND" + fi +else + echo "NOTFOUND" +fi diff --git a/conf/type/__addifnosuchline/gencode-remote b/conf/type/__addifnosuchline/gencode-remote new file mode 100755 index 00000000..f97789ae --- /dev/null +++ b/conf/type/__addifnosuchline/gencode-remote @@ -0,0 +1,33 @@ +#!/bin/sh +# +# 2010-2011 Daniel Roth (dani-cdist@d-roth.li) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# + +if [ -f "$__object/parameter/file" ]; then + file=$(cat "$__object/parameter/file") +else + file="/$__object_id" +fi + +result=$(cat "$__object/explorer/findline") + +if [ "$result" = "NOTFOUND" ]; then + line=$(cat "$__object/parameter/line") + echo "echo $line >> $file" +fi diff --git a/conf/type/__addifnosuchline/man.text b/conf/type/__addifnosuchline/man.text new file mode 100644 index 00000000..722a3080 --- /dev/null +++ b/conf/type/__addifnosuchline/man.text @@ -0,0 +1,50 @@ +cdist-type__addifnosuchline(7) +============================== +Daniel Roth + + +NAME +---- +cdist-type__addifnosuchline - Add a line (if not existing already) + + +DESCRIPTION +----------- +This type can be used to check a file for existence of a +specific line and adding it, if it was not found. + + +REQUIRED PARAMETERS +------------------- +line:: + Specifies the content which shall be added if not existing. + + +OPTIONAL PARAMETERS +------------------- +file:: + If supplied, use this as the destination file. + Otherwise the object_id is used. + + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +# Creates or appends the line specifiend in "include_www" to the file "lighttpd.conf" +__addifnosuchline www --file /etc/lighttpd.conf --line include_www + +# Adds the line "include_git" to the file "lighttpd.conf" +__addifnosuchline /etc/lighttpd.conf --line include_git +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist-type(7) + + +COPYING +------- +Copyright \(C) 2011 Daniel Roth. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__install_fstab/parameter/optional b/conf/type/__addifnosuchline/parameter/optional similarity index 100% rename from cdist/conf/type/__install_fstab/parameter/optional rename to conf/type/__addifnosuchline/parameter/optional diff --git a/conf/type/__addifnosuchline/parameter/required b/conf/type/__addifnosuchline/parameter/required new file mode 100644 index 00000000..a999a0c2 --- /dev/null +++ b/conf/type/__addifnosuchline/parameter/required @@ -0,0 +1 @@ +line diff --git a/cdist/conf/type/__apt_ppa/explorer/state b/conf/type/__apt_ppa/explorer/state similarity index 84% rename from cdist/conf/type/__apt_ppa/explorer/state rename to conf/type/__apt_ppa/explorer/state index d47e7d20..8a5638b2 100755 --- a/cdist/conf/type/__apt_ppa/explorer/state +++ b/conf/type/__apt_ppa/explorer/state @@ -23,12 +23,11 @@ name="$__object_id" -# shellcheck disable=SC1091 . /etc/lsb-release repo_name="${name#ppa:}" -repo_file_name="$(echo "$repo_name" | sed -e 's|[/:]|-|' -e 's|\.|_|')-${DISTRIB_CODENAME}.list" +repo_file_name="$(echo "$repo_name" | sed "s:\/:\-:")-${DISTRIB_CODENAME}.list" [ -s "/etc/apt/sources.list.d/${repo_file_name}" ] \ - && echo present || echo absent + && echo enabled || echo disabled diff --git a/cdist/conf/type/__apt_ppa/files/remove-apt-repository b/conf/type/__apt_ppa/files/remove-apt-repository similarity index 66% rename from cdist/conf/type/__apt_ppa/files/remove-apt-repository rename to conf/type/__apt_ppa/files/remove-apt-repository index 3eb7d491..b57a07f6 100755 --- a/cdist/conf/type/__apt_ppa/files/remove-apt-repository +++ b/conf/type/__apt_ppa/files/remove-apt-repository @@ -7,19 +7,13 @@ # 1: if not # 2: on other error -import os + import sys from aptsources import distro, sourceslist from softwareproperties import ppa from softwareproperties.SoftwareProperties import SoftwareProperties -def remove_if_empty(file_name): - with open(file_name, 'r') as f: - if f.read().strip(): - return - os.unlink(file_name) - def remove_repository(repository): #print 'repository:', repository codename = distro.get_distro().codename @@ -27,18 +21,11 @@ def remove_repository(repository): (line, file) = ppa.expand_ppa_line(repository.strip(), codename) #print 'line:', line #print 'file:', file - deb_source_entry = sourceslist.SourceEntry(line, file) - src_source_entry = sourceslist.SourceEntry('deb-src{}'.format(line[3:]), file) + source_entry = sourceslist.SourceEntry(line, file) try: sp = SoftwareProperties() - sp.remove_source(deb_source_entry) - try: - # If there's a deb-src entry, remove that too - sp.remove_source(src_source_entry) - except: - pass - remove_if_empty(file) + sp.remove_source(source_entry) return True except ValueError: print >> sys.stderr, "Error: '%s' doesn't exists in a sourcelist file" % line diff --git a/cdist/conf/type/__apt_ppa/gencode-remote b/conf/type/__apt_ppa/gencode-remote similarity index 77% rename from cdist/conf/type/__apt_ppa/gencode-remote rename to conf/type/__apt_ppa/gencode-remote index 84ebebfe..0e7fe163 100755 --- a/cdist/conf/type/__apt_ppa/gencode-remote +++ b/conf/type/__apt_ppa/gencode-remote @@ -1,4 +1,4 @@ -#!/bin/sh -e +#!/bin/sh # # 2011 Steven Armstrong (steven-cdist at armstrong.cc) # @@ -22,16 +22,14 @@ name="$__object_id" state_should="$(cat "$__object/parameter/state")" state_is="$(cat "$__object/explorer/state")" -if [ "$state_should" = "$state_is" ]; then - # Nothing to do, move along - exit 0 +if [ "$state_should" != "$state_is" ]; then + case "$state_should" in + enabled) + echo add-apt-repository \"$name\" + ;; + disabled) + echo remove-apt-repository \"$name\" + ;; + esac fi -case "$state_should" in - present) - echo "add-apt-repository '$name'" - ;; - absent) - echo "remove-apt-repository '$name'" - ;; -esac diff --git a/conf/type/__apt_ppa/man.text b/conf/type/__apt_ppa/man.text new file mode 100644 index 00000000..5423a1a2 --- /dev/null +++ b/conf/type/__apt_ppa/man.text @@ -0,0 +1,47 @@ +cdist-type__apt_ppa(7) +====================== +Steven Armstrong + + +NAME +---- +cdist-type__apt_ppa - Manage ppa repositories + + +DESCRIPTION +----------- +This cdist type allows manage ubuntu ppa repositories. + + +REQUIRED PARAMETERS +------------------- +state:: + The state the ppa should be in, either "enabled" or "disabled". + + +OPTIONAL PARAMETERS +------------------- +None. + + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +# Enable a ppa repository +__apt_ppa ppa:sans-intern/missing-bits --state enabled + +# Disable a ppa repository +__apt_ppa ppa:sans-intern/missing-bits --state disabled +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist-type(7) + + +COPYING +------- +Copyright \(C) 2011 Steven Armstrong. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__apt_ppa/manifest b/conf/type/__apt_ppa/manifest similarity index 79% rename from cdist/conf/type/__apt_ppa/manifest rename to conf/type/__apt_ppa/manifest index c6f4e876..d5df9e23 100755 --- a/cdist/conf/type/__apt_ppa/manifest +++ b/conf/type/__apt_ppa/manifest @@ -1,6 +1,6 @@ -#!/bin/sh -e +#!/bin/sh # -# 2011-2016 Steven Armstrong (steven-cdist at armstrong.cc) +# 2011 Steven Armstrong (steven-cdist at armstrong.cc) # # This file is part of cdist. # @@ -18,11 +18,12 @@ # along with cdist. If not, see . # -__package software-properties-common +name="$__object_id" -require="__package/software-properties-common" \ +__package python-software-properties --state installed + +require="__package/python-software-properties" \ __file /usr/local/bin/remove-apt-repository \ --source "$__type/files/remove-apt-repository" \ --mode 0755 -require="$__object_name" __apt_update_index diff --git a/cdist/conf/type/__apt_mark/parameter/required b/conf/type/__apt_ppa/parameter/required similarity index 100% rename from cdist/conf/type/__apt_mark/parameter/required rename to conf/type/__apt_ppa/parameter/required diff --git a/other/archived_types/__autofs_map/man.rst b/conf/type/__autofs_map/man.text similarity index 55% rename from other/archived_types/__autofs_map/man.rst rename to conf/type/__autofs_map/man.text index dfb79a27..941e22da 100644 --- a/other/archived_types/__autofs_map/man.rst +++ b/conf/type/__autofs_map/man.text @@ -1,10 +1,13 @@ cdist-type__autofs_map(7) ========================= -Manage autofs maps - Steven Armstrong +NAME +---- +cdist-type__autofs_map - Manage autofs maps + + DESCRIPTION ----------- This cdist type allows you to define maps for autofs. @@ -17,53 +20,41 @@ The object_id is used as the mount-point as described in auto.master(5). REQUIRED PARAMETERS ------------------- -map +map:: Name of the map to use. See auto.master(5). OPTIONAL PARAMETERS ------------------- -type +type:: Type of map used for this mount point. Defaults to 'file'. See map-type in auto.master(5) for possible values. - -options +options:: See auto.master(5). - -comment +comment:: A comment describing this map. Is added to the generated entry in auto.master. -BOOLEAN PARAMETERS ------------------- -noreload - don't reload autofs after the entry has been changed - - EXAMPLES -------- -.. code-block:: sh +-------------------------------------------------------------------------------- +# Add auto mounter at /net +__autofs_map /net --map /etc/auto.net --type program - # Add auto mounter at /net and reload - __autofs_map /net --map /etc/auto.net --type program - - # Add auto mounter at /pub and don't reload - __autofs_map /pub \ - --map /etc/auto.pub \ - --type file \ - --options "nosuid,rw,bg,hard,intr --ghost" \ - --noreload +# Add auto mounter at /pub +__autofs_map /pub --map /etc/auto.pub \ + --type file --options nosuid,rw,bg,hard,intr --ghost +-------------------------------------------------------------------------------- SEE ALSO -------- -- `cdist-type(7) `_ -- `cdist-type__autofs_reload(7) `_ +- cdist-type(7) COPYING ------- -Copyright \(C) 2012 Steven Armstrong. Free use of this software is +Copyright \(C) 2011 Steven Armstrong. Free use of this software is granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__postgres_role/explorer/state b/conf/type/__autofs_map/manifest similarity index 55% rename from cdist/conf/type/__postgres_role/explorer/state rename to conf/type/__autofs_map/manifest index c8e1fa9d..74672e46 100755 --- a/cdist/conf/type/__postgres_role/explorer/state +++ b/conf/type/__autofs_map/manifest @@ -18,25 +18,25 @@ # along with cdist. If not, see . # -case "$("${__explorer}/os")" -in - netbsd) - postgres_user='pgsql' - ;; - openbsd) - postgres_user='_postgresql' - ;; - *) - postgres_user='postgres' - ;; -esac +name="/$__object_id" +map="$(cat "$__object/parameter/map")" - -name="$__object_id" - -if test -n "$(su - "$postgres_user" -c "psql postgres -twAc \"SELECT 1 FROM pg_roles WHERE rolname='$name'\"")" -then - echo 'present' +if [ -f "$__object/parameter/type" ]; then + type="$(cat "$__object/parameter/type")" else - echo 'absent' + type="file" + echo "$type" > "$__object/parameter/type" fi + +# Generate entry for use in auto.master +entry="${name} ${type}:${map}" +if [ -f "$__object/parameter/options" ]; then + entry="$entry $(cat "$__object/parameter/options")" +fi +if [ -f "$__object/parameter/comment" ]; then + echo "# $(cat "$__object/parameter/comment")" > "$__object/parameter/entry" +fi +echo "$entry" >> "$__object/parameter/entry" + +require="$__self" __autofs_master + diff --git a/other/archived_types/__autofs_map/parameter/optional b/conf/type/__autofs_map/parameter/optional similarity index 100% rename from other/archived_types/__autofs_map/parameter/optional rename to conf/type/__autofs_map/parameter/optional diff --git a/other/archived_types/__autofs_map/parameter/required b/conf/type/__autofs_map/parameter/required similarity index 100% rename from other/archived_types/__autofs_map/parameter/required rename to conf/type/__autofs_map/parameter/required diff --git a/conf/type/__autofs_master/files/auto.master.header b/conf/type/__autofs_master/files/auto.master.header new file mode 100644 index 00000000..53590257 --- /dev/null +++ b/conf/type/__autofs_master/files/auto.master.header @@ -0,0 +1,3 @@ +# Generated from cdist __autofs_master +# Do not change this file. Changes will be overwritten. + diff --git a/cdist/conf/type/__user/explorer/passwd b/conf/type/__autofs_master/gencode-local similarity index 72% rename from cdist/conf/type/__user/explorer/passwd rename to conf/type/__autofs_master/gencode-local index 677e3ff0..701f97a8 100755 --- a/cdist/conf/type/__user/explorer/passwd +++ b/conf/type/__autofs_master/gencode-local @@ -18,14 +18,9 @@ # along with cdist. If not, see . # # -# Get an existing users passwd entry. +# Generate auto.master config based on all defined __autofs_map ojbects. # -name=$__object_id - -getent=$(command -v getent) -if [ X != X"${getent}" ]; then - "${getent}" passwd "$name" || true -elif [ -f /etc/passwd ]; then - grep "^${name}:" /etc/passwd || true -fi +auto_master="$__object/files/auto.master" +cat "$(cat "$__object/parameter/header")" > "$auto_master" +find "$__global/object/__autofs_map" -path "*.cdist/parameter/entry" | xargs cat >> "$auto_master" diff --git a/conf/type/__autofs_master/man.text b/conf/type/__autofs_master/man.text new file mode 100644 index 00000000..641c8393 --- /dev/null +++ b/conf/type/__autofs_master/man.text @@ -0,0 +1,47 @@ +cdist-type__autofs_master(7) +============================ +Steven Armstrong + + +NAME +---- +cdist-type__autofs_master - Generate the auto.master file + + +DESCRIPTION +----------- +This cdist type generates a auto.master configuration from given __autofs_map +definitions. See cdist-type__auto_map(7). + + +REQUIRED PARAMETERS +------------------- +None + +OPTIONAL PARAMETERS +------------------- +header:: + Absolute path to a file used as the header for the generated auto.master + file. + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +# auto.master with default header +__autofs_master + +# auto.master with custom header +__autofs_master --header /path/to/header +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist-type(7) + + +COPYING +------- +Copyright \(C) 2011 Steven Armstrong. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/other/types_submitted_for_inclusion/__nfs_server/manifest b/conf/type/__autofs_master/manifest similarity index 69% rename from other/types_submitted_for_inclusion/__nfs_server/manifest rename to conf/type/__autofs_master/manifest index 780cf77a..e37a5d34 100755 --- a/other/types_submitted_for_inclusion/__nfs_server/manifest +++ b/conf/type/__autofs_master/manifest @@ -18,11 +18,14 @@ # along with cdist. If not, see . # -__nfs_client -__package nfs-kernel-server --state installed +if [ ! -f "$__object/parameter/header" ]; then + echo "$__type/files/auto.master.header" > "$__object/parameter/header" +fi + +[ -d "$__object/files" ] || mkdir "$__object/files" +require="$__self" __file /etc/auto.master --source "$__object/files/auto.master" \ + --mode 644 \ + --owner root \ + --group root -require="__package/nfs-kernel-server" \ - __process nfs-kernel-server --state running \ - --start "/etc/init.d/portmap start" \ - --name ".*rpc.mountd.*" diff --git a/conf/type/__autofs_master/parameter/optional b/conf/type/__autofs_master/parameter/optional new file mode 100644 index 00000000..8e83f898 --- /dev/null +++ b/conf/type/__autofs_master/parameter/optional @@ -0,0 +1 @@ +header diff --git a/cdist/conf/type/__apt_default_release/singleton b/conf/type/__autofs_master/singleton similarity index 100% rename from cdist/conf/type/__apt_default_release/singleton rename to conf/type/__autofs_master/singleton diff --git a/cdist/conf/type/__package/explorer/pkgng_exists b/conf/type/__debconf_set_selections/gencode-remote similarity index 78% rename from cdist/conf/type/__package/explorer/pkgng_exists rename to conf/type/__debconf_set_selections/gencode-remote index 6d69ba14..62be6a12 100755 --- a/cdist/conf/type/__package/explorer/pkgng_exists +++ b/conf/type/__debconf_set_selections/gencode-remote @@ -1,6 +1,6 @@ #!/bin/sh # -# 2014 Jake Guffey (jake.guffey at eprotex.com) +# 2011 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -18,10 +18,9 @@ # along with cdist. If not, see . # # -# Retrieve the status of a package - parsed dpkg output +# Setup selections # -if [ "$("$__explorer/os")" = "freebsd" ]; then - command -v pkg -fi - +echo "debconf-set-selections << __file-eof" +cat "$(cat "$__object/parameter/file")" +echo "__file-eof" diff --git a/conf/type/__debconf_set_selections/man.text b/conf/type/__debconf_set_selections/man.text new file mode 100644 index 00000000..b6b2ad18 --- /dev/null +++ b/conf/type/__debconf_set_selections/man.text @@ -0,0 +1,43 @@ +cdist-type__debconf_set_selections(7) +===================================== +Nico Schottelius + + +NAME +---- +cdist-type__debconf_set_selections - Setup debconf selections + + +DESCRIPTION +----------- +On Debian and alike systems debconf-set-selections(1) can be used +to setup configuration parameters. + + +REQUIRED PARAMETERS +------------------- +file:: + If supplied, use the given filename as input for debconf-set-selections(1) + + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +# Setup configuration for nslcd +__debconf_set_selections nslcd --file /path/to/file + +# Setup configuration for nslcd from another type +__debconf_set_selections nslcd --file "$__type/files/preseed/nslcd" +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist-type(7) + + +COPYING +------- +Copyright \(C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__debconf_set_selections/parameter/required b/conf/type/__debconf_set_selections/parameter/required similarity index 100% rename from cdist/conf/type/__debconf_set_selections/parameter/required rename to conf/type/__debconf_set_selections/parameter/required diff --git a/cdist/conf/type/__qemu_img/explorer/exists b/conf/type/__directory/explorer/exists similarity index 98% rename from cdist/conf/type/__qemu_img/explorer/exists rename to conf/type/__directory/explorer/exists index c80b1181..f8b85671 100755 --- a/cdist/conf/type/__qemu_img/explorer/exists +++ b/conf/type/__directory/explorer/exists @@ -25,4 +25,6 @@ destination="/$__object_id" if [ -e "$destination" ]; then echo yes +else + echo no fi diff --git a/conf/type/__directory/gencode-remote b/conf/type/__directory/gencode-remote new file mode 100755 index 00000000..a5458b4b --- /dev/null +++ b/conf/type/__directory/gencode-remote @@ -0,0 +1,63 @@ +#!/bin/sh +# +# 2011 Nico Schottelius (nico-cdist at schottelius.org) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# +# Handle directories +# +# +# __directory /etc [--mode --owner --group --parents [yes|no] ] +# + +destination="/$__object_id" + +# Include parent directories? +if [ -f "$__object/parameter/parents" ]; then + parents="$(cat "$__object/parameter/parents")" + if [ yes = "$parents" ]; then + mkdiropt="-p" + else + mkdiropt="" + fi +fi + +if [ -f "$__object/parameter/recursive" ]; then + if [ yes = "$(cat "$__object/parameter/recursive")" ]; then + recursive="-R" + fi +fi + +# Only create if not already existent +if [ no = "$(cat "$__object/explorer/exists")" ]; then + echo mkdir $mkdiropt \"$destination\" +fi + +# Mode settings +if [ -f "$__object/parameter/mode" ]; then + echo chmod \"$(cat "$__object/parameter/mode")\" \"$destination\" +fi + +# Group +if [ -f "$__object/parameter/group" ]; then + echo chgrp $recursive \"$(cat "$__object/parameter/group")\" \"$destination\" +fi + +# Owner +if [ -f "$__object/parameter/owner" ]; then + echo chown $recursive \"$(cat "$__object/parameter/owner")\" \"$destination\" +fi diff --git a/conf/type/__directory/man.text b/conf/type/__directory/man.text new file mode 100644 index 00000000..e2201172 --- /dev/null +++ b/conf/type/__directory/man.text @@ -0,0 +1,70 @@ +cdist-type__directory(7) +======================== +Nico Schottelius + + +NAME +---- +cdist-type__directory - Create a directory + + +DESCRIPTION +----------- +This cdist type allows you to create directories on the target. + + +REQUIRED PARAMETERS +------------------- +None. + + +OPTIONAL PARAMETERS +------------------- +group:: + Group to chgrp to. + +mode:: + Unix permissions, suitable for chmod. + +owner:: + User to chown to. + +parents:: + Whether to create parents as well (mkdir -p behaviour). Must be yes or no. + +recursive:: + If supplied the chgrp and chown call will run recursively. + This does *not* influence the behaviour of chmod. + Must be yes or no. + + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +# A silly example +__directory /tmp/foobar + +# Ensure /etc exists correctly +__directory /etc --owner root --group root --mode 0755 + +# Create nfs service directory, including parents +__directory /home/services/nfs --parents yes + +# Change permissions recursively +__directory /home/services --recursive yes --owner root --group root + +# Setup a temp directory +__directory /local --mode 1777 +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist-type(7) + + +COPYING +------- +Copyright \(C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__directory/parameter/boolean b/conf/type/__directory/parameter/optional similarity index 51% rename from cdist/conf/type/__directory/parameter/boolean rename to conf/type/__directory/parameter/optional index 357c5e81..247e2f64 100644 --- a/cdist/conf/type/__directory/parameter/boolean +++ b/conf/type/__directory/parameter/optional @@ -1,2 +1,5 @@ +group +mode +owner parents recursive diff --git a/cdist/conf/type/__ccollect_source/explorer/cksum b/conf/type/__file/explorer/cksum similarity index 78% rename from cdist/conf/type/__ccollect_source/explorer/cksum rename to conf/type/__file/explorer/cksum index 335e4e7a..dcad99ba 100755 --- a/cdist/conf/type/__ccollect_source/explorer/cksum +++ b/conf/type/__file/explorer/cksum @@ -1,6 +1,6 @@ #!/bin/sh # -# 2011-2012 Nico Schottelius (nico-cdist at schottelius.org) +# 2011 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -24,11 +24,11 @@ destination="/$__object_id" if [ -e "$destination" ]; then - if [ -f "$destination" ]; then - cksum < "$destination" - else - echo "NO REGULAR FILE" - fi + if [ -f "$destination" ]; then + cksum < "$destination" + else + echo "NO REGULAR FILE" + fi else - echo "NO FILE FOUND, NO CHECKSUM CALCULATED." + echo "NO FILE FOUND, NO CHECKSUM CALCULATED." fi diff --git a/cdist/conf/type/__mount/explorer/mounted b/conf/type/__file/explorer/exists similarity index 80% rename from cdist/conf/type/__mount/explorer/mounted rename to conf/type/__file/explorer/exists index 81f8e454..f8b85671 100755 --- a/cdist/conf/type/__mount/explorer/mounted +++ b/conf/type/__file/explorer/exists @@ -1,6 +1,6 @@ #!/bin/sh # -# 2014 Steven Armstrong (steven-cdist at armstrong.cc) +# 2011 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -17,10 +17,13 @@ # You should have received a copy of the GNU General Public License # along with cdist. If not, see . # +# +# Check whether file exists or not +# -path="$(cat "$__object/parameter/path" 2>/dev/null || echo "/$__object_id")" +destination="/$__object_id" -if mountpoint -q "$path"; then +if [ -e "$destination" ]; then echo yes else echo no diff --git a/conf/type/__file/gencode-local b/conf/type/__file/gencode-local new file mode 100755 index 00000000..1168919e --- /dev/null +++ b/conf/type/__file/gencode-local @@ -0,0 +1,44 @@ +#!/bin/sh +# +# 2011 Nico Schottelius (nico-cdist at schottelius.org) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# +# __file is a very basic type, which will probably be reused quite often +# + +destination="/$__object_id" + +if [ -f "$__object/parameter/source" ]; then + source="$(cat "$__object/parameter/source")" + + if [ -f "$source" ]; then + local_cksum="$(cksum < "$source")" + remote_cksum="$(cat "$__object/explorer/cksum")" + + if [ "$local_cksum" != "$remote_cksum" ]; then + # FIXME: The username is ugly and hardcoded, replace after 1.0! + # Probably a better aproach is to have the user configured + # ~/.ssh/config to contain the right username + # Probably describe it in cdist-quickstart... + echo scp "$source" "root@${__target_host}:${destination}" + fi + else + echo "Source \"$source\" does not exist." >&2 + exit 1 + fi +fi diff --git a/cdist/conf/type/__rsync/gencode-remote b/conf/type/__file/gencode-remote similarity index 54% rename from cdist/conf/type/__rsync/gencode-remote rename to conf/type/__file/gencode-remote index 074246af..7c5cf7ce 100755 --- a/cdist/conf/type/__rsync/gencode-remote +++ b/conf/type/__file/gencode-remote @@ -1,6 +1,6 @@ -#!/bin/sh -e +#!/bin/sh # -# 2015 Dominique Roux (dominique.roux4 at gmail.com) +# 2011 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -17,21 +17,30 @@ # You should have received a copy of the GNU General Public License # along with cdist. If not, see . # +# +# __file is a very basic type, which will probably be reused quite often +# -if [ -f "$__object/parameter/destination" ]; then - destination=$(cat "$__object/parameter/destination") -else - destination="/$__object_id" +destination="/$__object_id" + +# No source? Create empty file +if [ ! -f "$__object/parameter/source" ]; then + if [ no = "$(cat "$__object/explorer/exists")" ]; then + echo touch \"$destination\" + fi fi -ownergroup="" -if [ -f "$__object/parameter/owner" ]; then - ownergroup=$(cat "$__object/parameter/owner") +# Mode settings +if [ -f "$__object/parameter/mode" ]; then + echo chmod \"$(cat "$__object/parameter/mode")\" \"$destination\" fi + +# Group if [ -f "$__object/parameter/group" ]; then - ownergroup="${ownergroup}:$(cat "$__object/parameter/group")" + echo chgrp \"$(cat "$__object/parameter/group")\" \"$destination\" fi -if [ "$ownergroup" ]; then - echo chown -R "$ownergroup" "$destination" +# Owner +if [ -f "$__object/parameter/owner" ]; then + echo chown \"$(cat "$__object/parameter/owner")\" \"$destination\" fi diff --git a/conf/type/__file/man.text b/conf/type/__file/man.text new file mode 100644 index 00000000..67ab53d1 --- /dev/null +++ b/conf/type/__file/man.text @@ -0,0 +1,61 @@ +cdist-type__file(7) +=================== +Nico Schottelius + + +NAME +---- +cdist-type__file - Create files + + +DESCRIPTION +----------- +This cdist type allows you to create files on the target. + + +REQUIRED PARAMETERS +------------------- +None. + + +OPTIONAL PARAMETERS +------------------- +group:: + Group to chgrp to. + +mode:: + Unix permissions, suitable for chmod. + +owner:: + User to chown to. + +source:: + If supplied, copy this file from the host running cdist to the target. + If not supplied, an empty file or directory will be created. + + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +# Create /etc/cdist-configured as an empty file +__file /etc/cdist-configured + +# Use __file from another type +__file /etc/issue --source "$__type/files/archlinux" + +# Supply some more settings +__file /etc/shadow --source "$__type/files/shadow" \ + --owner root --group shadow --mode 0640 +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist-type(7) + + +COPYING +------- +Copyright \(C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__directory/parameter/optional b/conf/type/__file/parameter/optional similarity index 70% rename from cdist/conf/type/__directory/parameter/optional rename to conf/type/__file/parameter/optional index 08798bc5..06120518 100644 --- a/cdist/conf/type/__directory/parameter/optional +++ b/conf/type/__file/parameter/optional @@ -1,4 +1,4 @@ -state group mode owner +source diff --git a/conf/type/__group/TODO b/conf/type/__group/TODO new file mode 100644 index 00000000..c20a5d21 --- /dev/null +++ b/conf/type/__group/TODO @@ -0,0 +1,2 @@ +- delete groups + diff --git a/cdist/conf/type/__group/explorer/group b/conf/type/__group/explorer/group similarity index 92% rename from cdist/conf/type/__group/explorer/group rename to conf/type/__group/explorer/group index 07f73a91..4c1e6ac0 100755 --- a/cdist/conf/type/__group/explorer/group +++ b/conf/type/__group/explorer/group @@ -1,6 +1,6 @@ #!/bin/sh # -# 2011-2015 Steven Armstrong (steven-cdist at armstrong.cc) +# 2011 Steven Armstrong (steven-cdist at armstrong.cc) # # This file is part of cdist. # diff --git a/cdist/conf/type/__group/explorer/gshadow b/conf/type/__group/explorer/gshadow similarity index 80% rename from cdist/conf/type/__group/explorer/gshadow rename to conf/type/__group/explorer/gshadow index ef40b7bc..51d502a1 100755 --- a/cdist/conf/type/__group/explorer/gshadow +++ b/conf/type/__group/explorer/gshadow @@ -1,6 +1,6 @@ #!/bin/sh # -# 2011-2015 Steven Armstrong (steven-cdist at armstrong.cc) +# 2011 Steven Armstrong (steven-cdist at armstrong.cc) # # This file is part of cdist. # @@ -22,13 +22,6 @@ # name=$__object_id -os="$("$__explorer/os")" - -case "$os" in - "freebsd"|"netbsd") - echo "$os does not have getent gshadow" - exit 0 - ;; -esac getent gshadow "$name" || true + diff --git a/conf/type/__group/gencode-remote b/conf/type/__group/gencode-remote new file mode 100755 index 00000000..5d43a054 --- /dev/null +++ b/conf/type/__group/gencode-remote @@ -0,0 +1,58 @@ +#!/bin/sh +# +# 2011 Steven Armstrong (steven-cdist at armstrong.cc) +# 2011 Nico Schottelius (nico-cdist at schottelius.org) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# +# Manage groups. +# + +name="$__object_id" + +cd "$__object/parameter" +if grep -q "^${name}:" "$__object/explorer/group"; then + for property in $(ls .); do + new_value="$(cat "$property")" + + case "$key" in + password) + current_value="$(awk -F: '{ print $2 }' < "$__object/explorer/gshadow")" + ;; + gid) + current_value="$(awk -F: '{ print $3 }' < "$__object/explorer/group")" + ;; + esac + + if [ "$new_value" != "$current_value" ]; then + set -- "$@" "--$property" \"$new_value\" + fi + done + + if [ $# -gt 0 ]; then + echo groupmod "$@" "$name" + else + true + fi +else + for property in $(ls .); do + new_value="$(cat "$property")" + set -- "$@" "--$property" \"$new_value\" + done + + echo groupadd "$@" "$name" +fi diff --git a/conf/type/__group/man.text b/conf/type/__group/man.text new file mode 100644 index 00000000..c57ae337 --- /dev/null +++ b/conf/type/__group/man.text @@ -0,0 +1,52 @@ +cdist-type__group(7) +==================== +Steven Armstrong + + +NAME +---- +cdist-type__group - Manage groups + + +DESCRIPTION +----------- +This cdist type allows you to create or modify groups on the target. + + +REQUIRED PARAMETERS +------------------- +None. + + +OPTIONAL PARAMETERS +------------------- +gid:: + see groupmod(8) +password:: + see above + + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +# Create a group 'foobar' with operating system default settings +__group foobar + +# Same but with a specific gid +__group foobar --gid 1234 + +# Same but with a gid and password +__group foobar --gid 1234 --password 'crypted-password-string' +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist-type(7) + + +COPYING +------- +Copyright \(C) 2011 Steven Armstrong. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__group/parameter/optional b/conf/type/__group/parameter/optional similarity index 68% rename from cdist/conf/type/__group/parameter/optional rename to conf/type/__group/parameter/optional index dd51c173..4c661c8f 100644 --- a/cdist/conf/type/__group/parameter/optional +++ b/conf/type/__group/parameter/optional @@ -1,3 +1,2 @@ gid password -state diff --git a/cdist/conf/type/__issue/files/archlinux b/conf/type/__issue/files/archlinux similarity index 100% rename from cdist/conf/type/__issue/files/archlinux rename to conf/type/__issue/files/archlinux diff --git a/cdist/conf/type/__issue/files/default b/conf/type/__issue/files/default similarity index 100% rename from cdist/conf/type/__issue/files/default rename to conf/type/__issue/files/default diff --git a/cdist/conf/type/__issue/files/redhat b/conf/type/__issue/files/redhat similarity index 100% rename from cdist/conf/type/__issue/files/redhat rename to conf/type/__issue/files/redhat diff --git a/conf/type/__issue/man.text b/conf/type/__issue/man.text new file mode 100644 index 00000000..40ed920e --- /dev/null +++ b/conf/type/__issue/man.text @@ -0,0 +1,47 @@ +cdist-type__issue(7) +==================== +Nico Schottelius + + +NAME +---- +cdist-type__issue - Manage issue + + +DESCRIPTION +----------- +This cdist type allows you to easily setup /etc/issue. + + +REQUIRED PARAMETERS +------------------- +None. + + +OPTIONAL PARAMETERS +------------------- +source:: + If supplied, use this file as /etc/issue instead of default. + + + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +__issue + +# When called from another type +__issue --source "$__type/files/myfancyissue" +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist-type(7) + + +COPYING +------- +Copyright \(C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__issue/manifest b/conf/type/__issue/manifest similarity index 68% rename from cdist/conf/type/__issue/manifest rename to conf/type/__issue/manifest index 0f0b3d83..eff6b808 100755 --- a/cdist/conf/type/__issue/manifest +++ b/conf/type/__issue/manifest @@ -1,6 +1,6 @@ -#!/bin/sh -e +#!/bin/sh # -# 2011-2012 Nico Schottelius (nico-cdist at schottelius.org) +# 2011 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -24,19 +24,17 @@ destination=/etc/issue os="$(cat "$__global/explorer/os")" if [ -f "$__object/parameter/source" ]; then - source="$(cat "$__object/parameter/source")" - if [ "$source" = "-" ]; then - source="${__object}/stdin" - fi + source="$(cat "$__object/parameter/source")" + echo using $source else - case "$os" in - archlinux|redhat) - source="$__type/files/$os" - ;; - *) - source="$__type/files/default" - ;; - esac + case "$os" in + archlinux|redhat) + source="$__type/files/$os" + ;; + *) + source="$__type/files/default" + ;; + esac fi __file "$destination" --source "$source" diff --git a/cdist/conf/type/__issue/parameter/optional b/conf/type/__issue/parameter/optional similarity index 100% rename from cdist/conf/type/__issue/parameter/optional rename to conf/type/__issue/parameter/optional diff --git a/cdist/conf/type/__apt_norecommends/singleton b/conf/type/__issue/singleton similarity index 100% rename from cdist/conf/type/__apt_norecommends/singleton rename to conf/type/__issue/singleton diff --git a/cdist/conf/type/__postgres_database/explorer/state b/conf/type/__key_value/explorer/value similarity index 63% rename from cdist/conf/type/__postgres_database/explorer/state rename to conf/type/__key_value/explorer/value index d68d4120..3afc7cc5 100755 --- a/cdist/conf/type/__postgres_database/explorer/state +++ b/conf/type/__key_value/explorer/value @@ -17,26 +17,21 @@ # You should have received a copy of the GNU General Public License # along with cdist. If not, see . # +# +# Get the current value of key or __NOTSET__ if the key doesn't exist. +# -case "$("${__explorer}/os")" -in - netbsd) - postgres_user='pgsql' - ;; - openbsd) - postgres_user='_postgresql' - ;; - *) - postgres_user='postgres' - ;; -esac - - -name="$__object_id" - -if test -n "$(su - "$postgres_user" -c "psql postgres -twAc \"SELECT 1 FROM pg_database WHERE datname='$name'\"")" -then - echo 'present' +if [ -f "$__object/parameter/key" ]; then + key="$(cat "$__object/parameter/key")" else - echo 'absent' + key="$__object_id" fi +file="$(cat "$__object/parameter/file")" +delimiter="$(cat "$__object/parameter/delimiter")" + +awk -F "$delimiter" ' +BEGIN { found=0 } +/^'$key'/ { print $2; found=1 } +END { if (found) exit 0; else exit 1 }' "$file" \ +|| echo "__NOTSET__" + diff --git a/cdist/conf/type/__sysctl/gencode-remote b/conf/type/__key_value/gencode-remote similarity index 50% rename from cdist/conf/type/__sysctl/gencode-remote rename to conf/type/__key_value/gencode-remote index 711d54e5..97da7349 100755 --- a/cdist/conf/type/__sysctl/gencode-remote +++ b/conf/type/__key_value/gencode-remote @@ -1,7 +1,6 @@ -#!/bin/sh -e +#!/bin/sh # -# 2014 Steven Armstrong (steven-cdist at armstrong.cc) -# 2018 Takashi Yoshi (takashi at yoshi.email) +# 2011 Steven Armstrong (steven-cdist at armstrong.cc) # # This file is part of cdist. # @@ -19,37 +18,35 @@ # along with cdist. If not, see . # -value_should="$(cat "$__object/parameter/value")" value_is="$(cat "$__object/explorer/value")" +value_should="$(cat "$__object/parameter/value")" -if [ "$value_should" = "$value_is" ]; then - # Nothing to do - exit 0 +key="$(cat "$__object/parameter/key")" +file="$(cat "$__object/parameter/file")" +delimiter="$(cat "$__object/parameter/delimiter")" + +if [ "$value_is" != "$value_should" ]; then + case "$value_is" in + __NOTSET__) + # add key and value + echo "echo \"${key}${delimiter}${value_should}\" >> \"$file\"" + ;; + *) + if [ "$value_should" = '__NOTSET__' ]; then + # remove key and value + cat << DONE +sed -i '/^${key}/d' "$file" +DONE + else + # change value + cat << DONE +awk -F "$delimiter" ' +/${key}${delimiter}*/{gsub(/$value_is/, "$value_should")};{print}' "$file" > "${file}+" \ +&& mv "${file}+" "$file" + +DONE + fi + ;; + esac fi -os=$(cat "$__global/explorer/os") -case "$os" in - # Linux - redhat|centos|ubuntu|debian|devuan|archlinux|gentoo|coreos) - flag='-w' - ;; - # BusyBox - alpine|openwrt) - flag='-w' - ;; - macosx) - # NOTE: Older versions of Mac OS X require the -w option. - # Even though the flag is not mentioned in new man pages anymore, - # it still works. - flag='-w' - ;; - netbsd) - flag='-w' - ;; - freebsd|openbsd) - flag='' - ;; -esac - -# set the current runtime value -printf 'sysctl %s %s="%s"\n' "$flag" "$__object_id" "$value_should" diff --git a/conf/type/__key_value/man.text b/conf/type/__key_value/man.text new file mode 100644 index 00000000..7b9381df --- /dev/null +++ b/conf/type/__key_value/man.text @@ -0,0 +1,59 @@ +cdist-type__key_value(7) +======================== +Steven Armstrong + + +NAME +---- +cdist-type__key_value - Change property values in files + + +DESCRIPTION +----------- +This cdist type allows you to change values in a key value based config +file. + + +REQUIRED PARAMETERS +------------------- +value:: + The value for the key. Setting the value to `__NOTSET__` will remove the key + from the file. +file:: + The file to operate on. +delimiter:: + The delimiter which seperates the key from the value. + + +OPTIONAL PARAMETERS +------------------- +key:: + The key to change. Defaults to object_id. + + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +# Set the maximum system user id +__key_value SYS_UID_MAX --file /etc/login.defs --value 666 --delimiter ' ' + +# Same with fancy id +__key_value my-fancy-id --file /etc/login.defs --key SYS_UID_MAX --value 666 \ + --delimiter ' ' + +# Enable packet forwarding +__key_value net.ipv4.ip_forward --file /etc/sysctl.conf --value 1 \ + --delimiter '=' +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist-type(7) + + +COPYING +------- +Copyright \(C) 2011 Steven Armstrong. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/conf/type/__key_value/manifest b/conf/type/__key_value/manifest new file mode 100755 index 00000000..706b0b0d --- /dev/null +++ b/conf/type/__key_value/manifest @@ -0,0 +1,26 @@ +#!/bin/sh +# +# 2011 Steven Armstrong (steven-cdist at armstrong.cc) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# + +if [ -f "$__object/parameter/key" ]; then + key="$(cat "$__object/parameter/key")" +else + echo "$__object_id" > "$__object/parameter/key" +fi + diff --git a/cdist/conf/type/__ssh_authorized_keys/parameter/required_multiple b/conf/type/__key_value/parameter/optional similarity index 100% rename from cdist/conf/type/__ssh_authorized_keys/parameter/required_multiple rename to conf/type/__key_value/parameter/optional diff --git a/cdist/conf/type/__key_value/parameter/required b/conf/type/__key_value/parameter/required similarity index 71% rename from cdist/conf/type/__key_value/parameter/required rename to conf/type/__key_value/parameter/required index 3ae10da3..8f4aa53c 100644 --- a/cdist/conf/type/__key_value/parameter/required +++ b/conf/type/__key_value/parameter/required @@ -1,2 +1,3 @@ +value file delimiter diff --git a/cdist/conf/type/__file/explorer/cksum b/conf/type/__link/gencode-remote similarity index 65% rename from cdist/conf/type/__file/explorer/cksum rename to conf/type/__link/gencode-remote index 335e4e7a..07da987c 100755 --- a/cdist/conf/type/__file/explorer/cksum +++ b/conf/type/__link/gencode-remote @@ -1,6 +1,6 @@ #!/bin/sh # -# 2011-2012 Nico Schottelius (nico-cdist at schottelius.org) +# 2011 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -18,17 +18,25 @@ # along with cdist. If not, see . # # -# Retrieve the md5sum of a file to be created, if it is already existing. +# Mostly a wrapper for ln # destination="/$__object_id" -if [ -e "$destination" ]; then - if [ -f "$destination" ]; then - cksum < "$destination" - else - echo "NO REGULAR FILE" - fi -else - echo "NO FILE FOUND, NO CHECKSUM CALCULATED." -fi +type="$(cat "$__object/parameter/type")" +source="$(cat "$__object/parameter/source")" + +case "$type" in + symbolic) + lnopt="-s" + ;; + hard) + lnopt="" + ;; + *) + echo "Unknown type: $type" >&2 + exit 1 + ;; +esac + +echo ln ${lnopt} -f \"$source\" \"$destination\" diff --git a/conf/type/__link/man.text b/conf/type/__link/man.text new file mode 100644 index 00000000..fb914298 --- /dev/null +++ b/conf/type/__link/man.text @@ -0,0 +1,56 @@ +cdist-type__link(7) +=================== +Nico Schottelius + + +NAME +---- +cdist-type__link - Create links + + +DESCRIPTION +----------- +This cdist type allows you to hard and symoblic links. The given +object id is the destination for the link. + + +REQUIRED PARAMETERS +------------------- +source:: + Specifies the link source. + +type:: + Specifies the link type: Either hard or symoblic. + + +OPTIONAL PARAMETERS +------------------- +None. + + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +# Create hard link of /etc/shadow +__link /root/shadow --source /etc/shadow --type hard + +# Relative symbolic link +__link /etc/apache2/sites-enabled/www.test.ch \ + --source ../sites-available/www.test.ch \ + --type symbolic + +# Absolute symbolic link +__link /opt/plone --source /home/services/plone --type symbolic +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist-type(7) + + +COPYING +------- +Copyright \(C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__link/parameter/required b/conf/type/__link/parameter/required similarity index 100% rename from cdist/conf/type/__link/parameter/required rename to conf/type/__link/parameter/required diff --git a/cdist/conf/type/__motd/files/motd b/conf/type/__motd/files/motd similarity index 100% rename from cdist/conf/type/__motd/files/motd rename to conf/type/__motd/files/motd diff --git a/cdist/conf/type/__motd/man.rst b/conf/type/__motd/man.text similarity index 52% rename from cdist/conf/type/__motd/man.rst rename to conf/type/__motd/man.text index 17369684..a4ca80b5 100644 --- a/cdist/conf/type/__motd/man.rst +++ b/conf/type/__motd/man.text @@ -1,5 +1,7 @@ cdist-type__motd(7) =================== +Nico Schottelius + NAME ---- @@ -18,7 +20,7 @@ None. OPTIONAL PARAMETERS ------------------- -source +source:: If supplied, copy this file from the host running cdist to the target. If not supplied, a default message will be placed onto the target. @@ -26,23 +28,21 @@ source EXAMPLES -------- -.. code-block:: sh +-------------------------------------------------------------------------------- +# Use cdist defaults +__motd - # Use cdist defaults - __motd - - # Supply source file from a different type - __motd --source "$__type/files/my-motd" +# Supply source file from a different type +__motd --source "$__type/files/my-motd" +-------------------------------------------------------------------------------- -AUTHORS -------- -Nico Schottelius +SEE ALSO +-------- +- cdist-type(7) COPYING ------- -Copyright \(C) 2011 Nico Schottelius. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. +Copyright \(C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__motd/manifest b/conf/type/__motd/manifest similarity index 90% rename from cdist/conf/type/__motd/manifest rename to conf/type/__motd/manifest index cd741cf4..286d1ff3 100755 --- a/cdist/conf/type/__motd/manifest +++ b/conf/type/__motd/manifest @@ -1,4 +1,4 @@ -#!/bin/sh -e +#!/bin/sh # # 2011 Nico Schottelius (nico-cdist at schottelius.org) # @@ -22,9 +22,6 @@ # Select motd source if [ -f "$__object/parameter/source" ]; then source="$(cat "$__object/parameter/source")" - if [ "$source" = "-" ]; then - source="${__object}/stdin" - fi else source="$__type/files/motd" fi @@ -33,7 +30,7 @@ os=$(cat "$__global/explorer/os") case "$os" in - debian|ubuntu|devuan) + debian|ubuntu) destination=/etc/motd.tail ;; *) diff --git a/cdist/conf/type/__motd/parameter/optional b/conf/type/__motd/parameter/optional similarity index 100% rename from cdist/conf/type/__motd/parameter/optional rename to conf/type/__motd/parameter/optional diff --git a/cdist/conf/type/__apt_update_index/singleton b/conf/type/__motd/singleton similarity index 100% rename from cdist/conf/type/__apt_update_index/singleton rename to conf/type/__motd/singleton diff --git a/conf/type/__package/man.text b/conf/type/__package/man.text new file mode 100644 index 00000000..46af7b3d --- /dev/null +++ b/conf/type/__package/man.text @@ -0,0 +1,61 @@ +cdist-type__user(7) +=================== +Steven Armstrong + + +NAME +---- +cdist-type__package - Manage packages + + +DESCRIPTION +----------- +This cdist type allows you to install or uninstall packages on the target. +It dispatches the actual work to the package system dependant types. + + +REQUIRED PARAMETERS +------------------- +state:: + The state the package should be in, either "installed" or "removed" + + +OPTIONAL PARAMETERS +------------------- +name:: + The name of the package to install. Default is to use the object_id as the + package name. +version:: + The version of the package to install. Default is to install the version + choosen by the local package manager. +type:: + The package type to use. Default is determined based on the $os explorer + variable. + e.g. __package_apt for Debian + __package_emerge for Gentoo + + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +# Install the package vim on the target +__package vim --state installed + +# Same but install specific version +__package vim --state installed --version 7.3.50 + +# Force use of a specific package type +__package vim --state installed --type __package_apt +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist-type(7) + + +COPYING +------- +Copyright \(C) 2011 Steven Armstrong. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__package/manifest b/conf/type/__package/manifest similarity index 59% rename from cdist/conf/type/__package/manifest rename to conf/type/__package/manifest index a453c32b..b331d32d 100755 --- a/cdist/conf/type/__package/manifest +++ b/conf/type/__package/manifest @@ -1,7 +1,6 @@ -#!/bin/sh -e +#!/bin/sh # -# 2011-2013 Steven Armstrong (steven-cdist at armstrong.cc) -# 2019 Nico Schottelius (nico-cdist at schottelius.org) +# 2011 Steven Armstrong (steven-cdist at armstrong.cc) # # This file is part of cdist. # @@ -20,7 +19,7 @@ # # # __package is an abstract type which dispatches to the lower level -# __package_$type types which do the actual interaction with the packaging +# __package_$name types which do the actual interaction with the packaging # system. # @@ -31,21 +30,10 @@ else # By default determine package manager based on operating system os="$(cat "$__global/explorer/os")" case "$os" in - amazon|scientific|centos|fedora|redhat) type="yum" ;; archlinux) type="pacman" ;; - debian|ubuntu|devuan) type="apt" ;; - freebsd) - if [ -n "$(cat "$__object/explorer/pkgng_exists")" ]; then - type="pkgng_freebsd" - else - type="pkg_freebsd" - fi - ;; + debian|ubuntu) type="apt" ;; gentoo) type="emerge" ;; - suse) type="zypper" ;; - openwrt) type="opkg" ;; - openbsd) type="pkg_openbsd" ;; - alpine) type="apk" ;; + fedora|redhat|centos) type="yum" ;; *) echo "Don't know how to manage packages on: $os" >&2 exit 1 @@ -53,14 +41,12 @@ else esac fi -state="$(cat "$__object/parameter/state")" - -set -- "$@" "$__object_id" "--state" "$state" +set -- "$@" "$__object_id" cd "$__object/parameter" -for property in *; do - if [ "$property" != "type" ] && [ "$property" != "state" ]; then +for property in $(ls .); do + if [ "$property" != "type" ]; then set -- "$@" "--$property" "$(cat "$property")" fi done -__package_$type "$@" +require="$__self" __package_$type "$@" diff --git a/cdist/conf/type/__package_emerge/parameter/optional b/conf/type/__package/parameter/optional similarity index 68% rename from cdist/conf/type/__package_emerge/parameter/optional rename to conf/type/__package/parameter/optional index f5c897df..712ea892 100644 --- a/cdist/conf/type/__package_emerge/parameter/optional +++ b/conf/type/__package/parameter/optional @@ -1,3 +1,3 @@ name -state version +type diff --git a/cdist/conf/type/__apt_ppa/parameter/optional b/conf/type/__package/parameter/required similarity index 100% rename from cdist/conf/type/__apt_ppa/parameter/optional rename to conf/type/__package/parameter/required diff --git a/cdist/conf/type/__apt_key_uri/explorer/state b/conf/type/__package_apt/explorer/pkg_status similarity index 78% rename from cdist/conf/type/__apt_key_uri/explorer/state rename to conf/type/__package_apt/explorer/pkg_status index 6f607607..86b94825 100755 --- a/cdist/conf/type/__apt_key_uri/explorer/state +++ b/conf/type/__package_apt/explorer/pkg_status @@ -1,6 +1,6 @@ #!/bin/sh # -# 2011-2014 Steven Armstrong (steven-cdist at armstrong.cc) +# 2011 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -18,7 +18,7 @@ # along with cdist. If not, see . # # -# Get the current state of the apt key. +# Retrieve the status of a package - parsed dpkg output # if [ -f "$__object/parameter/name" ]; then @@ -27,6 +27,5 @@ else name="$__object_id" fi -apt-key list 2> /dev/null | grep -Fqe "$name" \ - && echo present \ - || echo absent +# Except dpkg failing, if package is not known / installed +dpkg -s "$name" 2>/dev/null || exit 0 diff --git a/conf/type/__package_apt/gencode-remote b/conf/type/__package_apt/gencode-remote new file mode 100755 index 00000000..df8fd823 --- /dev/null +++ b/conf/type/__package_apt/gencode-remote @@ -0,0 +1,59 @@ +#!/bin/sh +# +# 2011 Nico Schottelius (nico-cdist at schottelius.org) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# +# Manage packages on Debian and co. +# + +if [ -f "$__object/parameter/name" ]; then + name="$(cat "$__object/parameter/name")" +else + name="$__object_id" +fi + +# Check for preseeding and add preseed as here document +if [ -f "$__object/parameter/preseed" ]; then + echo "debconf-set-selections << __file-eof" + cat "$(cat "$__object/parameter/preseed")" + echo "__file-eof" +fi + +state="$(cat "$__object/parameter/state")" +is_installed="$(grep "^Status: install ok installed" "$__object/explorer/pkg_status" || true)" + +aptget="DEBIAN_FRONTEND=noninteractive apt-get --quiet --yes" + +case "$state" in + installed) + # Install only if non-existent + if [ -z "$is_installed" ]; then + echo $aptget install \"$name\" + fi + ;; + removed) + # Remove only if existent + if [ -n "$is_installed" ]; then + echo $aptget remove \"$name\" + fi + ;; + *) + echo "Unknown state: $state" >&2 + exit 1 + ;; +esac diff --git a/conf/type/__package_apt/man.text b/conf/type/__package_apt/man.text new file mode 100644 index 00000000..905bfb5f --- /dev/null +++ b/conf/type/__package_apt/man.text @@ -0,0 +1,53 @@ +cdist-type__package_apt(7) +========================== +Nico Schottelius + + +NAME +---- +cdist-type__package_apt - Manage packages with apt-get + + +DESCRIPTION +----------- +apt-get is usually used on Debian and variants (like Ubuntu) to +manage packages. + + +REQUIRED PARAMETERS +------------------- +state:: + Either "installed" or "removed". + + +OPTIONAL PARAMETERS +------------------- +name:: + If supplied, use the name and not the object id as the package name. + + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +# Ensure zsh in installed +__package_apt zsh --state installed + +# In case you only want *a* webserver, but don't care which one +__package_apt webserver --state installed --name nginx + +# Remove obsolete package +__package_apt puppet --state removed +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist-type(7) +- cdist-type__package(7) + + +COPYING +------- +Copyright \(C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__golang_from_vendor/parameter/optional b/conf/type/__package_apt/parameter/optional similarity index 61% rename from cdist/conf/type/__golang_from_vendor/parameter/optional rename to conf/type/__package_apt/parameter/optional index 088eda41..a52167d3 100644 --- a/cdist/conf/type/__golang_from_vendor/parameter/optional +++ b/conf/type/__package_apt/parameter/optional @@ -1 +1,2 @@ +name version diff --git a/cdist/conf/type/__docker_swarm/parameter/optional b/conf/type/__package_apt/parameter/required similarity index 100% rename from cdist/conf/type/__docker_swarm/parameter/optional rename to conf/type/__package_apt/parameter/required diff --git a/cdist/conf/type/__package_pacman/explorer/pkg_version b/conf/type/__package_pacman/explorer/pkg_version similarity index 87% rename from cdist/conf/type/__package_pacman/explorer/pkg_version rename to conf/type/__package_pacman/explorer/pkg_version index c33820f8..4f612423 100755 --- a/cdist/conf/type/__package_pacman/explorer/pkg_version +++ b/conf/type/__package_pacman/explorer/pkg_version @@ -1,6 +1,6 @@ #!/bin/sh # -# 2011-2012 Nico Schottelius (nico-cdist at schottelius.org) +# 2011 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -18,7 +18,7 @@ # along with cdist. If not, see . # # -# Retrieve the status of a package - parsed pacman output +# Retrieve the status of a package - parsed dpkg output # if [ -f "$__object/parameter/name" ]; then diff --git a/cdist/conf/type/__package_pacman/gencode-remote b/conf/type/__package_pacman/gencode-remote similarity index 60% rename from cdist/conf/type/__package_pacman/gencode-remote rename to conf/type/__package_pacman/gencode-remote index 2e076ec3..3c4fdda7 100755 --- a/cdist/conf/type/__package_pacman/gencode-remote +++ b/conf/type/__package_pacman/gencode-remote @@ -1,6 +1,6 @@ -#!/bin/sh -e +#!/bin/sh # -# 2011-2012 Nico Schottelius (nico-cdist at schottelius.org) +# 2011 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -25,35 +25,32 @@ # exec >&2 # set -x +pacopts="--needed --noconfirm --noprogressbar" + if [ -f "$__object/parameter/name" ]; then name="$__object/parameter/name" else name="$__object_id" fi -state_should="$(cat "$__object/parameter/state")" - +state="$(cat "$__object/parameter/state")" pkg_version="$(cat "$__object/explorer/pkg_version")" -if [ -z "$pkg_version" ]; then - state_is="absent" -else - state_is="present" -fi -# Exit if nothing is needed to be done -[ "$state_is" = "$state_should" ] && exit 0 +case "$state" in + installed) -case "$state_should" in - present) - echo "pacman --needed --noconfirm --noprogressbar -S '$name'" - echo "installed" >> "$__messages_out" + # Empty? Not installed. + if [ -z "$pkg_version" ]; then + echo pacman "$pacopts" -S \"$name\" + fi ;; - absent) - echo "pacman --noconfirm --noprogressbar -R '$name'" - echo "removed" >> "$__messages_out" + removed) + if [ "$pkg_version" ]; then + echo pacman "$pacopts" -R \"$name\" + fi ;; *) - echo "Unknown state: $state_should" >&2 + echo "Unknown state: $state" >&2 exit 1 ;; esac diff --git a/conf/type/__package_pacman/man.text b/conf/type/__package_pacman/man.text new file mode 100644 index 00000000..28766581 --- /dev/null +++ b/conf/type/__package_pacman/man.text @@ -0,0 +1,53 @@ +cdist-type__package_pacman(7) +============================= +Nico Schottelius + + +NAME +---- +cdist-type__package_pacman - Manage packages with pacman + + +DESCRIPTION +----------- +Pacman is usually used on the Archlinux distribution to manage +packages. + + +REQUIRED PARAMETERS +------------------- +state:: + Either "installed" or "removed". + + +OPTIONAL PARAMETERS +------------------- +name:: + If supplied, use the name and not the object id as the package name. + + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +# Ensure zsh in installed +__package_pacman zsh --state installed + +# If you don't want to follow pythonX packages, but always use python +__package_pacman python --state installed --name python2 + +# Remove obsolete package +__package_pacman puppet --state removed +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist-type(7) +- cdist-type__package(7) + + +COPYING +------- +Copyright \(C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__apt_mark/parameter/optional b/conf/type/__package_pacman/parameter/optional similarity index 100% rename from cdist/conf/type/__apt_mark/parameter/optional rename to conf/type/__package_pacman/parameter/optional diff --git a/cdist/conf/type/__firewalld_rule/parameter/optional b/conf/type/__package_pacman/parameter/required similarity index 100% rename from cdist/conf/type/__firewalld_rule/parameter/optional rename to conf/type/__package_pacman/parameter/required diff --git a/conf/type/__package_pkg_openbsd/explorer/pkg_version b/conf/type/__package_pkg_openbsd/explorer/pkg_version new file mode 100755 index 00000000..bc23a85d --- /dev/null +++ b/conf/type/__package_pkg_openbsd/explorer/pkg_version @@ -0,0 +1,31 @@ +#!/bin/sh +# +# 2011 Andi Brönnimann (andi-cdist at v-net.ch) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# +# Retrieve the status of a package - parsed dpkg output +# + +if [ -f "$__object/parameter/name" ]; then + name="$(cat "$__object/parameter/name")" +else + name="$__object_id" +fi + +#TODO: Is there a better way? +pkg_info | grep "$name" | sed 's .*\(-[0-9.][0-9.]*\).* \1 ' | sed 's/-//' diff --git a/conf/type/__package_pkg_openbsd/gencode-remote b/conf/type/__package_pkg_openbsd/gencode-remote new file mode 100755 index 00000000..0cafddd6 --- /dev/null +++ b/conf/type/__package_pkg_openbsd/gencode-remote @@ -0,0 +1,85 @@ +#!/bin/sh +# +# 2011 Andi Brönnimann (andi-cdist at v-net.ch) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# +# Manage packages with pkg on OpenBSD +# + +# Debug +# exec >&2 +# set -x + +os_version="$(cat "$__global/explorer/os_version")" +machine="$(cat "$__global/explorer/machine")" + + +if [ -f "$__object/parameter/flavor" ]; then + flavor="$(cat "$__object/parameter/flavor")" +fi + +# do not show progress bar +pkgopts="-x" + +if [ -f "$__object/parameter/name" ]; then + name="$__object/parameter/name" +else + name="$__object_id" +fi + +state="$(cat "$__object/parameter/state")" +pkg_version="$(cat "$__object/explorer/pkg_version")" + +# TODO: Shouldn't be hardcoded +echo export PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/$os_version/packages/$machine/ + +case "$state" in + installed) + # Empty? Not installed. + if [ -z "$pkg_version" ]; then + # use this because pkg_add doesn't properly handle errors + cat << eof + status=\$(pkg_add "$pkgopts" "$name--$flavor") + + # no error + if [ -n "\$status" ]; then + echo "Error: \$status" + exit 1 + fi +eof + fi + ;; + removed) + if [ "$pkg_version" ]; then + # use this because pkg_add doesn't properly handle errors + cat << eof + status=\$(pkg_delete "$pkgopts" "$name--$flavor") + + # no error + if [ -n "\$status" ]; then + echo "Error: \$status" + exit 1 + fi +eof + fi + ;; + *) + echo "Unknown state: $state" >&2 + exit 1 + ;; +esac diff --git a/conf/type/__package_pkg_openbsd/man.text b/conf/type/__package_pkg_openbsd/man.text new file mode 100644 index 00000000..98aeaccf --- /dev/null +++ b/conf/type/__package_pkg_openbsd/man.text @@ -0,0 +1,58 @@ +cdist-type__package_pkg(7) +========================== +Andi Brönnimann + + +NAME +---- +cdist-type__package_pkg_openbsd - Manage OpenBSD packages + + +DESCRIPTION +----------- +This type is usually used on OpenBSD to manage packages. + + +REQUIRED PARAMETERS +------------------- +state:: + Either "installed" or "removed". + + +OPTIONAL PARAMETERS +------------------- +name:: + If supplied, use the name and not the object id as the package name. + +flavor:: + If supplied, use to avoid ambiguity. + + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +# Ensure zsh is installed +__package_pkg_openbsd zsh --state installed + +# Ensure vim is installed, use flavor no_x11 +__package_pkg_openbsd vim --state installed --flavor no_x11 + +# If you don't want to follow pythonX packages, but always use python +__package_pkg_openbsd python --state installed --name python2 + +# Remove obsolete package +__package_pkg_openbsd puppet --state removed +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist-type(7) +- cdist-type__package(7) + + +COPYING +------- +Copyright \(C) 2011 Andi Brönnimann. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/conf/type/__package_pkg_openbsd/parameter/optional b/conf/type/__package_pkg_openbsd/parameter/optional new file mode 100644 index 00000000..29b123ef --- /dev/null +++ b/conf/type/__package_pkg_openbsd/parameter/optional @@ -0,0 +1,2 @@ +name +flavor diff --git a/cdist/conf/type/__iptables_rule/parameter/optional b/conf/type/__package_pkg_openbsd/parameter/required similarity index 100% rename from cdist/conf/type/__iptables_rule/parameter/optional rename to conf/type/__package_pkg_openbsd/parameter/required diff --git a/cdist/conf/type/__package_yum/explorer/pkg_version b/conf/type/__package_yum/explorer/pkg_version similarity index 81% rename from cdist/conf/type/__package_yum/explorer/pkg_version rename to conf/type/__package_yum/explorer/pkg_version index b81b0fe9..0e078f68 100755 --- a/cdist/conf/type/__package_yum/explorer/pkg_version +++ b/conf/type/__package_yum/explorer/pkg_version @@ -1,6 +1,6 @@ #!/bin/sh # -# 2011-2012 Nico Schottelius (nico-cdist at schottelius.org) +# 2011 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -18,7 +18,7 @@ # along with cdist. If not, see . # # -# Retrieve the status of a package +# Retrieve the status of a package - parsed dpkg output # if [ -f "$__object/parameter/name" ]; then @@ -27,4 +27,4 @@ else name="$__object_id" fi -rpm -q "$name" 2>/dev/null || rpm -q --whatprovides "$name" 2>/dev/null || true +rpm -q --whatprovides "$name" 2>/dev/null || true diff --git a/cdist/conf/type/__jail_freebsd10/explorer/status b/conf/type/__package_yum/gencode-remote similarity index 51% rename from cdist/conf/type/__jail_freebsd10/explorer/status rename to conf/type/__package_yum/gencode-remote index c8039f21..e43712f8 100755 --- a/cdist/conf/type/__jail_freebsd10/explorer/status +++ b/conf/type/__package_yum/gencode-remote @@ -1,6 +1,6 @@ #!/bin/sh # -# 2012 Jake Guffey (jake.guffey at eprotex.com) +# 2011 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -18,35 +18,38 @@ # along with cdist. If not, see . # # -# See if the requested jail is started +# Manage packages with yum (mostly Fedora) # -# Debug -#exec >&2 -#set -x - if [ -f "$__object/parameter/name" ]; then - name="$(cat "$__object/parameter/name")" + name="$__object/parameter/name" else name="$__object_id" fi -if [ -f "$__object/parameter/jaildir" ]; then - jaildir="$(cat "$__object/parameter/jaildir")" -else - jaildir="/usr/jail" -fi -# backslash-escaped $jaildir -sjaildir="$(echo ${jaildir} | sed 's#/#\\/#g')" +state="$(cat "$__object/parameter/state")" -jls_output="$(jls | grep "[ ]${sjaildir}\\/${name}\$")" || true - -if [ -n "${jls_output}" ]; then - echo "STARTED" +if grep -q -E "(centos|redhat)" "$__global/explorer/os"; then + opts="-y --quiet" else - echo "NOTSTART" + opts="--assumeyes --quiet" fi -# Debug -#set +x +not_installed="^no package provides" +case "$state" in + installed) + if grep -q "$not_installed" "$__object/explorer/pkg_version"; then + echo yum $opts install \"$name\" + fi + ;; + removed) + if ! grep -q "$not_installed" "$__object/explorer/pkg_version"; then + echo yum $opts remove \"$name\" + fi + ;; + *) + echo "Unknown state: $state" >&2 + exit 1 + ;; +esac diff --git a/conf/type/__package_yum/man.text b/conf/type/__package_yum/man.text new file mode 100644 index 00000000..c9cad340 --- /dev/null +++ b/conf/type/__package_yum/man.text @@ -0,0 +1,54 @@ +cdist-type__package_yum(7) +========================== +Nico Schottelius + + +NAME +---- +cdist-type__package_yum - Manage packages with yum + + +DESCRIPTION +----------- +Yum is usually used on the Fedora distribution to manage packages. +If you specify an unknown package, yum will display the +slightly confusing error message "Error: Nothing to do". + + +REQUIRED PARAMETERS +------------------- +state:: + Either "installed" or "removed". + + +OPTIONAL PARAMETERS +------------------- +name:: + If supplied, use the name and not the object id as the package name. + + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +# Ensure zsh in installed +__package_yum zsh --state installed + +# If you don't want to follow pythonX packages, but always use python +__package_yum python --state installed --name python2 + +# Remove obsolete package +__package_yum puppet --state removed +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist-type(7) +- cdist-type__package(7) + + +COPYING +------- +Copyright \(C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__hostname/parameter/optional b/conf/type/__package_yum/parameter/optional similarity index 100% rename from cdist/conf/type/__hostname/parameter/optional rename to conf/type/__package_yum/parameter/optional diff --git a/cdist/conf/type/__link/parameter/optional b/conf/type/__package_yum/parameter/required similarity index 100% rename from cdist/conf/type/__link/parameter/optional rename to conf/type/__package_yum/parameter/required diff --git a/cdist/conf/type/__install_umount/gencode-remote b/conf/type/__postgres_database/explorer/state similarity index 83% rename from cdist/conf/type/__install_umount/gencode-remote rename to conf/type/__postgres_database/explorer/state index 8dcfb253..dc9659e2 100755 --- a/cdist/conf/type/__install_umount/gencode-remote +++ b/conf/type/__postgres_database/explorer/state @@ -1,4 +1,4 @@ -#!/bin/sh -e +#!/bin/sh # # 2011 Steven Armstrong (steven-cdist at armstrong.cc) # @@ -18,8 +18,10 @@ # along with cdist. If not, see . # -target="$(cat "$__object/parameter/target")" +name="$__object_id" -echo "swapoff -a" -echo "umount -l ${target}/* || true" -echo "umount -l ${target}" +if su - postgres -c "echo '\q' | psql '$name'" 2>/dev/null; then + echo "present" +else + echo "absent" +fi diff --git a/cdist/conf/type/__postgres_database/gencode-remote b/conf/type/__postgres_database/gencode-remote similarity index 76% rename from cdist/conf/type/__postgres_database/gencode-remote rename to conf/type/__postgres_database/gencode-remote index 61cfa50d..c097efce 100755 --- a/cdist/conf/type/__postgres_database/gencode-remote +++ b/conf/type/__postgres_database/gencode-remote @@ -1,4 +1,4 @@ -#!/bin/sh -e +#!/bin/sh # # 2011 Steven Armstrong (steven-cdist at armstrong.cc) # @@ -18,20 +18,6 @@ # along with cdist. If not, see . # -case "$(cat "${__global}/explorer/os")" -in - netbsd) - postgres_user='pgsql' - ;; - openbsd) - postgres_user='_postgresql' - ;; - *) - postgres_user='postgres' - ;; -esac - - name="$__object_id" state_should="$(cat "$__object/parameter/state")" state_is="$(cat "$__object/explorer/state")" @@ -43,10 +29,10 @@ if [ "$state_should" != "$state_is" ]; then if [ -f "$__object/parameter/owner" ]; then owner="-O '$(cat "$__object/parameter/owner")'" fi - echo "su - '$postgres_user' -c \"createdb $owner '$name'\"" + echo "su - postgres -c \"createdb $owner '$name'\"" ;; absent) - echo "su - '$postgres_user' -c \"dropdb '$name'\"" + echo "su - postgres -c \"dropdb '$name'\"" ;; esac fi diff --git a/conf/type/__postgres_database/man.text b/conf/type/__postgres_database/man.text new file mode 100644 index 00000000..06cb736f --- /dev/null +++ b/conf/type/__postgres_database/man.text @@ -0,0 +1,44 @@ +cdist-type__postgres_database(7) +================================ +Steven Armstrong + + +NAME +---- +cdist-type__postgres_database - create/drop postgres databases + + +DESCRIPTION +----------- +This cdist type allows you to create or drop postgres databases. + + +REQUIRED PARAMETERS +------------------- +state:: + either 'present' or 'absent' + + +OPTIONAL PARAMETERS +------------------- +owner:: + the role owning this database + + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +__postgres_database mydbname --state present --owner mydbusername +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist-type(7) + + +COPYING +------- +Copyright \(C) 2011 Steven Armstrong. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__rbenv/parameter/required b/conf/type/__postgres_database/parameter/optional similarity index 100% rename from cdist/conf/type/__rbenv/parameter/required rename to conf/type/__postgres_database/parameter/optional diff --git a/cdist/conf/type/__locale/parameter/optional b/conf/type/__postgres_database/parameter/required similarity index 100% rename from cdist/conf/type/__locale/parameter/optional rename to conf/type/__postgres_database/parameter/required diff --git a/cdist/conf/type/__install_mkfs/manifest b/conf/type/__postgres_role/explorer/state similarity index 82% rename from cdist/conf/type/__install_mkfs/manifest rename to conf/type/__postgres_role/explorer/state index b0a21dae..8c102df9 100755 --- a/cdist/conf/type/__install_mkfs/manifest +++ b/conf/type/__postgres_role/explorer/state @@ -1,4 +1,4 @@ -#!/bin/sh -e +#!/bin/sh # # 2011 Steven Armstrong (steven-cdist at armstrong.cc) # @@ -18,8 +18,10 @@ # along with cdist. If not, see . # -# set defaults -if [ ! -f "$__object/parameter/device" ]; then - device="/$__object_id" - echo "$device" > "$__object/parameter/device" +name="$__object_id" + +if su - postgres -c "psql -c '\du' | grep -q '^ *$name *|'"; then + echo "present" +else + echo "absent" fi diff --git a/conf/type/__postgres_role/gencode-remote b/conf/type/__postgres_role/gencode-remote new file mode 100755 index 00000000..a3280c09 --- /dev/null +++ b/conf/type/__postgres_role/gencode-remote @@ -0,0 +1,54 @@ +#!/bin/sh +# +# 2011 Steven Armstrong (steven-cdist at armstrong.cc) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# + +name="$__object_id" +state_is="$(cat "$__object/explorer/state")" +state_should="$(cat "$__object/parameter/state")" + +if [ "$state_is" != "$state_should" ]; then + case "$state_should" in + present) + optional="password + login + createdb + createrole + superuser" + for parameter in $optional; do + if [ -f "$__object/parameter/$parameter" ]; then + value="$(cat "$__object/parameter/$parameter")" + eval $parameter=$value + fi + done + + [ -n "$password" ] && password="PASSWORD '$password'" + [ "$login" = "true" ] && login="LOGIN" || login="NOLOGIN" + [ "$createdb" = "true" ] && createdb="CREATEDB" || createdb="NOCREATEDB" + [ "$createrole" = "true" ] && createrole="CREATEROLE" || createrole="NOCREATEROLE" + [ "$superuser" = "true" ] && superuser="SUPERUSER" || superuser="NOSUPERUSER" + [ "$inherit" = "true" ] && inherit="INHERIT" || inherit="NOINHERIT" + + cmd="CREATE ROLE $name WITH $password $login $createdb $createrole $superuser $inherit" + echo "su - postgres -c \"psql -c \\\"$cmd\\\"\"" + ;; + absent) + echo "su - postgres -c \"dropuser \\\"$name\\\"\"" + ;; + esac +fi diff --git a/conf/type/__postgres_role/man.text b/conf/type/__postgres_role/man.text new file mode 100644 index 00000000..a7264870 --- /dev/null +++ b/conf/type/__postgres_role/man.text @@ -0,0 +1,58 @@ +cdist-type__postgres_role(7) +============================ +Steven Armstrong + + +NAME +---- +cdist-type__postgres_role - manage postgres roles + + +DESCRIPTION +----------- +This cdist type allows you to create or drop postgres roles. + + +REQUIRED PARAMETERS +------------------- +state:: + either 'present' or 'absent' + + +OPTIONAL PARAMETERS +------------------- +All optional parameter map directly to the corresponding postgres createrole +parameters. + +password:: +login:: +createdb:: +createrole:: +superuser:: +inherit:: + + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +__postgres_role myrole --state present + +__postgres_role myrole --state present --password 'secret' + +__postgres_role admin --state present --password 'very-secret' --superuser true + +__postgres_role dbcustomer --state present --password 'bla' --createdb true +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist-type(7) +- http://www.postgresql.org/docs/current/static/sql-createrole.html + + +COPYING +------- +Copyright \(C) 2011 Steven Armstrong. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__postgres_role/parameter/boolean b/conf/type/__postgres_role/parameter/optional similarity index 83% rename from cdist/conf/type/__postgres_role/parameter/boolean rename to conf/type/__postgres_role/parameter/optional index a581b3fd..c5abb57f 100644 --- a/cdist/conf/type/__postgres_role/parameter/boolean +++ b/conf/type/__postgres_role/parameter/optional @@ -1,3 +1,4 @@ +password login createdb createrole diff --git a/cdist/conf/type/__package_dpkg/parameter/optional b/conf/type/__postgres_role/parameter/required similarity index 100% rename from cdist/conf/type/__package_dpkg/parameter/optional rename to conf/type/__postgres_role/parameter/required diff --git a/cdist/conf/type/__process/explorer/runs b/conf/type/__process/explorer/runs similarity index 85% rename from cdist/conf/type/__process/explorer/runs rename to conf/type/__process/explorer/runs index 561e2fe9..2bfa8f84 100755 --- a/cdist/conf/type/__process/explorer/runs +++ b/conf/type/__process/explorer/runs @@ -1,6 +1,6 @@ #!/bin/sh # -# 2011-2012 Nico Schottelius (nico-cdist at schottelius.org) +# 2011 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -22,9 +22,9 @@ # if [ -f "$__object/parameter/name" ]; then - name="$(cat "$__object/parameter/name")" + name="$(cat "$__object/parameter/name")" else - name="$__object_id" + name="/$__object_id" fi pgrep -x -f "$name" || true diff --git a/cdist/conf/type/__package_zypper/explorer/pkg_version b/conf/type/__process/gencode-remote old mode 100644 new mode 100755 similarity index 50% rename from cdist/conf/type/__package_zypper/explorer/pkg_version rename to conf/type/__process/gencode-remote index 83bf6dab..f8da1795 --- a/cdist/conf/type/__package_zypper/explorer/pkg_version +++ b/conf/type/__process/gencode-remote @@ -1,7 +1,6 @@ #!/bin/sh # -# 2011-2012 Nico Schottelius (nico-cdist at schottelius.org) -# 2013 Daniel Heule (hda at sfs.biz) +# 2011 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -19,7 +18,7 @@ # along with cdist. If not, see . # # -# Retrieve the status of a package of different types +# __file is a very basic type, which will probably be reused quite often # if [ -f "$__object/parameter/name" ]; then @@ -28,21 +27,33 @@ else name="$__object_id" fi -if [ -f "$__object/parameter/ptype" ]; then - ptype="$(cat "$__object/parameter/ptype")" -else - ptype="package" -fi +runs="$(cat "$__object/explorer/runs")" +state="$(cat "$__object/parameter/state")" + +case "$state" in + running) + # Does not run, start it! + if [ -z "$runs" ]; then + if [ -f "$__object/parameter/start" ]; then + cat "$__object/parameter/start" + else + echo "$name" + fi + fi + ;; + stopped) + # Runs, kill it! + if [ "$runs" ]; then + if [ -f "$__object/parameter/stop" ]; then + cat "$__object/parameter/stop" + else + echo kill "${runs}" + fi + fi + ;; + *) + echo "Unknown state: $state" >&2 + exit 1 + ;; -case "$ptype" in - package) - zypper search --details --match-exact --installed-only --type "$ptype" "$name" | grep -E '^i' | cut -d " " -f 3,7 || true - ;; - patch|pattern|product|srcpackage) - zypper search --match-exact --installed-only --type "$ptype" "$name" | grep -E '^i' | cut -d " " -f 3 || true - ;; - *) - echo "unknown ptype in __package_zypper explorer" >&2 - exit 1 - ;; esac diff --git a/conf/type/__process/man.text b/conf/type/__process/man.text new file mode 100644 index 00000000..fd3bcf49 --- /dev/null +++ b/conf/type/__process/man.text @@ -0,0 +1,64 @@ +cdist-type__process(7) +====================== +Nico Schottelius + + +NAME +---- +cdist-type__process - Start or stop process + + +DESCRIPTION +----------- +This cdist type allows you to define the state of a process. + + +REQUIRED PARAMETERS +------------------- +state:: + State of the process: Either stopped or running. + + +OPTIONAL PARAMETERS +------------------- +name:: + Process name to match on when using pgrep -f -x. + +stop:: + Executable to use for stopping the process. + +start:: + Executable to use for starting the process. + + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +# Start if not running +__process /usr/sbin/syslog-ng --state running + +# Start if not running with a different binary +__process /usr/sbin/nginx --state running --start "/etc/rc.d/nginx start" + +# Stop the process using kill (the type default) - DO NOT USE THIS +__process /usr/sbin/sshd --state stopped + +# Stop the process using /etc/rc.d/sshd stop - THIS ONE NOT AS WELL +__process /usr/sbin/sshd --state stopped --stop "/etc/rc.d/sshd stop" + +# Ensure cups is running, which runs with -C ...: +__process cups --start "/etc/rc.d/cups start" --state running \ + --name "/usr/sbin/cupsd -C /etc/cups/cupsd.conf" +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist-type(7) + + +COPYING +------- +Copyright \(C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__process/parameter/optional b/conf/type/__process/parameter/optional similarity index 72% rename from cdist/conf/type/__process/parameter/optional rename to conf/type/__process/parameter/optional index 85fe8805..3411afb4 100644 --- a/cdist/conf/type/__process/parameter/optional +++ b/conf/type/__process/parameter/optional @@ -1,4 +1,3 @@ name stop start -state diff --git a/cdist/conf/type/__pacman_conf_integrate/parameter/optional b/conf/type/__process/parameter/required similarity index 100% rename from cdist/conf/type/__pacman_conf_integrate/parameter/optional rename to conf/type/__process/parameter/required diff --git a/cdist/conf/type/__ssh_authorized_keys/explorer/file b/conf/type/__removeline/gencode-remote similarity index 73% rename from cdist/conf/type/__ssh_authorized_keys/explorer/file rename to conf/type/__removeline/gencode-remote index 5a02721a..3ec466b9 100755 --- a/cdist/conf/type/__ssh_authorized_keys/explorer/file +++ b/conf/type/__removeline/gencode-remote @@ -1,6 +1,6 @@ #!/bin/sh # -# 2014 Steven Armstrong (steven-cdist at armstrong.cc) +# 2010-2011 Daniel Roth (dani-cdist@d-roth.li) # # This file is part of cdist. # @@ -17,11 +17,15 @@ # You should have received a copy of the GNU General Public License # along with cdist. If not, see . # +# if [ -f "$__object/parameter/file" ]; then - cat "$__object/parameter/file" + file=$(cat "$__object/parameter/file") else - owner="$(cat "$__object/parameter/owner" 2>/dev/null || echo "$__object_id")" - home=$(getent passwd "$owner" | cut -d':' -f 6) - echo "$home/.ssh/authorized_keys" + file="/$__object_id" fi + +line=$(cat "$__object/parameter/line") +echo "ex -c \"/${line}/d|w|q\" \"${file}\" < + + +NAME +---- +cdist-type__removeline - Remove a line (if existing) + + +DESCRIPTION +----------- +This type can be used to check a file for existence of a +specific line and removeing it, if it was found. + + +REQUIRED PARAMETERS +------------------- +line:: + Specifies the content which shall be removed if existing. + + +OPTIONAL PARAMETERS +------------------- +file:: + If supplied, use this as the destination file. + Otherwise the object_id is used. + + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +# Removes the line specifiend in "include_www" from the file "lighttpd.conf" +__removeline www --file /etc/lighttpd.conf --line include_www + +# Removes the line "include_git" from the file "lighttpd.conf" +__removeline /etc/lighttpd.conf --line include_git +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist-type(7) + + +COPYING +------- +Copyright \(C) 2011 Daniel Roth. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__ssh_authorized_key/parameter/required b/conf/type/__removeline/parameter/optional similarity index 55% rename from cdist/conf/type/__ssh_authorized_key/parameter/required rename to conf/type/__removeline/parameter/optional index d51426c3..f73f3093 100644 --- a/cdist/conf/type/__ssh_authorized_key/parameter/required +++ b/conf/type/__removeline/parameter/optional @@ -1,2 +1 @@ file -key diff --git a/conf/type/__removeline/parameter/required b/conf/type/__removeline/parameter/required new file mode 100644 index 00000000..a999a0c2 --- /dev/null +++ b/conf/type/__removeline/parameter/required @@ -0,0 +1 @@ +line diff --git a/conf/type/__ssh_authorized_key/man.text b/conf/type/__ssh_authorized_key/man.text new file mode 100644 index 00000000..af0c2017 --- /dev/null +++ b/conf/type/__ssh_authorized_key/man.text @@ -0,0 +1,46 @@ +cdist-type__ssh_authorized_key(7) +================================= +Aurélien Bondis - aurelien.bondis AT gmail DOT com + + +NAME +---- +cdist-type__ssh_authorized_key - Sends a user's public key to another user's authorized_keys + + +DESCRIPTION +----------- +This type sends a rsa key. By default uses root's key and sends it to root's authorized_keys + + +REQUIRED PARAMETERS +------------------- +None. + + +OPTIONAL PARAMETERS +------------------- +srcuser:: the user to take the rsa public key from +dstuser:: the user to give the rsa public key to + + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +#deploy root's public key +__ssh_authorized_key admin +#deploy bob's public key to alice's authorized_keys +__ssh_authorized_key --srcuser bob --dstuser alice +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist-type(7) + + +COPYING +------- +Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/conf/type/__ssh_authorized_key/manifest b/conf/type/__ssh_authorized_key/manifest new file mode 100755 index 00000000..efadc3f6 --- /dev/null +++ b/conf/type/__ssh_authorized_key/manifest @@ -0,0 +1,55 @@ +#!/bin/sh +# +# 2011 Aurélien Bondis aurelien.bondis AT gmail DOT com +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# +# This type allows to send a public ssh key from a user to the +# authorized_keys of another +# +#require="__package openssh-server --state installed" +# Get option srcuser if defined +if [ -f "$__object/parameter/srcuser" ]; then + srcuser=`cat "$__object/parameter/srcuser"` +fi +# Get option dstuser if defined +if [ -f "$__object/parameter/dstuser" ]; then + dstuser=`cat "$__object/parameter/dstuser"` +fi + +# if a source user is defined, use it's public key +if [ "$srcuser" ]; then + srcrsa="/home/${srcuser}/.ssh/id_rsa.pub" +# if no source user is defined we use root's public key +else + srcrsa="/root/.ssh/id_rsa.pub" +fi +# if a destination user is defined, insert in it's authorized_keys +if [ "$dstuser" ]; then + sshpath="/home/$dstuser/.ssh" +# if no destination user is defined we use root's home +else + sshpath="/root/.ssh" +fi +rsa=`cat $srcrsa` +__directory $sshpath +# the file authorized_keys depends on the .ssh folder +require="__directory${sshpath}" __file "$sshpath/authorized_keys" --mode 640 +# the line added depends on authorized_keys existence +require="__file${sshpath}/authorized_keys" __addifnosuchline sshkey --file \ + "$sshpath/authorized_keys" --line "$rsa" + diff --git a/conf/type/__ssh_authorized_key/parameter/optional b/conf/type/__ssh_authorized_key/parameter/optional new file mode 100644 index 00000000..4903f5be --- /dev/null +++ b/conf/type/__ssh_authorized_key/parameter/optional @@ -0,0 +1,2 @@ +srcuser +dstuser diff --git a/cdist/conf/type/__timezone/man.rst b/conf/type/__timezone/man.text similarity index 50% rename from cdist/conf/type/__timezone/man.rst rename to conf/type/__timezone/man.text index 8a945c16..97e85dd3 100644 --- a/cdist/conf/type/__timezone/man.rst +++ b/conf/type/__timezone/man.text @@ -1,14 +1,16 @@ cdist-type__timezone(7) ======================= +Ramon Salvadó - rsalvado at gnuine dot com + NAME ---- -cdist-type__timezone - Allows one to configure the desired localtime timezone. +cdist-type__timezone - Allows to configure the desired localtime timezone. DESCRIPTION ----------- -This type creates a symlink (/etc/localtime) to the selected timezone +This type creates a symlink (/etc/localtime) to the selected timezone (which should be available in /usr/share/zoneinfo). @@ -25,18 +27,18 @@ None. EXAMPLES -------- -.. code-block:: sh +-------------------------------------------------------------------------------- +#Set up Europe/Andorra as our timezone. +__timezone Europe/Andorra - #Set up Europe/Andorra as our timezone. - __timezone Europe/Andorra - - #Set up US/Central as our timezone. - __timezone US/Central +#Set up US/Central as our timezone. +__timezone US/Central +-------------------------------------------------------------------------------- -AUTHORS -------- -Ramon Salvadó +SEE ALSO +-------- +- cdist-type(7) COPYING diff --git a/cdist/conf/type/__firewalld_rule/manifest b/conf/type/__timezone/manifest similarity index 74% rename from cdist/conf/type/__firewalld_rule/manifest rename to conf/type/__timezone/manifest index 71156329..b0bae209 100755 --- a/cdist/conf/type/__firewalld_rule/manifest +++ b/conf/type/__timezone/manifest @@ -1,6 +1,6 @@ -#!/bin/sh -e +#!/bin/sh # -# 2015 David Hürlimann (david at ungleich.ch) +# 2011 Ramon Salvadó (rsalvado at gnuine dot com) # # This file is part of cdist. # @@ -20,4 +20,9 @@ # # This type allows to configure the desired localtime timezone. -__package firewalld +timezone="$__object_id" + +__package tzdata --state installed +require="__package/tzdata" __link /etc/localtime \ + --source "/usr/share/zoneinfo/${timezone}" \ + --type symbolic diff --git a/conf/type/__user/TODO b/conf/type/__user/TODO new file mode 100644 index 00000000..fa6aeee7 --- /dev/null +++ b/conf/type/__user/TODO @@ -0,0 +1,2 @@ +- delete users + diff --git a/other/examples/remote/ssh/exec b/conf/type/__user/explorer/group similarity index 81% rename from other/examples/remote/ssh/exec rename to conf/type/__user/explorer/group index 2875c3fc..9defba14 100755 --- a/other/examples/remote/ssh/exec +++ b/conf/type/__user/explorer/group @@ -18,11 +18,11 @@ # along with cdist. If not, see . # # -# same as cdist default -# -# Usage: -# cdist config --remote-exec "/path/to/this/script" target_host +# Get an existing groups group entry. # -#echo "$@" | logger -t "cdist-ssh-exec" -ssh -o User=root -q $@ +if [ -f "$__object/parameter/gid" ]; then + gid=$(cat "$__object/parameter/gid") + getent group "$gid" || true +fi + diff --git a/other/types_submitted_for_inclusion/__nfs_export/explorer/exports.d b/conf/type/__user/explorer/passwd similarity index 88% rename from other/types_submitted_for_inclusion/__nfs_export/explorer/exports.d rename to conf/type/__user/explorer/passwd index ce370573..fdbfb193 100755 --- a/other/types_submitted_for_inclusion/__nfs_export/explorer/exports.d +++ b/conf/type/__user/explorer/passwd @@ -17,9 +17,11 @@ # You should have received a copy of the GNU General Public License # along with cdist. If not, see . # +# +# Get an existing users passwd entry. +# + +name=$__object_id + +getent passwd "$name" || true -if [ -d /etc/exports.d ]; then - echo present -else - echo absent -fi diff --git a/conf/type/__user/explorer/shadow b/conf/type/__user/explorer/shadow new file mode 100755 index 00000000..c75e36f4 --- /dev/null +++ b/conf/type/__user/explorer/shadow @@ -0,0 +1,27 @@ +#!/bin/sh +# +# 2011 Steven Armstrong (steven-cdist at armstrong.cc) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# +# Get an existing users shadow entry. +# + +name=$__object_id + +getent shadow "$name" || true + diff --git a/conf/type/__user/gencode-remote b/conf/type/__user/gencode-remote new file mode 100755 index 00000000..31c93655 --- /dev/null +++ b/conf/type/__user/gencode-remote @@ -0,0 +1,74 @@ +#!/bin/sh +# +# 2011 Steven Armstrong (steven-cdist at armstrong.cc) +# 2011 Nico Schottelius (nico-cdist at schottelius.org) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# +# Manage users. +# + +name="$__object_id" + +cd "$__object/parameter" +if grep -q "^${name}:" "$__object/explorer/passwd"; then + for property in $(ls .); do + new_value="$(cat "$property")" + + file="$__object/explorer/passwd" + + case "$property" in + gid) + if $(echo "$new_value" | grep -q '^[0-9][0-9]*$'); then + field=4 + else + # group name + file="$__object/explorer/group" + field=1 + fi + ;; + password) + field=3 + file="$__object/explorer/shadow" + ;; + comment) field=5 ;; + home) field=6 ;; + shell) field=7 ;; + uid) field=3 ;; + esac + + export field + current_value="$(awk -F: '{ print $ENVIRON["field"] }' < "$file")" + + if [ "$new_value" != "$current_value" ]; then + set -- "$@" "--$property" \"$new_value\" + fi + done + + if [ $# -gt 0 ]; then + echo usermod "$@" "$name" + else + true + fi +else + for property in $(ls .); do + new_value="$(cat "$property")" + set -- "$@" "--$property" \"$new_value\" + done + + echo useradd "$@" "$name" +fi diff --git a/conf/type/__user/man.text b/conf/type/__user/man.text new file mode 100644 index 00000000..e571c7c5 --- /dev/null +++ b/conf/type/__user/man.text @@ -0,0 +1,62 @@ +cdist-type__user(7) +=================== +Steven Armstrong + + +NAME +---- +cdist-type__user - Manage users + + +DESCRIPTION +----------- +This cdist type allows you to create or modify users on the target. + + +REQUIRED PARAMETERS +------------------- +None. + + +OPTIONAL PARAMETERS +------------------- +comment:: + see usermod(8) +home:: + see above +gid:: + see above +groups:: + see above +password:: + see above +shell:: + see above +uid:: + see above + + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +# Create user account for foobar with operating system default settings +__user foobar + +# Same but with a different shell +__user foobar --shell /bin/zsh + +# Set explicit uid and home +__user foobar --uid 1001 --shell /bin/zsh --home /home/foobar +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist-type(7) + + +COPYING +------- +Copyright \(C) 2011 Steven Armstrong. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/conf/type/__user/parameter/optional b/conf/type/__user/parameter/optional similarity index 83% rename from cdist/conf/type/__user/parameter/optional rename to conf/type/__user/parameter/optional index de6c3838..fe02e227 100644 --- a/cdist/conf/type/__user/parameter/optional +++ b/conf/type/__user/parameter/optional @@ -1,7 +1,7 @@ -state comment home gid +groups password shell uid diff --git a/configuration/cdist.cfg.skeleton b/configuration/cdist.cfg.skeleton deleted file mode 100644 index 22c1ccaf..00000000 --- a/configuration/cdist.cfg.skeleton +++ /dev/null @@ -1,73 +0,0 @@ -[GLOBAL] -# archiving -# Use specified archiving. Valid values include: -# none, tar, tgz, tbz2 and txz. -# archiving = tar -# -# beta -# Enable beta functionality. It recognizes boolean values from -# yes/no, on/off, true/false and 1/0 -# beta = no -# -# cache_path_pattern -# Specify cache path pattern. -# cache_path_pattern = %h -# -# conf_dir -# List of configuration directories separated with the character conventionally -# used by the operating system to separate search path components (as in PATH), -# such as ':' for POSIX or ';' for Windows. -# If also specified at command line then values from command line are -# appended to this value. -# conf_dir = : -# -# init_manifest -# Specify default initial manifest. -# init_mainfest = -# -# inventory_dir -# Specify inventory directory. -# inventory_dir = -# -# jobs -# Specify number of jobs for parallel processing. If -1 then the default, -# number of CPU's in the system is used. If 0 then parallel processing in -# jobs is disabled. If set to positive number then specified maximum -# number of processes will be used. -# jobs = 0 -# -# local_shell -# Shell command used for local execution. -# local_shell = /bin/sh -# -# out_path -# Directory to save cdist output in. -# out_path = -# -# parallel -# Process hosts in parallel. If -1 then the default, number of CPU's in -# the system is used. If 0 then parallel processing of hosts is disabled. -# If set to positive number then specified maximum number of processes -# will be used. -# parallel = 0 -# -# remote_copy -# Command to use for remote copy (should behave like scp). -# remote_copy = -# -# remote_exec -# Command to use for remote execution (should behave like ssh). -# remote_exec = -# -# remote_out_path -# Directory to save cdist output in on the target host. -# remote_out_path = /var/lib/cdist -# -# remote_shell -# Shell command at remote host used for remote execution. -# remote_shell = /bin/sh -# -# verbosity -# Set verbosity level. Valid values are: -# ERROR, WARNING, INFO, VERBOSE, DEBUG, TRACE and OFF. -# verbosity = INFO diff --git a/contrib/examples/nico/conf/type/__nico_afs/files/afs/CellServDB b/contrib/examples/nico/conf/type/__nico_afs/files/afs/CellServDB new file mode 100644 index 00000000..dbd238d7 --- /dev/null +++ b/contrib/examples/nico/conf/type/__nico_afs/files/afs/CellServDB @@ -0,0 +1,2 @@ +>eof +129.132.186.89 # sgv-afs-sur5r diff --git a/contrib/examples/nico/conf/type/__nico_afs/files/afs/ThisCell b/contrib/examples/nico/conf/type/__nico_afs/files/afs/ThisCell new file mode 100644 index 00000000..37fb719b --- /dev/null +++ b/contrib/examples/nico/conf/type/__nico_afs/files/afs/ThisCell @@ -0,0 +1 @@ +eof diff --git a/contrib/examples/nico/conf/type/__nico_afs/files/krb5/krb5.conf b/contrib/examples/nico/conf/type/__nico_afs/files/krb5/krb5.conf new file mode 100644 index 00000000..3b8259cb --- /dev/null +++ b/contrib/examples/nico/conf/type/__nico_afs/files/krb5/krb5.conf @@ -0,0 +1,28 @@ +[libdefaults] + default_realm = EOF + +# The following krb5.conf variables are only for MIT Kerberos. + krb4_config = /etc/krb.conf + krb4_realms = /etc/krb.realms + kdc_timesync = 1 + ccache_type = 4 + forwardable = true + proxiable = true + allow_weak_crypto = true + +[realms] + EOF = { + kdc = sgv-afs-sur5r.ethz.ch + admin_server = sgv-afs-sur5r.ethz.ch + } + + +[login] + krb4_convert = true + krb4_get_tickets = false + +[logging] + default = FILE:/var/log/krb5.log + kdc = FILE:/var/log/krb5kdc/kdc.log + admin_server = FILE:/var/log/krb5kdc/kadmin.log + diff --git a/contrib/examples/nico/conf/type/__nico_afs/files/ssh/JAS.pub b/contrib/examples/nico/conf/type/__nico_afs/files/ssh/JAS.pub new file mode 100644 index 00000000..222410d5 --- /dev/null +++ b/contrib/examples/nico/conf/type/__nico_afs/files/ssh/JAS.pub @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC/Gbl64LT3VD5hsVtk1w670S2gue1OaW9XLg/Vk/iBqsYYrLGZh+TXJsAsXOSF1sZH6QSdNlpzTPsno9KFCTQTNlYe0IrWPGRrFGw1or3M6OugJrMeSiMYQ5nhH6HMjhzCFHH8Xh4Yku8fgi3ejPpySW8umx7nBL7ndiEJ9Y+lixNWMirEPLpz9YufFm9u8GX6bPrmjIBz6EhfxaqJ2N/N6gQB+4PmNopzqWHm+n4LToA9N8qwetSfhgEg7DVaD9SrJNjNTGSgii6CritT9sF8ZBq5CZG58DTyrxCndhhHte5OCGMb5ENgO4OBHA0MrD56unHrdAZCCosa9rI+pIll abr@cltHome03 diff --git a/contrib/examples/nico/conf/type/__nico_afs/files/ssh/bugblue.pub b/contrib/examples/nico/conf/type/__nico_afs/files/ssh/bugblue.pub new file mode 100644 index 00000000..cccbe02f --- /dev/null +++ b/contrib/examples/nico/conf/type/__nico_afs/files/ssh/bugblue.pub @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA17fnWJMTAuIvWcdnsasdfEkBabeXEhYaR03Qc/KBpS+iToSeUzlc5SeXoAczqSMsC0uYpDnhll9q3aAN82Xo06RI2ytd7TeXvFcVwzvXB+sNUsvtyPZ5Uyx7d2WTI87bm169KhGTJCaww8p+qa2UhkjOOaXZwMGjkHlvZ3WSZr5mLar9O3r4PG8SIqoFF0m+tcc2fcWIK3df3jWIk8g6j/jTaoIa18qsK/rtO90Ql20FMQJOZTKGKjHIOx2FLnXY5WKrXmXyyffgFpqi1rUAkCkjCKnm65fDjecn6FplzSUuZo/IB2GnHGNQVnNkU/18/G8KQKu9clkMxuUl8DYJBQ== bugblue@jabber.eof.name diff --git a/contrib/examples/nico/conf/type/__nico_afs/files/ssh/docsteel.pub b/contrib/examples/nico/conf/type/__nico_afs/files/ssh/docsteel.pub new file mode 100644 index 00000000..4b40d089 --- /dev/null +++ b/contrib/examples/nico/conf/type/__nico_afs/files/ssh/docsteel.pub @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA1xfKoN8D3I0uGvc66E2cpnutdgALbSVIIWy0SBGV1ZLA4CehAL5BpMO0EI1TfH4LGgpjg+CnLXOSMd+bnvWjPTxGUbGcmK45UYCyn1LzSAfVKi9Mr06wbvQj0h5w1zEAwDqt63SHGjGOHO4TeCSrPxEROPMbZ1mP1ECsb4f+3WLWE5icbzOb/QMx2zNDd29rVvFJiJMOg4AiIs7pl/T7Qxg2yN6YlDIXSXLiE2i98O26kBNWRgAFcTNBqoUs5AkZ2F4LPUGbyuLpV+wtlpYcQXOUTLoRlKw+ovBQH3L6ae9n6+rFTIEEAS08C0MOzQPC3QjmfRMC8mxVkn22XnpHbQ== default diff --git a/contrib/examples/nico/conf/type/__nico_afs/files/ssh/downhill.pub b/contrib/examples/nico/conf/type/__nico_afs/files/ssh/downhill.pub new file mode 100644 index 00000000..bde07c29 --- /dev/null +++ b/contrib/examples/nico/conf/type/__nico_afs/files/ssh/downhill.pub @@ -0,0 +1 @@ +ssh-dss AAAAB3NzaC1kc3MAAAIBAMiYvUWD0Yq3vm2Dp6xJCGvRGcGIyiT8+07FQJvAWUAzudyhA9r+h58gm4uCUJTV5W33Npf70Id5LSxyZJA7LcdTXTuMxhVfERURcT/GgtxCrs+aMguitNvf7QVuiKBrvuBmBPMV/6k8UEwf/7eCQRjoXE4jxEYKUT9SW8X94wuH0HUqOqBRD2F21uMrmLgDkb12RK/9yFRV3c7waOSQU/QtO+VFwPvBNDqUTqBL0LOJJif449vMxboOZ1noS94K0Lyfz9yOGEwBYck11c2UzH4KXbv8qNpYgtuCmDjZFM2J8dnhWJgkmThZtmyfnNFbHlW0HZItVvkqLZMPDlCIqR77J9OC4lawjrX2FFKhAzcrJuw7WXr2PcFKQUh/TiypcM5f6zuU3fs2+8ZYQdwvU6j/QNW4A/zqud7v/hjAMYCVe0EIWf2Qt0SS/nFLh7dZRGV21nK9Vq0zDncVPTgDl7/L62TYieO/j/1X3HjEp2JbR+mjBWsfKM7WYZDP16xiQzBuhr0vItnKMyN9V4AbDthjqesezKuXIhv0jP1z40MppM9mr40FJpgRSY3hyt3cZQKoO2vVJevnJMuufLheocAxo037f2PUpmSiJDOF1dLywmS2Gqk4GgzNN40IPrOcz0umtKjMAtXeU6MeapfmmEbwk+2zOo75gUt6SWU8UiFhAAAAFQC/Fm0V7OYGdazrUNuyn7mcPknZhQAAAgBzO496WPYnn7/H336kdMOUoue4Kgr9shpgjyyTJ8K9UsFwm+IEh9iS0QKPgGnj54AY1FpspfrbCmRI0tma+pj2QlnRRwIGcHd7eh2nCOmr+DSD/36VmoRPvGZaJDSTVotN+qgyjddNhCGx0417fqHXSKypbASphBqyvcKwkpk8S7o5nkMeOhufeCNdTHYsenKha4W+p8srGBsIZBISNeaGAsESIK4LuaShuolciTXtT7Nsqo123EXmjdHrT7DHQuwKI+jJpvHcz/UrissLs1JD+lFLOE07lkHPDc4KKK6IDUjm/DzsVTlTWdrcn8wUZ7fhUTt7e8UDNHs6bMlnhtVkXEsHS3sbYRsbF9179jufUumXKLKkjLzpTZwni8D6GxnjUn51hQ9Ifb9UOlSlkRq+cqOU+TRQd5aQSdiXy5Ymao719MHBrAhH1aLbi9pk4VO3GGFNy/w54ZY2LRIXZsGMBgFTXzHyzqv1ejeQtOuQZw9xOzt9IZU3WuMKVGGR9D61rsgxbGI1aWGaDlyhMSL9LYyqkmEqVqnAyydAVmhpSxhoXjbDrwE/IRdjJwjlK/6NxUck9g7Ekc9pHrow0OmqH9k6SCd2npXBUybTXPYqwHUjY/KccJsW0Ia2OECGN6KgNWdSfFeAGJBrv2ct78laSyNgIguM+0MNOZQSr6QfSQAAAgEAqkHqwfmEtrlc7hKtvenEf4Dkgt6H33U7MJILNOo9qrn/StDeuuO1snbO2wbd8weJop7gnp29zJGRKYcs/p2T3YjOd9R6aRGLOlT+jEZjP1RMPeuT7W4UFajP34SezYc1MAMeT9wkABEBQyj6s+4CvC2tKJWoirziAvkSPfkYdOc3u9I1LuXHu21tP+Lky3K9KylsbnHDG6vw05GH3HbeXIa6LtxAkXiPp/+r0dABO5NzglHS36uaD4mbQGh2dIzWPm4j8mLrjg911R8XnLPdTgT2EB9mvXksLjWEEq7qzTSdacFG0127O+i4Be3h1+5wG5HM8ST1n5hTOX8tTywF3DJL5HbLNHdDQo/YlT6l/wk6HbnYdcZHviVHi6va3/lFTdhoTEPz5sgDYQp5/0vobiMyIRHSZwzcYmswHumpf6Wql/phff8xigJBDAbGdFgx1Jk2OoOVGNWEchZuzlXyfgQpatnzBcR9CAAJvAfQLPqcHb8jGyBINuoNY/0OsAbsQDDzSjOLkBEBVgBTVZbykcik2n7kBQFeNj8zAUeLQCnQcEGIGY7OkPoxaAHBGKh4+e5Wymz0fryKTJ9io78qLHTmc6xs/ep4UwlO4Ee/e9p7cGb2pOl98jGFCWUklqyzeksBTOQcfKZBPV5dYap4m6nrw59XYpVbV9yPRJ/yMhE= downhill@downhill.homelinux.net diff --git a/contrib/examples/nico/conf/type/__nico_afs/files/ssh/sur5r@samsa.pub b/contrib/examples/nico/conf/type/__nico_afs/files/ssh/sur5r@samsa.pub new file mode 100644 index 00000000..a1fcba83 --- /dev/null +++ b/contrib/examples/nico/conf/type/__nico_afs/files/ssh/sur5r@samsa.pub @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAABIwAABAEApDTX05FmMS1ArryWL6MmgcQeRFRU6E4Rgg+cPTeBuHCtBnnUoCUw7lhD2OICHIzQnfyMQasJOHH/4PnsrAxyO1Lm4KtK3zsdSdA5auunxAy0n7PZwaRKDTXCgpfXvi7ZAlzA+Mq/OjqtltfqdJgToYKxWoehwmltlwibuU1fke2v85VcTbCQRAttc6+0Y+3fToyTWecZM+X0uCsz1B5s07CLrMddo3lPVAlhYStSCbHflsM6C+NQAbxlsjkVFavii7WDYMYOd5FU0jIJt2Fy6u7Lx0ubY6hgGsP+mDOCCaRGA0JdjvWctBruj227CLswtAnYIFxvPi82R/okfx2X4YPtbqUPyLaUbr0G93g+raJEr/uXbour+wRd0TewOLq4VstwOsDfj9pm0wMFyIbsY2y97k6UZc0TE5pu3USGyW9/ainy5zD4TK4Al8lMkDHil6eItlud66KDZ4p5n5gzwuBj+ZOpOcBD5ZqLqDKst3YlHx6EuA1ddObBTrfy/nGphYYhWl1rbJ9+XOhSD8f/LIr5mjLEpSta6rHS/3dpLpSRGIy8ReG0RLbfay/fS74Iw0rEGOe/XgrfNDT0VwsgJMNV81sReepk27DaFD/vES/iPAymbbId8e8IQ7kDbhV0yK0yTkCZ5capqa9HXcut0SFRVJYGxzGT+ji5o/DcyAcaQHK9IW5i89sp04aVtZO+KZZDd2GmcDy+v9+fmBsSx2AFsoOQSXX31jJVdAXNw8idTNb88/3XDZIIEl+1KJ8Pv4UFXBW72RArpOxOrsDZYQjtaLQ4ZjTP3h823ZrBh4W3osb1znS7x4MmWBLPkmLCS0zmN8nbqhKi5EsTmSheCjCzySGShkyeqSGRIRGFk5PUsgh7hYvE+f7BhWD6x8MHbuUp9y0ODQonp022Dc4WzTc6Aa023MSNRuwV373tOqPYveuoPXDTS6vzV3IjXfv9a844HIkUTZbErxkavGBN5TEMgrALJkc8LS6M6Zg8odou8N2vWoNaKPn/DC5+H+FxJ2PSrK93hfzRMgvFvPSFzzDnixUFJClSqxf1Wvx9OW2pUuePAXBlcuFhAAnWV6w7fkmII8+qGk3m438dt2Sq6owmItzqIeJ6bohMsb9ejxeDyfk9DAQwmjS7S+BY47bYgAfsesZNRnlbeffp4rP0MAx4KoUXoNzb8tl1Jljulq58C0e5+EzRILqOYLM7WytY3+giqxN4zQJsqDp3mgSUaZ5SEHnA8JVi77MvABSoVclrEaujSLVEkxTBOiR252SFUWp3lWbxpGzBjd7gX4JAiytJql5xr+o4+nCy2O2laE6c2xS7en6SVEgC7jWflCsbDfvy9U+w1qOxa0j9fXE9Rw== sur5r@samsa diff --git a/contrib/examples/nico/conf/type/__nico_afs/manifest b/contrib/examples/nico/conf/type/__nico_afs/manifest new file mode 100755 index 00000000..7b4cc493 --- /dev/null +++ b/contrib/examples/nico/conf/type/__nico_afs/manifest @@ -0,0 +1,45 @@ +#!/bin/sh +# +# 2011 Nico Schottelius (nico-cdist at schottelius.org) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# + + +__directory /root/.ssh --mode 0700 + +__file /root/.ssh/authorized_keys --mode 0600 + +cd "$__type/files/ssh" +for key in *; do + require="__directory/root/.ssh" \ + __addifnosuchline ssh-$key --file /root/.ssh/authorized_keys \ + --line "$(cat "$key")" +done + +for pkg in openafs-client openafs-krb5 krb5-user; do + __package $pkg --state installed +done + +# Kerberos Config +__file /etc/krb5.conf --source "$__type/files/krb5/krb5.conf" + +# AFS config +cd "$__type/files/afs" +for afsconf in *; do + __file /etc/openafs/$afsconf --source "$__type/files/afs/$afsconf" +done diff --git a/cdist/conf/type/__cdistmarker/singleton b/contrib/examples/nico/conf/type/__nico_afs/singleton similarity index 100% rename from cdist/conf/type/__cdistmarker/singleton rename to contrib/examples/nico/conf/type/__nico_afs/singleton diff --git a/contrib/examples/nico/conf/type/__nico_desktop/files/hostname b/contrib/examples/nico/conf/type/__nico_desktop/files/hostname new file mode 100644 index 00000000..a4df6242 --- /dev/null +++ b/contrib/examples/nico/conf/type/__nico_desktop/files/hostname @@ -0,0 +1 @@ +scheibe diff --git a/contrib/examples/nico/conf/type/__nico_desktop/files/slim-preseed b/contrib/examples/nico/conf/type/__nico_desktop/files/slim-preseed new file mode 100644 index 00000000..01448d74 --- /dev/null +++ b/contrib/examples/nico/conf/type/__nico_desktop/files/slim-preseed @@ -0,0 +1,4 @@ +# Use slim, not gdm, if both are available +# Setup for slim, but value is available for gdm as well: +# gdm shared/default-x-display-manager select slim +slim shared/default-x-display-manager select slim diff --git a/contrib/examples/nico/conf/type/__nico_desktop/manifest b/contrib/examples/nico/conf/type/__nico_desktop/manifest new file mode 100755 index 00000000..7fbbe70f --- /dev/null +++ b/contrib/examples/nico/conf/type/__nico_desktop/manifest @@ -0,0 +1,47 @@ +#!/bin/sh +# +# 2011 Nico Schottelius (nico-cdist at schottelius.org) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# + +# +# Ensure hostname is setup +# +__file /etc/hostname --source "$__object/parameter/hostname" + +# All Linux distros have those +for pkg in dvdbackup mplayer x11vnc xfmpc; do + __package $pkg --state installed +done + +case "$(cat "$__global/explorer/os")" in + debian|ubuntu) + require="__package/zsh" __user lyni --uid 1000 --shell /bin/zsh + + for pkg in chromium-browser xfce4 xtightvncviewer; do + __package $pkg --state installed + done + + # Make slim default desktop on Debian/Ubuntu + __debconf_set_selections slim --file "$__type/files/slim-preseed" + require="__debconf_set_selections/slim" __package_apt slim --state installed + ;; +esac + +# Including gaming fun - not within examples, too big for core inclusion :-p +# __nico_dosbox diff --git a/contrib/examples/nico/conf/type/__nico_desktop/parameter/required b/contrib/examples/nico/conf/type/__nico_desktop/parameter/required new file mode 100644 index 00000000..ecd88aee --- /dev/null +++ b/contrib/examples/nico/conf/type/__nico_desktop/parameter/required @@ -0,0 +1 @@ +hostname diff --git a/cdist/conf/type/__consul/singleton b/contrib/examples/nico/conf/type/__nico_desktop/singleton similarity index 100% rename from cdist/conf/type/__consul/singleton rename to contrib/examples/nico/conf/type/__nico_desktop/singleton diff --git a/contrib/examples/nico/conf/type/__nico_mpd/files/slim-preseed b/contrib/examples/nico/conf/type/__nico_mpd/files/slim-preseed new file mode 100644 index 00000000..01448d74 --- /dev/null +++ b/contrib/examples/nico/conf/type/__nico_mpd/files/slim-preseed @@ -0,0 +1,4 @@ +# Use slim, not gdm, if both are available +# Setup for slim, but value is available for gdm as well: +# gdm shared/default-x-display-manager select slim +slim shared/default-x-display-manager select slim diff --git a/cdist/conf/explorer/runlevel b/contrib/examples/nico/conf/type/__nico_mpd/manifest old mode 100755 new mode 100644 similarity index 79% rename from cdist/conf/explorer/runlevel rename to contrib/examples/nico/conf/type/__nico_mpd/manifest index 02d3a245..d339bdf3 --- a/cdist/conf/explorer/runlevel +++ b/contrib/examples/nico/conf/type/__nico_mpd/manifest @@ -1,6 +1,6 @@ #!/bin/sh # -# 2012 Nico Schottelius (nico-cdist at schottelius.org) +# 2011 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -19,8 +19,6 @@ # # -set +e -executable=$(command -v runlevel) -if [ -x "$executable" ]; then - "$executable" | awk '{ print $2 }' -fi +__package mpd --state installed + +require="__package/mpd" __file /etc/mpd.conf --source "$__type/files/mpd.conf" diff --git a/contrib/examples/nico/conf/type/__nico_mpd/parameter/required b/contrib/examples/nico/conf/type/__nico_mpd/parameter/required new file mode 100644 index 00000000..ecd88aee --- /dev/null +++ b/contrib/examples/nico/conf/type/__nico_mpd/parameter/required @@ -0,0 +1 @@ +hostname diff --git a/cdist/conf/type/__consul_agent/singleton b/contrib/examples/nico/conf/type/__nico_mpd/singleton similarity index 100% rename from cdist/conf/type/__consul_agent/singleton rename to contrib/examples/nico/conf/type/__nico_mpd/singleton diff --git a/contrib/examples/nico/conf/type/__nico_network/files/interfaces-eth0 b/contrib/examples/nico/conf/type/__nico_network/files/interfaces-eth0 new file mode 100644 index 00000000..2a92eade --- /dev/null +++ b/contrib/examples/nico/conf/type/__nico_network/files/interfaces-eth0 @@ -0,0 +1,6 @@ +# generated by cdist +auto lo eth0 + +iface lo inet loopback + +iface eth0 inet dhcp diff --git a/contrib/examples/nico/conf/type/__nico_network/files/interfaces-wlan0 b/contrib/examples/nico/conf/type/__nico_network/files/interfaces-wlan0 new file mode 100644 index 00000000..49508eb2 --- /dev/null +++ b/contrib/examples/nico/conf/type/__nico_network/files/interfaces-wlan0 @@ -0,0 +1,11 @@ +# This file describes the network interfaces available on your system +# and how to activate them. For more information, see interfaces(5). + +# The loopback network interface +auto lo +iface lo inet loopback + +auto wlan0 +iface wlan0 inet dhcp + wpa-ssid undef + wpa-psk rotrussland diff --git a/contrib/examples/nico/conf/type/__nico_network/manifest b/contrib/examples/nico/conf/type/__nico_network/manifest new file mode 100755 index 00000000..012c47f7 --- /dev/null +++ b/contrib/examples/nico/conf/type/__nico_network/manifest @@ -0,0 +1,43 @@ +#!/bin/sh +# +# 2011 Nico Schottelius (nico-cdist at schottelius.org) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# + +case "$(cat "$__global/explorer/os")" in + debian|ubuntu) + + interface="$(cat $__object/parameter/interface)" + + # + # Only Debian and alike supported currently + # + destination=/etc/network/interfaces + case "$interface" in + eth0|wlan0) + source="$__type/files/interfaces-${interface}" + ;; + *) + echo "Unknown interface: $interface" >&2 + exit 1 + ;; + esac + + __file "$destination" --source "$source" + ;; +esac diff --git a/contrib/examples/nico/conf/type/__nico_network/parameter/required b/contrib/examples/nico/conf/type/__nico_network/parameter/required new file mode 100644 index 00000000..b529896a --- /dev/null +++ b/contrib/examples/nico/conf/type/__nico_network/parameter/required @@ -0,0 +1 @@ +interface diff --git a/cdist/conf/type/__consul_reload/singleton b/contrib/examples/nico/conf/type/__nico_network/singleton similarity index 100% rename from cdist/conf/type/__consul_reload/singleton rename to contrib/examples/nico/conf/type/__nico_network/singleton diff --git a/contrib/examples/nico/conf/type/__nico_nfs_client/files/slim-preseed b/contrib/examples/nico/conf/type/__nico_nfs_client/files/slim-preseed new file mode 100644 index 00000000..01448d74 --- /dev/null +++ b/contrib/examples/nico/conf/type/__nico_nfs_client/files/slim-preseed @@ -0,0 +1,4 @@ +# Use slim, not gdm, if both are available +# Setup for slim, but value is available for gdm as well: +# gdm shared/default-x-display-manager select slim +slim shared/default-x-display-manager select slim diff --git a/contrib/examples/nico/conf/type/__nico_nfs_client/manifest b/contrib/examples/nico/conf/type/__nico_nfs_client/manifest new file mode 100755 index 00000000..ed1a872b --- /dev/null +++ b/contrib/examples/nico/conf/type/__nico_nfs_client/manifest @@ -0,0 +1,47 @@ +#!/bin/sh +# +# 2011 Nico Schottelius (nico-cdist at schottelius.org) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# + +__directory /home/services + +for nfsshare in audio video; do + dir="/home/services/$nfsshare" + __addifnosuchline nfs-$nfsshare --file /etc/fstab \ + --line "192.168.42.1:$dir $dir nfs defaults 0 0" + require="__directory/home/services" __directory $dir +done + +__directory /home/services/eingehend +for nfsshare in bibliothek buch spiegel; do + dir="/home/services/eingehend/$nfsshare" + __addifnosuchline nfs-$nfsshare --file /etc/fstab \ + --line "192.168.42.1:$dir $dir nfs defaults,noauto 0 0" + require="__directory/home/services" __directory $dir +done + +case "$(cat "$__global/explorer/os")" in + debian|ubuntu) + __package nfs-common --state installed + ;; + + fedora|archlinux) + __package nfs-utils --state installed + ;; +esac diff --git a/cdist/conf/type/__consul_template/singleton b/contrib/examples/nico/conf/type/__nico_nfs_client/singleton similarity index 100% rename from cdist/conf/type/__consul_template/singleton rename to contrib/examples/nico/conf/type/__nico_nfs_client/singleton diff --git a/cdist/conf/type/__package_pkg_openbsd/explorer/has_installurl b/contrib/examples/nico/conf/type/__nico_notebook/manifest similarity index 63% rename from cdist/conf/type/__package_pkg_openbsd/explorer/has_installurl rename to contrib/examples/nico/conf/type/__nico_notebook/manifest index 68337cbb..7b010230 100755 --- a/cdist/conf/type/__package_pkg_openbsd/explorer/has_installurl +++ b/contrib/examples/nico/conf/type/__nico_notebook/manifest @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright 2017, Philippe Gregoire +# 2011 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -17,20 +17,22 @@ # You should have received a copy of the GNU General Public License # along with cdist. If not, see . # - -# -# Retrieve the installurl(5), as introduced in OpenBSD 6.1 -# -# As of 6.1, the file is supposed to contained a single line -# with the URL used to install from during install or upgrade. -# -# Allow for expansion and take the first non-commented (#) line. # -if [ -f /etc/installurl ]; then - printf 'yes' -else - printf 'no' -fi +require="__package/zsh" __user nico --uid 1000 --shell /bin/zsh -exit 0 +# +# Backup HD +# +for hd in usbhd eth-usbhd; do + dir="/home/services/$hd" + __addifnosuchline hd-$hd --file /etc/fstab \ + --line "/dev/mapper/$hd $dir auto defaults,noauto 0 0" + __directory $dir +done + +# +# Standard everywhere packages +# +__nico_packages +__motd diff --git a/cdist/conf/type/__daemontools/singleton b/contrib/examples/nico/conf/type/__nico_notebook/singleton similarity index 100% rename from cdist/conf/type/__daemontools/singleton rename to contrib/examples/nico/conf/type/__nico_notebook/singleton diff --git a/cdist/test/autil/fixtures/explorer/lsb_id b/contrib/examples/nico/conf/type/__nico_packages/manifest similarity index 71% rename from cdist/test/autil/fixtures/explorer/lsb_id rename to contrib/examples/nico/conf/type/__nico_packages/manifest index 9754eb63..a1e663f7 100755 --- a/cdist/test/autil/fixtures/explorer/lsb_id +++ b/contrib/examples/nico/conf/type/__nico_packages/manifest @@ -1,6 +1,6 @@ #!/bin/sh # -# 2011 Steven Armstrong (steven-cdist at armstrong.cc) +# 2011 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -19,15 +19,15 @@ # # -set +e -case "$($__explorer/os)" in - openwrt) - (. /etc/openwrt_release && echo "$DISTRIB_ID") +for pkg in atop screen vim wget zsh; do + __package "$pkg" --state installed +done + +case "$(cat "$__global/explorer/os")" in + fedora) + __package nc --state installed ;; *) - lsb_release=$(command -v lsb_release) - if [ -x "$lsb_release" ]; then - $lsb_release --short --id - fi + __package netcat --state installed ;; esac diff --git a/cdist/conf/type/__docker/singleton b/contrib/examples/nico/conf/type/__nico_packages/singleton similarity index 100% rename from cdist/conf/type/__docker/singleton rename to contrib/examples/nico/conf/type/__nico_packages/singleton diff --git a/other/examples/types/__nico_sudo/files/sudo-nico b/contrib/examples/nico/conf/type/__nico_sudo/files/sudo-nico similarity index 100% rename from other/examples/types/__nico_sudo/files/sudo-nico rename to contrib/examples/nico/conf/type/__nico_sudo/files/sudo-nico diff --git a/other/examples/types/__nico_sudo/manifest b/contrib/examples/nico/conf/type/__nico_sudo/manifest similarity index 85% rename from other/examples/types/__nico_sudo/manifest rename to contrib/examples/nico/conf/type/__nico_sudo/manifest index 5de33973..59315313 100755 --- a/other/examples/types/__nico_sudo/manifest +++ b/contrib/examples/nico/conf/type/__nico_sudo/manifest @@ -22,9 +22,6 @@ destination=/etc/sudoers.d/nico source="$__type/files/sudo-nico" +require="__package/sudo" __file "$destination" --source "$source" --mode 0440 + __package sudo --state installed -__directory /etc/sudoers.d --parents yes - -require="__directory/etc/sudoers.d" \ - __file "$destination" --source "$source" --mode 0440 - diff --git a/other/examples/types/__nico_sudo/parameter/gencode b/contrib/examples/nico/conf/type/__nico_sudo/parameter/gencode similarity index 100% rename from other/examples/types/__nico_sudo/parameter/gencode rename to contrib/examples/nico/conf/type/__nico_sudo/parameter/gencode diff --git a/other/examples/types/__nico_sudo/parameter/manifest b/contrib/examples/nico/conf/type/__nico_sudo/parameter/manifest similarity index 100% rename from other/examples/types/__nico_sudo/parameter/manifest rename to contrib/examples/nico/conf/type/__nico_sudo/parameter/manifest diff --git a/cdist/conf/type/__apt_source/nonparallel b/contrib/examples/nico/conf/type/__nico_sudo/parameter/optional similarity index 100% rename from cdist/conf/type/__apt_source/nonparallel rename to contrib/examples/nico/conf/type/__nico_sudo/parameter/optional diff --git a/cdist/conf/type/__apt_source/parameter/default/component b/contrib/examples/nico/conf/type/__nico_sudo/parameter/required similarity index 100% rename from cdist/conf/type/__apt_source/parameter/default/component rename to contrib/examples/nico/conf/type/__nico_sudo/parameter/required diff --git a/cdist/conf/type/__docker_compose/singleton b/contrib/examples/nico/conf/type/__nico_sudo/singleton similarity index 100% rename from cdist/conf/type/__docker_compose/singleton rename to contrib/examples/nico/conf/type/__nico_sudo/singleton diff --git a/contrib/examples/nico/conf/type/__nico_tee/files/99-apt-nico b/contrib/examples/nico/conf/type/__nico_tee/files/99-apt-nico new file mode 100644 index 00000000..8d6d7c82 --- /dev/null +++ b/contrib/examples/nico/conf/type/__nico_tee/files/99-apt-nico @@ -0,0 +1,2 @@ +APT::Periodic::Update-Package-Lists "1"; +APT::Periodic::Unattended-Upgrade "1"; diff --git a/contrib/examples/nico/conf/type/__nico_tee/files/hostname b/contrib/examples/nico/conf/type/__nico_tee/files/hostname new file mode 100644 index 00000000..a4df6242 --- /dev/null +++ b/contrib/examples/nico/conf/type/__nico_tee/files/hostname @@ -0,0 +1 @@ +scheibe diff --git a/cdist/conf/explorer/os_release b/contrib/examples/nico/conf/type/__nico_tee/manifest old mode 100644 new mode 100755 similarity index 76% rename from cdist/conf/explorer/os_release rename to contrib/examples/nico/conf/type/__nico_tee/manifest index cfc01004..4c614027 --- a/cdist/conf/explorer/os_release +++ b/contrib/examples/nico/conf/type/__nico_tee/manifest @@ -1,6 +1,6 @@ #!/bin/sh # -# 2018 Adam Dej (dejko.a at gmail.com) +# 2011 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -19,8 +19,10 @@ # # -# See os-release(5) and http://0pointer.de/blog/projects/os-release -set +e -cat /etc/os-release || cat /usr/lib/os-release || true +__package unattended-upgrades --state installed + +__file /etc/apt/apt.conf.d/99-apt-nico \ + --source "$__type/files/99-apt-nico" \ + --mode 0644 diff --git a/cdist/conf/type/__docker_swarm/singleton b/contrib/examples/nico/conf/type/__nico_tee/singleton similarity index 100% rename from cdist/conf/type/__docker_swarm/singleton rename to contrib/examples/nico/conf/type/__nico_tee/singleton diff --git a/contrib/types_pending_inclusion/__package_zypper/README b/contrib/types_pending_inclusion/__package_zypper/README new file mode 100644 index 00000000..1e073e3f --- /dev/null +++ b/contrib/types_pending_inclusion/__package_zypper/README @@ -0,0 +1,5 @@ +This type was not accepted, because cleanups are needed and the +manpage does not build. + +If you read this and want this code available in the cdist core, +just fix it and submit a git url :-) diff --git a/cdist/conf/type/__package_rubygem/explorer/pkg_status b/contrib/types_pending_inclusion/__package_zypper/explorer/pkg_version similarity index 81% rename from cdist/conf/type/__package_rubygem/explorer/pkg_status rename to contrib/types_pending_inclusion/__package_zypper/explorer/pkg_version index 97620892..0e078f68 100755 --- a/cdist/conf/type/__package_rubygem/explorer/pkg_status +++ b/contrib/types_pending_inclusion/__package_zypper/explorer/pkg_version @@ -1,6 +1,6 @@ #!/bin/sh # -# 2011 Chase Allen James (nx-cdist@nu-ex.com) +# 2011 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -17,7 +17,8 @@ # You should have received a copy of the GNU General Public License # along with cdist. If not, see . # -# Retrieve the status of a rubygem +# +# Retrieve the status of a package - parsed dpkg output # if [ -f "$__object/parameter/name" ]; then @@ -26,5 +27,4 @@ else name="$__object_id" fi -# Except gem failing, if package is not known / installed -gem list -i "$name" 2>/dev/null || exit 0 +rpm -q --whatprovides "$name" 2>/dev/null || true diff --git a/cdist/conf/type/__package_opkg/explorer/pkg_status b/contrib/types_pending_inclusion/__package_zypper/gencode-remote similarity index 59% rename from cdist/conf/type/__package_opkg/explorer/pkg_status rename to contrib/types_pending_inclusion/__package_zypper/gencode-remote index 5da4f742..2d1112d3 100755 --- a/cdist/conf/type/__package_opkg/explorer/pkg_status +++ b/contrib/types_pending_inclusion/__package_zypper/gencode-remote @@ -1,7 +1,6 @@ #!/bin/sh # # 2011 Nico Schottelius (nico-cdist at schottelius.org) -# 2012 Giel van Schijndel (giel plus cdist at mortis dot eu) # # This file is part of cdist. # @@ -19,21 +18,34 @@ # along with cdist. If not, see . # # -# Retrieve the status of a package - parsed opkg output +# Manage packages with yum (mostly Fedora) # if [ -f "$__object/parameter/name" ]; then - name="$(cat "$__object/parameter/name")" + name="$__object/parameter/name" else name="$__object_id" fi -# Except dpkg failing, if package is not known / installed -if opkg status "$name" 2>/dev/null | grep -q "^Status: install user installed$"; then - echo "present" - exit 0 -elif [ "$(opkg info "$name" 2> /dev/null | wc -l)" -eq 0 ]; then - echo "absent notpresent" - exit 0 -fi -echo "absent" +state="$(cat "$__object/parameter/state")" + +opts="-n -q" + +not_installed="^no package provides" + +case "$state" in + installed) + if grep -q "$not_installed" "$__object/explorer/pkg_version"; then + echo zypper $opts install \"$name\" + fi + ;; + removed) + if ! grep -q "$not_installed" "$__object/explorer/pkg_version"; then + echo zypper $opts remove \"$name\" + fi + ;; + *) + echo "Unknown state: $state" >&2 + exit 1 + ;; +esac diff --git a/contrib/types_pending_inclusion/__package_zypper/man.text b/contrib/types_pending_inclusion/__package_zypper/man.text new file mode 100644 index 00000000..3a4f1026 --- /dev/null +++ b/contrib/types_pending_inclusion/__package_zypper/man.text @@ -0,0 +1,52 @@ +cdist-type__package_zypper(7) +========================== +Franky Van Liedekerke + + +NAME +---- +cdist-type__package_zypper - Manage packages with zypper + + +DESCRIPTION +----------- +zypper is usually used on the Suse distribution to manage packages. + + +REQUIRED PARAMETERS +------------------- +state:: + Either "installed" or "removed". + + +OPTIONAL PARAMETERS +------------------- +name:: + If supplied, use the name and not the object id as the package name. + + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +# Ensure zsh in installed +__package_zypper zsh --state installed + +# If you don't want to follow pythonX packages, but always use python +__package_zypper python --state installed --name python2 + +# Remove obsolete package +__package_zypper puppet --state removed +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist-type(7) +- cdist-type__package(7) + + +COPYING +------- +Copyright \(C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/cdist/test/emulator/fixtures/conf/type/__moon/parameter/optional b/contrib/types_pending_inclusion/__package_zypper/parameter/optional similarity index 100% rename from cdist/test/emulator/fixtures/conf/type/__moon/parameter/optional rename to contrib/types_pending_inclusion/__package_zypper/parameter/optional diff --git a/cdist/conf/type/__postgres_extension/parameter/optional b/contrib/types_pending_inclusion/__package_zypper/parameter/required similarity index 100% rename from cdist/conf/type/__postgres_extension/parameter/optional rename to contrib/types_pending_inclusion/__package_zypper/parameter/required diff --git a/core/__cdist_cache b/core/__cdist_cache new file mode 100755 index 00000000..95764d3d --- /dev/null +++ b/core/__cdist_cache @@ -0,0 +1,34 @@ +#!/bin/sh +# +# 2010 Nico Schottelius (nico-cdist at schottelius.org) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# +# Save the configuration tree into the local cache +# + +__cdist_cache() +{ + # Create base to move into + mkdir -p "${__cdist_local_base_cache_dir}" + + __cdist_echo info \ + "Caching to $(__cdist_host_cache_dir "$__cdist_target_host")" + rm -rf "$(__cdist_host_cache_dir "$__cdist_target_host")" + mv "$__cdist_local_base_dir" \ + "$(__cdist_host_cache_dir "$__cdist_target_host")" +} diff --git a/core/__cdist_dir b/core/__cdist_dir new file mode 100755 index 00000000..32ee0075 --- /dev/null +++ b/core/__cdist_dir @@ -0,0 +1,46 @@ +#!/bin/sh +# +# 2011 Nico Schottelius (nico-cdist at schottelius.org) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# +# Push a directory to a target, both sides have the same name (i.e. explorers) +# or +# Pull a directory from a target, both sides have the same name (i.e. explorers) +# + +__cdist_dir() +{ + [ $# -eq 3 ] || __cdist_usage " " + + # ${3%/*} will be the destination directory, so no subdirectories + # of the same name are created, if the directory is already existing + + if [ "$1" = "push" ]; then + # FIXME: add error handling with __cdist_run_remote_... or so + ssh "${__cdist_remote_user}@${__cdist_target_host}" \ + "mkdir -p \"$3\"" + scp -qr "$2" \ + "${__cdist_remote_user}@${__cdist_target_host}:${3%/*}" + elif [ "$1" = "pull" ]; then + mkdir -p "$3" + scp -qr "${__cdist_remote_user}@${__cdist_target_host}:$2" \ + "${3%/*}" + else + __cdist_exit_err "Unknown action $1" + fi +} diff --git a/other/examples/remote/ssh/copy b/core/__cdist_dir_listing similarity index 72% rename from other/examples/remote/ssh/copy rename to core/__cdist_dir_listing index 5b0ed324..f4aa2320 100755 --- a/other/examples/remote/ssh/copy +++ b/core/__cdist_dir_listing @@ -1,6 +1,6 @@ #!/bin/sh # -# 2011 Steven Armstrong (steven-cdist at armstrong.cc) +# 2011 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -18,11 +18,13 @@ # along with cdist. If not, see . # # -# same as cdist default +# List files in a directory, if it exists # -# Usage: -# cdist config --remote-copy "/path/to/this/script" target_host +# We only create output, if there's at least one entry +# and can thus be used as a boolean ;-) # -#echo "$@" | logger -t "cdist-ssh-copy" -scp -o User=root -q $@ +__cdist_dir_listing() +{ + [ -d "$1" ] && ls -1 "$1" +} diff --git a/other/examples/types/__nico_acpi_supend_on_lid_close/manifest b/core/__cdist_echo old mode 100644 new mode 100755 similarity index 50% rename from other/examples/types/__nico_acpi_supend_on_lid_close/manifest rename to core/__cdist_echo index 3ef4e971..a89d1821 --- a/other/examples/types/__nico_acpi_supend_on_lid_close/manifest +++ b/core/__cdist_echo @@ -18,26 +18,39 @@ # along with cdist. If not, see . # # +# echo / syslog alike function +# -__package acpid --state installed -__package pm-utils --state installed +__cdist_echo() +{ + __cdist_echo_type="$1"; shift -event_dir=/etc/acpi/events -event_file="$event_dir/lid" + set +u + if [ "$__cdist_object_self" ]; then + __cdist_echo_prefix="${__cdist_object_self}:" + else + __cdist_echo_prefix="core: " + fi + set -u -action_dir=/etc/acpi/actions -action_file="$action_dir/lid.sh" - -__directory "$event_dir" --owner root --group root \ - --mode 0755 --parents yes - -__directory "$action_dir" --owner root --group root \ - --mode 0755 --parents yes - -require="__directory/$event_dir" __file "$event_file" \ - --owner root --group root --mode 0644 \ - --source "$__type/files/lid_event" - -require="__directory/$action_dir" __file "$action_file" \ - --owner root --group root --mode 0755 \ - --source "$__type/files/lid.sh" + case "$__cdist_echo_type" in + debug) + if [ "$__cdist_debug" = 1 ]; then + echo $__cdist_echo_prefix "DEBUG: $@" + fi + ;; + info) + echo $__cdist_echo_prefix "$@" + ;; + warn) + echo $__cdist_echo_prefix "Warning: $@" + ;; + error) + echo $__cdist_echo_prefix "Error: $@" >&2 + ;; + *) + echo "CORE BUG, who created the broken commit in $0?" >&2 + exit 23 + ;; + esac +} diff --git a/core/__cdist_exit_err b/core/__cdist_exit_err new file mode 100755 index 00000000..303dbf20 --- /dev/null +++ b/core/__cdist_exit_err @@ -0,0 +1,28 @@ +#!/bin/sh +# +# 2011 Nico Schottelius (nico-cdist at schottelius.org) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# +# Print error and exit (perror() alike) +# + +__cdist_exit_err() +{ + __cdist_echo error "$@" + exit 1 +} diff --git a/core/__cdist_explorer_run b/core/__cdist_explorer_run new file mode 100755 index 00000000..9e58fa09 --- /dev/null +++ b/core/__cdist_explorer_run @@ -0,0 +1,79 @@ +#!/bin/sh +# +# 2011 Nico Schottelius (nico-cdist at schottelius.org) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# +# Run explorers - FIXME: this function is ugly +# + +__cdist_explorer_run() +{ + [ $# -eq 5 ] || __cdist_usage " " + + # Ensure there is at least one explorer + num="$(ls -1 "$__cdist_explorer_dir" | wc -l)" + if [ "$num" -lt 1 ]; then + __cdist_exit_err "${__cdist_explorer_dir}: Contains no explorers" + fi + + # Check whether to setup variable for type explorer + case "$1" in + global) + ;; + type) + # FIXME: think about how and where this gets setup! + "$__cdist_name_var_object=\"$(__cdist_remote_object_dir "$__cdist_object_self")\"" + ;; + esac + + # Transfer explorers + __cdist_dir push "$2" "$3" + + # Create output directory + __cdist_run_remote mkdir -p "$4" + + # Execute all explorers - FIXME: isolate cd call? + cd "$2"; + # FIXME: cleanup double variable, no need when in directory + for __cdist_explorer_run_explorer in *; do + __cdist_explorer_explorer_name="${__cdist_explorer_run_explorer##*/}" + + if [ -f "$__cdist_explorer_run_explorer" ]; then + if [ ! -x "$__cdist_explorer_run_explorer" ]; then + __cdist_exit_err "Explorer \"$__cdist_explorer_run_explorer\" exists, but is not executable." + fi + + else + if [ -e "$__cdist_explorer_run_explorer" ]; then + __cdist_exit_err "Explorer \"$__cdist_explorer_run_explorer\" exists, but is not a file." + fi + fi + + # FIXME: no need for remote out dir probably? + # or should we leave it and continue using __cdist_dir pull? + __cdist_run_remote \ + "export $__cdist_name_var_explorer=\"$__cdist_remote_explorer_dir\";" \ + "export $__cdist_name_var_global=\"$__cdist_remote_out_dir\";" \ + "$3/$__cdist_explorer_run_explorer" ">" \ + "$4/$__cdist_explorer_run_explorer" || \ + __cdist_exit_err "Explorer $__cdist_explorer_run_explorer failed." + done + + # Transfer results back + __cdist_dir pull "$4" "$5" +} diff --git a/core/__cdist_explorer_run_global b/core/__cdist_explorer_run_global new file mode 100755 index 00000000..27359713 --- /dev/null +++ b/core/__cdist_explorer_run_global @@ -0,0 +1,32 @@ +#!/bin/sh +# +# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# +# Copy & run the global explorers, i.e. not bound to types +# + +__cdist_explorer_run_global() +{ + __cdist_echo info "Running global explorers " + + # run the global explorers remotely + __cdist_explorer_run global \ + "$__cdist_explorer_dir" "$__cdist_remote_explorer_dir" \ + "$__cdist_remote_out_explorer_dir" "$__cdist_out_explorer_dir" +} diff --git a/core/__cdist_init_deploy b/core/__cdist_init_deploy new file mode 100755 index 00000000..4ac3168c --- /dev/null +++ b/core/__cdist_init_deploy @@ -0,0 +1,40 @@ +#!/bin/sh +# +# 2011 Nico Schottelius (nico-cdist at schottelius.org) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# +# Prepare deployment +# + +__cdist_init_deploy() +{ + __cdist_echo info "Creating clean directory structure " + + # Ensure there is no old stuff, neither local nor remote + rm -rf "$__cdist_local_base_dir" + ssh "${__cdist_remote_user}@${__cdist_target_host}" \ + "rm -rf ${__cdist_remote_base_dir}" + + # Init base + mkdir -p "$__cdist_local_base_dir" + ssh "${__cdist_remote_user}@${__cdist_target_host}" \ + "mkdir -p ${__cdist_remote_base_dir}" + + # Link configuration source directory - consistent with remote + ln -sf "$__cdist_conf_dir" "$__cdist_local_base_dir/$__cdist_name_conf_dir" +} diff --git a/core/__cdist_is_executable b/core/__cdist_is_executable new file mode 100755 index 00000000..a7a6d174 --- /dev/null +++ b/core/__cdist_is_executable @@ -0,0 +1,44 @@ +#!/bin/sh +# +# 2011 Nico Schottelius (nico-cdist at schottelius.org) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# +# Test whether something is executable (that should be executable) or +# is missing +# + +__cdist_is_executable() +{ + [ $# -eq 1 ] || __cdist_exit_err "" + + if [ -e "$1" ]; then + if [ -f "$1" ]; then + if [ -x "$1" ]; then + # Exists and is a correct executable + true + else + __cdist_exit_err "$1 exists, but is not executable." + fi + else + __cdist_exit_err "$1 exists, but is not a file." + fi + else + # Does not exist + false + fi +} diff --git a/core/__cdist_kill_on_interrupt b/core/__cdist_kill_on_interrupt new file mode 100644 index 00000000..7cb711fa --- /dev/null +++ b/core/__cdist_kill_on_interrupt @@ -0,0 +1,31 @@ +#!/bin/sh +# +# 2011 Nico Schottelius (nico-cdist at schottelius.org) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# +# Run the given command for each created object. +# + +# Does not work in children, will be called again in every script! +# Use only in interactive "front end" scripts +__cdist_kill_on_interrupt() +{ + __cdist_tmp_removal + kill 0 + exit 1 +} diff --git a/core/__cdist_manifest_run b/core/__cdist_manifest_run new file mode 100755 index 00000000..cf85d646 --- /dev/null +++ b/core/__cdist_manifest_run @@ -0,0 +1,53 @@ +#!/bin/sh +# +# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# +# Let's build a cconfig tree from a configuration +# And save it into the cache tree +# + +__cdist_manifest_run() +{ + [ $# -eq 1 ] || __cdist_usage "" + + __cdist_manifest="$1"; shift + + ################################################################################ + # Export information for cdist-type-emulator or manifest + # + + # Config dir should not get reset - FIXME: why did I do this? + export __cdist_conf_dir + + # Used to record the source in the object + export __cdist_manifest + + # Export information for manifests - __cdist_out_dir comes from cdist-config + export $__cdist_name_var_global="$__cdist_out_dir" + + ################################################################################ + # The actual run + # + + # Ensure binaries are existing - FIXME: move error handling into __cdist_type_build_emulation + __cdist_type_build_emulation \ + || __cdist_exit_err "Failed to build type emulation binaries" + + __cdist_run_shell "${__cdist_manifest}" +} diff --git a/bin/cdist b/core/__cdist_manifest_run_init similarity index 60% rename from bin/cdist rename to core/__cdist_manifest_run_init index 645020a1..e8fa63de 100755 --- a/bin/cdist +++ b/core/__cdist_manifest_run_init @@ -1,7 +1,6 @@ #!/bin/sh -# -*- coding: utf-8 -*- # -# 2012 Nico Schottelius (nico-cdist at schottelius.org) +# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -18,16 +17,16 @@ # You should have received a copy of the GNU General Public License # along with cdist. If not, see . # +# +# Let's build a cconfig tree from a configuration +# And save it into the cache tree # -# Wrapper for real script to allow execution from checkout -dir=${0%/*} +__cdist_manifest_run_init() +{ + # FIXME: probably do not export but always set explicitly? + export $__cdist_name_var_manifest="$__cdist_manifest_dir" -# Ensure version is present - the bundled/shipped version contains a static version, -# the git version contains a dynamic version -"$dir/build-helper" version - -libdir=$(cd "${dir}/../" && pwd -P) -export PYTHONPATH="${libdir}" - -"$dir/../scripts/cdist" "$@" + __cdist_echo info "Running initial manifest for $__cdist_target_host " + __cdist_manifest_run "$__cdist_manifest_init" +} diff --git a/core/__cdist_object_all b/core/__cdist_object_all new file mode 100755 index 00000000..965d08f6 --- /dev/null +++ b/core/__cdist_object_all @@ -0,0 +1,60 @@ +#!/bin/sh +# +# 2011 Nico Schottelius (nico-cdist at schottelius.org) +# 2011 Steven Armstrong (steven-cdist at armstrong.cc) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# +# Run the given command for each created object. +# + +__cdist_object_all() +{ + [ $# -eq 1 ] || __cdist_usage "" + + __cdist_object_all_object_all_command="$1"; shift + + __cdist_object_all_object_all_objects="$__cdist_tmp_dir/objects" + + # Ensure object dir exists, so marker can be created + mkdir -p "${__cdist_out_object_dir}" + + # FIXME: : - why do we use a file? + # core/__cdist_object_manifest_run: touch "$__cdist_objects_created" + + # Loop until we do not create new objects anymore + # which is equal to all objects have been run + touch "$__cdist_objects_created" + while [ -f "$__cdist_objects_created" ]; do + # Assume we're done after this run + rm "$__cdist_objects_created" + + # Get listing of objects + __cdist_object_list "$__cdist_out_object_dir" > \ + "$__cdist_object_all_object_all_objects" + + # NEED TO CREATE ARRAY, SSH DESTROYS WHILE READ LOOP + while read __cdist_object_all_object; do + set -- "$@" "$__cdist_object_all_object" + done < "$__cdist_object_all_object_all_objects" + + while [ $# -gt 0 ]; do + __cdist_object_all_object="$1"; shift + $__cdist_object_all_object_all_command "$__cdist_object_all_object" + done + done +} diff --git a/core/__cdist_object_code_run b/core/__cdist_object_code_run new file mode 100755 index 00000000..8af67ab8 --- /dev/null +++ b/core/__cdist_object_code_run @@ -0,0 +1,54 @@ +#!/bin/sh +# +# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org) +# 2011 Steven Armstrong (steven-cdist at armstrong.cc) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# +# Exec the code for the given object locally and remote +# + +__cdist_object_code_run() +{ + [ $# -eq 1 ] || __cdist_exit_err "" + + + if [ ! -d "$(__cdist_object_dir "$1")" ]; then + __cdist_exit_err "Object undefined" + fi + + # Code local + export __cdist_out_object_dir="$__cdist_out_object_dir" + __cdist_echo debug "Trying to run local code" + if __cdist_is_executable \ + "$(__cdist_object_code "$1" "${__cdist_name_gencode_local}")"; then + __cdist_run_shell \ + "$(__cdist_object_code "$1" "${__cdist_name_gencode_local}")" + else + __cdist_echo debug "Local code: none" + fi + + # Code remote + __cdist_echo debug "Trying to run remote code" + if __cdist_is_executable \ + "$(__cdist_object_code "$1" "${__cdist_name_gencode_remote}")"; then + + __cdist_run_remote $(__cdist_remote_object_code "$1") + else + __cdist_echo debug "Remote code: none" + fi +} diff --git a/core/__cdist_object_explorer_run b/core/__cdist_object_explorer_run new file mode 100755 index 00000000..da59d6c3 --- /dev/null +++ b/core/__cdist_object_explorer_run @@ -0,0 +1,89 @@ +#!/bin/sh +# +# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org) +# 2011 Steven Armstrong (steven-cdist at armstrong.cc) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# +# Run the explorers for the given object on the target host. +# + +# FIXME: many cleanups needed before going production! + +__cdist_object_explorer_run() +{ + __cdist_object_self="$1"; shift + + __cdist_object_id="$(__cdist_object_id_from_object "$__cdist_object_self")" + __cdist_type="$(__cdist_type_from_object "$__cdist_object_self")" + + # Check if type of object has >= 1 explorer + __cdist_has_explorer="$(__cdist_dir_listing "$(__cdist_type_explorer_dir "$__cdist_type")" | wc -l)" + # Run the type explorers for the current object if any + if [ "$__cdist_has_explorer" -ge 1 ]; then + if ! __cdist_type_explorer_pushed "$__cdist_type"; then + # FIXME: variables! + src_dir="$(__cdist_type_explorer_dir "$__cdist_type")" + dst_dir="$(__cdist_remote_type_explorer_dir "$__cdist_type")" + __cdist_echo info "Transfering explorers for $__cdist_type " + __cdist_dir push "$src_dir" "$dst_dir" + __cdist_type_explorer_pushed_add "$__cdist_type" + fi + + __cdist_echo info "Running explorers" + # Copy object parameters + __cdist_dir push \ + "$(__cdist_object_parameter_dir "$__cdist_object_self")" \ + "$(__cdist_remote_object_parameter_dir "$__cdist_object_self")" + + # Execute explorers + # FIXME: STOPPED: + # - remove cdist-remote-explorer-run + # - problem: new variables / need to run explorer directly? + # -> or put logic into __cdist_explorer_run + # -> think about having _one_ wrapper script for remote to execute + # shell functions + + # Create remote output directory + __cdist_run_remote mkdir -p "$(__cdist_remote_object_type_explorer_dir "$__cdist_object_self")" + + cd "$(__cdist_type_explorer_dir "$__cdist_type")" + + + for __cdist_object_explorer_run_explorer in *; do + __cdist_run_remote \ + "$__cdist_name_var_object=\"$(__cdist_remote_object_dir "$__cdist_object_self")\"" \ + "$__cdist_name_var_object_id=\"$__cdist_object_id\"" \ + "$__cdist_name_var_self=\"$__cdist_object_self\"" \ + "$(__cdist_remote_type_explorer_dir "$__cdist_type")/$__cdist_object_explorer_run_explorer" \ + ">" "$(__cdist_remote_object_type_explorer_dir "$__cdist_object_self")/$__cdist_object_explorer_run_explorer" + done + +# __cdist_run_remote \ +# "$__cdist_name_var_object=\"$(__cdist_remote_object_dir "$__cdist_object_self")\"" \ +# "$__cdist_name_var_object_id=\"$__cdist_object_id\"" \ +# "$__cdist_name_var_self=\"$__cdist_object_self\"" \ +# cdist-remote-explorer-run \ +# "$__cdist_name_var_type_explorer" \ +# "$(__cdist_remote_type_explorer_dir "$__cdist_type")" \ +# "$(__cdist_remote_object_type_explorer_dir "$__cdist_object_self")" + + # Copy back results + __cdist_dir pull "$(__cdist_remote_object_type_explorer_dir "$__cdist_object_self")" \ + "$(__cdist_object_type_explorer_dir "$__cdist_object_self")" + fi +} diff --git a/core/__cdist_object_gencode b/core/__cdist_object_gencode new file mode 100755 index 00000000..08ef8b7d --- /dev/null +++ b/core/__cdist_object_gencode @@ -0,0 +1,66 @@ +#!/bin/sh +# +# 2011 Nico Schottelius (nico-cdist at schottelius.org) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# +# Generate code from one object (object must be relative path!) +# WARNING: OUTPUT ON STDOUT, ERRORS NEED TO BE ON STDERR! +# + +# FIXME: check variable names: +# either prefix or use global or use functions directly +# functions looks good, they are cheap anyway! + +__cdist_object_gencode() +{ + [ $# -eq 2 ] || __cdist_usage "" "" + + __cdist_object_self="$1"; shift + __cdist_gencode_type="$1"; shift + + __cdist_type="$(__cdist_type_from_object "$__cdist_object_self")" + __cdist_type_gencode="$(__cdist_type_gencode "$__cdist_type" "$__cdist_gencode_type")" + __cdist_code_output="$(__cdist_object_code "$__cdist_object_self" "$__cdist_gencode_type")" + + # export variables for the gencode script + export __object_id="$(__cdist_object_id_from_object "$__cdist_object_self")" + export __object="$(__cdist_object_dir "$__cdist_object_self")" + export __global="$__cdist_out_dir" + + if [ -x "$__cdist_type_gencode" ]; then + __cdist_run_shell "$__cdist_type_gencode" > "$__cdist_tmp_file" + else + if [ -e "$__cdist_type_gencode" ]; then + __cdist_exit_err "$__cdist_type_gencode exists, but is not executable" + fi + + # Ensure it's empty, if there is no gencode + : > "$__cdist_tmp_file" + fi + + # Only create code, if gencode created output + if [ "$(wc -l < "$__cdist_tmp_file")" -gt 0 ]; then + cat - "$__cdist_tmp_file" << eof > "$__cdist_code_output" +# +# The following code was generated by $__cdist_type_gencode +# + +eof + chmod u+x "${__cdist_code_output}" + fi +} diff --git a/other/examples/remote/schroot/exec b/core/__cdist_object_gencode_run similarity index 59% rename from other/examples/remote/schroot/exec rename to core/__cdist_object_gencode_run index 2510fd22..308f5f33 100755 --- a/other/examples/remote/schroot/exec +++ b/core/__cdist_object_gencode_run @@ -1,5 +1,6 @@ #!/bin/sh # +# 2010 Nico Schottelius (nico-cdist at schottelius.org) # 2011 Steven Armstrong (steven-cdist at armstrong.cc) # # This file is part of cdist. @@ -17,29 +18,19 @@ # You should have received a copy of the GNU General Public License # along with cdist. If not, see . # -# -# __remote_exec script to run cdist against a chroot on the target host over ssh. -# -# Usage: -# cdist config --remote-exec "/path/to/this/script schroot-chroot-name" target_host +# +# For the given object create the code to be executed on the target. # -log() { - #echo "$@" | logger -t "cdist-schroot-exec" - : +__cdist_object_gencode_run() +{ + __cdist_object_gencode_run_object="$1"; shift + + __cdist_echo info "Generating local code " + __cdist_object_gencode "$__cdist_object_gencode_run_object" \ + "${__cdist_name_gencode_local}" + + __cdist_echo info "Generating remote code " + __cdist_object_gencode "$__cdist_object_gencode_run_object" \ + "${__cdist_name_gencode_remote}" } - -chroot_name="$1"; shift -target_host="$1"; shift - -code="ssh -o User=root -q $target_host schroot -c $chroot_name -- $@" - -log "target_host: $target_host" -log "chroot_name: $chroot_name" -log "@: $@" -log "code: $code" - -# run in remote chroot -$code - -log "-----" diff --git a/core/__cdist_object_list b/core/__cdist_object_list new file mode 100755 index 00000000..f2785c30 --- /dev/null +++ b/core/__cdist_object_list @@ -0,0 +1,36 @@ +#!/bin/sh +# +# 2011 Nico Schottelius (nico-cdist at schottelius.org) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# +# Print error and exit (perror() alike) +# + +__cdist_object_list() +{ + # FIXME: no local in posix + local basedir="$1"; shift + + # Use subshell to prevent changing cwd in program + ( + cd "${basedir}" + + find . -name "$__cdist_name_dot_cdist" | \ + sed -e 's;^./;;' -e "s;/${__cdist_name_dot_cdist}\$;;" + ) +} diff --git a/core/__cdist_object_manifest_run b/core/__cdist_object_manifest_run new file mode 100755 index 00000000..efc85539 --- /dev/null +++ b/core/__cdist_object_manifest_run @@ -0,0 +1,59 @@ +#!/bin/sh +# +# 2010 Nico Schottelius (nico-cdist at schottelius.org) +# 2011 Steven Armstrong (steven-cdist at armstrong.cc) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# +# Run the manifest for the given object. +# + + +__cdist_object_manifest_run() +{ + [ $# -eq 1 ] || __cdist_usage "" + + __cdist_object_self="$1"; shift + + # FIXME: rename to __cdist_object_dir (everywhere!) + __cdist_cur_object_dir="$(__cdist_object_dir "$__cdist_object_self")" + __cdist_object_id="$(__cdist_object_id_from_object "$__cdist_object_self")" + + __cdist_echo info "Checking manifest " + + __cdist_type="$(__cdist_type_from_object "$__cdist_object_self")" + __cdist_manifest="$(__cdist_type_manifest "$__cdist_type")" + + if [ -f "$__cdist_manifest" ]; then + if [ -x "$__cdist_manifest" ]; then + # Make __cdist_manifest available for cdist-type-emulator + export __cdist_manifest + + __cdist_echo info "Executing manifest " + export $__cdist_name_var_object="$__cdist_cur_object_dir" + export $__cdist_name_var_object_id="$__cdist_object_id" + export $__cdist_name_var_type="$(__cdist_type_dir "$__cdist_type")" + + __cdist_manifest_run "$__cdist_manifest" + + # Tell cdist-object-run-all that there may be new objects + touch "$__cdist_objects_created" + else + __cdist_exit_err "${__cdist_manifest} needs to be executable." + fi + fi +} diff --git a/core/__cdist_object_prepare b/core/__cdist_object_prepare new file mode 100755 index 00000000..24039be0 --- /dev/null +++ b/core/__cdist_object_prepare @@ -0,0 +1,47 @@ +#!/bin/sh +# +# 2011 Nico Schottelius (nico-cdist at schottelius.org) +# 2011 Steven Armstrong (steven-cdist at armstrong.cc) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# +# For the given object: +# - run type explorers +# - run type manifest +# + +__cdist_object_prepare() +{ + [ $# -eq 1 ] || __cdist_usage "" + + __cdist_object_self="$1"; shift + __cdist_object_dir="$(__cdist_object_dir "$__cdist_object_self")" + [ -d "$__cdist_object_dir" ] || __cdist_exit_err "Object undefined" + + # Export to non-core for use in manifest and gencode scripts + export $__cdist_name_var_self=$__cdist_object_self + + __cdist_object_prepared="$(__cdist_object_prepared "$__cdist_object_self")" + if [ ! -f "$__cdist_object_prepared" ]; then + __cdist_echo info "Preparing object" + __cdist_object_explorer_run "$__cdist_object_self" + __cdist_object_manifest_run "$__cdist_object_self" + + # Mark this object as prepared + touch "$__cdist_object_prepared" + fi +} diff --git a/core/__cdist_object_run b/core/__cdist_object_run new file mode 100755 index 00000000..d2c7df6e --- /dev/null +++ b/core/__cdist_object_run @@ -0,0 +1,74 @@ +#!/bin/sh +# +# 2011 Nico Schottelius (nico-cdist at schottelius.org) +# 2011 Steven Armstrong (steven-cdist at armstrong.cc) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# +# For the given object: +# - run type explorers +# - run type manifest +# - generate code +# - copy object to target +# - execute code on target +# + +__cdist_object_run() +{ + [ $# -eq 1 ] || __cdist_usage "" + + __cdist_object_self="$1"; shift + __cdist_object_dir="$(__cdist_object_dir "$__cdist_object_self")" + [ -d "$__cdist_object_dir" ] || __cdist_exit_err "Object undefined" + + # Export to non-core for use in manifest and gencode scripts + export $__cdist_name_var_self=$__cdist_object_self + + # FIXME: BUG: should be named differently! + # FIXME: BUG: I can be called recursively! -> variables are probably already set / overwritten! + __cdist_object_finished="$(__cdist_object_finished "$__cdist_object_self")" + if [ ! -f "$__cdist_object_finished" ]; then + # Resolve dependencies, if any + __cdist_object_require="$(__cdist_object_require "$__cdist_object_self")" + if [ -f "$__cdist_object_require" ]; then + # NEED TO CREATE ARRAY, SSH DESTROYS WHILE READ LOOP + while read __cdist_requirement; do + set -- "$@" "$__cdist_requirement" + done < "$__cdist_object_require" + + while [ $# -gt 0 ]; do + __cdist_requirement="$1"; shift + __cdist_echo info "Resolving requirement $__cdist_requirement" + # FIXME: BUG: at this point, the other __cdist_object_run may have + # overwritten all our variables! + __cdist_object_run "$__cdist_requirement" + done + fi + + __cdist_echo debug "Before gencode" + __cdist_object_gencode_run "$__cdist_object_self" + __cdist_echo debug "Before push" + __cdist_dir push "$(__cdist_object_dir "$__cdist_object_self")" \ + "$(__cdist_remote_object_dir "$__cdist_object_self")" + __cdist_echo debug "Before run" + __cdist_object_code_run "$__cdist_object_self" + __cdist_echo debug "Object run done" + + # Mark this object as done + touch "$__cdist_object_finished" + fi +} diff --git a/core/__cdist_run b/core/__cdist_run new file mode 100755 index 00000000..8febe550 --- /dev/null +++ b/core/__cdist_run @@ -0,0 +1,27 @@ +#!/bin/sh +# +# 2011 Nico Schottelius (nico-cdist at schottelius.org) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# +# Exit if an error occurs running something +# + +__cdist_run() +{ + "$@" || __cdist_echo error "$1 exited non-zero, aborting." +} diff --git a/core/__cdist_run_remote b/core/__cdist_run_remote new file mode 100755 index 00000000..17074049 --- /dev/null +++ b/core/__cdist_run_remote @@ -0,0 +1,32 @@ +#!/bin/sh +# +# 2011 Nico Schottelius (nico-cdist at schottelius.org) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# +# Run a cdist binary on the remote side +# + +__cdist_run_remote() +{ + [ $# -ge 1 ] || __cdist_usage " [opts]" + + ssh "${__cdist_remote_user}@${__cdist_target_host}" \ + "export PATH=\"${__cdist_remote_bin_dir}:\$PATH\";" \ + "export __cdist_out_object_dir=\"$__cdist_remote_out_object_dir\";" \ + "$@" +} diff --git a/cdist/test/banner/__init__.py b/core/__cdist_run_shell old mode 100644 new mode 100755 similarity index 60% rename from cdist/test/banner/__init__.py rename to core/__cdist_run_shell index 957b7b12..b6e0a57d --- a/cdist/test/banner/__init__.py +++ b/core/__cdist_run_shell @@ -1,5 +1,4 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- +#!/bin/sh # # 2011 Nico Schottelius (nico-cdist at schottelius.org) # @@ -19,25 +18,17 @@ # along with cdist. If not, see . # # +# Exit if an error occurs when running a shell script +# -import io -import sys -import unittest - -import cdist -import cdist.banner - - -class Banner(unittest.TestCase): - def setUp(self): - self.banner = cdist.BANNER + "\n" - - def test_banner_output(self): - """Check that printed banner equals saved banner""" - output = io.StringIO() - - sys.stdout = output - - cdist.banner.banner(None) - - self.assertEqual(output.getvalue(), self.banner) +__cdist_run_shell() +{ + # Prepend our path, so all cdist tools come before other tools + PATH="${__cdist_out_type_bin_dir}:$PATH" sh -e "$@" + if [ "$?" -ne 0 ]; then + __cdist_echo error "$1 exited non-zero" + __cdist_echo warn "Faulty code:" + cat "$1" + __cdist_exit_err "Aborting due to non-zero exit code." + fi +} diff --git a/cdist/conf/type/__hostname/explorer/has_hostnamectl b/core/__cdist_tmp_removal similarity index 83% rename from cdist/conf/type/__hostname/explorer/has_hostnamectl rename to core/__cdist_tmp_removal index 9040023d..74d74936 100755 --- a/cdist/conf/type/__hostname/explorer/has_hostnamectl +++ b/core/__cdist_tmp_removal @@ -1,6 +1,6 @@ #!/bin/sh # -# 2014 Nico Schottelius (nico-cdist at schottelius.org) +# 2011 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -18,7 +18,10 @@ # along with cdist. If not, see . # # -# Check whether system has hostnamectl +# Remove tmp dir # -command -v hostnamectl || true +__cdist_tmp_removal() +{ + rm -rf "${__cdist_tmp_dir}" +} diff --git a/core/__cdist_type_build_emulation b/core/__cdist_type_build_emulation new file mode 100755 index 00000000..3c7270ca --- /dev/null +++ b/core/__cdist_type_build_emulation @@ -0,0 +1,49 @@ +#!/bin/sh +# +# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# Build pseudo binaries for type emulation +# + +__cdist_type_build_emulation() +{ + [ $# -eq 0 ] || __cdist_usage "No arguments" + + [ -f "${__cdist_out_type_bin_dir}/.marker" ] && return 0 + + __cdist_type_emulator="$__cdist_abs_mydir/cdist-type-emulator" + + if [ ! -d "${__cdist_type_dir}" ]; then + __cdist_exit_err "$__cdist_type_dir must exist and contain available types" + fi + + # Get Types + ( + cd "${__cdist_type_dir}" + ls -1 > "${__cdist_tmp_file}" + ) + + # Create binaries + mkdir -p "${__cdist_out_type_bin_dir}" + while read __cdist_type_build_emulation_type; do + ln -sf "${__cdist_type_emulator}" \ + "${__cdist_out_type_bin_dir}/${__cdist_type_build_emulation_type}" + done < "${__cdist_tmp_file}" + + touch "${__cdist_out_type_bin_dir}/.marker" +} diff --git a/core/__cdist_usage b/core/__cdist_usage new file mode 100755 index 00000000..9dfa30e4 --- /dev/null +++ b/core/__cdist_usage @@ -0,0 +1,27 @@ +#!/bin/sh +# +# 2011 Nico Schottelius (nico-cdist at schottelius.org) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# +# Print error and exit (perror() alike) +# + +__cdist_usage() +{ + __cdist_exit_err "$__cdist_myname: $@" +} diff --git a/doc/changelog b/doc/changelog new file mode 100644 index 00000000..a0d114a1 --- /dev/null +++ b/doc/changelog @@ -0,0 +1,134 @@ +1.8.0: + * Added debug (via __cdist_debug={1,2} environment variable) + * Transformed shell script based approach to shell functions (performance improvement) + +1.7.1: 2011-07-26 + * Documentation: Add explorers to reference + * Documentation: Typo cleanup (Derek Brost) + * Type __key_value: Bugfix (Steven Armstrong) + * New Type: __postgres_role (Steven Armstrong) + * New Type: __postgres_database (Steven Armstrong) + +1.7.0: 2011-05-10 + * Bugfix type __package_yum: Fix redhat support (Ramon Salvadó) + * Improved type __package_yum: Add centos support (Ramon Salvadó) + * New Type: __timezone (Ramon Salvadó) + * Renamed explorer: hardware_type to machine + * Core: Do not execute empty code fragments + +1.6.2: 2011-04-19 + * Core: Introduce __cdist_tmp_base_dir + * Core: Cleanup and enhance cdist-type-template + * Core: cdist-mass-deploy: Report failed cdist-deploy-to instances + * New Type: __ssh_authorized_key (Aurélien Bondis) + +1.6.1: 2011-04-07 + * Improved logging: Show code responsible for abort + * Improved logging: Consistently prefix with current object or core + * Bugfix: Type __debconf_set_selections used wrong contens for selection + * Bugfix: Don't fail, if cache directory is not existing + * Bugfix: __user and __group exited non-zero if no change was necessary + * New Explorer: hardware_type + * New Type: __package_pkg_openbsd (Andi Brönnimann) + * New Type: __autofs_map (Steven Armstrong) + * New Type: __autofs_master (Steven Armstrong) + +1.6.0: 2011-04-06 + * New Type: __package_yum + * New type: __debconf_set_selections + * New explorer: os_version + * Bugfix: Type __group failed in case of __group NAME syntax + * Bugfix: __package* types: consistently name --state removed instead of + uninstalled or deinstalled + * Type __package: Added Fedora support + * Type __package_apt: Removed --preseed support + * Explorer os gained Fedora support + * Simplified types __user and __group + * New helper binary: cdist-mass-deploy + +1.5.0: 2011-04-01 + * Add basic cache functionality + * New type: __process + * Restructured execution: (Steven Armstrong) + Orientate processing on objects, resolve dependencies and + ensure correct execution order. + * Documentation: Rewrite stages docs (Steven Armstrong) + * Documentation: Remove legacy man pages (Steven Armstrong) + +1.4.1: 2011-03-25 + * New type: __key_value (Steven Armstrong) + * New type: __apt_ppa (Steven Armstrong) + * Documentation: Manpage generation cleanup + * Documentation: Manpage fix for __apt_ppa + +1.4.0: 2011-03-24 + * Add --recursive to __directory + * Move cdist generated stuff to .cdist of an object + * Allow objects to be redefined + +1.3.2: 2011-03-21 + * Add --source to __motd + * Add --preseed to __package_apt + * Include HTML documentation of manpages and publish them + +1.3.1: 2011-03-21 + * Document: cdist-type-build-emulation + * Document: cdist-type-emulator + * Document: cdist-remote-explorer-run + * Fix dependencies in cdist-code-run + * Fix dependencies in cdist-manifest-run-all + * Add --source to __issue and fix os check + +1.3.0: 2011-03-20 + * Add support for local and remote code generation and execution + * Bugfix: Remove obsolete $@ call in cdist-remote-explorer-run + * Bugfix: Correct manpage for __removeline (broke manpage generation) + +1.2.0: 2011-03-19 + * Added dependencies (see cdist-type(7)) + * New type: __removeline (Daniel Roth) + * New type: __group (Steven Armstrong) + * New type: __user (Steven Armstrong) + * Documentation: cdist-run-remote + * Documentation: cdist-code-run-all + * Documentation: cdist-object-gencode + * Documentation: cdist-explorer-run-global + * Documentation: cdist-manifest-run-init + * Documentation: cdist-manifest-run-all + * Documentation: cdist-object-gencode-all + * Documentation: cdist-manifest-run + +1.1.0: 2011-03-16 + * Replace type __file with __file, __directory, __link + * Documentation: cdist-env + * Documentation: cdist-config + * Documentation: cdist-dir + * Documentation: cdist-quickstart + +1.0.4: 2011-03-15 + * New type: __motd + * New type: __addifnosuchline (Daniel Roth) + * New type: __user + * Document type: __issue + * Document type: __package + * Document type: __package_pacman + * Document type: __package_apt + * New parameter for __file: --owner and --group + +1.0.3: 2011-03-11 + * Update regexp used for sane characters + * Allow types without parameters + * Allow type to be singleton + * Type __file learned --type symlink + +1.0.2: 2011-03-09 + * Add manpages: cdist-type, cdist-type__file, cdist-reference, cdist-explorer + * Make doc/man/ usable as MANPATH entry + +1.0.1: 2011-03-08 + * Added cdist-type-template including manpage + * Fix manpage building + * Add new manpages: cdist-stages, cdist-bin-transfer + +1.0.0: 2011-03-07 + * Initial release diff --git a/docs/dev/benchmark-oprofile b/doc/dev/benchmark-oprofile similarity index 100% rename from docs/dev/benchmark-oprofile rename to doc/dev/benchmark-oprofile diff --git a/docs/dev/debug/bach25-1.6.2-373-g6fd31f8 b/doc/dev/debug/bach25-1.6.2-373-g6fd31f8 similarity index 100% rename from docs/dev/debug/bach25-1.6.2-373-g6fd31f8 rename to doc/dev/debug/bach25-1.6.2-373-g6fd31f8 diff --git a/docs/dev/debug/ikq04-1.6.2-373-g6fd31f8-dbg b/doc/dev/debug/ikq04-1.6.2-373-g6fd31f8-dbg similarity index 100% rename from docs/dev/debug/ikq04-1.6.2-373-g6fd31f8-dbg rename to doc/dev/debug/ikq04-1.6.2-373-g6fd31f8-dbg diff --git a/doc/dev/git-post-commit-hook b/doc/dev/git-post-commit-hook new file mode 100755 index 00000000..b16caa2a --- /dev/null +++ b/doc/dev/git-post-commit-hook @@ -0,0 +1,108 @@ +#!/usr/bin/env bash +# Distributed under the terms of the GNU General Public License v2 +# Copyright (c) 2006 Fernando J. Pereda +# +# Git CIA bot in bash. (no, not the POSIX shell, bash). +# It is *heavily* based on Git ciabot.pl by Petr Baudis. +# +# It is meant to be run either on a post-commit hook or in an update +# hook: +# +# post-commit: It parses latest commit and current HEAD to get the +# information it needs. +# +# update: You have to call it once per merged commit: +# +# refname=$1 +# oldhead=$2 +# newhead=$3 +# for merged in $(git rev-list ${oldhead}..${newhead} | tac) ; do +# /path/to/ciabot.bash ${refname} ${merged} +# done +# + +# The project as known to CIA +project="cdist" + +# Set to true if you want the full log to be sent +noisy=false + +# Addresses for the e-mail +from="nico-cia.vc@schottelius.org" +to="cia@cia.vc" + +# SMTP client to use +sendmail="/usr/sbin/sendmail -f ${from} ${to}" + +# Changeset URL +url="http://git.schottelius.org/?p=${project};a=commit;h=@@sha1@@" + +# You shouldn't be touching anything else. +if [[ $# = 0 ]] ; then + refname=$(git symbolic-ref HEAD 2>/dev/null) + merged=$(git rev-parse HEAD) +else + refname=$1 + merged=$2 +fi + +refname=${refname##refs/heads/} + +gitver=$(git --version) +gitver=${gitver##* } + +rev=$(git describe ${merged} 2>/dev/null) +[[ -z ${rev} ]] && rev=${merged:0:12} + +rawcommit=$(git cat-file commit ${merged}) + +author=$(sed -n -e '/^author .*<\([^@]*\).*$/s--\1-p' \ + <<< "${rawcommit}") + +logmessage=$(sed -e '1,/^$/d' <<< "${rawcommit}") +${noisy} || logmessage=$(head -n 1 <<< "${logmessage}") +logmessage=${logmessage//&/&} +logmessage=${logmessage///>} + +ts=$(sed -n -e '/^author .*> \([0-9]\+\).*$/s--\1-p' \ + <<< "${rawcommit}") + +out=" + + + CIA Bash client for Git + ${gitver} + http://dev.gentoo.org/~ferdy/stuff/ciabot.bash + + + ${project} + ${refname} + + ${ts} + + + ${author} + ${rev} + + $(git diff-tree -r --name-only ${merged} | + sed -e '1d' -e 's-.*-&-') + + +${logmessage} + + ${url//@@sha1@@/${merged}} + + +" + +${sendmail} << EOM +Message-ID: <${merged:0:12}.${author}@${project}> +From: ${from} +To: ${to} +Content-type: text/xml +Subject: DeliverXML +${out} +EOM + +# vim: set tw=70 : diff --git a/docs/dev/header b/doc/dev/header similarity index 100% rename from docs/dev/header rename to doc/dev/header diff --git a/docs/dev/lastchanges b/doc/dev/lastchanges similarity index 100% rename from docs/dev/lastchanges rename to doc/dev/lastchanges diff --git a/docs/dev/logs/2010-09-25 b/doc/dev/logs/2010-09-25 similarity index 100% rename from docs/dev/logs/2010-09-25 rename to doc/dev/logs/2010-09-25 diff --git a/docs/dev/logs/2010-11-02.steven b/doc/dev/logs/2010-11-02.steven similarity index 100% rename from docs/dev/logs/2010-11-02.steven rename to doc/dev/logs/2010-11-02.steven diff --git a/docs/dev/logs/2010-11-09 b/doc/dev/logs/2010-11-09 similarity index 100% rename from docs/dev/logs/2010-11-09 rename to doc/dev/logs/2010-11-09 diff --git a/docs/dev/logs/2010-11-21 b/doc/dev/logs/2010-11-21 similarity index 100% rename from docs/dev/logs/2010-11-21 rename to doc/dev/logs/2010-11-21 diff --git a/docs/dev/logs/2010-11-29 b/doc/dev/logs/2010-11-29 similarity index 100% rename from docs/dev/logs/2010-11-29 rename to doc/dev/logs/2010-11-29 diff --git a/docs/dev/logs/2010-12-01 b/doc/dev/logs/2010-12-01 similarity index 100% rename from docs/dev/logs/2010-12-01 rename to doc/dev/logs/2010-12-01 diff --git a/docs/dev/logs/2010-12-01.handwritten/SCAN0000.PDF b/doc/dev/logs/2010-12-01.handwritten/SCAN0000.PDF similarity index 100% rename from docs/dev/logs/2010-12-01.handwritten/SCAN0000.PDF rename to doc/dev/logs/2010-12-01.handwritten/SCAN0000.PDF diff --git a/docs/dev/logs/2010-12-01.handwritten/SCAN0001.PDF b/doc/dev/logs/2010-12-01.handwritten/SCAN0001.PDF similarity index 100% rename from docs/dev/logs/2010-12-01.handwritten/SCAN0001.PDF rename to doc/dev/logs/2010-12-01.handwritten/SCAN0001.PDF diff --git a/docs/dev/logs/2010-12-01.handwritten/SCAN0002.PDF b/doc/dev/logs/2010-12-01.handwritten/SCAN0002.PDF similarity index 100% rename from docs/dev/logs/2010-12-01.handwritten/SCAN0002.PDF rename to doc/dev/logs/2010-12-01.handwritten/SCAN0002.PDF diff --git a/docs/dev/logs/2010-12-01.handwritten/SCAN0003.PDF b/doc/dev/logs/2010-12-01.handwritten/SCAN0003.PDF similarity index 100% rename from docs/dev/logs/2010-12-01.handwritten/SCAN0003.PDF rename to doc/dev/logs/2010-12-01.handwritten/SCAN0003.PDF diff --git a/docs/dev/logs/2010-12-01.handwritten/SCAN0004.PDF b/doc/dev/logs/2010-12-01.handwritten/SCAN0004.PDF similarity index 100% rename from docs/dev/logs/2010-12-01.handwritten/SCAN0004.PDF rename to doc/dev/logs/2010-12-01.handwritten/SCAN0004.PDF diff --git a/docs/dev/logs/2011-01-17 b/doc/dev/logs/2011-01-17 similarity index 100% rename from docs/dev/logs/2011-01-17 rename to doc/dev/logs/2011-01-17 diff --git a/docs/dev/logs/2011-01-18.type-creation b/doc/dev/logs/2011-01-18.type-creation similarity index 100% rename from docs/dev/logs/2011-01-18.type-creation rename to doc/dev/logs/2011-01-18.type-creation diff --git a/docs/dev/logs/2011-01-24 b/doc/dev/logs/2011-01-24 similarity index 100% rename from docs/dev/logs/2011-01-24 rename to doc/dev/logs/2011-01-24 diff --git a/docs/dev/logs/2011-02-03 b/doc/dev/logs/2011-02-03 similarity index 100% rename from docs/dev/logs/2011-02-03 rename to doc/dev/logs/2011-02-03 diff --git a/docs/dev/logs/2011-02-04.steven b/doc/dev/logs/2011-02-04.steven similarity index 100% rename from docs/dev/logs/2011-02-04.steven rename to doc/dev/logs/2011-02-04.steven diff --git a/docs/dev/logs/2011-02-22 b/doc/dev/logs/2011-02-22 similarity index 100% rename from docs/dev/logs/2011-02-22 rename to doc/dev/logs/2011-02-22 diff --git a/docs/dev/logs/2011-02-24 b/doc/dev/logs/2011-02-24 similarity index 100% rename from docs/dev/logs/2011-02-24 rename to doc/dev/logs/2011-02-24 diff --git a/docs/dev/logs/2011-02-27 b/doc/dev/logs/2011-02-27 similarity index 100% rename from docs/dev/logs/2011-02-27 rename to doc/dev/logs/2011-02-27 diff --git a/docs/dev/logs/2011-03-03 b/doc/dev/logs/2011-03-03 similarity index 100% rename from docs/dev/logs/2011-03-03 rename to doc/dev/logs/2011-03-03 diff --git a/docs/dev/logs/2011-03-07 b/doc/dev/logs/2011-03-07 similarity index 100% rename from docs/dev/logs/2011-03-07 rename to doc/dev/logs/2011-03-07 diff --git a/docs/dev/logs/2011-03-09 b/doc/dev/logs/2011-03-09 similarity index 100% rename from docs/dev/logs/2011-03-09 rename to doc/dev/logs/2011-03-09 diff --git a/docs/dev/logs/2011-03-15 b/doc/dev/logs/2011-03-15 similarity index 100% rename from docs/dev/logs/2011-03-15 rename to doc/dev/logs/2011-03-15 diff --git a/docs/dev/logs/2011-03-15.file_directory_link b/doc/dev/logs/2011-03-15.file_directory_link similarity index 100% rename from docs/dev/logs/2011-03-15.file_directory_link rename to doc/dev/logs/2011-03-15.file_directory_link diff --git a/docs/dev/logs/2011-03-23.autorequire b/doc/dev/logs/2011-03-23.autorequire similarity index 100% rename from docs/dev/logs/2011-03-23.autorequire rename to doc/dev/logs/2011-03-23.autorequire diff --git a/docs/dev/logs/2011-03-23.manifest_use_explorer b/doc/dev/logs/2011-03-23.manifest_use_explorer similarity index 100% rename from docs/dev/logs/2011-03-23.manifest_use_explorer rename to doc/dev/logs/2011-03-23.manifest_use_explorer diff --git a/docs/dev/logs/2011-03-27.pgrep b/doc/dev/logs/2011-03-27.pgrep similarity index 100% rename from docs/dev/logs/2011-03-27.pgrep rename to doc/dev/logs/2011-03-27.pgrep diff --git a/docs/dev/logs/2011-03-28.execution-order b/doc/dev/logs/2011-03-28.execution-order similarity index 100% rename from docs/dev/logs/2011-03-28.execution-order rename to doc/dev/logs/2011-03-28.execution-order diff --git a/docs/dev/logs/2011-04-02.yum b/doc/dev/logs/2011-04-02.yum similarity index 100% rename from docs/dev/logs/2011-04-02.yum rename to doc/dev/logs/2011-04-02.yum diff --git a/docs/dev/logs/2011-04-04.openbsd b/doc/dev/logs/2011-04-04.openbsd similarity index 100% rename from docs/dev/logs/2011-04-04.openbsd rename to doc/dev/logs/2011-04-04.openbsd diff --git a/docs/dev/logs/2011-04-19 b/doc/dev/logs/2011-04-19 similarity index 100% rename from docs/dev/logs/2011-04-19 rename to doc/dev/logs/2011-04-19 diff --git a/docs/dev/logs/2011-04-21.benchmark-from-home.with-stdout b/doc/dev/logs/2011-04-21.benchmark-from-home.with-stdout similarity index 100% rename from docs/dev/logs/2011-04-21.benchmark-from-home.with-stdout rename to doc/dev/logs/2011-04-21.benchmark-from-home.with-stdout diff --git a/docs/dev/logs/2011-04-27 b/doc/dev/logs/2011-04-27 similarity index 100% rename from docs/dev/logs/2011-04-27 rename to doc/dev/logs/2011-04-27 diff --git a/docs/dev/logs/2011-05-09 b/doc/dev/logs/2011-05-09 similarity index 100% rename from docs/dev/logs/2011-05-09 rename to doc/dev/logs/2011-05-09 diff --git a/docs/dev/logs/2011-05-10 b/doc/dev/logs/2011-05-10 similarity index 100% rename from docs/dev/logs/2011-05-10 rename to doc/dev/logs/2011-05-10 diff --git a/docs/dev/logs/2011-05-10.benchmark b/doc/dev/logs/2011-05-10.benchmark similarity index 100% rename from docs/dev/logs/2011-05-10.benchmark rename to doc/dev/logs/2011-05-10.benchmark diff --git a/docs/dev/logs/2011-05-12 b/doc/dev/logs/2011-05-12 similarity index 100% rename from docs/dev/logs/2011-05-12 rename to doc/dev/logs/2011-05-12 diff --git a/docs/dev/logs/2011-06-13.installation-via-cdist b/doc/dev/logs/2011-06-13.installation-via-cdist similarity index 100% rename from docs/dev/logs/2011-06-13.installation-via-cdist rename to doc/dev/logs/2011-06-13.installation-via-cdist diff --git a/docs/dev/logs/2011-06-14.library_for_user b/doc/dev/logs/2011-06-14.library_for_user similarity index 86% rename from docs/dev/logs/2011-06-14.library_for_user rename to doc/dev/logs/2011-06-14.library_for_user index 325150e2..5c0eb6f0 100644 --- a/docs/dev/logs/2011-06-14.library_for_user +++ b/doc/dev/logs/2011-06-14.library_for_user @@ -17,3 +17,6 @@ run_code_from_user() load_lib . file_from_user } + +Introduce global variables: + __cdist_target_host diff --git a/doc/dev/logs/2011-06-14.timing b/doc/dev/logs/2011-06-14.timing new file mode 100644 index 00000000..dcfd4884 --- /dev/null +++ b/doc/dev/logs/2011-06-14.timing @@ -0,0 +1,6 @@ +ikq04: + +cdist-deploy-to ikq04.ethz.ch 35.44s user 30.65s system 34% cpu 3:11.45 total # also migrate cdist-object-gencode +cdist-deploy-to ikq04.ethz.ch 23.56s user 22.44s system 35% cpu 2:09.78 total # ../bin/cdist-object-all -> __cdist_object_all +cdist-deploy-to ikq04.ethz.ch 17.35s user 16.83s system 30% cpu 1:53.69 total # bin/cdist-object-manifest-run -> core/__cdist_object_manifest_run +cdist-deploy-to ikq04.ethz.ch 19.76s user 23.58s system 35% cpu 2:03.33 total # ../core/__cdist_manifest_run_init diff --git a/doc/dev/logs/2011-06-17.design-ideas b/doc/dev/logs/2011-06-17.design-ideas new file mode 100644 index 00000000..26845360 --- /dev/null +++ b/doc/dev/logs/2011-06-17.design-ideas @@ -0,0 +1,9 @@ +Should __run_remote be used or should the workflow more be +"I'm working here, part of it is executed remote?" + +Indirect call to functions like __cdist_remote_explorer_run are +partly hard to debug / think about. + +Setting up variables is needed for non-core (i.e. explorers) + + diff --git a/doc/dev/logs/2011-06-21.execute_remote b/doc/dev/logs/2011-06-21.execute_remote new file mode 100644 index 00000000..a9c88df2 --- /dev/null +++ b/doc/dev/logs/2011-06-21.execute_remote @@ -0,0 +1,61 @@ +Steven, Nico: + +Problem: + How to execute a function instead of binary + +Solutions: + + 1) + ( + cat $lib/* + cat bin/cdist-config + echo $function $args + ) | ssh foo + + Works partly, does not work for export = ... + Needs to copy over lib every time again! + + 2) + scp $dir/lib.sh root@foo:/tmp/lib.sh + cat << DONE | ssh root@foo sh + source /tmp/lib.sh + export foo=bla + function args + DONE + + Caches lib directory + + 3) follow up to 1) + __run_remote() + { + cat << eof | ssh foo + + . /cdist-config + "$@" # NOT USABLE, no export = export = lines possible! + + eof + + 4) final solution + - write for every remote job a new function + - this functions prepares env + reuses ssh header + + __cdist_remote_explorer() + { + cat << eof + $__cdist_remote_header + export foo1=bar + export foo2=bar + export foo3=bar + + "$@" + eof | __cdist_ssh + } + + +Problems found and solved: + + - remote shell cannot work due to multi line variable export + - caching library directory with scp + - create function for every remote action + -> prepares environment + diff --git a/docs/dev/logs/README b/doc/dev/logs/README similarity index 100% rename from docs/dev/logs/README rename to doc/dev/logs/README diff --git a/docs/dev/logs/linklist b/doc/dev/logs/linklist similarity index 100% rename from docs/dev/logs/linklist rename to doc/dev/logs/linklist diff --git a/docs/dev/logs/times b/doc/dev/logs/times similarity index 100% rename from docs/dev/logs/times rename to doc/dev/logs/times diff --git a/doc/dev/releasechecklist b/doc/dev/releasechecklist new file mode 100755 index 00000000..fef1f53b --- /dev/null +++ b/doc/dev/releasechecklist @@ -0,0 +1,35 @@ +#!/bin/sh -e + +files="bin/cdist-config doc/changelog" + +# Stuff to take care of when doing a release +echo "Preparing next release" + +# Ensure documentation builds cleanly +./build.sh clean && ./build.sh man + +# get version +version=$(awk -F'=' '/^__cdist_version/ { print $2 }' bin/cdist-config | sed 's/"//g') + +# get target branch +branch=${version%.?} + +# adjust version and release date +vi $files + +# Commit stuff +git commit $files + +# add tag +printf "Enter description for %s>" "$version" +read tagmessage +git tag "$version" -m "$tagmessage" + +# Import into current version branch +git checkout $branch +git merge master +git checkout master + +# Publish manpages and sourcecode +./build.sh web +./build.sh pub diff --git a/cdist/conf/explorer/machine b/doc/dev/show_all_exported_variables similarity index 81% rename from cdist/conf/explorer/machine rename to doc/dev/show_all_exported_variables index 7ecb67e3..18acceca 100755 --- a/cdist/conf/explorer/machine +++ b/doc/dev/show_all_exported_variables @@ -1,6 +1,6 @@ #!/bin/sh # -# 2010-2011 Andi Brönnimann (andi-cdist at v-net.ch) +# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -18,10 +18,8 @@ # along with cdist. If not, see . # # -# All os variables are lower case -# +# Generate documentation of exported variables # -if command -v uname >/dev/null 2>&1 ; then - uname -m -fi + +cat bin/* | awk '/^export/ { print $2 }' diff --git a/cdist/conf/type/__git/explorer/state b/doc/dev/sync-to-testhost similarity index 77% rename from cdist/conf/type/__git/explorer/state rename to doc/dev/sync-to-testhost index e0719579..cc59eb8d 100755 --- a/cdist/conf/type/__git/explorer/state +++ b/doc/dev/sync-to-testhost @@ -1,6 +1,6 @@ #!/bin/sh # -# 2012 Nico Schottelius (nico-cdist at schottelius.org) +# 2011 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -18,13 +18,11 @@ # along with cdist. If not, see . # # -# Check whether repository exists +# Sync repo to testhosts # -destination="/$__object_id/.git" +dirs="cdist cdist-nutzung" -if [ -d "$destination" ]; then - echo present -else - echo absent -fi +for dir in $dirs; do + rsync -av --delete /home/users/nico/p/$dir/ root@rnic01:$dir +done diff --git a/doc/dev/todo/TAKEME b/doc/dev/todo/TAKEME new file mode 100644 index 00000000..8670c8f1 --- /dev/null +++ b/doc/dev/todo/TAKEME @@ -0,0 +1,71 @@ +UNASSIGNED TODOS +---------------- +The following list of todos has not been assigned to any developer. +Feel free to pick one! + +CORE +---- +- Fix warnings / __cdist_usage in core/* + -> __cdist_usage prints $0! not function name! +- Inconsistent error messages if object is not existing! + -> always use "Object undefined" +- Add echo function / beautify output + __cdist_echo [level] [messages...] + level := syslog alike: + debug, notice, err + Include object_self prefixing, if given! +- Think about moving cdist-type-build-emulation out of cdist-manifest-run to + cdist-deploy-to: more dependency of cdist-manifest-run, but a lot of + less cycles consumed + +- cdist-object-gencode: remove code if output empty? + - also take care of that in cdist-code-run! +- Remove cdist-object-push, covers only one line and is used only once: + [20:22] kr:bin% grep cdist-object-push * + cdist-object-run: cdist-object-push "$__cdist_target_host" "$__cdist_object" + [20:22] kr:bin% + +- probably remove or improve cdist-type-template +- add $__tmp? + - for use in manifest, code, etc.? + - for creating temporary files, etc. + +- How to cleanly implement "restart service if config file changed" + +- Cache + - add example how to use + - export variable $__cache + -> for current host + -> add function to cdist-config, import from cdist-cache + +- check all all internal variables are prefixed with __cdist +- Define / document "this is what should be on host X" + and have it parsable by different (shinken) tool + -> given after manifest run already! + +- Allow types to have parameters without values (boolean flags). + e.g. __chair fancychair --pink --wood + would result in: + $__object/parameter/ + pink # empty file + wood # empty file + +- allow cdist to run without $PATH setup: ./bin/cdist-deploy-to + +TYPES +------ +- __ssh-keys (host/user) +- __file_edit + - regexp replace (can probably cover all?) + -> aka sed. +- __cron +- __user + add option to include --create-home + +DOCUMENTATION +-------------- +- asciidoc interprets __, which we use for variables + names -> seek through docs and replace with \_\_! +- reference explorers in cdist-reference! +- compare running times: + one, 5, 10, 50, 100, 1000 hosts => how does cdist scale? diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext new file mode 100644 index 00000000..cd4f8e70 --- /dev/null +++ b/doc/dev/todo/niconext @@ -0,0 +1,38 @@ +BUG in core/__cdist_object_run: each recursive call overwrites the variables! + +-------------------------------------------------------------------------------- + +Bug with requirements when indirect requires is scheduled late: + +__package/collectd: Generating local code +__package/collectd: Generating remote code +__package/collectd: Transferring object +__package/collectd: Checking code-local +__package/collectd: Checking code-remote +__file/etc/collectd/collectd.conf: Generating local code +__file/etc/collectd/collectd.conf: Generating remote code +__file/etc/collectd/collectd.conf: Transferring object +__file/etc/collectd/collectd.conf: Checking code-local +__file/etc/collectd/collectd.conf: Executing code-local +scp: /etc/collectd/collectd.conf: No such file or directory +__file/etc/collectd/collectd.conf: Error: /tmp/cdist.PYKFWmj9QknE/out/object/__file/etc/collectd/collectd.conf/.cdist/code-local exited non-zero +__file/etc/collectd/collectd.conf: Warning: Faulty code: +# +# The following code was generated by /home/users/nico/oeffentlich/rechner/projekte/cdist-nutzung/conf/type/__file/gencode-local +# + +scp /home/users/nico/oeffentlich/rechner/projekte/cdist-nutzung/conf/type/__ethz_collectd/files/collectd.conf.client root@shrek08:/etc/collectd/collectd.conf +__file/etc/collectd/collectd.conf: Error: Aborting due to non-zero exit code. + +-------------------------------------------------------------------------------- + +Bad error reporting in functions: + +[15:15] ikn:cdist-nutzung% cdist-deploy-to ikn +core: cdist 1.8.0: Configuring ikn +core: Creating clean directory structure +core: Transferring cdist binaries/functions to the target host +core: Running global explorers +core: Running initial manifest for ikn +core: Error: cdist-deploy-to: No arguments + diff --git a/doc/dev/todo/performance-ideas b/doc/dev/todo/performance-ideas new file mode 100644 index 00000000..bbbfe427 --- /dev/null +++ b/doc/dev/todo/performance-ideas @@ -0,0 +1,6 @@ +- Migrate scripts from bin/* to functions in bin/cdist-deploy-to +- Use one pipe-shell for type execution +- Parallelise gencode and code-run of all objects +- Diff against local cache only instead of real target +- Use only one ssh session? + - Can be indirectly improved via ssh config already! diff --git a/cdist/conf/type/__daemontools_service/parameter/default/run b/doc/dev/todo/steven similarity index 100% rename from cdist/conf/type/__daemontools_service/parameter/default/run rename to doc/dev/todo/steven diff --git a/docs/gfx/cdist-automated-inverted.png b/doc/gfx/cdist-automated-inverted.png similarity index 100% rename from docs/gfx/cdist-automated-inverted.png rename to doc/gfx/cdist-automated-inverted.png diff --git a/docs/gfx/cdist-automated.png b/doc/gfx/cdist-automated.png similarity index 100% rename from docs/gfx/cdist-automated.png rename to doc/gfx/cdist-automated.png diff --git a/docs/gfx/cdist-automated.text b/doc/gfx/cdist-automated.text similarity index 100% rename from docs/gfx/cdist-automated.text rename to doc/gfx/cdist-automated.text diff --git a/docs/gfx/cdist-logo-inverted.png b/doc/gfx/cdist-logo-inverted.png similarity index 100% rename from docs/gfx/cdist-logo-inverted.png rename to doc/gfx/cdist-logo-inverted.png diff --git a/docs/gfx/cdist-logo.png b/doc/gfx/cdist-logo.png similarity index 100% rename from docs/gfx/cdist-logo.png rename to doc/gfx/cdist-logo.png diff --git a/docs/gfx/cdist-logo.text b/doc/gfx/cdist-logo.text similarity index 100% rename from docs/gfx/cdist-logo.text rename to doc/gfx/cdist-logo.text diff --git a/doc/man/cdist-reference.text.sh b/doc/man/cdist-reference.text.sh new file mode 100755 index 00000000..90efc0f8 --- /dev/null +++ b/doc/man/cdist-reference.text.sh @@ -0,0 +1,200 @@ +#!/bin/sh +# +# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# +# Generate manpage that lists available types +# + +__cdist_pwd="$(pwd -P)" +__cdist_mydir="${0%/*}"; +__cdist_abs_mydir="$(cd "$__cdist_mydir" && pwd -P)" +__cdist_myname=${0##*/}; +__cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" + +filename="${__cdist_myname%.sh}" +dest="$__cdist_abs_mydir/man7/$filename" + +cd "$__cdist_abs_mydir" + +exec > "$dest" +cat << eof +cdist-reference(7) +================== +Nico Schottelius + +NAME +---- +cdist-reference - Variable, path and type reference for cdist + + +EXPLORERS +--------- +The following global explores are available: + +eof +( + cd ../../conf/explorer + for explorer in *; do + echo "- $explorer" + done +) + +cat << eof + +PATHS +----- +If not specified otherwise, all paths are relative to the checkout directory. + +conf/:: + Contains the (static) configuration like manifests, types and explorers. + +conf/manifest/init:: + This is the central entry point used by cdist-manifest-init(1). + It is an executable (+x bit set) shell script that can use + values from the explorers to decide which configuration to create + for the specified target host. + It should be primary used to define mapping from configurations to hosts. + +conf/manifest/*:: + All other files in this directory are not directly used by cdist, but you + can seperate configuration mappings, if you have a lot of code in the + manifest/init file. This may also be very helpful to have different admins + maintain different groups of hosts. + +conf/explorer/:: + Contains explorers to be run on the target hosts, see cdist-explorer(7). + +conf/type/:: + Contains all available types, which are used to provide + some kind of functionality. See cdist-type(7). + +conf/type//:: + Home of the type . + + This directory is referenced by the variable __type (see below). + +conf/type//man.text:: + Manpage in Asciidoc format (nequired for inclusion into upstream) + +conf/type//manifest:: + Used to generate additional objects from a type. + +conf/type//gencode-local:: + Used to generate code to be executed on the server. + +conf/type//gencode-remote:: + Used to generate code to be executed on the client. + +conf/type//parameters/required:: + Parameters required by type, \n seperated list. + +conf/type//parameters/optional:: + Parameters optionally accepted by type, \n seperated list. + +conf/type//explorer:: + Location of the type specific explorers. + This directory is referenced by the variable __type_explorer (see below). + See cdist-explorer(7). + +out/:: + This directory contains output of cdist and is usually located + in a temporary directory and thus will be removed after the run. + This directory is referenced by the variable __global (see below). + +out/explorer:: + Output of general explorers. + +out/object:: + Objects created for the host. + +out/object/:: + Contains all object specific information. + This directory is referenced by the variable __object (see below). + +out/object//explorers:: + Output of type specific explorers, per object. + +tmp_dir:: + A tempdir and a tempfile is used by cdist internally, + which will be removed when the scripts end automatically. + See cdist-config(1). + +TYPES +----- +The following types are available: + +eof + +for type in man7/cdist-type__*.text; do + no_dir="${type#man7/}"; + no_type="${no_dir#cdist-type}"; + name="${no_type%.text}"; + name_no_underline="$(echo $name | sed 's/^__/\\__/g')" + man="${no_dir%.text}(7)" + + echo "- $name_no_underline" "($man)" +done + +cat << eof + + +ENVIRONMENT VARIABLES +--------------------- +__explorer:: + Directory that contains all global explorers. + Available for: explorer +__manifest:: + Directory that contains the initial manifest. + Available for: initial manifest +__global:: + Directory that contains generic output like explorer. + Available for: initial manifest, type manifest, type explorer, type codegen +__object:: + Directory that contains the current object. + Available for: type manifest, type explorer, type codegen +__object_id:: + The type unique object id. + Available for: type manifest, type explorer, type codegen +__self:: + The full qualified name of the current object. + Available for: type manifest, type explorer, type codegen +__target_host:: + The host we are deploying to. + Available for: initial manifest, type manifest, type codegen +__target_user:: + User to use for authentication on remote host. + Currently static in core. +__type:: + Path to the current type. + Available for: type manifest +__type_explorer:: + Directory that contains the type explorers. + Available for: type explorer + + +SEE ALSO +-------- +- cdist(7) + + +COPYING +------- +Copyright \(C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). +eof diff --git a/doc/man/man1/cdist-cache.text b/doc/man/man1/cdist-cache.text new file mode 100644 index 00000000..54619199 --- /dev/null +++ b/doc/man/man1/cdist-cache.text @@ -0,0 +1,31 @@ +cdist-cache(1) +============== +Nico Schottelius + + +NAME +---- +cdist-cache - Cache output of last run + + +SYNOPSIS +-------- +cdist-cache TARGET_HOST + + +DESCRIPTION +----------- +cdist-cache moves away the objects created during last run so the +next run can use the previous information and compare them with +the current status. + + +SEE ALSO +-------- +cdist(7) + + +COPYING +------- +Copyright \(C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/doc/man/man1/cdist-code-run.text b/doc/man/man1/cdist-code-run.text new file mode 100644 index 00000000..e5d8c976 --- /dev/null +++ b/doc/man/man1/cdist-code-run.text @@ -0,0 +1,34 @@ +cdist-code-run(1) +================= +Nico Schottelius + + +NAME +---- +cdist-code-run - Run explorer remotely + + +SYNOPSIS +-------- +cdist-code-run OBJECT_DIR OBJECT TYPE + + +DESCRIPTION +----------- +cdist-code-run executes generated code from a given OBJECT. +The OBJECT must be located below OBJECT_DIR. +TYPE must be either local or remote and determines which +code part is to be executed. + + +SEE ALSO +-------- +- cdist(7) +- cdist-object-gencode(1) +- cdist-object-gencode-all(1) + + +COPYING +------- +Copyright \(C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/doc/man/man1/cdist-config.text b/doc/man/man1/cdist-config.text new file mode 100644 index 00000000..0c8b0735 --- /dev/null +++ b/doc/man/man1/cdist-config.text @@ -0,0 +1,48 @@ +cdist-config(1) +=============== +Nico Schottelius + + +NAME +---- +cdist-config - Read basic cdist configuration + + +DESCRIPTION +----------- +Cdist-config is sourced by cdist programs and provides hints on where to find +types, manifests, etc. Generally speaking, it's just usable from within the +core and is only of interest for cdist-developers. + + +ENVIRONMENT VARIABLES +--------------------- +The following list contains environment variables that are known +to be changed by users in various situations. To change the variable, +use your current shell and export it, so all cdist-binaries know about it. + +__cdist_tmp_base_dir:: + Normally this points to /tmp. In case /tmp is not suitable for + cdist (i.e. has noexec flag setup) you can change this variable + to point to a better location. + + +EXAMPLES +-------- + +If /tmp has the noexec flag, you can use $HOME/.tmp for instance: + +-------------------------------------------------------------------------------- +export __cdist_tmp_base_dir=$HOME/.tmp +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +cdist(7) + + +COPYING +------- +Copyright \(C) 2010-2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/doc/man/man1/cdist-deploy-to.text b/doc/man/man1/cdist-deploy-to.text new file mode 100644 index 00000000..f42a0509 --- /dev/null +++ b/doc/man/man1/cdist-deploy-to.text @@ -0,0 +1,43 @@ +cdist-deploy-to(1) +================== +Nico Schottelius + + +NAME +---- +cdist-deploy-to - Deploy configuration to host + + +SYNOPSIS +-------- +cdist-deploy-to HOSTNAME + + +DESCRIPTION +----------- +Deploy configurations to the specified host, as configured in the initial +manifest. This script triggers the execution of several other scripts, in so +called stages. It is intented to run either from the command line or from cron. + + +ENVIRONMENT +----------- +If the environment variable **__cdist_conf_dir** is not set, the +configuration is read from /conf. The local output directory can +be changed by the variable **__cdist_local_base_dir**. All environment +variables are handled by cdist-config. + + +SEE ALSO +-------- +- cdist(7) +- cdist-config(1) +- cdist-mass-deploy(1) +- cdist-reference(7) +- cdist-stages(7) + + +COPYING +------- +Copyright \(C) 2010-2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/doc/man/man1/cdist-dir.text b/doc/man/man1/cdist-dir.text new file mode 100644 index 00000000..223bc779 --- /dev/null +++ b/doc/man/man1/cdist-dir.text @@ -0,0 +1,38 @@ +cdist-dir(1) +============ +Nico Schottelius + + +NAME +---- +cdist-dir - Poor man's directory synchronisation + + +SYNOPSIS +-------- +cdist-dir TARGET_HOST SRC_DIR DST_DIR + + +DESCRIPTION +----------- +cdist-dir either pushes a local directory to the target host +or pulls a remote directory from a target host to the local host. + +In the push case SRC_DIR is local, in the pull case remote. +In the push case DST_DIR is remote, in the pull case local. + +cdist-dir does not cleanup DST_DIR and thus it may contain old +stuff if used multiple times. + +cdist-dir does not rely on rsync or other high level tools, because +it cannot expect its existence on the local or target host. + +SEE ALSO +-------- +cdist(7) + + +COPYING +------- +Copyright \(C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/doc/man/man1/cdist-env.text b/doc/man/man1/cdist-env.text new file mode 100644 index 00000000..9a736133 --- /dev/null +++ b/doc/man/man1/cdist-env.text @@ -0,0 +1,49 @@ +cdist-env(1) +============ +Nico Schottelius + + +NAME +---- +cdist-env - Setup environment for using cdist + + +SYNOPSIS +-------- +cdist-env + + +DESCRIPTION +----------- +cdist-env outputs two strings suitable for usage in your current shell, +so you can use cdist from the checkout. cdist-env essentially helps you +to easily setup PATH and MANPATH. + +If you've multiple checkouts of cdist and run cdist-env from the various +checkouts, a new run will prepend the last directory, thus ensures you +can run it multiple times and does what one expects. + +EXAMPLES +-------- +For use in bourne shell variants (like dash, bash, ksh) as well as +in csh variants (csh, tcsh): + +-------------------------------------------------------------------------------- +eval `./bin/cdist-env` +-------------------------------------------------------------------------------- + +For bourne shell, there is also a shorter version: +-------------------------------------------------------------------------------- +. ./bin/cdist-env +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +cdist(7) + + +COPYING +------- +Copyright \(C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/doc/man/man1/cdist-explorer-run-global.text b/doc/man/man1/cdist-explorer-run-global.text new file mode 100644 index 00000000..f4b32dfb --- /dev/null +++ b/doc/man/man1/cdist-explorer-run-global.text @@ -0,0 +1,31 @@ +cdist-explorer-run-global(1) +============================ +Nico Schottelius + + +NAME +---- +cdist-explorer-run-global - Run the global explorers + + +SYNOPSIS +-------- +cdist-explorer-run-global HOSTNAME + + +DESCRIPTION +----------- +Transfer the global explorers to HOSTNAME, execute them and transfer +back the results. + + +SEE ALSO +-------- +- cdist(7) +- cdist-deploy-to(1) + + +COPYING +------- +Copyright \(C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/doc/man/man1/cdist-manifest-run-init.text b/doc/man/man1/cdist-manifest-run-init.text new file mode 100644 index 00000000..3a3265dc --- /dev/null +++ b/doc/man/man1/cdist-manifest-run-init.text @@ -0,0 +1,32 @@ +cdist-manifest-run-init(1) +========================== +Nico Schottelius + + +NAME +---- +cdist-manifest-run-init - Run the initial manifest + + +SYNOPSIS +-------- +cdist-manifest-run-init HOSTNAME + + +DESCRIPTION +----------- +cdist-manifest-run-init executes the initial manifest, which creates +the first objects. + + +SEE ALSO +-------- +- cdist(7) +- cdist-deploy-to(1) +- cdist-manifest-run-all(1) + + +COPYING +------- +Copyright \(C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/doc/man/man1/cdist-manifest-run.text b/doc/man/man1/cdist-manifest-run.text new file mode 100644 index 00000000..8cd6b513 --- /dev/null +++ b/doc/man/man1/cdist-manifest-run.text @@ -0,0 +1,31 @@ +cdist-manifest-run(1) +===================== +Nico Schottelius + + +NAME +---- +cdist-manifest-run - Run a given manifest + + +SYNOPSIS +-------- +cdist-manifest-run HOSTNAME MANIFEST + + +DESCRIPTION +----------- +cdist-manifest-run executes the given MANIFEST. + + +SEE ALSO +-------- +- cdist(7) +- cdist-deploy-to(1) +- cdist-manifest-run-init(1) + + +COPYING +------- +Copyright \(C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/doc/man/man1/cdist-mass-deploy.text b/doc/man/man1/cdist-mass-deploy.text new file mode 100644 index 00000000..ac495b21 --- /dev/null +++ b/doc/man/man1/cdist-mass-deploy.text @@ -0,0 +1,41 @@ +cdist-mass-deploy(1) +==================== +Nico Schottelius + + +NAME +---- +cdist-mass-deploy - Deploy configuration to many hosts + + +SYNOPSIS +-------- +cdist-mass-deploy [-p] HOSTNAME [HOSTNAME ...] + + +DESCRIPTION +----------- +cdist-mass-deploy is essentially a wrapper around cdist-deploy-to to +be able to deploy to many hosts on one command line. + + +EXAMPLES +-------- +Deploy in parallel to all hosts specfied in the dsh group configuration ikr, +which is prefixed by "root@": + +-------------------------------------------------------------------------------- +cdist-mass-deploy -p $(cat ~/.dsh/group/ikr | sed 's/^root@//') +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist(7) +- cdist-deploy-to(1) + + +COPYING +------- +Copyright \(C) 2010-2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/doc/man/man1/cdist-object-all.text b/doc/man/man1/cdist-object-all.text new file mode 100644 index 00000000..06d45268 --- /dev/null +++ b/doc/man/man1/cdist-object-all.text @@ -0,0 +1,31 @@ +cdist-object-all(1) +=================== +Steven Armstrong + + +NAME +---- +cdist-object-all - Run the given command on all objects + + +SYNOPSIS +-------- +cdist-object-all HOSTNAME COMMAND + + +DESCRIPTION +----------- +Iterates over all defined objects and executes the given command on each +of them. + + +SEE ALSO +-------- +- cdist(7) +- cdist-type(1) + + +COPYING +------- +Copyright \(C) 2011 Steven Armstrong. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/doc/man/man1/cdist-object-code-run.text b/doc/man/man1/cdist-object-code-run.text new file mode 100644 index 00000000..f8bae6a4 --- /dev/null +++ b/doc/man/man1/cdist-object-code-run.text @@ -0,0 +1,32 @@ +cdist-object-code-run(1) +======================== +Nico Schottelius + + +NAME +---- +cdist-object-code-run - Execute the generated code for a object + + +SYNOPSIS +-------- +cdist-object-code-run HOSTNAME OBJECT + + +DESCRIPTION +----------- +Execute the local and remote code for the given object. + + +SEE ALSO +-------- +- cdist(7) +- cdist-object-run(1) +- cdist-code-run(1) +- cdist-run-remote(1) + + +COPYING +------- +Copyright \(C) 2011 Nico Schottelius, Steven Armstrong. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/doc/man/man1/cdist-object-explorer-run.text b/doc/man/man1/cdist-object-explorer-run.text new file mode 100644 index 00000000..a791681e --- /dev/null +++ b/doc/man/man1/cdist-object-explorer-run.text @@ -0,0 +1,31 @@ +cdist-object-explorer-run(1) +============================ +Nico Schottelius + + +NAME +---- +cdist-object-explorer-run - Run type explorers for a object + + +SYNOPSIS +-------- +cdist-object-explorer-run HOSTNAME OBJECT + + +DESCRIPTION +----------- +Runs the explorers for the given object on the target host. + + +SEE ALSO +-------- +- cdist(7) +- cdist-deploy-to(1) +- cdist-remote-explorer-run(1) + + +COPYING +------- +Copyright \(C) 2011 Nico Schottelius, Steven Armstrong. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/doc/man/man1/cdist-object-gencode-run.text b/doc/man/man1/cdist-object-gencode-run.text new file mode 100644 index 00000000..7705815c --- /dev/null +++ b/doc/man/man1/cdist-object-gencode-run.text @@ -0,0 +1,32 @@ +cdist-object-gencode-run(1) +=========================== +Nico Schottelius + + +NAME +---- +cdist-object-gencode-run - Generate code for a object + + +SYNOPSIS +-------- +cdist-object-gencode-run HOSTNAME OBJECT + + +DESCRIPTION +----------- +For the given object, generate the code for local and remote execution. + + +SEE ALSO +-------- +- cdist(7) +- cdist-code-run(1) +- cdist-object-run(1) +- cdist-object-gencode(1) + + +COPYING +------- +Copyright \(C) 2011 Nico Schottelius, Steven Armstrong. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/doc/man/man1/cdist-object-gencode.text b/doc/man/man1/cdist-object-gencode.text new file mode 100644 index 00000000..83f4b4c1 --- /dev/null +++ b/doc/man/man1/cdist-object-gencode.text @@ -0,0 +1,33 @@ +cdist-object-gencode(1) +======================= +Nico Schottelius + + +NAME +---- +cdist-object-gencode - Generate code for a given object + + +SYNOPSIS +-------- +cdist-object-gencode HOSTNAME OBJECT + + +DESCRIPTION +----------- +For the given object, run the gencode executable. The output of this +executable on stdout will be used by cdist-object-gencode-all(1). + + +SEE ALSO +-------- +- cdist(7) +- cdist-code-run(1) +- cdist-deploy-to(1) +- cdist-object-gencode-all(1) + + +COPYING +------- +Copyright \(C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/doc/man/man1/cdist-object-manifest-run.text b/doc/man/man1/cdist-object-manifest-run.text new file mode 100644 index 00000000..a6f12f78 --- /dev/null +++ b/doc/man/man1/cdist-object-manifest-run.text @@ -0,0 +1,31 @@ +cdist-object-manifest-run(1) +============================ +Nico Schottelius + + +NAME +---- +cdist-object-manifest-run - Run an objects manifest + + +SYNOPSIS +-------- +cdist-object-manifest-run HOSTNAME OBJECT + + +DESCRIPTION +----------- +Run the manifest for the given object. + + +SEE ALSO +-------- +- cdist(7) +- cdist-deploy-to(1) +- cdist-manifest-run(1) + + +COPYING +------- +Copyright \(C) 2011 Nico Schottelius, Steven Armstrong. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/doc/man/man1/cdist-object-prepare.text b/doc/man/man1/cdist-object-prepare.text new file mode 100644 index 00000000..c91a7b2e --- /dev/null +++ b/doc/man/man1/cdist-object-prepare.text @@ -0,0 +1,35 @@ +cdist-object-prepare(1) +======================= +Steven Armstrong + + +NAME +---- +cdist-object-prepare - Prepare an object + + +SYNOPSIS +-------- +cdist-object-prepare HOSTNAME OBJECT + + +DESCRIPTION +----------- +Prepare the given object by running it through stage 3 (object information +retrieval) and stage 4 (run the object manifest). +See related man pages for details. + + +SEE ALSO +-------- +- cdist(7) +- cdist-stages(7) +- cdist-object-explorer-run(1) +- cdist-object-manifest-run(1) +- cdist-type(1) + + +COPYING +------- +Copyright \(C) 2011 Steven Armstrong. Free use of this software is granted +under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/doc/man/man1/cdist-object-push.text b/doc/man/man1/cdist-object-push.text new file mode 100644 index 00000000..4c960eaa --- /dev/null +++ b/doc/man/man1/cdist-object-push.text @@ -0,0 +1,31 @@ +cdist-object-push(1) +==================== +Nico Schottelius + + +NAME +---- +cdist-object-push - Transfer a object to the target host + + +SYNOPSIS +-------- +cdist-object-push HOSTNAME OBJECT + + +DESCRIPTION +----------- +Transfers the given object to the target host. + + +SEE ALSO +-------- +- cdist(7) +- cdist-object-run(1) +- cdist-type(1) + + +COPYING +------- +Copyright \(C) 2011 Nico Schottelius, Steven Armstrong. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/doc/man/man1/cdist-object-run.text b/doc/man/man1/cdist-object-run.text new file mode 100644 index 00000000..fc85a05f --- /dev/null +++ b/doc/man/man1/cdist-object-run.text @@ -0,0 +1,36 @@ +cdist-object-run(1) +=================== +Steven Armstrong + + +NAME +---- +cdist-object-run - Run an object + + +SYNOPSIS +-------- +cdist-object-run HOSTNAME OBJECT + + +DESCRIPTION +----------- +Applies the given object on the target host by running it through stage 5 +(code generation) and stage 6 (code execution). +See related man pages for details. + + +SEE ALSO +-------- +- cdist(7) +- cdist-stages(7) +- cdist-object-gencode-run(1) +- cdist-object-push(1) +- cdist-object-code-run(1) +- cdist-type(1) + + +COPYING +------- +Copyright \(C) 2011 Steven Armstrong. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/doc/man/man1/cdist-quickstart.text b/doc/man/man1/cdist-quickstart.text new file mode 100644 index 00000000..087fd2d5 --- /dev/null +++ b/doc/man/man1/cdist-quickstart.text @@ -0,0 +1,47 @@ +cdist-quickstart(1) +=================== +Nico Schottelius + +NAME +---- +cdist-quickstart - Make use of cinit in 5 minutes + + +SYNOPSIS +-------- +cdist-quickstart + + +DESCRIPTION +----------- +cdist-quickstart is an interactive guide to cdist. It should be one +of the first tools you use when you begin with cdist. + + +EXAMPLES +-------- +To use cdist-quickstart, add the bin directory to your PATH, execute +cdist-quickstart and enjoy cdist: + +-------------------------------------------------------------------------------- +# Bourne shell example +export PATH=$(pwd -P)/bin:$PATH + +# Alternatively, usable for csh and bsh, set's up PATH and MANPATH +eval `./bin/cdist-env` + +# Let's go! +cdist-quickstart +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist(7) +- cdist-env(1) + + +COPYING +------- +Copyright \(C) 2010-2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/doc/man/man1/cdist-remote-explorer-run.text b/doc/man/man1/cdist-remote-explorer-run.text new file mode 100644 index 00000000..64951e2c --- /dev/null +++ b/doc/man/man1/cdist-remote-explorer-run.text @@ -0,0 +1,33 @@ +cdist-remote-explorer-run(1) +============================ +Nico Schottelius + + +NAME +---- +cdist-remote-explorer-run - Run explorer remotely + + +SYNOPSIS +-------- +cdist-remote-explorer-run VARIABLE_NAME EXPLORER_DIR OUT_DIR + + +DESCRIPTION +----------- +cdist-remote-explorer-run is executed on the target. +It sets up the variable VARIABLE_NAME to point to the given +EXPLORER_DIR and runs all explorer found in EXPLORER_DIR. +The output of every run explorer is saved into OUT_DIR. + + +SEE ALSO +-------- +- cdist(7) +- cdist-explorer-run-global(1) + + +COPYING +------- +Copyright \(C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/doc/man/man1/cdist-run-remote.text b/doc/man/man1/cdist-run-remote.text new file mode 100644 index 00000000..ee7a6337 --- /dev/null +++ b/doc/man/man1/cdist-run-remote.text @@ -0,0 +1,33 @@ +cdist-run-remote(1) +=================== +Nico Schottelius + + +NAME +---- +cdist-run-remote - Execute something on the target + + +SYNOPSIS +-------- +cdist-run-remote HOSTNAME EXECUTABLE [ARGUMENTS FOR EXECUTABLE] + + +DESCRIPTION +----------- +cdist-run-remote runs the given executable on the remote host. +It ensures PATH is setup correctly on the target side. + + +SEE ALSO +-------- +- cdist(7) +- cdist-object-code-run(1) +- cdist-deploy-to(1) +- cdist-remote-code-run-all(1) + + +COPYING +------- +Copyright \(C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/doc/man/man1/cdist-type-build-emulation.text b/doc/man/man1/cdist-type-build-emulation.text new file mode 100644 index 00000000..81c56e7c --- /dev/null +++ b/doc/man/man1/cdist-type-build-emulation.text @@ -0,0 +1,33 @@ +cdist-type-build-emulation(1) +============================= +Nico Schottelius + + +NAME +---- +cdist-type-build-emulation - Build executables for types + + +SYNOPSIS +-------- +cdist-type-build-emulation OUT_DIR + + +DESCRIPTION +----------- +cdist-type-build-emulation creates a link to cdist-type-emulator +for every TYPE. These links are placed in a OUT_DIR, which +is prepended into $PATH. This way the user can use TYPE in the +manifests like any other executable. + + +SEE ALSO +-------- +- cdist(7) +- cdist-type-emulator(1) + + +COPYING +------- +Copyright \(C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/doc/man/man1/cdist-type-emulator.text b/doc/man/man1/cdist-type-emulator.text new file mode 100644 index 00000000..507c1054 --- /dev/null +++ b/doc/man/man1/cdist-type-emulator.text @@ -0,0 +1,56 @@ +cdist-type-emulator(1) +====================== +Nico Schottelius + + +NAME +---- +cdist-type-emulator - Emulate type and record parameters and dependencies + + +SYNOPSIS +-------- +cdist-type-emulator [TYPE ARGS] + + +DESCRIPTION +----------- +cdist-type-emulator is normally called through a link to it of the +name of a specifc type. It saves the given parameters into +a parameters directory and the requirements into a require file. + +It checks whether the parameters are valid: + +- are required parameter given? +- are all other required parameters specified as optional? + + +EXAMPLES +-------- +Your manifest may contain stuff like this: + + +-------------------------------------------------------------------------------- +__addifnosuchline /tmp/linetest --line "test" + +__motd +-------------------------------------------------------------------------------- + +In both cases, cdist-type-emulator is called instead of a real type. +In the first case, the object id "/tmp/linetest" is recorded and the +parameter "line" stored with the content "test". + +In the second case, __motd must be decleared as a singleton, as the +object id is missing. + + +SEE ALSO +-------- +- cdist(7) +- cdist-type-build-emulation(1) + + +COPYING +------- +Copyright \(C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/doc/man/man1/cdist-type-template.text b/doc/man/man1/cdist-type-template.text new file mode 100644 index 00000000..bbd31409 --- /dev/null +++ b/doc/man/man1/cdist-type-template.text @@ -0,0 +1,30 @@ +cdist-type-template(1) +====================== +Nico Schottelius + + +NAME +---- +cdist-type-template - Create a new type + + +SYNOPSIS +-------- +cdist-type-template NAME + + +DESCRIPTION +----------- +cdist-type-template creates a new type and adds the usual files to it. +It is thought to be helpful when writing new types. + + +SEE ALSO +-------- +cdist(7) + + +COPYING +------- +Copyright \(C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/doc/man/man7/cdist-best-practice.text b/doc/man/man7/cdist-best-practice.text new file mode 100644 index 00000000..5ec01d5f --- /dev/null +++ b/doc/man/man7/cdist-best-practice.text @@ -0,0 +1,150 @@ +cdist-best-practice(7) +====================== +Nico Schottelius + +NAME +---- +cdist-best-practice - Practices used in real environments + + +PASSWORDLESS CONNECTIONS +------------------------ +It is recommended to run cdist with public key authentication. +This requires a private/public key pair and the entry +"PermitRootLogin without-password" in the sshd server. +See sshd_config(5) and ssh-keygen(1). + + +SPEEDING UP SSH CONNECTIONS +--------------------------- +When connecting to a new host, the initial delay with ssh connections +is pretty big. You can work around this by +"sharing of multiple sessions over a single network connection" +(quote from ssh_config(5)). The following code is suitable for +inclusion into your ~/.ssh/config: + +-------------------------------------------------------------------------------- +Host * + ControlPath ~/.ssh/master-%l-%r@%h:%p + ControlMaster auto + ControlPersist 10 +-------------------------------------------------------------------------------- + + +MULTI MASTER OR ENVIRONMENT SETUPS +---------------------------------- +If you plan to distribute cdist among servers or use different +environments, you can do so easily with the included version +control git. For instance if you plan to use the typical three +environments production, integration and development, you can +realise this with git branches: + +-------------------------------------------------------------------------------- +# Go to cdist checkout +cd /path/to/cdist + +# Create branches +git branch development +git branch integration +git branch production + +# Make use of a branch, for instance production +git checkout production +-------------------------------------------------------------------------------- + +Similar if you want to have cdist checked out at multiple machines, +you can clone it multiple times: + +-------------------------------------------------------------------------------- +machine-a % git clone git://your-git-server/cdist +machine-b % git clone git://your-git-server/cdist +-------------------------------------------------------------------------------- + +SEPERATING WORK BY GROUPS +------------------------- +If you are working with different groups on one cdist-configuration, +you can delegate to other manifests and have the groups edit only +their manifests. You can use the following snippet in +**conf/manifests/init**: + +-------------------------------------------------------------------------------- +# Include other groups +sh -e "$__manifest/systems" + +sh -e "$__manifest/cbrg" +-------------------------------------------------------------------------------- + + +MAINTAINING MULTIPLE CONFIGURATIONS +----------------------------------- +When you need to manage multiple sites with cdist, like company_a, company_b +and private for instance, you can easily use git for this purpose. +Including a possible common base that is reused accross the different sites: + +-------------------------------------------------------------------------------- +# create branches +git branch company_a company_b common private + +# make stuff for company a +git checkout company_a +# work, commit, etc. + +# make stuff for company b +git checkout company_b +# work, commit, etc. + +# make stuff relevant for all sites +git checkout common +# work, commit, etc. + +# change to private and include latest common stuff +git checkout private +git merge common +-------------------------------------------------------------------------------- + +The following **.git/config** is taken from a a real world scenario: +-------------------------------------------------------------------------------- +# Track upstream, merge from time to time +[remote "upstream"] + url = git://git.schottelius.org/cdist + fetch = +refs/heads/*:refs/remotes/upstream/* + +# Same as upstream, but works when being offline +[remote "local"] + fetch = +refs/heads/*:refs/remotes/local/* + url = /home/users/nico/p/cdist + +# Remote containing various ETH internal branches +[remote "eth"] + url = sans.ethz.ch:/home/services/sans/git/cdist-eth + fetch = +refs/heads/*:refs/remotes/eth/* + +# Public remote that contains my private changes to cdist upstream +[remote "nico"] + url = git.schottelius.org:/home/services/git/cdist-nico + fetch = +refs/heads/*:refs/remotes/nico/* + +# The "nico" branch will be synced with the remote nico, branch master +[branch "nico"] + remote = nico + merge = refs/heads/master + +# ETH stable contains rock solid configurations used in various places +[branch "eth-stable"] + remote = eth + merge = refs/heads/stable +-------------------------------------------------------------------------------- + +Have a look at git-remote(1) to adjust the remote configuration, which allows +you to push certain branches to certain remotes. + + +SEE ALSO +-------- +- cdist(7) + + +COPYING +------- +Copyright \(C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/doc/man/man7/cdist-explorer.text b/doc/man/man7/cdist-explorer.text new file mode 100644 index 00000000..63c7a5c9 --- /dev/null +++ b/doc/man/man7/cdist-explorer.text @@ -0,0 +1,68 @@ +cdist-explorer(7) +================= +Nico Schottelius + + +NAME +---- +cdist-explorer - Explore the target systems + + +DESCRIPTION +----------- +Explorer are small shell scripts, which will be executed on the target +host. The aim of the explorer is to give hints to types on how to act on the +target system. An explorer outputs the result to stdout, which is usually +a one liner, but may be empty or multi line especially in the case of +type explorers. + +There are general explorers, which are run in an early stage, and +type explorers. Both work almost exactly the same way, with the difference +that the values of the general explorers are stored in a general location and +the type specific below the object. + +Explorers can reuse other explorers on the target system by calling +$__explorer/ (general and type explorer) or +$__type_explorer/ (type explorer). + +In case of significant errors, the explorer may exit non-zero and return an +error message on stderr, which will cause the cdist run to abort. + +You can also use stderr for debugging purposes while developing a new +explorer. + +EXAMPLES +-------- +A very simple explorer may look like this: + +-------------------------------------------------------------------------------- +hostname +-------------------------------------------------------------------------------- + +Which is in practise the "hostname" explorer. + +A type explorer, which could check for the status of a package may look like this: + +-------------------------------------------------------------------------------- +if [ -f "$__object/parameter/name" ]; then + name="$(cat "$__object/parameter/name")" +else + name="$__object_id" +fi + +# Except dpkg failing, if package is not known / installed +dpkg -s "$name" 2>/dev/null || exit 0 +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist(7) +- cdist-reference(7) +- cdist-stages(7) + + +COPYING +------- +Copyright \(C) 2010-2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/doc/man/man7/cdist-hacker.text b/doc/man/man7/cdist-hacker.text new file mode 100644 index 00000000..efd6ef7d --- /dev/null +++ b/doc/man/man7/cdist-hacker.text @@ -0,0 +1,92 @@ +cdist-hacker(7) +=============== +Nico Schottelius + + +NAME +---- +cdist-hacker - How to get (stuff) into cdist + + +WELCOME +------- +Welcome dear hacker! I invite you to a tour of pointers to +get into the usable configuration mangament system, cdist. + +The first thing to know is probably that cdist is brought to +you by people who care about how code looks like and who think +twice before merging or implementing a feature: Less features +with good usability are far better than the opposite. + + +REPORTING BUGS +-------------- +If you believe you've found a bug and verified that it is +in the latest version, drop a mail to the cdist mailing list, +subject prefixed with "[BUG] ". + + +UNDERSTANDING CDIST INTERNALS +----------------------------- +IF you are interested in how cdist internally works, you can open +bin/cdist-config and bin/cdist-deploy-to in your favorite editor and +read the scripts bin/cdist-deploy-to calls. The magnificent HACKERS_README +may be of great help as well. + + +CODING CONVENTIONS (EVERYWHERE) +------------------------------- +If something should be better done or needs to fixed, add the word FIXME +nearby, so grepping for FIXME gives all positions that need to be fixed. + + +CODING CONVENTIONS (CORE) +------------------------- +- All variables exported by cdist are prefixed with a double underscore (__) +- All cdist-internal variables are prefixed with __cdist_ and are generally not exported. + + +HOW TO SUBMIT STUFF FOR INCLUSION INTO UPSTREAM CDIST +----------------------------------------------------- +If you did some cool changes to cdist, which you value as a benefit for +everybody using cdist, you're welcome to propose inclusion into upstream. + +There are though some requirements to ensure your changes don't break others +work nor kill the authors brain: + +- All files should contain the usual header (Author, Copying, etc.) +- Code submission must be done via git +- Do not add conf/manifest/init - This file should only be touched in your + private branch! +- Code to be included should be branched of the upstream "master" branch + - Exception: Bugfixes to a version branch +- Code submissions should be in your master branch + - Other branches are fine as well, but you need to tell me which branch + your work is in! +- If you developed more than **one** feature, consider submitting them in + seperate branches. This way one feature can already be included, even if + the other needs to be improved. + +As soon as your work meets these requirements, you can contact me +(IRC, Mailinglist, Phone, RFC 1149) and I'll check your code before +including it. + + +HOW TO SUBMIT A NEW TYPE +------------------------ +Submitting a type works as described above, with the additional requirement +that a corresponding manpage named man.text in asciidoc format with +the manpage-name "cdist-type__NAME" is included in the type directory +AND asciidoc is able to compile it (i.e. do NOT have to many "=" in the second +line). + + +SEE ALSO +-------- +- cdist(7) + + +COPYING +------- +Copyright \(C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/doc/man/man7/cdist-manifest.text b/doc/man/man7/cdist-manifest.text new file mode 100644 index 00000000..43dd2b6a --- /dev/null +++ b/doc/man/man7/cdist-manifest.text @@ -0,0 +1,80 @@ +cdist-manifest(7) +================= +Nico Schottelius + + +NAME +---- +cdist-manifest - Define types to be used + + +DESCRIPTION +----------- +Manifests exist to define which configurations should be applied to a specific +host as well as to define which configurations should be applied within a +type. Manifests are executed locally and the resulting objects are stored in +an internal database. + +The same object can be redefined in multiple different manifests as long as +the parameters are exactly the same. + +In general, manifests are used to define which types are used depending +on given conditions. + + +EXAMPLE +------- +The initial manifest may for instance contain the following code: + +-------------------------------------------------------------------------------- +# Always create this file, so other sysadmins know cdist is used. +__file /etc/cdist-configured --type file + +case "$__target_host" in + my.server.name) + __file /root/bin/ --type directory + __file /etc/issue.net --type file --source "$__manifest/issue.net + ;; +esac +-------------------------------------------------------------------------------- + +The manifest of the type "nologin" may look like this: + +-------------------------------------------------------------------------------- +__file /etc/nologin --type file --source "$__type/files/default.nologin" +-------------------------------------------------------------------------------- + +DEPENDENCIES +------------ +If you want to describe that something requires something else, just +setup the variable "require" to contain the requirements. Multiple +requirements can be added white space seperated. + + +-------------------------------------------------------------------------------- +# No dependency +__file /etc/cdist-configured + +# Require above object +require="__file/etc/cdist-configured" __link /tmp/cdist-testfile \ + --source /etc/cdist-configured --type symbolic + +# Require two objects +require="__file/etc/cdist-configured __link/tmp/cdist-testfile" \ + __file /tmp/cdist-another-testfile + + +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist-manifest-run(1) +- cdist-manifest-run-init(1) +- cdist-type(7) + + +COPYING +------- +Copyright \(C) 2010-2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/doc/man/man7/cdist-stages.text b/doc/man/man7/cdist-stages.text new file mode 100644 index 00000000..294dffc7 --- /dev/null +++ b/doc/man/man7/cdist-stages.text @@ -0,0 +1,137 @@ +cdist-stages(7) +=============== +Nico Schottelius + +NAME +---- +cdist-stages - Stages used during configuration deployment + + +DESCRIPTION +----------- +Starting the execution of deployment with cdist-deploy-to(1), cdist passes +through different stages, each can be triggered and debugged on its own. +Reading the source of the cdist-deploy-to executable shows the scripts +responsible for each stage. + + +STAGE 0: INTERNAL PREPERATION +----------------------------- +Before running the user facing stages, cdist prepares the target host +to contain cdist binaries and creates a clean environment for the +configuration run. + +Related documentation: + - Source of cdist-deploy-to + + +STAGE 1: TARGET INFORMATION RETRIEVAL +------------------------------------- +In this stage information is collected about the target host using so called +explorers. Every existing explorer is run on the target and the output of all +explorers are copied back into the local cache. The results can be used by +manifests and types. + +Related documentation: + - cdist-explorer-run-global(1) + - cdist-remote-explorer-run(1) + - cdist-explorer(7) + + +STAGE 2: RUN THE INITIAL MANIFEST +--------------------------------- +The initial manifest, which should be used for mappings of hosts to types, +is executed. This stage creates objects in a cconfig database that contains +the objects as defined in the manifest for the specific host. In this stage, +no conflicts may occur, i.e. no object of the same type with the same id may +be created. + +Related documentation: + - cdist-manifest-run-init(1) + - cdist-manifest-run(1) + - cdist-manifest(7) + + +STAGE 3: OBJECT INFORMATION RETRIEVAL +------------------------------------- +Every object is checked whether its type has explorers and if so, these are +transfered to the target host and executed. The results are transfered back +and can be used in the following stages to decide what changes need to be made +on the target to implement the desired state. + +Related documentation: + - cdist-object-explorer-run(1) + - cdist-remote-explorer-run(1) + - cdist-type(7) + - cdist-explorer(7) + + +STAGE 4: RUN THE OBJECT MANIFEST +-------------------------------- +Every object is checked whether its type has a executable manifest. The +manifest script may generate and change the created objects. In other words, +one type can reuse other types. + +For instance the object __apache/www.test.ch is of type __apache, which may +contain a manifest script, which creates new objects of type __file. + +The newly created objects are merged back into the existing tree. No conflicts +may occur during the merge. A conflict would mean that two different objects +try to create the same object, which indicates a broken configuration. + +Related documentation: + - cdist-object-manifest-run(1) + - cdist-manifest-run(1) + - cdist-type(7) + + +STAGE 5: CODE GENERATION +------------------------ +In this stage for every created object its type is checked for executable +gencode scripts. The gencode scripts generate the code to be executed on the +target on stdout. If the gencode executables fail, they must print diagnostic +messages on stderr and exit non-zero. + +Related documentation: + - cdist-object-gencode-run(1) + - cdist-object-gencode(1) + - cdist-type(7) + + +STAGE 6: CODE EXECUTION +----------------------- +For every object the resulting code from the previous stage is transferred to +the target host and executed there to apply the configuration changes. + +Related documentation: + - cdist-object-code-run(1) + - cdist-code-run(1) + + +STAGE 7: CACHE +-------------- +The cache stores the information from the current run for later use. + +Related documentation: + - cdist-cache(1) + + +SUMMARY +------- +If, and only if, all the stages complete without an errors, the configuration +will be applied to the target. Each stage can also be run individually, though +dependencies for each stage must be fulfilled and thus the stages must be run +in correct order. + + +SEE ALSO +-------- +- cdist(7) +- cdist-deploy-to(1) +- cdist-reference(7) + + +COPYING +------- +Copyright \(C) 2010-2011 Nico Schottelius, Steven Armstrong. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/doc/man/man7/cdist-type.text b/doc/man/man7/cdist-type.text new file mode 100644 index 00000000..1af386fb --- /dev/null +++ b/doc/man/man7/cdist-type.text @@ -0,0 +1,214 @@ +cdist-type(7) +============= +Nico Schottelius + + +NAME +---- +cdist-type - Functionality bundled + + +SYNOPSIS +-------- +__TYPE ID --parameter value [--parameter value ...] + +__TYPE --parameter value [--parameter value ...] (for singletons) + + +DESCRIPTION +----------- +Types are the main component of cdist and define functionality. If you +use cdist, you'll write a type for every functionality you would like +to use. + + +HOW TO USE A TYPE +----------------- +You can use types from the initial manifest or the type manifest like a +normal command: + +-------------------------------------------------------------------------------- +# Creates empty file /etc/cdist-configured +__file /etc/cdist-configured --type file + +# Ensure tree is installed +__package tree --state installed +-------------------------------------------------------------------------------- + +Internally cdist-type-emulator(1) will be called from cdist-manifest-run(1) to +save the given parameters into a cconfig database, so they can be accessed by +the manifest and gencode scripts of the type (see below). + +A list of supported types can be found in the cdist-reference(7) manpage. + +SINGLETON TYPES +--------------- +If a type is flagged as a singleton, it may me used only once. This +is useful for types which can be used only once on a system. If a type +can only be used once, it does not take an + +Example: +-------------------------------------------------------------------------------- +# __issue type manages /etc/issue +__issue + +# Probably your own type - singletons may use parameters +__myfancysingleton --colour green +-------------------------------------------------------------------------------- + + + +HOW TO WRITE A NEW TYPE +----------------------- +A type consists of + +- parameter (optional) +- manifest (optional) +- singleton (optional) +- explorer (optional) +- gencode (optional) + +Types are stored below conf/type/. Their name should always be prefixed with +two underscores (__) to prevent collisions with other binaries in $PATH. + +To begin a new type from a template, execute "cdist-type-template __NAME" +and cd conf/type/__NAME. + + +DEFINING PARAMETERS +------------------- +Every type consists of optional and required parameters, which must +be created in a newline seperated file in parameters/required and +parameters/optional. If either or both missing, the type will have +no required, no optional or no parameters at all. + +Example: +-------------------------------------------------------------------------------- +echo servername >> conf/type/__nginx_vhost/parameter/required +echo logdirectory >> conf/type/__nginx_vhost/parameter/optional +-------------------------------------------------------------------------------- + + +WRITING THE MANIFEST +-------------------- +In the manifest of a type you can use other types, so your type extends +their functionality. A good example is the __package type, which in +a shortened version looks like this: + +-------------------------------------------------------------------------------- +os="$(cat "$__global/explorer/os")" +case "$os" in + archlinux) type="pacman" ;; + debian|ubuntu) type="apt" ;; + gentoo) type="emerge" ;; + *) + echo "Don't know how to manage packages on: $os" >&2 + exit 1 + ;; +esac + +__package_$type "$@" +-------------------------------------------------------------------------------- + +As you can see, the type can reference different environment variables, +which are documented in cdist-environment-variables(7). + +Always ensure the manifest is executable, otherwise cdist will not be able +to execute it. + + +SINGLETON - ONLY INSTANCE ONLY +------------------------------ +If you want to ensure that a type can only be used once per target, you can +mark it as a singleton: Just create the (empty) file "singleton" in your type +directory. This will also change the way your type must be called: + +-------------------------------------------------------------------------------- +__YOURTYPE --parameter value +-------------------------------------------------------------------------------- + +As you can see, the ID is omitted, because it does not make any sense, if your +type can be used only once. + + +THE TYPE EXPLORERS +------------------ +If a type needs to explore specific details, it can provide type specific +explorers, which will be executed on the target for every created object. + +The explorers are stored under the "explorer" directory below the type. +It could for instance contain code to check the md5sum of a file on the +client, like this (shortened version from real type __file): + +-------------------------------------------------------------------------------- +if [ -f "$__object/parameter/destination" ]; then + destination="$(cat "$__object/parameter/destination")" +else + destination="/$__object_id" +fi + +if [ -e "$destination" ]; then + md5sum < "$destination" +fi +-------------------------------------------------------------------------------- + + +WRITING THE GENCODE SCRIPT +-------------------------- +There are two gencode scripts: gencode-local and gencode-remote. +The output of gencode-local is executed locally, whereas +the output of gencode-remote is executed on the target. + +The gencode script can make use of the parameters, the global explorers +and the type specific explorers. The output (stdout) of this script is +saved by cdist and will be executed on the target. + +If the gencode script encounters an error, it should print diagnostic +messages to stderr and exit non-zero. If you need to debug the gencode +script, you can write to stderr: + +-------------------------------------------------------------------------------- +# Debug output to stderr +echo "My fancy debug line" >&2 + +# Output to be saved by cdist for execution on the target +echo "touch /etc/cdist-configured" +-------------------------------------------------------------------------------- + + +HINTS FOR TYPEWRITERS +---------------------- +It must be assumed that the target is pretty dumb and thus does not have high +level tools like ruby installed. If a type requires specific tools to be present +on the target, there must be another type that provides this tool and the first +type should create an object of the specific type. + +If your type wants to save temporary data, that may be used by other types +later on (for instance __file), you can save them in the subdirectory +"files" below $__object (but you must create it yourself). cdist will not touch +this directory. + +If your type contains static files, it's also recommended to place them in +a folder named "files" within the type (again, because cdist guarantees to +never ever touch this folder). + +HOW TO INCLUDE A TYPE INTO UPSTREAM CDIST +----------------------------------------- +If you think your type may be useful for others, ensure it works with the +current master branch of cdist and submit the git url containing the type for +inclusion to the mailinglist **cdist at cdist -- at -- l.schottelius.org**. + +Ensure a corresponding manpage named man.text in asciidoc format with +the manpage-name "cdist-type__NAME" is included in the type directory. + + +SEE ALSO +-------- +- cdist-manifest-run(1) +- cdist-stages(7) + + +COPYING +------- +Copyright \(C) 2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/doc/man/man7/cdist.text b/doc/man/man7/cdist.text new file mode 100644 index 00000000..9f7dbbab --- /dev/null +++ b/doc/man/man7/cdist.text @@ -0,0 +1,49 @@ +cdist(7) +======== +Nico Schottelius + + +NAME +---- +cdist - Configuration management system + + +DESCRIPTION +----------- +Cdist is a usable configuration management system. +The easiest way to get started with cdist is to initialise +the environment and run cdist-quickstart: + +-------------------------------------------------------------------------------- +eval `./bin/cdist-env` && cdist-quickstart +-------------------------------------------------------------------------------- + +Cdist configurations are written in the shell scripting language. +The mapping of configurations to hosts is defined in so called manifests, +logical units of functionality are called "types" in cdist jargon. +Cdist ships with some types included. You can use or change them, create new +ones or even submit your types for inclusion into cdist. + +The main command is cdist-deploy-to, which runs several stages to push +configurations to a host. If you want to deeply understand cdist, reading +the source of cdist-deploy-to is recommended. +Cdist currently uses the push approach (a server pushes out the +configuration to the clients), but future version will also support the +pull mechanism (client requests configuration). + + +SEE ALSO +-------- +- Website: http://www.nico.schottelius.org/software/cdist/[] +- cdist-best-practise(7) +- cdist-deploy-to(1) +- cdist-hacker(7) +- cdist-manifest(7) +- cdist-quickstart(1) +- cdist-type(7) + + +COPYING +------- +Copyright \(C) 2010-2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/docs/speeches/.gitignore b/doc/speeches/.gitignore similarity index 100% rename from docs/speeches/.gitignore rename to doc/speeches/.gitignore diff --git a/docs/speeches/2011-03-18_hacker_erwachen.tex b/doc/speeches/2011-03-18_hacker_erwachen.tex similarity index 100% rename from docs/speeches/2011-03-18_hacker_erwachen.tex rename to doc/speeches/2011-03-18_hacker_erwachen.tex diff --git a/docs/speeches/2011-04-27_sans.tex b/doc/speeches/2011-04-27_sans.tex similarity index 100% rename from docs/speeches/2011-04-27_sans.tex rename to doc/speeches/2011-04-27_sans.tex diff --git a/docs/speeches/2011-05-20_cosin.tex b/doc/speeches/2011-05-20_cosin.tex similarity index 100% rename from docs/speeches/2011-05-20_cosin.tex rename to doc/speeches/2011-05-20_cosin.tex diff --git a/docs/video/cdist-installation-in-less-than-60-seconds.mp4 b/doc/video/cdist-installation-in-less-than-60-seconds.mp4 similarity index 100% rename from docs/video/cdist-installation-in-less-than-60-seconds.mp4 rename to doc/video/cdist-installation-in-less-than-60-seconds.mp4 diff --git a/docs/2016-06-06.org b/docs/2016-06-06.org deleted file mode 100644 index 8e3624a8..00000000 --- a/docs/2016-06-06.org +++ /dev/null @@ -1,7 +0,0 @@ -* Enhance cdist speed -** Start separate server with own option -** Reconfigure normal sshd with appropriate options -** Start various own daemons -** Use custom multiplexing protocol -** Support native Python code -*** Use manifest.py instead of manifest if available diff --git a/docs/changelog b/docs/changelog deleted file mode 100644 index 7594a6d4..00000000 --- a/docs/changelog +++ /dev/null @@ -1,1090 +0,0 @@ -Changelog ---------- - -5.1.3: 2019-08-30 - * Build: Overcome bash CDPATH when building docs (Dmitry Bogatov) - * Type __grafana_dashboard: Update distribution name, package signing key URI and repository URI (Dominique Roux) - * Type __letsencrypt_cert: Add Devuan Beowulf support (Nico Schottelius) - * Type __letsencrypt_cert: Fix Devuan Ascii: support (Nico Schottelius) - * Type __docker: Add devuan support (Dominique Roux) - * Type __docker_swarm: Fix for Docker 19.03 (Ľubomír Kučera) - -5.1.2: 2019-06-21 - * Core: Add support for type parameters deprecation (Darko Poljak) - * Type __acl: Rewrite and improve (Ander Punnar) - -5.1.1: 2019-05-28 - * Type __apt_key: Use gpg key, fallback to deprecated apt-key (Ander Punnar) - * Type __acl: Fix and improve (Ander Punnar) - * Documentation: Document type stdin inside loop caveats (Darko Poljak) - -5.1.0: 2019-05-22 - * Type __consul: Add alpine support (Nico Schottelius) - * Type __consul: Add version 1.5.0 (Nico Schottelius) - * Type __consul_agent: Add alpine support (Nico Schottelius) - * New helper script: cdist-new-type (Steven Armstrong, Darko Poljak) - * Core: Add support for deprecated type marker (Darko Poljak) - -5.0.2: 2019-05-17 - * Type __package_apk: Fix @repo handling in explorer (Nico Schottelius) - * Type __postfix: Add alpine support (Nico Schottelius) - * Type __postfix_postconf: Add alpine support (Nico Schottelius) - * Type __user: Add alpine support (Nico Schottelius) - * Core: Set __cdist_dry_run env var (Ander Punnar) - -5.0.1: 2019-05-09 - * Documentation: Add 'Perils of CDIST_ORDER_DEPENDENCY' sub-section (Darko Poljak) - * Build: Clean and separate end user targets into Makefile and maintainer targets into build-helper (Darko Poljak) - * Core: Update residual references to old cdist homepage (Darko Poljak) - * Documentation: Update residual references to old cdist homepage and git source (Darko Poljak) - * Type __cdist: Fix non working 'git://' protocol source (Darko Poljak) - -5.0.0: 2019-05-05 - * Type __zypper_service: Fix spelling error in manpage (Dmitry Bogatov) - * Explorer init: Add support for OpenBSD (sideeffect42) - * Type __postgres_database: Run psql with -w (no-password) (sideeffect42) - * Type __postgres_role: Run psql with -w (no-password) (sideeffect42) - * Type __block: Quote prefix/suffix - fix when prefix/suffix contains quotes (sideeffect42) - * Build: Update due to migration to code.ungleich.ch (Darko Poljak) - * Documentation: Update due to migration to code.ungleich.ch (Darko Poljak) - * Core: Detect and report dependency cycle as soon as possible (Darko Poljak) - * Core, documentation: Release -j/--jobs option, i.e. make it non-beta (Darko Poljak) - * Documentation: Update due to new cdist website (Darko Poljak) - * Build: Update due to new cdist website (Darko Poljak) - -4.11.1: 2019-04-22 - * Core: Improve explorer error reporting (Darko Poljak) - * Type __directory: explorer stat: add support for Solaris (Ander Punnar) - * Type __file: explorer stat: add support for Solaris (Ander Punnar) - * Type __ssh_authorized_keys: Remove legacy code (Ander Punnar) - * Explorer disks: Bugfix: do not break config in case of unsupported OS - which was introduced in 4.11.0, print message to stderr and empty disk list - to stdout instead (Darko Poljak) - -4.11.0: 2019-04-20 - * Type __package: Add __package_apk support (Nico Schottelius) - * Type __directory: Add alpine support (Nico Schottelius) - * Type __file: Add alpine support (Nico Schottelius) - * Type __hostname: Add alpine support (Nico Schottelius) - * Type __locale: Add alpine support (Nico Schottelius) - * Type __start_on_boot: Add alpine support (Nico Schottelius) - * Type __timezone: Add alpine support (Nico Schottelius) - * Type __start_on_boot: gentoo: check all runlevels in explorer (Nico Schottelius) - * New type: __package_apk (Nico Schottelius) - * Type __acl: Add support for ACL mask (Dimitrios Apostolou) - * Core: Fix circular dependency for CDIST_ORDER_DEPENDENCY (Darko Poljak) - * Type __acl: Improve the type (Ander Punnar) - * Explorer interfaces: Simplify code, be more compatible (Ander Punnar) - * Explorer disks: Remove assumable default/fallback, for now explicitly support only Linux and BSDs (Ander Punnar, Darko Poljak) - -4.10.11: 2019-04-13 - * Core: Fix broken quiet mode (Darko Poljak) - * Build: Add version.py into generated raw source archive (Darko Poljak) - * Explorer disks: Fix detecting disks, fix/add support for BSDs (Ander Punnar) - * Type __file: Fix stat explorer for BSDs (Ander Punnar) - * Type __directory: Fix stat explorer for BSDs (Ander Punnar) - -4.10.10: 2019-04-11 - * New types: __ufw and __ufw_rule (Mark Polyakov) - * Type __link: Add messaging (Ander Punnar) - * Debugging: Rename debug-dump.sh to cdist-dump (Darko Poljak) - * Documentation: Add cdist-dump man page (Darko Poljak) - -4.10.9: 2019-04-09 - * Type __ssh_authorized_keys: Properly handle multiple --option params (Steven Armstrong) - * Debugging: Add debug dump helper script (Darko Poljak) - * Type __file: Bugfix: fire onchange for present and exists states if no attribute is changed (Darko Poljak) - -4.10.8: 2019-04-06 - * Type __clean_path: Fix list explorer exit code if path not directory or does not exist (Ander Punnar) - * New type: __check_messages (Ander Punnar) - -4.10.7: 2019-03-30 - * Build: Migrate from pep8 to pycodestyle (Darko Poljak) - * Type __start_on_boot: Implement state absent for OpenBSD (Daniel Néri) - * Explorers cpu_cores, disks: Add support for OpenBSD (Daniel Néri) - * Type __staged_file: Use portable -p instead of --tmpdir for mktemp (Silas Silva) - * Type __line: Add onchange parameter (Ander Punnar) - * Type __file: Add onchange parameter (Ander Punnar) - * New type: __clean_path (Ander Punnar) - -4.10.6: 2019-02-15 - * Type __prometheus_alertmanager: Add startup flag (Dominique Roux) - * Types __zypper_repo, __zypper_service: Re-add the use of echo in explorers (Daniel Heule) - -4.10.5: 2018-12-21 - * Type __group: Fix/remove '--' from echo command (Dimitrios Apostolou) - * New type: __ping (Olliver Schinagl) - * Type __postgres_role: Fix broken syntax (Nico Schottelius, Darko Poljak) - * Type __consul_agent: Add Debian 9 support (Jin-Guk Kwon) - * Documentation: Fix broken links (Rage ) - * Type __docker: Add version parameter (Jonas Weber) - * Type __sysctl: Refactor for better OS support (Takashi Yoshi) - * Types __package_*: Add messaging upon installation/removal (Takashi Yoshi) - * Type __package_pkg_openbsd: Reworked (Takashi Yoshi) - -4.10.4: 2018-11-03 - * Core: Transfer all files of a directory at once instead of calling copy once per file (myeisha) - * Core: Add timestamp (optional) to log messages (Darko Poljak) - * Explorers and types: Fix shellcheck found problems and encountered bugs (Jonas Weber, Thomas Eckert, Darko Poljak) - * Build: Add shellcheck makefile target and check when doing release (Darko Poljak) - * Type __consul: Add newest versions (Dominique Roux) - * Type __user: Remove annoying output, handle state param gracefully, add messages for removal (Thomas Eckert) - * Core: Fix checking for conflicting parameters for multiple values parameters (Darko Poljak) - * Documentation: Various fixes (Thomas Eckert) - * Various types: Improve OpenBSD support (sideeffect42) - -4.10.3: 2018-09-23 - * New global explorer: os_release (Ľubomír Kučera) - * Type __docker: Update type, install docker CE (Ľubomír Kučera) - * Type __package_apt: Write a message when a package is installed or removed; shellcheck (Jonas Weber) - * Documentation: Add 'Dive into real world cdist' walkthrough chapter (Darko Poljak) - * Core: Remove duplicate remote mkdir calls in explorer transfer (myeisha) - -4.10.2: 2018-09-06 - * Type __letsencrypt_cert: Add support for devuan ascii (Darko Poljak) - * Type __systemd_unit: Fix minor issues and add masking unit files support (Adam Dej) - * Type __grafana_dashboard: Fix devuan ascii support (Dominique Roux) - * Type __apt_source: Add nonparallel marker (Darko Poljak) - * Type __package_update_index: Fix error when using OS not using apt (Stu Zhao) - * Type __package_update_index: Support --maxage for type pacman (Stu Zhao) - * Type __letsencrypt_cert: Fix explorers: check that certbot exists before using it (Darko Poljak) - -4.10.1: 2018-06-21 - * Type __letsencrypt_cert: Fix temp file location and removal (Darko Poljak) - * Type __line: Handle missing file in __line explorer gracefully (Jonas Weber) - * Documentation: Add env vars usage idiom for writing types (Darko Poljak) - -4.10.0: 2018-06-17 - * New type: __acl (Ander Punnar) - * Core: Disable config parser interpolation (Darko Poljak) - * Type __sysctl: Use sysctl.d location if exists (Darko Poljak) - * Type __line: Rewrite and support --before and --after (Steven Armstrong) - -4.9.1: 2018-05-30 - * New type: __install_coreos (Ľubomír Kučera) - * Type __consul_agent: Add LSB init header (Nico Schottelius) - * Type __package_yum: Fix explorer when name contains package name with exact version specified (Aleksandr Dinu) - * Type __letsencrypt_cert: Use object id as domain if domain param is not specified (Darko Poljak) - -4.9.0: 2018-05-17 - * Type __docker_stack: Use --with-registry-auth option (Ľubomír Kučera) - * New type: __docker_config (Ľubomír Kučera) - * New type: __docker_secret (Ľubomír Kučera) - * Type __letsencrypt_cert: Rewritten; WARN: breaks backward compatibility (Ľubomír Kučera) - * Core: Fix NameError: name 'cdist_object' is not defined (Darko Poljak) - -4.8.4: 2018-04-20 - * Documentation, type manpages: Fix spelling (Dmitry Bogatov) - * New explorer: is-freebsd-jail (Kamila Součková) - * Types __hostname, __start_on_boot, __sysctl: Support FreeBSD (Kamila Součková) - * Type __install_config: set environment variable to distinguish between - install-config and regular config (Steven Armstrong) - * Core: Improve error reporting (Darko Poljak) - -4.8.3: 2018-03-16 - * Type __key_value: Add onchange parameter (Kamila Součková) - * Types __prometheus_server, __prometheus_alertmanager, __grafana_dashboard: - Work with packages instead of go get, remove __daemontools dependency and clean up (Kamila Součková) - * Documentation: Fix manpage generation (Darko Poljak) - * New type: __docker_swarm (Ľubomír Kučera) - * New type: __docker_stack (Ľubomír Kučera) - -4.8.2: 2018-03-10 - * Core: Fix quiet argument access for bare cdist command (Darko Poljak) - -4.8.1: 2018-03-09 - * Type __consul: Add option for directly downloading on target host (Darko Poljak) - * Core: Add -4 and -6 params to force IPv4, IPv6 addresses respectively (Darko Poljak) - * Type __package_update_index: Fix messaging (Thomas Eckert) - * Type __package_dpkg: Add state parameter and messaging (Thomas Eckert) - * Core: Fix a case when HOME is set but empty (Darko Poljak) - * Core: Fix non-existent manifest non graceful handling (Darko Poljak) - * Core: Fix main and inventory parent argparse options (Darko Poljak) - * Core: Fix lost error info with parallel jobs (option -j) (Darko Poljak) - * Core: Fix determining beta value through configuration (Darko Poljak) - * Core: Fix determining save_output_streams value through configuration (Darko Poljak) - * Core: Support in-distribution config file (Darko Poljak) - * New type: __apt_default_release (Matthijs Kooijman) - * Type __file: Add pre-exists state (Matthijs Kooijman) - * Type __grafana_dashboard: Add support for stretch + ascii (Nico Schottelius) - * Core: Fix idna (getaddrinfo) unicode tracebak for invalid host name (Darko Poljak) - -4.8.0: 2018-02-14 - * Core: Skip empty lines in parameter files (Darko Poljak) - * Explorer memory: Support OpenBSD (Philippe Gregoire) - * Type __install_config: re-export cdist log level during installation (Steven Armstrong) - * Type __sysctl: Add support for CoreOS (Ľubomír Kučera) - * Type __systemd_unit: Various improvements (Ľubomír Kučera) - * Type __line: Support regex beginning with '-' (Philippe Gregoire) - * Type __letsencrypt_cert: Add nonparallel; make admin-email required (Kamila Součková) - * Type __package_pkgng_freebsd: Redirect stdout and stderr to /dev/null instead of closing them (michal-hanu-la) - * Type __daemontools: Make it more robust and clean up the code (Kamila Součková) - * Core: Save output streams (Steven Armstrong, Darko Poljak) - * Documentation: Add local cache overview (Darko Poljak) - * Type __systemd_unit: Fix handling stdin (Jonas Weber) - * Type __package_apt: Add --purge-if-absent parameter (Jonas Weber) - * Type __package_update_index: Add --maxage parameter for apt and add message if index was updated(Thomas Eckert) - * Type __motd: Support reading from stdin (Jonas Weber) - * Type __issue: Support reading from stdin (Jonas Weber) - * Type __package_apt: Add support for --version parameter (Darko Poljak) - * Type __letsencrypt_cert: Add --renew-hook parameter(Darko Poljak) - * Core: Support disabling saving output streams (Darko Poljak) - * Type __apt_source: Remove update index dependency; call index update in gencode-remote (Darko Poljak) - -4.7.3: 2017-11-10 - * Type __ccollect_source: Add create destination parameter (Dominique Roux) - * Type __ssh_authorized_key: Add messaging (Thomas Eckert) - * New type: __letsencrypt_cert (Nico Schottelius, Kamila Součková) - * Core: Warn about invalid type in conf dir and continue instead of error (Darko Poljak) - * New type: __systemd_unit (Ľubomír Kučera) - * Type __letsencrypt_cert: Add support for debian stretch (Daniel Tschada) - * Type __line: Fix a case for absent when line contains single quotes (Darko Poljak) - * Type __config_file: Fix onchange command not being executed (Ľubomír Kučera) - -4.7.2: 2017-10-22 - * Type __hostname: Add support for CoreOS (Ľubomír Kučera) - * Type __timezone: Add support for CoreOS (Ľubomír Kučera) - * Explorer os: Fix for devuan ascii (Kamila Součková) - -4.7.1: 2017-10-01 - * Type __line: Add messaging (Thomas Eckert) - * Documentation: Fix documentation for building custom man-pages from non-standard path (Thomas Eckert) - * Core: Fix running scripts with execute bit when name without path is specified (Ander Punnar) - * Type __process: Add messaging (Thomas Eckert) - -4.7.0: 2017-09-22 - * Core: Add configuration/config file support (Darko Poljak) - * Core: Implement simple integration API (unstable) (Darko Poljak) - * Explorer machine_type: Detect kvm on proxmox (Sven Wick) - * Types __prometheus_server, __prometheus_alertmanager: Bugfixes (Kamila Součková) - * New type: __prometheus_exporter (Kamila Součková) - * Type __daemontools: Improve it on FreeBSD (Kamila Součková) - * Type __package_pkg_openbsd: Fix use of --name (Philippe Gregoire) - * Type __package_pkg_openbsd: Fix pkg_version explorer (Philippe Gregoire) - * Type __prometheus_exporter: Fixes + go version bump (Kamila Součková) - * Core, types: __cdist_loglevel -> __cdist_log_level (Darko Poljak) - * Core, types: Add __cdist_log_level_name env var with vlaue of log level name (Darko Poljak) - * Core: Make cdist honor __cdist_log_level env var (Darko Poljak) - * Core: Add -l/--log-level option (Darko Poljak) - * Type __install_stage: Fix __debug -> __cdist_log_level (Darko Poljak) - * Documentation: Document __cdist_log_level (Darko Poljak) - * Core: Log ERROR to stderr and rest to stdout (Darko Poljak, Steven Armstrong) - * Type __ssh_authorized_key: Bugfix the case where invalid key clears a file and add key validation (Darko Poljak) - -4.6.1: 2017-08-30 - * Type __user: Explore with /etc files (passwd, group, shadow) (Philippe Gregoire) - * Explorer init: Use pgrep instead of ps for Linux (Philippe Gregoire) - * Type __apt_key_uri: Redirect stderr of apt-key to /dev/null (Mark Verboom) - * Type __package_pkg_openbsd: Support the empty flavor (Philippe Gregoire) - * Type __package_pkg_openbsd: Support using /etc/installurl (Philippe Gregoire) - * Type __user_groups: Support OpenBSD (Philippe Gregoire) - * Type __hostname: Allow hostnamectl to fail silently (Steven Armstrong) - * Type __install_config: Use default default __remote_{copy,exec} in custom __remote_{copy,exec} scripts (Steven Armstrong) - * Type __ssh_authorized_key: Fix removing ssh key that is last one in the file (Darko Poljak) - -4.6.0: 2017-08-25 - * Core: Add inventory functionality (Darko Poljak) - * Core: Expose inventory host tags in __target_host_tags env var (Darko Poljak) - * Type __timezone: Check current timezone before doing anything (Ander Punnar) - * Core: Add -p HOST_MAX argument (Darko Poljak) - * Core: Add archiving support for transferring directory - new -R beta option (Darko Poljak) - * Core: Fix ssh connection multiplexing race condition (Darko Poljak) - * Core: Fix emulator race conditions with -j option (Darko Poljak) - * Documentation: Cleanup (Darko Poljak) - * Explorer os: Get ID from /etc/os-release (Philippe Gregoire) - -4.5.0: 2017-07-20 - * Types: Fix install types (Steven Armstrong) - * Core: Add -r command line option for setting remote base path (Steven Armstrong) - * Core: Allow manifest and gencode scripts to be written in any language (Darko Poljak) - * Documentation: Improvements to the english and fix typos (Mesar Hameed) - * Core: Merge -C custom cache path pattern option from beta branch (Darko Poljak) - * Core: Improve and cleanup logging (Darko Poljak, Steven Armstrong) - * Core: Remove deprecated -d option (Darko Poljak) - * Type __file: If no --source then create only if there is no file (Ander Punnar) - * Core: Ignore directory entries that begin with dot('.') (Darko Poljak) - * Core: Fix parallel object prepare and run steps and add nonparallel type marker (Darko Poljak) - -4.4.4: 2017-06-16 - * Core: Support -j parallelization for object prepare and object run (Darko Poljak) - * Type __install_mkfs: mkfs.vfat does not support -q (Nico Schottelius) - * Types __go_get, __daemontools*, __prometheus*: Fix missing dependencies, fix arguments (Kamila Součková) - -4.4.3: 2017-06-13 - * Type __golang_from_vendor: Install golang from https://golang.org/dl/ (Kamila Součková) - * Type __go_get: Install go packages using go get (Kamila Součková) - * Explorer kernel_name: uname -s (Kamila Součková) - * Type __sysctl: Add devuan support (Nico Schottelius) - * Type __start_on_boot: Add devuan support (Nico Schottelius) - * Core: Shorten ssh control path (Darko Poljak) - * Type __consul: Add new version and add http check (Kamila Součková) - * New types: __daemontools and __daemontools_service (Kamila Součková) - * New types: __prometheus_server and __prometheus_alertmanager (Kamila Součková) - * New type: __grafana_dashboard (Kamila Součková) - -4.4.2: 2017-03-08 - * Core: Fix suppression of manifests' outputs (Darko Poljak) - * Type __user_groups: Support FreeBSD (Andres Erbsen) - * Type __cron: Fix filter for new cron on sles12 sp2 (Daniel Heule) - * Type __docker: Support absent state (Dominique Roux) - * Type __docker_compose: Support absent state (Dominique Roux) - * New type: __hosts (Dmitry Bogatov) - * New type: __dot_file (Dmitry Bogatov) - -4.4.1: 2016-12-17 - * Documentation: Update docs for types that used man.rst as symbolic links (Darko Poljak) - * Type __cron: Remove '# marker' for raw_command due to cron security (Daniel Heule) - * New type: __docker_compose (Dominique Roux) - * Type __apt_mark: Check supported apt version and if package is installed (Ander Punnar) - * New type: __docker (Steven Armstrong) - * New type: __package_dpkg (Tomas Pospisek) - -4.4.0: 2016-12-03 - * Core: Deprecate -d option and make -v option log level counter (Darko Poljak) - * New type: __postgres_extension (Tomas Pospisek) - * Core, types: Support IPv6 (Darko Poljak) - * Type __consul: Add source and cksum files for Consul 0.7.0 and 0.7.1 (Carlos Ortigoza) - * Type __user: FreeBSD fix (Kamila Souckova) - * New type: __apt_mark (Ander Punnar) - * Type __package_upgrade_all: Do not dist-upgrade by default, add apt-clean and apt-dist-upgrade options (Ander Punnar) - * Core: Correct target_host var in code.py (Darko Poljak) - * All: Merge install feature from 4.0-pre-not-stable (Darko Poljak) - -4.3.2: 2016-10-13 - * Documentation: Update no longer existing links (Simon Walter) - * Core: Add warning message for faulty dependencies case (Darko Poljak) - * Explorer os_version: Use /etc/os-release instead of /etc/SuSE-release (Daniel Heule) - * Type __package: Call __package_pkg_openbsd on openbsd (Andres Erbsen) - * Type __package_pkg_openbsd: Support --version (Andres Erbsen) - * Type __hostname: Support openbsd (Andres Erbsen) - * New type: __firewalld_start: start/stop firewalld and/or enable/disable start on boot (Darko Poljak) - * Bugfix __consul_agent: Config option was misnamed 'syslog' instead of 'enable_syslog' (Steven Armstrong) - -4.3.1: 2016-08-22 - * Documentation: Spelling fixes (Darko Poljak) - * Type __filesystem: Spelling fixes (Dmitry Bogatov) - * Core: Add target_host file to cache since cache dir name can be hash (Darko Poljak) - * Core: Improve hostfile: support comments, skip empty lines (Darko Poljak) - -4.3.0: 2016-08-19 - * Documentation: Add Parallelization chapter (Darko Poljak) - * Core: Add -b, --enable-beta option for enabling beta functionalities (Darko Poljak) - * Core: Add -j, --jobs option for parallel execution and add parallel support for global explorers (currently in beta) (Darko Poljak) - * Core: Add derived env vars for target hostname and fqdn (Darko Poljak) - * New type: __keyboard: Set keyboard layout (Carlos Ortigoza) - * Documentation: Re-license types' man pages to GPLV3+ (Dmitry Bogatov, Darko Poljak) - * New type __filesystem: manage filesystems on devices (Daniel Heule) - * New type: __locale_system (Steven Armstrong, Carlos Ortigoza, Nico Schottelius) - * New type: __sysctl (Steven Armstrong) - -4.2.2: 2016-07-26 - * Core: Fix ssh ControlPath socket file error (Darko Poljak) - * Documentation: Update cdist man page and cdist-references (Darko Poljak) - * Documentation: Change cdist and cdist-type__pyvenv man page licenses to GPLv3+ (Darko Poljak) - * Documentation: Add FILES to cdist man page (Darko Poljak) - -4.2.1: 2016-07-18 - * Build: Fix signed release (Darko Poljak) - * Build: Fix building docs (Darko Poljak) - * Documentation: Fix man pages (Dmitry Bogatov) - * Documentation: Fix spellings (Dmitry Bogatov) - -4.2.0: 2016-07-16 - * Build: Make github signed release (Darko Poljak) - * Core: Fix hostdir: use hash instead of target host (Steven Armstrong) - * Core: pep8 (Darko Poljak) - * Documentation: Restructure and fix and improve docs and manpages (Darko Poljak) - * Core: Add files directory for static files (Darko Poljak) - * Custom: Add bash and zsh completions (Darko Poljak) - * Core: Improve error reporting for local and remote run command (Darko Poljak) - * New type: __jail_freebsd9: Handle jail management on FreeBSD <= 9.X (Jake Guffey) - * New type: __jail_freebsd10: Handle jail management on FreeBSD >= 10.0 (Jake Guffey) - * Type __jail: Dynamically select the correct jail subtype based on target host OS (Jake Guffey) - * Explorer __machine_type: add openvz and lxc - * Explorer __os __os_version: add scientific - * Type various: add scientific - * Explorer __machine_type: add virtualbox (Stu Zhao) - -4.1.0: 2016-05-27 - * Documentation: Migrate to reStructuredText format and sphinx (Darko Poljak) - * Core: Add -f option to read additional hosts from file/stdin (Darko Poljak) - * Type __apt_key: Use pool.sks-keyservers.net as keyserver (Steven Armstrong) - -4.0.0: 2016-05-04 - * Core: Fix bug with parallel hosts operation when output path is specifed (Darko Poljak) - * Type __package_pip: Add support for running as specified user (useful for pip in venv) (Darko Poljak) - * New type: __pyvenv: Manage python virtualenv (Darko Poljak) - * Core: Add CDIST_REMOTE_COPY/EXEC env variables and multiplexing options for default scp/ssh (Darko Poljak) - * Types: Remove bashisms in scripts (Darko Poljak) - * Core: Fix bug in remote command with environment (Darko Poljak) - * Core: Fix bug in local code execution (Darko Poljak) - * Documentation: Fix spelling in manual pages (Dmitry Bogatov) - * New type: __pacman_conf: Manage pacman.conf (Dominique Roux) - * New type: __pacman_conf_integrate: cdist compatible pacman.conf (Dominique Roux) - * Type __consul: Do not install unused package unzip (Steven Armstrong) - * Type __consul: Add source & cksum for 0.5.2 (Steven Armstrong) - * Core: Support object ids '.cdist' (Nico Schottelius) - * Type __apt_norecommends: Also setup autoremove options (Dmitry Bogatov) - * Type __user_groups: Add NetBSD support (Jonathan A. Kollasch) - * Type __timezone: Add NetBSD support (Jonathan A. Kollasch) - * Type __ccollect_source: Add NetBSD support (Jonathan A. Kollasch) - * Type __directory: Add NetBSD support (Jonathan A. Kollasch) - * Type __file: Add NetBSD support (Jonathan A. Kollasch) - * Type __group: Add NetBSD support (Jonathan A. Kollasch) - * Type __consul: Add new consul versions (Nico Schottelius) - * Type __apt_ppa: Do not install legacy package python-software-properties (Steven Armstrong) - -3.1.13: 2015-05-16 - * Type __block: Fix support for non stdin blocks (Dominique Roux) - * Type __consul: Install package unzip (Nico Schottelius) - * Type __consul: Add source & cksum for 0.5.1 (Nico Schottelius) - * Type __consul_agent: Use systemd for Debian 8 (Nico Schottelius) - * Type __firewalld_rule: Ensure firewalld package is present (David Hürlimann) - * Type __locale: Support CentOS (David Hürlimann) - * Type __staged_file: Fix comparison operator (Nico Schottelius) - * Type __user_groups: Support old Linux versions (Daniel Heule) - -3.1.12: 2015-03-19 - * Core: Support object ids '.cdist' (Nico Schottelius) - * New type: __firewalld_rule (Nico Schottelius) - * Type __consul_agent: add support for acl options (Steven Armstrong) - * Type __consul_agent: add support for Debian (Nico Schottelius) - * Type __package_apt: Use default parameters (Antoine Catton) - * Type __package_luarocks: Use default parameters (Antoine Catton) - * Type __package_opkg: Use default parameters (Antoine Catton) - * Type __package_pacman: Use default parameters (Antoine Catton) - * Type __package_pip: Use default parameters (Antoine Catton) - * Type __package_pkg_freebsd: Use default parameters (Antoine Catton) - * Type __package_pkg_openbsd: Use default parameters (Antoine Catton) - * Type __package_pkgng_openbsd: Use default parameters (Antoine Catton) - -3.1.11: 2015-02-27 - * New type: __staged_file: Manage staged files (Steven Armstrong) - * New type: __config_file: Manage configuration files and run code on change (Steven Armstrong) - * New type: __consul: install consul (Steven Armstrong) - * New type: __consul_agent: manage the consul agent (Steven Armstrong) - * New type: __consul_check: manages consul checks (Steven Armstrong) - * New type: __consul_reload: reload consul (Steven Armstrong) - * New type: __consul_service: manages consul services (Steven Armstrong) - * New type: __consul_template: manage the consul-template service (Steven Armstrong) - * New type: __consul_template_template: manage consul-template templates (Steven Armstrong) - * New type: __consul_watch_checks: manages consul checks watches (Steven Armstrong) - * New type: __consul_watch_event: manages consul event watches (Steven Armstrong) - * New type: __consul_watch_key: manages consul key watches (Steven Armstrong) - * New type: __consul_watch_keyprefix: manages consul keyprefix watches (Steven Armstrong) - * New type: __consul_watch_nodes: manages consul nodes watches (Steven Armstrong) - * New type: __consul_watch_service: manages consul service watches (Steven Armstrong) - * New type: __consul_watch_services: manages consul services watches (Steven Armstrong) - * New Type: __rsync (Nico Schottelius) - * Type __start_on_boot: Support Ubuntu upstart (Nico Schottelius) - * Type __timezone: Added support for FreeBSD (Christian Kruse) - -3.1.10: 2015-02-10 - * Core: Fix too many open files bug (#343) - * Type __ssh_authorized_keys: Remove unneeded explorer (Steven Armstrong) - * Type __ssh_authorized_keys: Fix empty output bug of entry explorer (Steven Armstrong) - * Type __package_apt: Add support for --target-release (Nico Schottelius) - * Type __locale: Add support for Ubuntu (Nico Schottelius) - * Type __group: Rewrite (Steven Armstrong) - * Documentation: Fix typo in maintainer file (Stephan Kulla) - -3.1.9: 2014-10-17 - * Type __package_emerge: Fix handling of slotted packages (Daniel Heule) - * Type __package_apt: Use --force-confdef (Ricardo Catalinas Jiménez) - * Type __package_update_index: Decrease verbosity (Ricardo Catalinas Jiménez) - * Type __package_upgrade_all: Decrease verbosity (Ricardo Catalinas Jiménez) - -3.1.8: 2014-10-01 - * New Type: __package_update_index (Ricardo Catalinas Jiménez) - * New Type: __package_upgrade_all (Ricardo Catalinas Jiménez) - -3.1.7: 2014-09-29 - * Type __cdistmarker: Fix typo (Ricardo Catalinas Jiménez) - * Core: Bugfix: Export messaging to manifests (Ricardo Catalinas Jiménez) - * Explorer cpu_cores, cpu_sockets, memory: Add Mac OS X support (Manuel Hutter) - * Type __ssh_authorized_keys: Ensure keys are correctly added (Steven Armstrong) - * New Type: __ssh_authorized_key (Steven Armstrong) - * New Type: __package_pkgng_freebsd (Jake Guffey) - -3.1.6: 2014-08-18 - * New Type: __ssh_dot_ssh (Nico Schottelius) - * Type __package_yum: Support retrieving package via URL (Nico Schottelius) - * Type __hostname: Support SuSE and have CentOS use sysconfig value (Nico Schottelius) - * Type __locale: Support SuSE (Nico Schottelius) - * Type __locale: Support Archlinux (Nico Schottelius) - * Type __timezone: Support SuSE (Nico Schottelius) - * Type __file: Support MacOS X (Manuel Hutter) - * Type __iptables_apply: Add "reset" to init.d script of iptables (Nico Schottelius) - * Type __ssh_authorized_key: Use new type __ssh_dot_ssh (Nico Schottelius) - * Type __zypper_repo: Bugfix for pattern matching (Daniel Heule) - -3.1.5: 2014-05-05 - * Type __zypper_repo: Automatically import gpg keys (Daniel Heule) - * Type __zypper_service: Automatically import gpg keys (Daniel Heule) - -3.1.4: 2014-05-04 - * Core: Ensure all created files end in \n (Steven Armstrong) - * Documentation: Cleanup up, added HTML links (Tomas Pospisek) - * Explorer interfaces: Remove test output (Daniel Heule) - * Type __jail: Add messaging support (Jake Guffey) - -3.1.3: 2014-04-29 - * New Type: __yum_repo (Steven Armstrong) - * Type __hostname: Add support for CentOS (Nico Schottelius) - -3.1.2: 2014-04-12 - * Documentation: Add missing environment variables to reference (Nico Schottelius) - * Type __qemu_img: size is optional, if state is not present (Nico Schottelius) - * Type __key_value: Rewrite using awk (Daniel Heule) - * New Type: __dog_vdi (Nico Schottelius) - -3.1.1: 2014-03-26 - * Core: Make __object and __object_id available to code (Daniel Heule) - * New explorer: cpu_cores (Daniel Heule/Thomas Oettli) - * New explorer: cpu_sockets (Daniel Heule/Thomas Oettli) - * New explorer: machine_type (Daniel Heule/Thomas Oettli) - * New explorer: memory (Daniel Heule/Thomas Oettli) - * Type __jail: Fix parameter names in explorer (Jake Guffey) - * Type __line: Ensure permissions are kept (Steven Armstrong) - * Type __link: Do not create link in directory, if link exists (Steven Armstrong) - * Type __package_pkg_openbsd: Improve error handling (og) - -3.1.0: 2014-03-19 - * New Type: __rbenv (Nico Schottelius) - * Type __file: Enhance OpenBSD Support (og) - * Type __git: Pass onwer/group/mode values to __directory (Nico Schottelius) - * Type __iptable_rule: Fix example documentation (Antoine Catton) - * Type __key_value: Add messaging support (Nico Schottelius) - * Type __package_pkg_openbsd: Allow to change PKG_PATH (og) - * Type __ssh_authorized_keys: Allow managing existing keys (Steven Armstrong) - * Type __user: Enhance OpenBSD Support (og) - -3.0.9: 2014-02-14 - * Core: Ignore order dependencies if override is set (Daniel Heule) - * Core: Improve Mac OS X support for unit tests (Steven Armstrong) - * Type __locale: Error out in case of unsupported OS (Nico Schottelius) - * Type __jail: Use default parameters for state (Daniel Heule) - * Type __pf_ruleset: Use default parameters for state (Daniel Heule) - * Type __postgres_database: Use default parameters for state (Daniel Heule) - * Type __postgres_role: Use default parameters for state (Daniel Heule) - * Type __rvm: Use default parameters for state (Daniel Heule) - * Type __rvm_gem: Use default parameters for state (Daniel Heule) - * Type __rvm_gemset: Use default parameters for state (Daniel Heule) - * Type __rvm_ruby: Use default parameters for state (Daniel Heule) - -3.0.8: 2014-02-11 - * Core: Enhance object id verification (Daniel Heule) - * Core: Add unit tests for dependencies based on execution order (Daniel Heule) - * Core: Add unit tests for dry run (Daniel Heule) - -3.0.7: 2014-02-08 - * Core: Allow dependencies to be created based execution order (Daniel Heule) - * Core: Add tests for override (Daniel Heule) - -3.0.6: 2014-02-06 - * New Type: __apt_key (Steven Armstrong) - * New Type: __apt_key_uri (Steven Armstrong) - * New Type: __apt_norecommends (Steven Armstrong) - * New Type: __apt_source (Steven Armstrong) - * New Type: __ccollect_source (Nico Schottelius) - * Type __git: Use default parameters (Daniel Heule) - * Type __jail: Use default parameters (Daniel Heule) - * Type __package_yum: Use default parameters (Daniel Heule) - * Type __package_zypper: Use default parameters (Daniel Heule) - * Type __user_groups: Use default parameters (Daniel Heule) - -3.0.5: 2014-02-05 - * Core: Introduce override concept (Daniel Heule) - * Type __process: Make --state absent work (Steven Armstrong) - * Documentation: Update documentation for environment variables (Nico Schottelius) - -3.0.4: 2014-01-29 - * Core: Ignore install types in config mode (Nico Schottelius) - * Documentation: Update reference (files path in object space) (Nico Schottelius) - * Documentation: Update best practise: Replaces templates/ with files/ (Nico Schottelius) - * Type __apt_ppa: Install required software (Steven Armstrong) - * Type __debconf_set_selections: Support --file - to read from stdin (Nico Schottelius) - * Type __jail: Fix jaildir parameter handling (Jake Guffey) - -3.0.3: 2014-01-22 - * Core: Enhance error message when requirement is missing object id (Nico Schottelius) - * Core: Add environment variable to select shell for executing scripts (Daniel Heule) - * Explorer hostname: Return host name by using uname -n (Nico Schottelius) - * 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 (Nico Schottelius) - * 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 - * Documentation: Document all messages sent by types (Daniel Heule) - * New Type: __block (Steven Armstrong) - * New Type: __mount (Steven Armstrong) - * Type __cron: Replace existing entry when changing it (Daniel Heule) - * Type __ssh_authorized_keys: Use new type __block (Steven Armstrong) - -3.0.1: 2014-01-14 - * Core: Copy only files, not directories (Steven Armstrong) - * Core: Allow hostnames to start with / (Nico Schottelius) - * Type __line: Remove unnecessary backslash escape (Nico Schottelius) - * Type __directory: Add messaging support (Daniel Heule) - * Type __directory: Do not generate code if mode is 0xxx (Daniel Heule) - * Type __package: Fix typo in optional parameter ptype (Daniel Heule) - * Type __start_on_boot: Fix for SuSE's chkconfig (Daniel Heule) - -3.0.0: 2013-12-24 - * Core: Added messaging support (Nico Schottelius) - * Core: Removed unused "changed" attribute of objects (Nico Schottelius) - * Core: Support default values for multiple parameters (Steven Armstrong) - * Core: Ensure Object Parameter file contains \n (Steven Armstrong) - * New Type: __zypper_repo (Daniel Heule) - * New Type: __zypper_service (Daniel Heule) - * New Type: __package_emerge (Daniel Heule) - * New Type: __package_emerge_dependencies (Daniel Heule) - * Type __cron: Add support for raw lines (Daniel Heule) - * Type __cron: Suppress stderr output from crontab (Daniel Heule) - * Type __cron: Fix quoting issue (Daniel Heule) - * Type __file: Do not generate code if mode is 0xxx (Nico Schottelius) - * Type __iptables_rule: Use default parameter (Nico Schottelius) - * Type __key_value: Fix quoting issue (Steven Armstrong) - * Type __package: Use state --present by default (Steven Armstrong) - * Type __package_zypper: Support non packages as well (Daniel Heule) - * Type __package_zypper: Support package versions (Daniel Heule) - * Type __postfix_*: Depend on __postfix Type (Steven Armstrong) - * Type __postfix_postconf: Enable support for SuSE (Daniel Heule) - * Type __postfix: Enable support for SuSE (Daniel Heule) - * Type __start_on_boot: Use default parameter state (Nico Schottelius) - * Type __start_on_boot: Add support for gentoo (Daniel Heule) - * Type __user: Add support for state parameter (Daniel Heule) - * Type __user: Add support for system users (Daniel Heule) - * Type __user: Add messaging support (Steven Armstrong) - * Type __zypper_service: Support older SuSE releases (Daniel Heule) - -2.3.7: 2013-12-02 - * Type __file: Secure the file transfer by using mktemp (Steven Armstrong) - * Type __file: Only remove file when state is absent (Steven Armstrong) - * Type __link: Only remove link when state is absent (Steven Armstrong) - * Type __directory: Only remove directory when state is absent (Steven Armstrong) - * Type __directory: Fix newly introduced quoting issue (Nico Schottelius) - * Type __package_zypper: Fix explorer and parameter issue (Daniel Heule) - * Core: Fix backtrace when cache cannot be deleted (Nico Schottelius) - -2.3.6: 2013-11-25 - * New Type: __locale (Nico Schottelius) - * Type __line: Ensure special characters are not interpreted (Nico Schottelius) - -2.3.5: 2013-10-10 - * Core: Unit test fix for remote_copy (Steven Armstrong) - * Documentation: Updated manpages of __package and __file (Alex Greif) - * Documentation: Add more examples to cdist-manifest (Dan Levin) - * Type __package_apt: Do not install recommends by default (Nico Schottelius) - -2.3.4: 2013-10-03 - * Core: Add missing bits to support dry run (Steven Armstrong) - * Core: Make unit test remote copy more compatible with scp (Steven Armstrong) - * New Type: __postfix (Steven Armstrong) - * New Type: __postfix_master (Steven Armstrong) - * New Type: __postfix_postconf (Steven Armstrong) - * New Type: __postfix_postmap (Steven Armstrong) - * New Type: __postfix_reload (Steven Armstrong) - * Type __line: Ensure regex does not contain / - * Type __ssh_authorized_keys: Bugfix: Preserve ownership (Steven Armstrong) - -2.3.3: 2013-09-09 - * Core: Add support for default values of optional parameters (Steven Armstrong) - * Type __start_on_boot: Bugfix for systemd (Steven Armstrong) - -2.3.2: 2013-09-05 - * Build: Ensure tests don't change attributes of non-test files (Nico Schottelius) - * Core: Fix typo in argument parser (Nico Schottelius) - * Core: Code cleanup: Remove old install code (Steven Armstrong) - * Core: Improve error message when using non-existing type in requirement (Nico Schottelius) - * New Type: __iptables_rule (Nico Schottelius) - * New Type: __iptables_apply (Nico Schottelius) - * Type __cdist: Also create home directory (Nico Schottelius) - * Type __cdist: Add support for --shell parameter (Nico Schottelius) - * Type __motd: Regenerate motd on Debian and Ubuntu (Nico Schottelius) - -2.3.1: 2013-08-28 - * Core: Support relative paths for configuration directories (Nico Schottelius) - * Core: Code cleanup (removed context class, added log class) (Nico Schottelius) - * Documentation: Add more best practises (Nico Schottelius) - * Documentation: Add troubleshooting chapter (Nico Schottelius) - * Type __key_value: Fix quoting problem (Steven Armstrong) - -2.3.0: 2013-08-12 - * Core: Added support for cdist shell (Nico Schottelius) - * Documentation: Improved some manpages (Nico Schottelius) - -2.2.0: 2013-07-12 - * Build: Cleanup the Makefile (Nico Schottelius) - * Type __package_opkg: Use shortcut version (Nico Schottelius) - * Core: Remove old pseudo object id "singleton" (Steven Armstrong) - -2.1.2: 2013-07-09 - * Build: Change clean-dist target to "distclean" (Nico Schottelius) - * Build: Moved a lot of build logic into Makefile for dependency resolution - * Core: Make global explorers available to initial manifest (Arkaitz Jimenez) - * Core: Change execution order to run object as one unit (Nico Schottelius) - * Documentation: Improved documentation (Tomáš Pospíšek) - * New Remote Example: Add support for sudo operations (Chase James) - * New Type: __update_alternatives (Nico Schottelius) - * New Type: __cdist (Nico Schottelius) - * Type __apt_ppa: Fix comparison operator (Tyler Akins) - * Type __start_on_boot: Archlinux changed to use systemd - adapt type (Nico Schottelius) - * Type __git: Missing quotes added (Chase James) - * Type __postgres_database: Make state parameter optional (Chase James) - * Type __postgres_role: Make state parameter optional, fix password bug (Chase James) - * Type __process: Make state parameter optional (Nico Schottelius) - * Type __cron: Simplyfied and syntax change (Nico Schottelius) - -2.1.1: 2013-04-08 - * Core: Use dynamic dependency resolver to allow indirect self dependencies (Nico Schottelius) - * Core: Remove umask call - protect /var/lib/cdist only (Arkaitz Jimenez) - * Explorer os: Added Slackware support (Eivind Uggedal) - * Type __git: Support mode and fix owner/group settings (contradict) - * Type __jail: State absent should implies stopped (Jake Guffey) - * Type __directory: Make stat call compatible with FreeBSD (Jake Guffey) - * Type __cron: Allow crontab without entries (Arkaitz Jimenez) - * Type __user: Add support for creating user home (Arkaitz Jimenez) - -2.1.0: 2012-12-09 - * Core: Ensure global explorers are executable (Nico Schottelius) - * Core: Ensure type explorers are executable (Steven Armstrong) - * New Type: __git (Nico Schottelius) - * New Type: __ssh_authorized_keys (Steven Armstrong) - * New Type: __user_groups (Steven Armstrong) - * Type __rvm_gemset: Change parameter "default" to be boolean (Nico Schottelius) - * Type __user: Remove --groups support (now provided by __user_groups) - * Type __apt_ppa: Bugfix: Installeded ppa detection (Steven Armstrong) - * Type __jail: Change optional parameter "started" to boolean "stopped" parameter, - change optional parameter "devfs-enable" to boolean "devfs-disable" parameter and - change optional parameter "onboot" to boolean. (Nico Schottelius) - * Type __package_pip: Bugfix: Installeded the package, not pyro (Nico Schottelius) - * Remove Type __ssh_authorized_key: Superseeded by __ssh_authorized_keys (Nico Schottelius) - * Support for CDIST_PATH (Steven Armstrong) - -2.1.0pre8: 2012-11-15 - * Type cleanup: __apt_ppa, __apt_ppa_update_index, __file, - __ssh_authorized_key, __timezone, all install types (Steven Armstrong) - * Types: Remove all parameter changing code (Nico Schottelius) - * Type __rvm_ruby: Change parameter "default" to be boolean (Nico Schottelius) - * Documentation: Web documentation clean up (Nico Schottelius) - -2.1.0pre7: 2012-11-07 - * Core: All unit tests restored back to working (Nico Schottelius) - * Core: Print error message when missing the initial manifest (Nico Schottelius) - -2.1.0pre6: 2012-11-05 - * New Example: Turn remote calls into local calls (used for unittesting) (Nico Schottelius) - * Core: Export PYTHONPATH, it's also needed by emulator (Nico Schottelius) - * Bugfix Type __rvm_ruby: Add clean package dependencies (Nico Schottelius) - * Bugfix Type __rvm_gem: Run rvm as user, not as root (Nico Schottelius) - * Cleanup Type __rvm, __rvm_gemset: Use shortcut version (Nico Schottelius) - * Bugfix __rvm_gemset: Correctly check for gemsets (Nico Schottelius) - * Cleanup Type __postgres_database, __postgres_role: Reference each other - in documentation (Nico Schottelius) - * Cleanp Type __postgres_role: Use boolean parameters where appropriate (Nico Schottelius) - * Cleanp Type __postgres_role: Use shortcut version (Nico Schottelius) - -2.1.0pre5: 2012-11-01 - * Core: First round of tests updated to work with multiple configuration directories (Nico Schottelius) - -2.1.0pre4: 2012-10-31 - * Dist: PyPi: Moved cdist.py to script/cdist to avoid double import (Nico Schottelius) - * Core: Added support for multiple configuration directories (no documentation) (Nico Schottelius) - -2.1.0pre3: 2012-10-30 - * Dist: PyPi: Types and explorer included as package data (Nico Schottelius) - -2.1.0pre2: 2012-10-26 - * Dist: PyPi: Add conf/ directory to distribution (Nico Schottelius) - * Dist: Initial support for archlinux packaging (Nico Schottelius) - -2.1.0pre1: 2012-10-26 - * Core: Removed obsolete variable __self (Nico Schottelius) - * Removed type __addifnosuchline (replaced by __line) (Nico Schottelius) - * Removed type __removeline (replaced by __line) (Nico Schottelius) - * Type __directory: Parameter --parents and --recursive are now boolean (Nico Schottelius) - * Type __package_apt, __package_luarocks, __package_opkg, - __package_pacman, __package_pkg_freebsd, __package_pkg_openbsd, - __package_rubygem, __package_yum, __process: - Parameter state accepts only "present" and "absent" (Nico Schottelius) - * Dist: Initial support for pypi packaging (Nico Schottelius) - -2.0.15: 2012-11-02 - * Core: Make variable __object_name available in type explorers (Steven Armtrong) - * New Type: __qemu_img (Nico Schottelius) - * New Type: __line (Nico Schottelius) - * New Type: __pf_apply (Jake Guffey) - * New Type: __pf_ruleset (Jake Guffey) - * Bugfix Type: __rvm: Make type work if rvm is already installed (Nico Schottelius) - -2.0.14: 2012-09-07 - * Bugfix Type: __jail: Use correct variable (Jake Guffey) - * Change Type: __jail: Parameter jailbase now optional (Jake Guffey) - * Bugfix Type: __user: Use passwd database on FreeBSD (Jake Guffey) - * Bugfix Type: __start_on_boot: Do not change parameters (Nico Schottelius) - * Feature __user: Added support for BSDs (Sébastien Gross) - * Feature __group: Added support for FreeBSD (Jake Guffey) - * New Type: __package_zypper (Nico Schottelius) - * Feature Types: Initial Support for SuSE Linux (Nico Schottelius) - -2.0.13: 2012-06-05 - * Bugfix __ssh_authorized_key: Ensure it sets proper group (contradict) - * Bugfix __addifnosuchline: Fixed quotes/interpolation bug ("a b" became "a b") (Nico Schottelius) - * New Explorer: interfaces (Sébastien Gross) - * Feature core: Support reading from stdin in types (Steven Armstrong) - * Feature core: Support multiple parameters for types (Steven Armstrong) - * Feature __file: Support reading from stdin with - syntax (Steven Armstrong) - -2.0.12: 2012-05-29 - * Core: Correctly raise error on Python < 3.2 (Steven Armtrong) - * Core: Add support for --remote-exec and --remote-copy parameters (Nico Schottelius) - * Documentation: Debian Squeeze hints (Sébastien Gross) - -2.0.11: 2012-05-23 - * Fix insecure file/directory creation: Use umask 077 (Nico Schottelius) - -2.0.10: 2012-05-18 - * Cleanup __group: No getent gshadow in old Redhat, use groupmod -g - (Matt Coddington) - * Bugfix __package_yum: Missing cat (Nico Schottelius) - * Bugfix __start_on_boot: Correctly use sed and quotes (Steven Armstrong) - * Feature __file: Support for --state exists (Steven Armstrong) - * Feature core: Make variable __manifest available to type manifests (Nico Schottelius) - * Feature core: Correct parent dependency handling (Steven Armstrong) - * Bugfix several types: Fix sed for FreeBSD (Istvan Beregszaszi) - * New Type: __jail (Jake Guffey) - * Change Type: __rvm*: --state present/absent not installed/remvoed (Evax Software) - * Bugfix Type: __cron: Hide error output from crontab (Nico Schottelius) - * Various smaller bugfixes (Chris Lamb) - -2.0.9: 2012-03-12 - * Cleanup documentation: Fix environment variable list to be properly - displayed (Giel van Schijndel) - * Cleanup documentation: Some minor corrections - * New Type: __package_opkg (Giel van Schijndel) - * New Type: __package_pkg_freebsd (Jake Guffey) - * New Type: __mysql_database (Benedikt Koeppel) - * Feature __package: Support for OpenWRT (Giel van Schijndel) - * Feature __start_on_boot: Support for OpenWRT (Giel van Schijndel) - * Feature __start_on_boot: Support for Amazon Linux (Matt Coddington) - * New Example: Use rsync to backup files (Matt Coddington) - * Feature core: Exit non-zero, if configuration failed (Nico Schottelius) - * Documentation: Describe how to do templating (Aurélien Bondis) - -2.0.8: 2012-02-20 - * Bugfix core: Remove another nasty traceback when sending SIGINT (aka Ctrl-C) (Nico Schottelius) - * Cleanup: Better hint to source of error (Nico Schottelius) - * Cleanup: Do not output failing script, but path to script only (Nico Schottelius) - * Cleanup: Remove support for __debug variable in manifests (Type != Core - debugging) (Nico Schottelius) - * Cleanup: Change __package_* to support absent/present (default state - name now). The values removed/installed will be removed in cdist 2.1. (Nico Schottelius) - * Cleanup: Change __process to support absent/present (default state - name now). The values running/stopped will be removed in cdist 2.1. (Nico Schottelius) - * Feature Core: Support boolean parameters (Steven Armstrong) - -2.0.7: 2012-02-13 - * Bugfix __file: Use chmod after chown/chgrp (Matt Coddington) - * Bugfix __user: Correct shadow field in explorer (Matt Coddington) - * Bugfix __link: Properly handle existing links (Steven Armstrong) - * Bugfix __key_value: More robust implementation (Steven Armstrong) - * Bugfix __user: Fix for changing a user's group by name (Matt Coddington) - * New Type: __package_pip (Nico Schottelius) - * Bugfix/Cleanup: Correctly allow Object ID to start and end with /, but - not contain //. (Nico Schottelius) - -2.0.6: 2012-01-28 - * Bugfix __apt_ppa: - Also remove the [ppa-name].list file, if empty. (Tim Kersten) - * Bugfix __group: - Referenced wrong variable name (Matt Coddington) - * Feature __package_apt: - Initial support for virtual packages (Evax Software) - * Feature Core: Added new dependency resolver (Steven Armstrong) - * Feature Explorer, __package_yum: Support Amazon Linux (Matt Coddington) - * New Type: __rvm (Evax Software) - * New Type: __rvm_gem (Evax Software) - * New Type: __rvm_gemset (Evax Software) - * New Type: __rvm_ruby (Evax Software) - -2.0.5: 2012-01-18 - * Bugfix __key_value: Use correct delimiters - (Steven Armstrong, Daniel Maher) - * Cleanup: Explicitly require Python >= 3.2 (do not fail implicitly) (Nico Schottelius) - * Documentation: (Re)write of the tutorial (Nico Schottelius) - * Feature: __addifnosuchline supports matching on - regular expressions (Daniel Maher) - * Feature: __directory, __file, __link: - Add --state parameter (Steven Armstrong) - * New Type: __package_luarocks (Christian G. Warden) - * New Type: __cdistmarker (Daniel Maher) - -2.0.4: 2011-11-18 - * Bugfix core: Remove traceback when sending SIGINT (aka Ctrl-C) (Nico Schottelius) - * Bugfix core: Accept parameters with - in the name (Steven Armstrong) - * Cleanup: __object_fq variable removed (never used) (Nico Schottelius) - * Cleanup: Environment variable __self DEPRECATED, use __object_name instead (Nico Schottelius) - * Cleanup: Environment variable __self scheduled for removal in cdist 2.1 (Nico Schottelius) - * Documentation: Many examples for use of __remote_* (Steven Armstrong) - * Feature: Automatically require all used objects (Steven Armstrong) - * New Type: __cron (Steven Armstrong) - -2.0.3: 2011-10-18 - * Improved logging, added --verbose, by more quiet by default - * Bugfix __user: Correct quoting (Steven Armstrong) - * Bugfix __addifnosuchline: Falsely exited (Nico Schottelius) - * Bugfix requirements: Restore original require="" behaviour (Nico Schottelius) - * Feature requirements: Check for broken object_ids and abort (Nico Schottelius) - * Massive refactoring and unittesting introduced (Steven Armstrong) - -2.0.2: 2011-09-27 - * Add support for detection of OpenWall Linux (Matthias Teege) - * Add support for __debug variable in manifests (Nico Schottelius) - * Bugfix core: Various issues with type emulator (Nico Schottelius) - -2.0.1: 2011-09-23 - * Bugfix core: Always print source of error in case of exec errors (Nico Schottelius) - * Bugfix core: Various smaller bugs in string concatenation (Nico Schottelius) - * Feature: Add marker "changed" to changed objects (Nico Schottelius) - -2.0.0: 2011-09-16 - * New Type: __package_rubygem (Chase Allen James) - * __self replaced by __object_fq (Nico Schottelius) - * Rewrote cdist in Python (Nico Schottelius) - -1.7.1: 2011-07-26 - * Documentation: Add explorers to reference (Nico Schottelius) - * Documentation: Typo cleanup (Derek Brost) - * Type __key_value: Bugfix (Steven Armstrong) - * New Type: __postgres_role (Steven Armstrong) - * New Type: __postgres_database (Steven Armstrong) - -1.7.0: 2011-05-10 - * Bugfix type __package_yum: Fix redhat support (Ramon Salvadó) - * Improved type __package_yum: Add centos support (Ramon Salvadó) - * New Type: __timezone (Ramon Salvadó) - * Renamed explorer: hardware_type to machine (Nico Schottelius) - * Core: Do not execute empty code fragments (Nico Schottelius) - -1.6.2: 2011-04-19 - * Core: Introduce __cdist_tmp_base_dir (Nico Schottelius) - * Core: Cleanup and enhance cdist-type-template (Nico Schottelius) - * Core: cdist-mass-deploy: Report failed cdist-deploy-to instances (Nico Schottelius) - * New Type: __ssh_authorized_key (Aurélien Bondis) - -1.6.1: 2011-04-07 - * Improved logging: Show code responsible for abort (Nico Schottelius) - * Improved logging: Consistently prefix with current object or core (Nico Schottelius) - * Bugfix: Type __debconf_set_selections used wrong contens for selection (Nico Schottelius) - * Bugfix: Don't fail, if cache directory is not existing (Nico Schottelius) - * Bugfix: __user and __group exited non-zero if no change was necessary (Nico Schottelius) - * New Explorer: hardware_type (Nico Schottelius) - * New Type: __package_pkg_openbsd (Andi Brönnimann) - * New Type: __autofs_map (Steven Armstrong) - * New Type: __autofs_master (Steven Armstrong) - -1.6.0: 2011-04-06 - * New Type: __package_yum (Nico Schottelius) - * New type: __debconf_set_selections (Nico Schottelius) - * New explorer: os_version (Nico Schottelius) - * Bugfix: Type __group failed in case of __group NAME syntax (Nico Schottelius) - * Bugfix: __package* types: consistently name --state removed instead of - uninstalled or deinstalled (Nico Schottelius) - * Type __package: Added Fedora support (Nico Schottelius) - * Type __package_apt: Removed --preseed support (Nico Schottelius) - * Explorer os gained Fedora support (Nico Schottelius) - * Simplified types __user and __group (Nico Schottelius) - * New helper binary: cdist-mass-deploy (Nico Schottelius) - -1.5.0: 2011-04-01 - * Add basic cache functionality (Nico Schottelius) - * New type: __process (Nico Schottelius) - * Restructured execution: (Steven Armstrong) - Orientate processing on objects, resolve dependencies and - ensure correct execution order. - * Documentation: Rewrite stages docs (Steven Armstrong) - * Documentation: Remove legacy man pages (Steven Armstrong) - -1.4.1: 2011-03-25 - * New type: __key_value (Steven Armstrong) - * New type: __apt_ppa (Steven Armstrong) - * Documentation: Manpage generation cleanup (Nico Schottelius) - * Documentation: Manpage fix for __apt_ppa - -1.4.0: 2011-03-24 - * Add --recursive to __directory (Nico Schottelius) - * Move cdist generated stuff to .cdist of an object (Nico Schottelius) - * Allow objects to be redefined (Nico Schottelius) - -1.3.2: 2011-03-21 - * Add --source to __motd (Nico Schottelius) - * Add --preseed to __package_apt (Nico Schottelius) - * Include HTML documentation of manpages and publish them (Nico Schottelius) - -1.3.1: 2011-03-21 - * Document: cdist-type-build-emulation (Nico Schottelius) - * Document: cdist-type-emulator (Nico Schottelius) - * Document: cdist-remote-explorer-run (Nico Schottelius) - * Fix dependencies in cdist-code-run (Nico Schottelius) - * Fix dependencies in cdist-manifest-run-all (Nico Schottelius) - * Add --source to __issue and fix os check (Nico Schottelius) - -1.3.0: 2011-03-20 - * Add support for local and remote code generation and execution (Nico Schottelius) - * Bugfix: Remove obsolete $@ call in cdist-remote-explorer-run (Nico Schottelius) - * Bugfix: Correct manpage for __removeline (broke manpage generation) (Nico Schottelius) - -1.2.0: 2011-03-19 - * Added dependencies (see cdist-type(7)) (Nico Schottelius) - * New type: __removeline (Daniel Roth) - * New type: __group (Steven Armstrong) - * New type: __user (Steven Armstrong) - * Documentation: cdist-run-remote (Nico Schottelius) - * Documentation: cdist-code-run-all (Nico Schottelius) - * Documentation: cdist-object-gencode (Nico Schottelius) - * Documentation: cdist-explorer-run-global (Nico Schottelius) - * Documentation: cdist-manifest-run-init (Nico Schottelius) - * Documentation: cdist-manifest-run-all (Nico Schottelius) - * Documentation: cdist-object-gencode-all (Nico Schottelius) - * Documentation: cdist-manifest-run (Nico Schottelius) - -1.1.0: 2011-03-16 - * Replace type __file with __file, __directory, __link (Nico Schottelius) - * Documentation: cdist-env (Nico Schottelius) - * Documentation: cdist-config (Nico Schottelius) - * Documentation: cdist-dir (Nico Schottelius) - * Documentation: cdist-quickstart (Nico Schottelius) - -1.0.4: 2011-03-15 - * New type: __motd (Nico Schottelius) - * New type: __addifnosuchline (Daniel Roth) - * New type: __user (Nico Schottelius) - * Document type: __issue (Nico Schottelius) - * Document type: __package (Nico Schottelius) - * Document type: __package_pacman (Nico Schottelius) - * Document type: __package_apt (Nico Schottelius) - * New parameter for __file: --owner and --group (Nico Schottelius) - -1.0.3: 2011-03-11 - * Update regexp used for sane characters (Nico Schottelius) - * Allow types without parameters (Nico Schottelius) - * Allow type to be singleton (Nico Schottelius) - * Type __file learned --type symlink (Nico Schottelius) - -1.0.2: 2011-03-09 - * Add manpages: cdist-type, cdist-type__file, cdist-reference, cdist-explorer (Nico Schottelius) - * Make doc/man/ usable as MANPATH entry (Nico Schottelius) - -1.0.1: 2011-03-08 - * Added cdist-type-template including manpage (Nico Schottelius) - * Fix manpage building (Nico Schottelius) - * Add new manpages: cdist-stages, cdist-bin-transfer (Nico Schottelius) - -1.0.0: 2011-03-07 - * Initial release (Nico Schottelius) diff --git a/docs/dev/benchmark-parallel-deploy b/docs/dev/benchmark-parallel-deploy deleted file mode 100755 index 0e7c4a2f..00000000 --- a/docs/dev/benchmark-parallel-deploy +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -outfile="$1"; shift - -( - for host in "$@"; do - hosts="$hosts $host" - cdist config -c ~/p/cdist-nutzung -p $hosts 2>&1 - done -) | tee "$outfile" -echo "----------" -grep 'INFO: Total processing time for' "$outfile" | sed 's/.*: //' diff --git a/docs/dev/factsheet.odt b/docs/dev/factsheet.odt deleted file mode 100644 index 2bb2a84b..00000000 Binary files a/docs/dev/factsheet.odt and /dev/null differ diff --git a/docs/dev/factsheet.pdf b/docs/dev/factsheet.pdf deleted file mode 100644 index c59a1a6f..00000000 Binary files a/docs/dev/factsheet.pdf and /dev/null differ diff --git a/docs/dev/github-gitlab-migration/release b/docs/dev/github-gitlab-migration/release deleted file mode 100755 index c973f0f1..00000000 --- a/docs/dev/github-gitlab-migration/release +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh -e - -set -x - -printf "Enter tag name: " -read tag -printf "Enter repository authentication token: " -read token - -git tag -d "${tag}" || : - -git tag "${tag}" -m "Release ${tag}" -git push origin "${tag}" - -echo 'foo' > foo -echo 'foo signature' > foo.asc - -archivename="foo" - -project="poljakowski%2Fmy-cdist-testing" -sed_cmd='s/^.*"markdown":"\([^"]*\)".*$/\1/' - -# upload archive -response_archive=$(curl -f -X POST \ - -H "PRIVATE-TOKEN: ${token}" \ - -F "file=@${archivename}" \ - "https://code.ungleich.ch/api/v4/projects/${project}/uploads" \ - | sed "${sed_cmd}") || exit 1 - -# upload archive signature -response_archive_sig=$(curl -f -X POST \ - -H "PRIVATE-TOKEN: ${token}" \ - -F "file=@${archivename}.asc" \ - "https://code.ungleich.ch/api/v4/projects/${project}/uploads" \ - | sed "${sed_cmd}") || exit 1 - -# make release -curl -f -X POST \ - -H "PRIVATE-TOKEN: ${token}" \ - -F "description=Release ${tag}
${response_archive}
${response_archive_sig}" \ - "https://code.ungleich.ch/api/v4/projects/${project}/repository/tags/${tag}/release" \ - || exit 1 - -# get tag -curl -f -X GET \ - -H "PRIVATE-TOKEN: ${token}" \ - "https://code.ungleich.ch/api/v4/projects/${project}/repository/tags/${tag}" \ - || exit 1 - -rm -f foo foo.asc diff --git a/docs/dev/logs/2011-04-20.slashdot-articles b/docs/dev/logs/2011-04-20.slashdot-articles deleted file mode 100644 index 24b3baf0..00000000 --- a/docs/dev/logs/2011-04-20.slashdot-articles +++ /dev/null @@ -1,2 +0,0 @@ -http://slashdot.org/submission/1533922/cdist-162---usable-configuration-management -http://slashdot.org/submission/1522134/Cdist-Configuration-management-that-makes-fun# diff --git a/docs/dev/logs/2011-04-21.benchmark-eth b/docs/dev/logs/2011-04-21.benchmark-eth deleted file mode 100644 index f1dfa05a..00000000 --- a/docs/dev/logs/2011-04-21.benchmark-eth +++ /dev/null @@ -1,7 +0,0 @@ -cdist-mass-deploy -p ikq02.ethz.ch; 142 -cdist-mass-deploy -p ikq02.ethz.ch ikq03.ethz.ch; 194 -cdist-mass-deploy -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch; 271 -cdist-mass-deploy -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch ikq05.ethz.ch; 328 -cdist-mass-deploy -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch ikq05.ethz.ch ikq06.ethz.ch; 456 -cdist-mass-deploy -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch ikq05.ethz.ch ikq06.ethz.ch ikq07.ethz.ch; 568 - diff --git a/docs/dev/logs/2011-04-27.benchmark b/docs/dev/logs/2011-04-27.benchmark deleted file mode 100644 index 6f1f1e21..00000000 --- a/docs/dev/logs/2011-04-27.benchmark +++ /dev/null @@ -1,56 +0,0 @@ -% x200 -data = [ 1 104; 2 129; 6 249 ; 25 1267 ] - -% x201, 4.2.2.4 dns, eth -data = [ 1 143; 2 159; 3 198; 4 244; 5 299; 6 350; 7 435; 8 429 ]; - -% x201, von zuhause aus -data2 = [ 226 242 275 296 306 357 403 400 409 685 617 672 ] -plot(0:size(data)(2)-1, data) - - -hold off; -plot(data(:,1), data(:,2)) -% per host time: -data(:,2)' ./ data(:,1)' -hold on; -plot(data(:,1), data(:,2)' ./ data(:,1)') - - -Testing on - Intel(R) Core(TM)2 Duo CPU P8400 @ 2.26GHz - 4 GiB RAM - Intel Gbit Nic - -- 169 objects, all done (i.e. rerun) -- runs are cpu bound - -1 host: - -core: cdist 1.6.2: Successfully finished run -Run: 104s (1 minutes) - -2 hosts: - -[13:48] kr:cdist-nutzung% mytime cdist-mass-deploy -p ikq03.ethz.ch ikq04.ethz.ch -Run: 129s (2 minutes) - -6 hosts: (7 specified, but ikq01.ethz.ch is dead) -cdist-mass-deploy -p ikq01.ethz.ch ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch ikq05.ethz.ch ikq06.ethz.ch ikq07.ethz.ch -Run: 294s (4 minutes) - -25 hosts - -[13:58] kr:cdist-nutzung% mytime cdist-mass-deploy -p $(sed 's/^root@//' ~/.dsh/group/ikr) - -Run: 723s (12 minutes) - - -25 hosts without proxy command now: - -Run: 1267s (21 minutes) -Run: 1212s (20 minutes) - - -[14:11] kr:cdist-nutzung% mytime cdist-mass-deploy -p $(sed 's/^root@//' ~/.dsh/group/ikr) - diff --git a/docs/dev/logs/2011-04-27.benchmark.dash b/docs/dev/logs/2011-04-27.benchmark.dash deleted file mode 100644 index 635062e8..00000000 --- a/docs/dev/logs/2011-04-27.benchmark.dash +++ /dev/null @@ -1,9 +0,0 @@ -Run: 78s (1 minutes) -[13:25] kr:cdist-nutzung% mytime cdist-deploy-to ikq02.ethz.ch - -% mit dash, eth, x201, Mit Apr 27 13:41:49 CEST 2011 -data = [ 0 73 77 89 107 130 151 180 197 228 251 260 199 295 335 276 ] -plot(0:size(data2)(2)-1, data2) - - - diff --git a/docs/dev/logs/2011-04-27.debug-timing b/docs/dev/logs/2011-04-27.debug-timing deleted file mode 100644 index e6c99d4d..00000000 --- a/docs/dev/logs/2011-04-27.debug-timing +++ /dev/null @@ -1,1725 +0,0 @@ -core: cdist 1.6.2: Configuring ikq04.ethz.ch -core: Creating clean directory structure -core: Transferring cdist binaries to the target host -core: Debug: Mit Apr 27 14:17:37 CEST 2011 -core: Debug: Mit Apr 27 14:17:37 CEST 2011 -core: Running global explorers -core: Debug: Mit Apr 27 14:17:38 CEST 2011 -core: Running initial manifest for ikq04.ethz.ch -core: Debug: Mit Apr 27 14:17:39 CEST 2011 -__ethz_systems/singleton: Preparing object -__ethz_systems/singleton: Checking manifest -__ethz_systems/singleton: Executing manifest -__file/etc/cdist-configured: Preparing object -__file/etc/cdist-configured: Transfering explorers for __file -__file/etc/cdist-configured: Running explorers -__file/etc/cdist-configured: Checking manifest -__package/puppet: Preparing object -__package/puppet: Checking manifest -__package/puppet: Executing manifest -__ethz_systems_root_via_ssh/subasui: Preparing object -__ethz_systems_root_via_ssh/subasui: Checking manifest -__ethz_systems_root_via_ssh/subasui: Executing manifest -__ethz_systems_root_via_ssh/blukas: Preparing object -__ethz_systems_root_via_ssh/blukas: Checking manifest -__ethz_systems_root_via_ssh/blukas: Executing manifest -__ethz_systems_root_via_ssh/petfisch: Preparing object -__ethz_systems_root_via_ssh/petfisch: Checking manifest -__ethz_systems_root_via_ssh/petfisch: Executing manifest -__ethz_nullmailer/singleton: Preparing object -__ethz_nullmailer/singleton: Checking manifest -__ethz_nullmailer/singleton: Executing manifest -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__ethz_systems_ldap_krb5_autofs/singleton: Preparing object -__ethz_systems_ldap_krb5_autofs/singleton: Checking manifest -__ethz_systems_ldap_krb5_autofs/singleton: Executing manifest -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__etc_hosts/singleton: Preparing object -__etc_hosts/singleton: Checking manifest -__etc_hosts/singleton: Executing manifest -__directory/local: Preparing object -__directory/local: Transfering explorers for __directory -__directory/local: Running explorers -__directory/local: Checking manifest -__ethz_ntpd/singleton: Preparing object -__ethz_ntpd/singleton: Checking manifest -__ethz_ntpd/singleton: Executing manifest -__ethz_systems_packages/singleton: Preparing object -__ethz_systems_packages/singleton: Checking manifest -__ethz_systems_packages/singleton: Executing manifest -__package_apt/puppet: Preparing object -__package_apt/puppet: Transfering explorers for __package_apt -__package_apt/puppet: Running explorers -__package_apt/puppet: Checking manifest -__addifnosuchline/ssh-root-subasui: Preparing object -__addifnosuchline/ssh-root-subasui: Transfering explorers for __addifnosuchline -__addifnosuchline/ssh-root-subasui: Running explorers -__addifnosuchline/ssh-root-subasui: Checking manifest -__addifnosuchline/ssh-root-blukas: Preparing object -__addifnosuchline/ssh-root-blukas: Running explorers -__addifnosuchline/ssh-root-blukas: Checking manifest -__addifnosuchline/ssh-root-petfisch: Preparing object -__addifnosuchline/ssh-root-petfisch: Running explorers -__addifnosuchline/ssh-root-petfisch: Checking manifest -__ethz_systems_motd/singleton: Preparing object -__ethz_systems_motd/singleton: Checking manifest -__ethz_systems_motd/singleton: Executing manifest -__ethz_systems_sudo/singleton: Preparing object -__ethz_systems_sudo/singleton: Checking manifest -__ethz_systems_sudo/singleton: Executing manifest -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__ethz_sans_syslog/singleton: Preparing object -__ethz_sans_syslog/singleton: Checking manifest -__ethz_sans_syslog/singleton: Executing manifest -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/ethz/autofs/auto.pub: Preparing object -__file/etc/ethz/autofs/auto.pub: Running explorers -__file/etc/ethz/autofs/auto.pub: Checking manifest -__file/etc/default/openntpd: Preparing object -__file/etc/default/openntpd: Running explorers -__file/etc/default/openntpd: Checking manifest -__file/etc/hosts: Preparing object -__file/etc/hosts: Running explorers -__file/etc/hosts: Checking manifest -__file/etc/syslog-ng/syslog-ng.conf: Preparing object -__file/etc/syslog-ng/syslog-ng.conf: Running explorers -__file/etc/syslog-ng/syslog-ng.conf: Checking manifest -__file/etc/nullmailer/remotes: Preparing object -__file/etc/nullmailer/remotes: Running explorers -__file/etc/nullmailer/remotes: Checking manifest -__file/etc/openntpd/ntpd.conf: Preparing object -__file/etc/openntpd/ntpd.conf: Running explorers -__file/etc/openntpd/ntpd.conf: Checking manifest -__file/etc/sudoers.d/systems: Preparing object -__file/etc/sudoers.d/systems: Running explorers -__file/etc/sudoers.d/systems: Checking manifest -__link/etc/motd: Preparing object -__link/etc/motd: Checking manifest -__motd/singleton: Preparing object -__motd/singleton: Checking manifest -__motd/singleton: Executing manifest -__package/mc: Preparing object -__package/mc: Checking manifest -__package/mc: Executing manifest -__package/ant: Preparing object -__package/ant: Checking manifest -__package/ant: Executing manifest -__package/gcc: Preparing object -__package/gcc: Checking manifest -__package/gcc: Executing manifest -__package/gdb: Preparing object -__package/gdb: Checking manifest -__package/gdb: Executing manifest -__package/vim: Preparing object -__package/vim: Checking manifest -__package/vim: Executing manifest -__package/git-core: Preparing object -__package/git-core: Checking manifest -__package/git-core: Executing manifest -__package/atop: Preparing object -__package/atop: Checking manifest -__package/atop: Executing manifest -__package/flex: Preparing object -__package/flex: Checking manifest -__package/flex: Executing manifest -__package/gawk: Preparing object -__package/gawk: Checking manifest -__package/gawk: Executing manifest -__package/make: Preparing object -__package/make: Checking manifest -__package/make: Executing manifest -__package/sudo: Preparing object -__package/sudo: Checking manifest -__package/sudo: Executing manifest -__package/swig: Preparing object -__package/swig: Checking manifest -__package/swig: Executing manifest -__package/libreadline5-dev: Preparing object -__package/libreadline5-dev: Checking manifest -__package/libreadline5-dev: Executing manifest -__package/libexpat1-dev: Preparing object -__package/libexpat1-dev: Checking manifest -__package/libexpat1-dev: Executing manifest -__package/libnet-ssleay-perl: Preparing object -__package/libnet-ssleay-perl: Checking manifest -__package/libnet-ssleay-perl: Executing manifest -__package/subversion: Preparing object -__package/subversion: Checking manifest -__package/subversion: Executing manifest -__package/libcurl4-openssl-dev: Preparing object -__package/libcurl4-openssl-dev: Checking manifest -__package/libcurl4-openssl-dev: Executing manifest -__package/bison: Preparing object -__package/bison: Checking manifest -__package/bison: Executing manifest -__package/cmake: Preparing object -__package/cmake: Checking manifest -__package/cmake: Executing manifest -__package/emacs: Preparing object -__package/emacs: Checking manifest -__package/emacs: Executing manifest -__package/xfce4: Preparing object -__package/xfce4: Checking manifest -__package/xfce4: Executing manifest -__package/xterm: Preparing object -__package/xterm: Checking manifest -__package/xterm: Executing manifest -__package/tcl8.4-dev: Preparing object -__package/tcl8.4-dev: Checking manifest -__package/tcl8.4-dev: Executing manifest -__package/libio-socket-ssl-perl: Preparing object -__package/libio-socket-ssl-perl: Checking manifest -__package/libio-socket-ssl-perl: Executing manifest -__package/doxygen: Preparing object -__package/doxygen: Checking manifest -__package/doxygen: Executing manifest -__package/zlib1g-dev: Preparing object -__package/zlib1g-dev: Checking manifest -__package/zlib1g-dev: Executing manifest -__package/autoconf: Preparing object -__package/autoconf: Checking manifest -__package/autoconf: Executing manifest -__package/libtool: Preparing object -__package/libtool: Checking manifest -__package/libtool: Executing manifest -__package/syslog-ng: Preparing object -__package/syslog-ng: Checking manifest -__package/syslog-ng: Executing manifest -__package/traceroute-nanog: Preparing object -__package/traceroute-nanog: Checking manifest -__package/traceroute-nanog: Executing manifest -__package/libncurses5-dev: Preparing object -__package/libncurses5-dev: Checking manifest -__package/libncurses5-dev: Executing manifest -__package/libaio-dev: Preparing object -__package/libaio-dev: Checking manifest -__package/libaio-dev: Executing manifest -__package/libboost-dev: Preparing object -__package/libboost-dev: Checking manifest -__package/libboost-dev: Executing manifest -__package/xtightvncviewer: Preparing object -__package/xtightvncviewer: Checking manifest -__package/xtightvncviewer: Executing manifest -__package/nullmailer: Preparing object -__package/nullmailer: Checking manifest -__package/nullmailer: Executing manifest -__package/libxml2-dev: Preparing object -__package/libxml2-dev: Checking manifest -__package/libxml2-dev: Executing manifest -__package/libtidy-dev: Preparing object -__package/libtidy-dev: Checking manifest -__package/libtidy-dev: Executing manifest -__package/manpages: Preparing object -__package/manpages: Checking manifest -__package/manpages: Executing manifest -__package/gcc-doc: Preparing object -__package/gcc-doc: Checking manifest -__package/gcc-doc: Executing manifest -__package/fluxbox: Preparing object -__package/fluxbox: Checking manifest -__package/fluxbox: Executing manifest -__package/libicu-dev: Preparing object -__package/libicu-dev: Checking manifest -__package/libicu-dev: Executing manifest -__package/libc6-dev-i386: Preparing object -__package/libc6-dev-i386: Checking manifest -__package/libc6-dev-i386: Executing manifest -__package/mercurial: Preparing object -__package/mercurial: Checking manifest -__package/mercurial: Executing manifest -__package/git-doc: Preparing object -__package/git-doc: Checking manifest -__package/git-doc: Executing manifest -__package/git-svn: Preparing object -__package/git-svn: Checking manifest -__package/git-svn: Executing manifest -__package/libnuma-dev: Preparing object -__package/libnuma-dev: Checking manifest -__package/libnuma-dev: Executing manifest -__package/gnuplot: Preparing object -__package/gnuplot: Checking manifest -__package/gnuplot: Executing manifest -__package/screen: Preparing object -__package/screen: Checking manifest -__package/screen: Executing manifest -__package/openntpd: Preparing object -__package/openntpd: Checking manifest -__package/openntpd: Executing manifest -__package/gcc-multilib: Preparing object -__package/gcc-multilib: Checking manifest -__package/gcc-multilib: Executing manifest -__package/libboost-regex-dev: Preparing object -__package/libboost-regex-dev: Checking manifest -__package/libboost-regex-dev: Executing manifest -__package/g++-multilib: Preparing object -__package/g++-multilib: Checking manifest -__package/g++-multilib: Executing manifest -__package/xfonts-base: Preparing object -__package/xfonts-base: Checking manifest -__package/xfonts-base: Executing manifest -__package/rdesktop: Preparing object -__package/rdesktop: Checking manifest -__package/rdesktop: Executing manifest -__package/build-essential: Preparing object -__package/build-essential: Checking manifest -__package/build-essential: Executing manifest -__package/tightvncserver: Preparing object -__package/tightvncserver: Checking manifest -__package/tightvncserver: Executing manifest -__package/python-crypto: Preparing object -__package/python-crypto: Checking manifest -__package/python-crypto: Executing manifest -__package/libc6-dev: Preparing object -__package/libc6-dev: Checking manifest -__package/libc6-dev: Executing manifest -__package/manpages-dev: Preparing object -__package/manpages-dev: Checking manifest -__package/manpages-dev: Executing manifest -__package/ia32-libs: Preparing object -__package/ia32-libs: Checking manifest -__package/ia32-libs: Executing manifest -__package/libxml-checker-perl: Preparing object -__package/libxml-checker-perl: Checking manifest -__package/libxml-checker-perl: Executing manifest -__ethz_pam_krb5/singleton: Preparing object -__ethz_pam_krb5/singleton: Checking manifest -__ethz_pam_krb5/singleton: Executing manifest -__ethz_dinfk_autofs/singleton: Preparing object -__ethz_dinfk_autofs/singleton: Checking manifest -__ethz_dinfk_autofs/singleton: Executing manifest -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__ethz_dinfk_ldap/singleton: Preparing object -__ethz_dinfk_ldap/singleton: Checking manifest -__ethz_dinfk_ldap/singleton: Executing manifest -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__directory/etc/ethz/autofs: Preparing object -__directory/etc/ethz/autofs: Running explorers -__directory/etc/ethz/autofs: Checking manifest -__ethz_krb5/singleton: Preparing object -__ethz_krb5/singleton: Checking manifest -__ethz_krb5/singleton: Executing manifest -__package_apt/mc: Preparing object -__package_apt/mc: Running explorers -__package_apt/mc: Checking manifest -__package_apt/ant: Preparing object -__package_apt/ant: Running explorers -__package_apt/ant: Checking manifest -__package_apt/gcc: Preparing object -__package_apt/gcc: Running explorers -__package_apt/gcc: Checking manifest -__package_apt/gdb: Preparing object -__package_apt/gdb: Running explorers -__package_apt/gdb: Checking manifest -__package_apt/vim: Preparing object -__package_apt/vim: Running explorers -__package_apt/vim: Checking manifest -__package_apt/git-core: Preparing object -__package_apt/git-core: Running explorers -__package_apt/git-core: Checking manifest -__package_apt/atop: Preparing object -__package_apt/atop: Running explorers -__package_apt/atop: Checking manifest -__package_apt/flex: Preparing object -__package_apt/flex: Running explorers -__package_apt/flex: Checking manifest -__package_apt/gawk: Preparing object -__package_apt/gawk: Running explorers -__package_apt/gawk: Checking manifest -__package_apt/make: Preparing object -__package_apt/make: Running explorers -__package_apt/make: Checking manifest -__package_apt/sudo: Preparing object -__package_apt/sudo: Running explorers -__package_apt/sudo: Checking manifest -__package_apt/swig: Preparing object -__package_apt/swig: Running explorers -__package_apt/swig: Checking manifest -__package_apt/libreadline5-dev: Preparing object -__package_apt/libreadline5-dev: Running explorers -__package_apt/libreadline5-dev: Checking manifest -__package_apt/libexpat1-dev: Preparing object -__package_apt/libexpat1-dev: Running explorers -__package_apt/libexpat1-dev: Checking manifest -__package_apt/libnet-ssleay-perl: Preparing object -__package_apt/libnet-ssleay-perl: Running explorers -__package_apt/libnet-ssleay-perl: Checking manifest -__package_apt/subversion: Preparing object -__package_apt/subversion: Running explorers -__package_apt/subversion: Checking manifest -__package_apt/libcurl4-openssl-dev: Preparing object -__package_apt/libcurl4-openssl-dev: Running explorers -__package_apt/libcurl4-openssl-dev: Checking manifest -__package_apt/bison: Preparing object -__package_apt/bison: Running explorers -__package_apt/bison: Checking manifest -__package_apt/cmake: Preparing object -__package_apt/cmake: Running explorers -__package_apt/cmake: Checking manifest -__package_apt/emacs: Preparing object -__package_apt/emacs: Running explorers -__package_apt/emacs: Checking manifest -__package_apt/xfce4: Preparing object -__package_apt/xfce4: Running explorers -__package_apt/xfce4: Checking manifest -__package_apt/xterm: Preparing object -__package_apt/xterm: Running explorers -__package_apt/xterm: Checking manifest -__package_apt/tcl8.4-dev: Preparing object -__package_apt/tcl8.4-dev: Running explorers -__package_apt/tcl8.4-dev: Checking manifest -__package_apt/libio-socket-ssl-perl: Preparing object -__package_apt/libio-socket-ssl-perl: Running explorers -__package_apt/libio-socket-ssl-perl: Checking manifest -__package_apt/doxygen: Preparing object -__package_apt/doxygen: Running explorers -__package_apt/doxygen: Checking manifest -__package_apt/zlib1g-dev: Preparing object -__package_apt/zlib1g-dev: Running explorers -__package_apt/zlib1g-dev: Checking manifest -__package_apt/autoconf: Preparing object -__package_apt/autoconf: Running explorers -__package_apt/autoconf: Checking manifest -__package_apt/libtool: Preparing object -__package_apt/libtool: Running explorers -__package_apt/libtool: Checking manifest -__package_apt/syslog-ng: Preparing object -__package_apt/syslog-ng: Running explorers -__package_apt/syslog-ng: Checking manifest -__package_apt/traceroute-nanog: Preparing object -__package_apt/traceroute-nanog: Running explorers -__package_apt/traceroute-nanog: Checking manifest -__package_apt/libncurses5-dev: Preparing object -__package_apt/libncurses5-dev: Running explorers -__package_apt/libncurses5-dev: Checking manifest -__package_apt/libaio-dev: Preparing object -__package_apt/libaio-dev: Running explorers -__package_apt/libaio-dev: Checking manifest -__package_apt/libboost-dev: Preparing object -__package_apt/libboost-dev: Running explorers -__package_apt/libboost-dev: Checking manifest -__package_apt/xtightvncviewer: Preparing object -__package_apt/xtightvncviewer: Running explorers -__package_apt/xtightvncviewer: Checking manifest -__package_apt/nullmailer: Preparing object -__package_apt/nullmailer: Running explorers -__package_apt/nullmailer: Checking manifest -__package_apt/libxml2-dev: Preparing object -__package_apt/libxml2-dev: Running explorers -__package_apt/libxml2-dev: Checking manifest -__package_apt/libtidy-dev: Preparing object -__package_apt/libtidy-dev: Running explorers -__package_apt/libtidy-dev: Checking manifest -__package_apt/manpages: Preparing object -__package_apt/manpages: Running explorers -__package_apt/manpages: Checking manifest -__package_apt/gcc-doc: Preparing object -__package_apt/gcc-doc: Running explorers -__package_apt/gcc-doc: Checking manifest -__package_apt/fluxbox: Preparing object -__package_apt/fluxbox: Running explorers -__package_apt/fluxbox: Checking manifest -__package_apt/libicu-dev: Preparing object -__package_apt/libicu-dev: Running explorers -__package_apt/libicu-dev: Checking manifest -__package_apt/libc6-dev-i386: Preparing object -__package_apt/libc6-dev-i386: Running explorers -__package_apt/libc6-dev-i386: Checking manifest -__package_apt/mercurial: Preparing object -__package_apt/mercurial: Running explorers -__package_apt/mercurial: Checking manifest -__package_apt/git-doc: Preparing object -__package_apt/git-doc: Running explorers -__package_apt/git-doc: Checking manifest -__package_apt/git-svn: Preparing object -__package_apt/git-svn: Running explorers -__package_apt/git-svn: Checking manifest -__package_apt/libnuma-dev: Preparing object -__package_apt/libnuma-dev: Running explorers -__package_apt/libnuma-dev: Checking manifest -__package_apt/gnuplot: Preparing object -__package_apt/gnuplot: Running explorers -__package_apt/gnuplot: Checking manifest -__package_apt/screen: Preparing object -__package_apt/screen: Running explorers -__package_apt/screen: Checking manifest -__package_apt/openntpd: Preparing object -__package_apt/openntpd: Running explorers -__package_apt/openntpd: Checking manifest -__package_apt/gcc-multilib: Preparing object -__package_apt/gcc-multilib: Running explorers -__package_apt/gcc-multilib: Checking manifest -__package_apt/libboost-regex-dev: Preparing object -__package_apt/libboost-regex-dev: Running explorers -__package_apt/libboost-regex-dev: Checking manifest -__package_apt/g++-multilib: Preparing object -__package_apt/g++-multilib: Running explorers -__package_apt/g++-multilib: Checking manifest -__package_apt/xfonts-base: Preparing object -__package_apt/xfonts-base: Running explorers -__package_apt/xfonts-base: Checking manifest -__package_apt/rdesktop: Preparing object -__package_apt/rdesktop: Running explorers -__package_apt/rdesktop: Checking manifest -__package_apt/build-essential: Preparing object -__package_apt/build-essential: Running explorers -__package_apt/build-essential: Checking manifest -__package_apt/tightvncserver: Preparing object -__package_apt/tightvncserver: Running explorers -__package_apt/tightvncserver: Checking manifest -__package_apt/python-crypto: Preparing object -__package_apt/python-crypto: Running explorers -__package_apt/python-crypto: Checking manifest -__package_apt/libc6-dev: Preparing object -__package_apt/libc6-dev: Running explorers -__package_apt/libc6-dev: Checking manifest -__package_apt/manpages-dev: Preparing object -__package_apt/manpages-dev: Running explorers -__package_apt/manpages-dev: Checking manifest -__package_apt/ia32-libs: Preparing object -__package_apt/ia32-libs: Running explorers -__package_apt/ia32-libs: Checking manifest -__package_apt/libxml-checker-perl: Preparing object -__package_apt/libxml-checker-perl: Running explorers -__package_apt/libxml-checker-perl: Checking manifest -__file/etc/nsswitch.conf: Preparing object -__file/etc/nsswitch.conf: Running explorers -__file/etc/nsswitch.conf: Checking manifest -__file/etc/ethz/autofs/auto_home: Preparing object -__file/etc/ethz/autofs/auto_home: Running explorers -__file/etc/ethz/autofs/auto_home: Checking manifest -__file/etc/auto.master: Preparing object -__file/etc/auto.master: Running explorers -__file/etc/auto.master: Checking manifest -__file/etc/motd.tail: Preparing object -__file/etc/motd.tail: Running explorers -__file/etc/motd.tail: Checking manifest -__file/etc/nslcd.conf: Preparing object -__file/etc/nslcd.conf: Running explorers -__file/etc/nslcd.conf: Checking manifest -__package/python-ldap: Preparing object -__package/python-ldap: Checking manifest -__package/python-ldap: Executing manifest -__package/libnss-ldapd: Preparing object -__package/libnss-ldapd: Checking manifest -__package/libnss-ldapd: Executing manifest -__package/autofs: Preparing object -__package/autofs: Checking manifest -__package/autofs: Executing manifest -__package/libpam-krb5: Preparing object -__package/libpam-krb5: Checking manifest -__package/libpam-krb5: Executing manifest -__package_apt/python-ldap: Preparing object -__package_apt/python-ldap: Running explorers -__package_apt/python-ldap: Checking manifest -__package_apt/libnss-ldapd: Preparing object -__package_apt/libnss-ldapd: Running explorers -__package_apt/libnss-ldapd: Checking manifest -__package_apt/autofs: Preparing object -__package_apt/autofs: Running explorers -__package_apt/autofs: Checking manifest -__package_apt/libpam-krb5: Preparing object -__package_apt/libpam-krb5: Running explorers -__package_apt/libpam-krb5: Checking manifest -__file/etc/krb5.conf: Preparing object -__file/etc/krb5.conf: Running explorers -__file/etc/krb5.conf: Checking manifest -core: Debug: Mit Apr 27 14:18:44 CEST 2011 -__ethz_nullmailer/singleton: Generating local code -__ethz_nullmailer/singleton: Generating remote code -__ethz_nullmailer/singleton: Transferring object -__ethz_nullmailer/singleton: Checking code-local -__ethz_nullmailer/singleton: Executing code-local -__ethz_nullmailer/singleton: Checking code-remote -__ethz_nullmailer/singleton: Executing code-remote -__ethz_systems_ldap_krb5_autofs/singleton: Generating local code -__ethz_systems_ldap_krb5_autofs/singleton: Generating remote code -__ethz_systems_ldap_krb5_autofs/singleton: Transferring object -__ethz_systems_ldap_krb5_autofs/singleton: Checking code-local -__ethz_systems_ldap_krb5_autofs/singleton: Executing code-local -__ethz_systems_ldap_krb5_autofs/singleton: Checking code-remote -__ethz_systems_ldap_krb5_autofs/singleton: Executing code-remote -__etc_hosts/singleton: Generating local code -__etc_hosts/singleton: Generating remote code -__etc_hosts/singleton: Transferring object -__etc_hosts/singleton: Checking code-local -__etc_hosts/singleton: Executing code-local -__etc_hosts/singleton: Checking code-remote -__etc_hosts/singleton: Executing code-remote -__directory/etc/ethz/autofs: Generating local code -__directory/etc/ethz/autofs: Generating remote code -__directory/etc/ethz/autofs: Transferring object -__directory/etc/ethz/autofs: Checking code-local -__directory/etc/ethz/autofs: Executing code-local -__directory/etc/ethz/autofs: Checking code-remote -__directory/etc/ethz/autofs: Executing code-remote -__directory/local: Generating local code -__directory/local: Generating remote code -__directory/local: Transferring object -__directory/local: Checking code-local -__directory/local: Executing code-local -__directory/local: Checking code-remote -__directory/local: Executing code-remote -__ethz_krb5/singleton: Generating local code -__ethz_krb5/singleton: Generating remote code -__ethz_krb5/singleton: Transferring object -__ethz_krb5/singleton: Checking code-local -__ethz_krb5/singleton: Executing code-local -__ethz_krb5/singleton: Checking code-remote -__ethz_krb5/singleton: Executing code-remote -__ethz_ntpd/singleton: Generating local code -__ethz_ntpd/singleton: Generating remote code -__ethz_ntpd/singleton: Transferring object -__ethz_ntpd/singleton: Checking code-local -__ethz_ntpd/singleton: Executing code-local -__ethz_ntpd/singleton: Checking code-remote -__ethz_ntpd/singleton: Executing code-remote -__ethz_systems_packages/singleton: Generating local code -__ethz_systems_packages/singleton: Generating remote code -__ethz_systems_packages/singleton: Transferring object -__ethz_systems_packages/singleton: Checking code-local -__ethz_systems_packages/singleton: Executing code-local -__ethz_systems_packages/singleton: Checking code-remote -__ethz_systems_packages/singleton: Executing code-remote -__package_apt/mc: Generating local code -__package_apt/mc: Generating remote code -__package_apt/mc: Transferring object -__package_apt/mc: Checking code-local -__package_apt/mc: Executing code-local -__package_apt/mc: Checking code-remote -__package_apt/mc: Executing code-remote -__package_apt/ant: Generating local code -__package_apt/ant: Generating remote code -__package_apt/ant: Transferring object -__package_apt/ant: Checking code-local -__package_apt/ant: Executing code-local -__package_apt/ant: Checking code-remote -__package_apt/ant: Executing code-remote -__package_apt/gcc: Generating local code -__package_apt/gcc: Generating remote code -__package_apt/gcc: Transferring object -__package_apt/gcc: Checking code-local -__package_apt/gcc: Executing code-local -__package_apt/gcc: Checking code-remote -__package_apt/gcc: Executing code-remote -__package_apt/gdb: Generating local code -__package_apt/gdb: Generating remote code -__package_apt/gdb: Transferring object -__package_apt/gdb: Checking code-local -__package_apt/gdb: Executing code-local -__package_apt/gdb: Checking code-remote -__package_apt/gdb: Executing code-remote -__package_apt/vim: Generating local code -__package_apt/vim: Generating remote code -__package_apt/vim: Transferring object -__package_apt/vim: Checking code-local -__package_apt/vim: Executing code-local -__package_apt/vim: Checking code-remote -__package_apt/vim: Executing code-remote -__package_apt/git-core: Generating local code -__package_apt/git-core: Generating remote code -__package_apt/git-core: Transferring object -__package_apt/git-core: Checking code-local -__package_apt/git-core: Executing code-local -__package_apt/git-core: Checking code-remote -__package_apt/git-core: Executing code-remote -__package_apt/atop: Generating local code -__package_apt/atop: Generating remote code -__package_apt/atop: Transferring object -__package_apt/atop: Checking code-local -__package_apt/atop: Executing code-local -__package_apt/atop: Checking code-remote -__package_apt/atop: Executing code-remote -__package_apt/flex: Generating local code -__package_apt/flex: Generating remote code -__package_apt/flex: Transferring object -__package_apt/flex: Checking code-local -__package_apt/flex: Executing code-local -__package_apt/flex: Checking code-remote -__package_apt/flex: Executing code-remote -__package_apt/gawk: Generating local code -__package_apt/gawk: Generating remote code -__package_apt/gawk: Transferring object -__package_apt/gawk: Checking code-local -__package_apt/gawk: Executing code-local -__package_apt/gawk: Checking code-remote -__package_apt/gawk: Executing code-remote -__package_apt/make: Generating local code -__package_apt/make: Generating remote code -__package_apt/make: Transferring object -__package_apt/make: Checking code-local -__package_apt/make: Executing code-local -__package_apt/make: Checking code-remote -__package_apt/make: Executing code-remote -__package_apt/sudo: Generating local code -__package_apt/sudo: Generating remote code -__package_apt/sudo: Transferring object -__package_apt/sudo: Checking code-local -__package_apt/sudo: Executing code-local -__package_apt/sudo: Checking code-remote -__package_apt/sudo: Executing code-remote -__package_apt/swig: Generating local code -__package_apt/swig: Generating remote code -__package_apt/swig: Transferring object -__package_apt/swig: Checking code-local -__package_apt/swig: Executing code-local -__package_apt/swig: Checking code-remote -__package_apt/swig: Executing code-remote -__package_apt/libreadline5-dev: Generating local code -__package_apt/libreadline5-dev: Generating remote code -__package_apt/libreadline5-dev: Transferring object -__package_apt/libreadline5-dev: Checking code-local -__package_apt/libreadline5-dev: Executing code-local -__package_apt/libreadline5-dev: Checking code-remote -__package_apt/libreadline5-dev: Executing code-remote -__package_apt/libexpat1-dev: Generating local code -__package_apt/libexpat1-dev: Generating remote code -__package_apt/libexpat1-dev: Transferring object -__package_apt/libexpat1-dev: Checking code-local -__package_apt/libexpat1-dev: Executing code-local -__package_apt/libexpat1-dev: Checking code-remote -__package_apt/libexpat1-dev: Executing code-remote -__package_apt/libnet-ssleay-perl: Generating local code -__package_apt/libnet-ssleay-perl: Generating remote code -__package_apt/libnet-ssleay-perl: Transferring object -__package_apt/libnet-ssleay-perl: Checking code-local -__package_apt/libnet-ssleay-perl: Executing code-local -__package_apt/libnet-ssleay-perl: Checking code-remote -__package_apt/libnet-ssleay-perl: Executing code-remote -__package_apt/subversion: Generating local code -__package_apt/subversion: Generating remote code -__package_apt/subversion: Transferring object -__package_apt/subversion: Checking code-local -__package_apt/subversion: Executing code-local -__package_apt/subversion: Checking code-remote -__package_apt/subversion: Executing code-remote -__package_apt/libcurl4-openssl-dev: Generating local code -__package_apt/libcurl4-openssl-dev: Generating remote code -__package_apt/libcurl4-openssl-dev: Transferring object -__package_apt/libcurl4-openssl-dev: Checking code-local -__package_apt/libcurl4-openssl-dev: Executing code-local -__package_apt/libcurl4-openssl-dev: Checking code-remote -__package_apt/libcurl4-openssl-dev: Executing code-remote -__package_apt/bison: Generating local code -__package_apt/bison: Generating remote code -__package_apt/bison: Transferring object -__package_apt/bison: Checking code-local -__package_apt/bison: Executing code-local -__package_apt/bison: Checking code-remote -__package_apt/bison: Executing code-remote -__package_apt/cmake: Generating local code -__package_apt/cmake: Generating remote code -__package_apt/cmake: Transferring object -__package_apt/cmake: Checking code-local -__package_apt/cmake: Executing code-local -__package_apt/cmake: Checking code-remote -__package_apt/cmake: Executing code-remote -__package_apt/emacs: Generating local code -__package_apt/emacs: Generating remote code -__package_apt/emacs: Transferring object -__package_apt/emacs: Checking code-local -__package_apt/emacs: Executing code-local -__package_apt/emacs: Checking code-remote -__package_apt/emacs: Executing code-remote -__package_apt/xfce4: Generating local code -__package_apt/xfce4: Generating remote code -__package_apt/xfce4: Transferring object -__package_apt/xfce4: Checking code-local -__package_apt/xfce4: Executing code-local -__package_apt/xfce4: Checking code-remote -__package_apt/xfce4: Executing code-remote -__package_apt/xterm: Generating local code -__package_apt/xterm: Generating remote code -__package_apt/xterm: Transferring object -__package_apt/xterm: Checking code-local -__package_apt/xterm: Executing code-local -__package_apt/xterm: Checking code-remote -__package_apt/xterm: Executing code-remote -__package_apt/tcl8.4-dev: Generating local code -__package_apt/tcl8.4-dev: Generating remote code -__package_apt/tcl8.4-dev: Transferring object -__package_apt/tcl8.4-dev: Checking code-local -__package_apt/tcl8.4-dev: Executing code-local -__package_apt/tcl8.4-dev: Checking code-remote -__package_apt/tcl8.4-dev: Executing code-remote -__package_apt/libio-socket-ssl-perl: Generating local code -__package_apt/libio-socket-ssl-perl: Generating remote code -__package_apt/libio-socket-ssl-perl: Transferring object -__package_apt/libio-socket-ssl-perl: Checking code-local -__package_apt/libio-socket-ssl-perl: Executing code-local -__package_apt/libio-socket-ssl-perl: Checking code-remote -__package_apt/libio-socket-ssl-perl: Executing code-remote -__package_apt/doxygen: Generating local code -__package_apt/doxygen: Generating remote code -__package_apt/doxygen: Transferring object -__package_apt/doxygen: Checking code-local -__package_apt/doxygen: Executing code-local -__package_apt/doxygen: Checking code-remote -__package_apt/doxygen: Executing code-remote -__package_apt/zlib1g-dev: Generating local code -__package_apt/zlib1g-dev: Generating remote code -__package_apt/zlib1g-dev: Transferring object -__package_apt/zlib1g-dev: Checking code-local -__package_apt/zlib1g-dev: Executing code-local -__package_apt/zlib1g-dev: Checking code-remote -__package_apt/zlib1g-dev: Executing code-remote -__package_apt/autoconf: Generating local code -__package_apt/autoconf: Generating remote code -__package_apt/autoconf: Transferring object -__package_apt/autoconf: Checking code-local -__package_apt/autoconf: Executing code-local -__package_apt/autoconf: Checking code-remote -__package_apt/autoconf: Executing code-remote -__package_apt/python-ldap: Generating local code -__package_apt/python-ldap: Generating remote code -__package_apt/python-ldap: Transferring object -__package_apt/python-ldap: Checking code-local -__package_apt/python-ldap: Executing code-local -__package_apt/python-ldap: Checking code-remote -__package_apt/python-ldap: Executing code-remote -__package_apt/libtool: Generating local code -__package_apt/libtool: Generating remote code -__package_apt/libtool: Transferring object -__package_apt/libtool: Checking code-local -__package_apt/libtool: Executing code-local -__package_apt/libtool: Checking code-remote -__package_apt/libtool: Executing code-remote -__package_apt/syslog-ng: Generating local code -__package_apt/syslog-ng: Generating remote code -__package_apt/syslog-ng: Transferring object -__package_apt/syslog-ng: Checking code-local -__package_apt/syslog-ng: Executing code-local -__package_apt/syslog-ng: Checking code-remote -__package_apt/syslog-ng: Executing code-remote -__package_apt/traceroute-nanog: Generating local code -__package_apt/traceroute-nanog: Generating remote code -__package_apt/traceroute-nanog: Transferring object -__package_apt/traceroute-nanog: Checking code-local -__package_apt/traceroute-nanog: Executing code-local -__package_apt/traceroute-nanog: Checking code-remote -__package_apt/traceroute-nanog: Executing code-remote -__package_apt/libnss-ldapd: Generating local code -__package_apt/libnss-ldapd: Generating remote code -__package_apt/libnss-ldapd: Transferring object -__package_apt/libnss-ldapd: Checking code-local -__package_apt/libnss-ldapd: Executing code-local -__package_apt/libnss-ldapd: Checking code-remote -__package_apt/libnss-ldapd: Executing code-remote -__package_apt/libncurses5-dev: Generating local code -__package_apt/libncurses5-dev: Generating remote code -__package_apt/libncurses5-dev: Transferring object -__package_apt/libncurses5-dev: Checking code-local -__package_apt/libncurses5-dev: Executing code-local -__package_apt/libncurses5-dev: Checking code-remote -__package_apt/libncurses5-dev: Executing code-remote -__package_apt/libaio-dev: Generating local code -__package_apt/libaio-dev: Generating remote code -__package_apt/libaio-dev: Transferring object -__package_apt/libaio-dev: Checking code-local -__package_apt/libaio-dev: Executing code-local -__package_apt/libaio-dev: Checking code-remote -__package_apt/libaio-dev: Executing code-remote -__package_apt/libboost-dev: Generating local code -__package_apt/libboost-dev: Generating remote code -__package_apt/libboost-dev: Transferring object -__package_apt/libboost-dev: Checking code-local -__package_apt/libboost-dev: Executing code-local -__package_apt/libboost-dev: Checking code-remote -__package_apt/libboost-dev: Executing code-remote -__package_apt/xtightvncviewer: Generating local code -__package_apt/xtightvncviewer: Generating remote code -__package_apt/xtightvncviewer: Transferring object -__package_apt/xtightvncviewer: Checking code-local -__package_apt/xtightvncviewer: Executing code-local -__package_apt/xtightvncviewer: Checking code-remote -__package_apt/xtightvncviewer: Executing code-remote -__package_apt/nullmailer: Generating local code -__package_apt/nullmailer: Generating remote code -__package_apt/nullmailer: Transferring object -__package_apt/nullmailer: Checking code-local -__package_apt/nullmailer: Executing code-local -__package_apt/nullmailer: Checking code-remote -__package_apt/nullmailer: Executing code-remote -__package_apt/libxml2-dev: Generating local code -__package_apt/libxml2-dev: Generating remote code -__package_apt/libxml2-dev: Transferring object -__package_apt/libxml2-dev: Checking code-local -__package_apt/libxml2-dev: Executing code-local -__package_apt/libxml2-dev: Checking code-remote -__package_apt/libxml2-dev: Executing code-remote -__package_apt/libtidy-dev: Generating local code -__package_apt/libtidy-dev: Generating remote code -__package_apt/libtidy-dev: Transferring object -__package_apt/libtidy-dev: Checking code-local -__package_apt/libtidy-dev: Executing code-local -__package_apt/libtidy-dev: Checking code-remote -__package_apt/libtidy-dev: Executing code-remote -__package_apt/manpages: Generating local code -__package_apt/manpages: Generating remote code -__package_apt/manpages: Transferring object -__package_apt/manpages: Checking code-local -__package_apt/manpages: Executing code-local -__package_apt/manpages: Checking code-remote -__package_apt/manpages: Executing code-remote -__package_apt/autofs: Generating local code -__package_apt/autofs: Generating remote code -__package_apt/autofs: Transferring object -__package_apt/autofs: Checking code-local -__package_apt/autofs: Executing code-local -__package_apt/autofs: Checking code-remote -__package_apt/autofs: Executing code-remote -__package_apt/gcc-doc: Generating local code -__package_apt/gcc-doc: Generating remote code -__package_apt/gcc-doc: Transferring object -__package_apt/gcc-doc: Checking code-local -__package_apt/gcc-doc: Executing code-local -__package_apt/gcc-doc: Checking code-remote -__package_apt/gcc-doc: Executing code-remote -__package_apt/fluxbox: Generating local code -__package_apt/fluxbox: Generating remote code -__package_apt/fluxbox: Transferring object -__package_apt/fluxbox: Checking code-local -__package_apt/fluxbox: Executing code-local -__package_apt/fluxbox: Checking code-remote -__package_apt/fluxbox: Executing code-remote -__package_apt/libicu-dev: Generating local code -__package_apt/libicu-dev: Generating remote code -__package_apt/libicu-dev: Transferring object -__package_apt/libicu-dev: Checking code-local -__package_apt/libicu-dev: Executing code-local -__package_apt/libicu-dev: Checking code-remote -__package_apt/libicu-dev: Executing code-remote -__package_apt/libc6-dev-i386: Generating local code -__package_apt/libc6-dev-i386: Generating remote code -__package_apt/libc6-dev-i386: Transferring object -__package_apt/libc6-dev-i386: Checking code-local -__package_apt/libc6-dev-i386: Executing code-local -__package_apt/libc6-dev-i386: Checking code-remote -__package_apt/libc6-dev-i386: Executing code-remote -__package_apt/mercurial: Generating local code -__package_apt/mercurial: Generating remote code -__package_apt/mercurial: Transferring object -__package_apt/mercurial: Checking code-local -__package_apt/mercurial: Executing code-local -__package_apt/mercurial: Checking code-remote -__package_apt/mercurial: Executing code-remote -__package_apt/git-doc: Generating local code -__package_apt/git-doc: Generating remote code -__package_apt/git-doc: Transferring object -__package_apt/git-doc: Checking code-local -__package_apt/git-doc: Executing code-local -__package_apt/git-doc: Checking code-remote -__package_apt/git-doc: Executing code-remote -__package_apt/git-svn: Generating local code -__package_apt/git-svn: Generating remote code -__package_apt/git-svn: Transferring object -__package_apt/git-svn: Checking code-local -__package_apt/git-svn: Executing code-local -__package_apt/git-svn: Checking code-remote -__package_apt/git-svn: Executing code-remote -__package_apt/libnuma-dev: Generating local code -__package_apt/libnuma-dev: Generating remote code -__package_apt/libnuma-dev: Transferring object -__package_apt/libnuma-dev: Checking code-local -__package_apt/libnuma-dev: Executing code-local -__package_apt/libnuma-dev: Checking code-remote -__package_apt/libnuma-dev: Executing code-remote -__package_apt/gnuplot: Generating local code -__package_apt/gnuplot: Generating remote code -__package_apt/gnuplot: Transferring object -__package_apt/gnuplot: Checking code-local -__package_apt/gnuplot: Executing code-local -__package_apt/gnuplot: Checking code-remote -__package_apt/gnuplot: Executing code-remote -__package_apt/puppet: Generating local code -__package_apt/puppet: Generating remote code -__package_apt/puppet: Transferring object -__package_apt/puppet: Checking code-local -__package_apt/puppet: Executing code-local -__package_apt/puppet: Checking code-remote -__package_apt/puppet: Executing code-remote -__package_apt/screen: Generating local code -__package_apt/screen: Generating remote code -__package_apt/screen: Transferring object -__package_apt/screen: Checking code-local -__package_apt/screen: Executing code-local -__package_apt/screen: Checking code-remote -__package_apt/screen: Executing code-remote -__package_apt/openntpd: Generating local code -__package_apt/openntpd: Generating remote code -__package_apt/openntpd: Transferring object -__package_apt/openntpd: Checking code-local -__package_apt/openntpd: Executing code-local -__package_apt/openntpd: Checking code-remote -__package_apt/openntpd: Executing code-remote -__package_apt/gcc-multilib: Generating local code -__package_apt/gcc-multilib: Generating remote code -__package_apt/gcc-multilib: Transferring object -__package_apt/gcc-multilib: Checking code-local -__package_apt/gcc-multilib: Executing code-local -__package_apt/gcc-multilib: Checking code-remote -__package_apt/gcc-multilib: Executing code-remote -__package_apt/libboost-regex-dev: Generating local code -__package_apt/libboost-regex-dev: Generating remote code -__package_apt/libboost-regex-dev: Transferring object -__package_apt/libboost-regex-dev: Checking code-local -__package_apt/libboost-regex-dev: Executing code-local -__package_apt/libboost-regex-dev: Checking code-remote -__package_apt/libboost-regex-dev: Executing code-remote -__package_apt/g++-multilib: Generating local code -__package_apt/g++-multilib: Generating remote code -__package_apt/g++-multilib: Transferring object -__package_apt/g++-multilib: Checking code-local -__package_apt/g++-multilib: Executing code-local -__package_apt/g++-multilib: Checking code-remote -__package_apt/g++-multilib: Executing code-remote -__package_apt/xfonts-base: Generating local code -__package_apt/xfonts-base: Generating remote code -__package_apt/xfonts-base: Transferring object -__package_apt/xfonts-base: Checking code-local -__package_apt/xfonts-base: Executing code-local -__package_apt/xfonts-base: Checking code-remote -__package_apt/xfonts-base: Executing code-remote -__package_apt/rdesktop: Generating local code -__package_apt/rdesktop: Generating remote code -__package_apt/rdesktop: Transferring object -__package_apt/rdesktop: Checking code-local -__package_apt/rdesktop: Executing code-local -__package_apt/rdesktop: Checking code-remote -__package_apt/rdesktop: Executing code-remote -__package_apt/build-essential: Generating local code -__package_apt/build-essential: Generating remote code -__package_apt/build-essential: Transferring object -__package_apt/build-essential: Checking code-local -__package_apt/build-essential: Executing code-local -__package_apt/build-essential: Checking code-remote -__package_apt/build-essential: Executing code-remote -__package_apt/tightvncserver: Generating local code -__package_apt/tightvncserver: Generating remote code -__package_apt/tightvncserver: Transferring object -__package_apt/tightvncserver: Checking code-local -__package_apt/tightvncserver: Executing code-local -__package_apt/tightvncserver: Checking code-remote -__package_apt/tightvncserver: Executing code-remote -__package_apt/python-crypto: Generating local code -__package_apt/python-crypto: Generating remote code -__package_apt/python-crypto: Transferring object -__package_apt/python-crypto: Checking code-local -__package_apt/python-crypto: Executing code-local -__package_apt/python-crypto: Checking code-remote -__package_apt/python-crypto: Executing code-remote -__package_apt/libpam-krb5: Generating local code -__package_apt/libpam-krb5: Generating remote code -__package_apt/libpam-krb5: Transferring object -__package_apt/libpam-krb5: Checking code-local -__package_apt/libpam-krb5: Executing code-local -__package_apt/libpam-krb5: Checking code-remote -__package_apt/libpam-krb5: Executing code-remote -__package_apt/libc6-dev: Generating local code -__package_apt/libc6-dev: Generating remote code -__package_apt/libc6-dev: Transferring object -__package_apt/libc6-dev: Checking code-local -__package_apt/libc6-dev: Executing code-local -__package_apt/libc6-dev: Checking code-remote -__package_apt/libc6-dev: Executing code-remote -__package_apt/manpages-dev: Generating local code -__package_apt/manpages-dev: Generating remote code -__package_apt/manpages-dev: Transferring object -__package_apt/manpages-dev: Checking code-local -__package_apt/manpages-dev: Executing code-local -__package_apt/manpages-dev: Checking code-remote -__package_apt/manpages-dev: Executing code-remote -__package_apt/ia32-libs: Generating local code -__package_apt/ia32-libs: Generating remote code -__package_apt/ia32-libs: Transferring object -__package_apt/ia32-libs: Checking code-local -__package_apt/ia32-libs: Executing code-local -__package_apt/ia32-libs: Checking code-remote -__package_apt/ia32-libs: Executing code-remote -__package_apt/libxml-checker-perl: Generating local code -__package_apt/libxml-checker-perl: Generating remote code -__package_apt/libxml-checker-perl: Transferring object -__package_apt/libxml-checker-perl: Checking code-local -__package_apt/libxml-checker-perl: Executing code-local -__package_apt/libxml-checker-perl: Checking code-remote -__package_apt/libxml-checker-perl: Executing code-remote -__addifnosuchline/ssh-root-subasui: Generating local code -__addifnosuchline/ssh-root-subasui: Generating remote code -__addifnosuchline/ssh-root-subasui: Transferring object -__addifnosuchline/ssh-root-subasui: Checking code-local -__addifnosuchline/ssh-root-subasui: Executing code-local -__addifnosuchline/ssh-root-subasui: Checking code-remote -__addifnosuchline/ssh-root-subasui: Executing code-remote -__addifnosuchline/ssh-root-blukas: Generating local code -__addifnosuchline/ssh-root-blukas: Generating remote code -__addifnosuchline/ssh-root-blukas: Transferring object -__addifnosuchline/ssh-root-blukas: Checking code-local -__addifnosuchline/ssh-root-blukas: Executing code-local -__addifnosuchline/ssh-root-blukas: Checking code-remote -__addifnosuchline/ssh-root-blukas: Executing code-remote -__addifnosuchline/ssh-root-petfisch: Generating local code -__addifnosuchline/ssh-root-petfisch: Generating remote code -__addifnosuchline/ssh-root-petfisch: Transferring object -__addifnosuchline/ssh-root-petfisch: Checking code-local -__addifnosuchline/ssh-root-petfisch: Executing code-local -__addifnosuchline/ssh-root-petfisch: Checking code-remote -__addifnosuchline/ssh-root-petfisch: Executing code-remote -__ethz_systems/singleton: Generating local code -__ethz_systems/singleton: Generating remote code -__ethz_systems/singleton: Transferring object -__ethz_systems/singleton: Checking code-local -__ethz_systems/singleton: Executing code-local -__ethz_systems/singleton: Checking code-remote -__ethz_systems/singleton: Executing code-remote -__file/etc/nsswitch.conf: Resolving requirement __package/libnss-ldapd -__package/libnss-ldapd: Generating local code -__package/libnss-ldapd: Generating remote code -__package/libnss-ldapd: Transferring object -__package/libnss-ldapd: Checking code-local -__package/libnss-ldapd: Executing code-local -__package/libnss-ldapd: Checking code-remote -__package/libnss-ldapd: Executing code-remote -__file/etc/nsswitch.conf: Resolving requirement __file//etc/nslcd.conf -__file//etc/nslcd.conf: Generating local code -__file//etc/nslcd.conf: Generating remote code -__file//etc/nslcd.conf: Transferring object -__file//etc/nslcd.conf: Checking code-local -__file//etc/nslcd.conf: Executing code-local -__file//etc/nslcd.conf: Checking code-remote -__file//etc/nslcd.conf: Executing code-remote -__file/etc/nsswitch.conf: Generating local code -__file/etc/nsswitch.conf: Generating remote code -__file/etc/nsswitch.conf: Transferring object -__file/etc/nsswitch.conf: Checking code-local -__file/etc/nsswitch.conf: Executing code-local -__file/etc/nsswitch.conf: Checking code-remote -__file/etc/nsswitch.conf: Executing code-remote -__file/etc/ethz/autofs/auto.pub: Resolving requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Generating local code -__file/etc/ethz/autofs/auto.pub: Generating remote code -__file/etc/ethz/autofs/auto.pub: Transferring object -__file/etc/ethz/autofs/auto.pub: Checking code-local -__file/etc/ethz/autofs/auto.pub: Executing code-local -__file/etc/ethz/autofs/auto.pub: Checking code-remote -__file/etc/ethz/autofs/auto.pub: Executing code-remote -__file/etc/ethz/autofs/auto_home: Resolving requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Resolving requirement __package/python-ldap -__package/python-ldap: Generating local code -__package/python-ldap: Generating remote code -__package/python-ldap: Transferring object -__package/python-ldap: Checking code-local -__package/python-ldap: Executing code-local -__package/python-ldap: Checking code-remote -__package/python-ldap: Executing code-remote -__file/etc/ethz/autofs/auto_home: Generating local code -__file/etc/ethz/autofs/auto_home: Generating remote code -__file/etc/ethz/autofs/auto_home: Transferring object -__file/etc/ethz/autofs/auto_home: Checking code-local -__file/etc/ethz/autofs/auto_home: Executing code-local -__file/etc/ethz/autofs/auto_home: Checking code-remote -__file/etc/ethz/autofs/auto_home: Executing code-remote -__file/etc/default/openntpd: Generating local code -__file/etc/default/openntpd: Generating remote code -__file/etc/default/openntpd: Transferring object -__file/etc/default/openntpd: Checking code-local -__file/etc/default/openntpd: Executing code-local -__file/etc/default/openntpd: Checking code-remote -__file/etc/default/openntpd: Executing code-remote -__file/etc/auto.master: Resolving requirement __package/autofs -__package/autofs: Generating local code -__package/autofs: Generating remote code -__package/autofs: Transferring object -__package/autofs: Checking code-local -__package/autofs: Executing code-local -__package/autofs: Checking code-remote -__package/autofs: Executing code-remote -__file/etc/auto.master: Generating local code -__file/etc/auto.master: Generating remote code -__file/etc/auto.master: Transferring object -__file/etc/auto.master: Checking code-local -__file/etc/auto.master: Executing code-local -__file/etc/auto.master: Checking code-remote -__file/etc/auto.master: Executing code-remote -__file/etc/hosts: Generating local code -__file/etc/hosts: Generating remote code -__file/etc/hosts: Transferring object -__file/etc/hosts: Checking code-local -__file/etc/hosts: Executing code-local -__file/etc/hosts: Checking code-remote -__file/etc/hosts: Executing code-remote -__file/etc/krb5.conf: Generating local code -__file/etc/krb5.conf: Generating remote code -__file/etc/krb5.conf: Transferring object -__file/etc/krb5.conf: Checking code-local -__file/etc/krb5.conf: Executing code-local -__file/etc/krb5.conf: Checking code-remote -__file/etc/krb5.conf: Executing code-remote -__file/etc/syslog-ng/syslog-ng.conf: Resolving requirement __package/syslog-ng -__package/syslog-ng: Generating local code -__package/syslog-ng: Generating remote code -__package/syslog-ng: Transferring object -__package/syslog-ng: Checking code-local -__package/syslog-ng: Executing code-local -__package/syslog-ng: Checking code-remote -__package/syslog-ng: Executing code-remote -__file/etc/syslog-ng/syslog-ng.conf: Generating local code -__file/etc/syslog-ng/syslog-ng.conf: Generating remote code -__file/etc/syslog-ng/syslog-ng.conf: Transferring object -__file/etc/syslog-ng/syslog-ng.conf: Checking code-local -__file/etc/syslog-ng/syslog-ng.conf: Executing code-local -__file/etc/syslog-ng/syslog-ng.conf: Checking code-remote -__file/etc/syslog-ng/syslog-ng.conf: Executing code-remote -__file/etc/nullmailer/remotes: Resolving requirement __package/nullmailer -__package/nullmailer: Generating local code -__package/nullmailer: Generating remote code -__package/nullmailer: Transferring object -__package/nullmailer: Checking code-local -__package/nullmailer: Executing code-local -__package/nullmailer: Checking code-remote -__package/nullmailer: Executing code-remote -__file/etc/nullmailer/remotes: Generating local code -__file/etc/nullmailer/remotes: Generating remote code -__file/etc/nullmailer/remotes: Transferring object -__file/etc/nullmailer/remotes: Checking code-local -__file/etc/nullmailer/remotes: Executing code-local -__file/etc/nullmailer/remotes: Checking code-remote -__file/etc/nullmailer/remotes: Executing code-remote -__file/etc/cdist-configured: Generating local code -__file/etc/cdist-configured: Generating remote code -__file/etc/cdist-configured: Transferring object -__file/etc/cdist-configured: Checking code-local -__file/etc/cdist-configured: Executing code-local -__file/etc/cdist-configured: Checking code-remote -__file/etc/cdist-configured: Executing code-remote -__file/etc/motd.tail: Generating local code -__file/etc/motd.tail: Generating remote code -__file/etc/motd.tail: Transferring object -__file/etc/motd.tail: Checking code-local -__file/etc/motd.tail: Executing code-local -__file/etc/motd.tail: Checking code-remote -__file/etc/motd.tail: Executing code-remote -__file/etc/openntpd/ntpd.conf: Generating local code -__file/etc/openntpd/ntpd.conf: Generating remote code -__file/etc/openntpd/ntpd.conf: Transferring object -__file/etc/openntpd/ntpd.conf: Checking code-local -__file/etc/openntpd/ntpd.conf: Executing code-local -__file/etc/openntpd/ntpd.conf: Checking code-remote -__file/etc/openntpd/ntpd.conf: Executing code-remote -__file/etc/sudoers.d/systems: Resolving requirement __package/sudo -__package/sudo: Generating local code -__package/sudo: Generating remote code -__package/sudo: Transferring object -__package/sudo: Checking code-local -__package/sudo: Executing code-local -__package/sudo: Checking code-remote -__package/sudo: Executing code-remote -__file/etc/sudoers.d/systems: Generating local code -__file/etc/sudoers.d/systems: Generating remote code -__file/etc/sudoers.d/systems: Transferring object -__file/etc/sudoers.d/systems: Checking code-local -__file/etc/sudoers.d/systems: Executing code-local -__file/etc/sudoers.d/systems: Checking code-remote -__file/etc/sudoers.d/systems: Executing code-remote -__link/etc/motd: Generating local code -__link/etc/motd: Generating remote code -__link/etc/motd: Transferring object -__link/etc/motd: Checking code-local -__link/etc/motd: Executing code-local -__link/etc/motd: Checking code-remote -__link/etc/motd: Executing code-remote -__motd/singleton: Generating local code -__motd/singleton: Generating remote code -__motd/singleton: Transferring object -__motd/singleton: Checking code-local -__motd/singleton: Executing code-local -__motd/singleton: Checking code-remote -__motd/singleton: Executing code-remote -__package/mc: Generating local code -__package/mc: Generating remote code -__package/mc: Transferring object -__package/mc: Checking code-local -__package/mc: Executing code-local -__package/mc: Checking code-remote -__package/mc: Executing code-remote -__package/ant: Generating local code -__package/ant: Generating remote code -__package/ant: Transferring object -__package/ant: Checking code-local -__package/ant: Executing code-local -__package/ant: Checking code-remote -__package/ant: Executing code-remote -__package/gcc: Generating local code -__package/gcc: Generating remote code -__package/gcc: Transferring object -__package/gcc: Checking code-local -__package/gcc: Executing code-local -__package/gcc: Checking code-remote -__package/gcc: Executing code-remote -__package/gdb: Generating local code -__package/gdb: Generating remote code -__package/gdb: Transferring object -__package/gdb: Checking code-local -__package/gdb: Executing code-local -__package/gdb: Checking code-remote -__package/gdb: Executing code-remote -__package/vim: Generating local code -__package/vim: Generating remote code -__package/vim: Transferring object -__package/vim: Checking code-local -__package/vim: Executing code-local -__package/vim: Checking code-remote -__package/vim: Executing code-remote -__package/git-core: Generating local code -__package/git-core: Generating remote code -__package/git-core: Transferring object -__package/git-core: Checking code-local -__package/git-core: Executing code-local -__package/git-core: Checking code-remote -__package/git-core: Executing code-remote -__package/atop: Generating local code -__package/atop: Generating remote code -__package/atop: Transferring object -__package/atop: Checking code-local -__package/atop: Executing code-local -__package/atop: Checking code-remote -__package/atop: Executing code-remote -__package/flex: Generating local code -__package/flex: Generating remote code -__package/flex: Transferring object -__package/flex: Checking code-local -__package/flex: Executing code-local -__package/flex: Checking code-remote -__package/flex: Executing code-remote -__package/gawk: Generating local code -__package/gawk: Generating remote code -__package/gawk: Transferring object -__package/gawk: Checking code-local -__package/gawk: Executing code-local -__package/gawk: Checking code-remote -__package/gawk: Executing code-remote -__package/make: Generating local code -__package/make: Generating remote code -__package/make: Transferring object -__package/make: Checking code-local -__package/make: Executing code-local -__package/make: Checking code-remote -__package/make: Executing code-remote -__package/swig: Generating local code -__package/swig: Generating remote code -__package/swig: Transferring object -__package/swig: Checking code-local -__package/swig: Executing code-local -__package/swig: Checking code-remote -__package/swig: Executing code-remote -__package/libreadline5-dev: Generating local code -__package/libreadline5-dev: Generating remote code -__package/libreadline5-dev: Transferring object -__package/libreadline5-dev: Checking code-local -__package/libreadline5-dev: Executing code-local -__package/libreadline5-dev: Checking code-remote -__package/libreadline5-dev: Executing code-remote -__package/libexpat1-dev: Generating local code -__package/libexpat1-dev: Generating remote code -__package/libexpat1-dev: Transferring object -__package/libexpat1-dev: Checking code-local -__package/libexpat1-dev: Executing code-local -__package/libexpat1-dev: Checking code-remote -__package/libexpat1-dev: Executing code-remote -__package/libnet-ssleay-perl: Generating local code -__package/libnet-ssleay-perl: Generating remote code -__package/libnet-ssleay-perl: Transferring object -__package/libnet-ssleay-perl: Checking code-local -__package/libnet-ssleay-perl: Executing code-local -__package/libnet-ssleay-perl: Checking code-remote -__package/libnet-ssleay-perl: Executing code-remote -__package/subversion: Generating local code -__package/subversion: Generating remote code -__package/subversion: Transferring object -__package/subversion: Checking code-local -__package/subversion: Executing code-local -__package/subversion: Checking code-remote -__package/subversion: Executing code-remote -__package/libcurl4-openssl-dev: Generating local code -__package/libcurl4-openssl-dev: Generating remote code -__package/libcurl4-openssl-dev: Transferring object -__package/libcurl4-openssl-dev: Checking code-local -__package/libcurl4-openssl-dev: Executing code-local -__package/libcurl4-openssl-dev: Checking code-remote -__package/libcurl4-openssl-dev: Executing code-remote -__package/bison: Generating local code -__package/bison: Generating remote code -__package/bison: Transferring object -__package/bison: Checking code-local -__package/bison: Executing code-local -__package/bison: Checking code-remote -__package/bison: Executing code-remote -__package/cmake: Generating local code -__package/cmake: Generating remote code -__package/cmake: Transferring object -__package/cmake: Checking code-local -__package/cmake: Executing code-local -__package/cmake: Checking code-remote -__package/cmake: Executing code-remote -__package/emacs: Generating local code -__package/emacs: Generating remote code -__package/emacs: Transferring object -__package/emacs: Checking code-local -__package/emacs: Executing code-local -__package/emacs: Checking code-remote -__package/emacs: Executing code-remote -__package/xfce4: Generating local code -__package/xfce4: Generating remote code -__package/xfce4: Transferring object -__package/xfce4: Checking code-local -__package/xfce4: Executing code-local -__package/xfce4: Checking code-remote -__package/xfce4: Executing code-remote -__package/xterm: Generating local code -__package/xterm: Generating remote code -__package/xterm: Transferring object -__package/xterm: Checking code-local -__package/xterm: Executing code-local -__package/xterm: Checking code-remote -__package/xterm: Executing code-remote -__package/tcl8.4-dev: Generating local code -__package/tcl8.4-dev: Generating remote code -__package/tcl8.4-dev: Transferring object -__package/tcl8.4-dev: Checking code-local -__package/tcl8.4-dev: Executing code-local -__package/tcl8.4-dev: Checking code-remote -__package/tcl8.4-dev: Executing code-remote -__package/libio-socket-ssl-perl: Generating local code -__package/libio-socket-ssl-perl: Generating remote code -__package/libio-socket-ssl-perl: Transferring object -__package/libio-socket-ssl-perl: Checking code-local -__package/libio-socket-ssl-perl: Executing code-local -__package/libio-socket-ssl-perl: Checking code-remote -__package/libio-socket-ssl-perl: Executing code-remote -__package/doxygen: Generating local code -__package/doxygen: Generating remote code -__package/doxygen: Transferring object -__package/doxygen: Checking code-local -__package/doxygen: Executing code-local -__package/doxygen: Checking code-remote -__package/doxygen: Executing code-remote -__package/zlib1g-dev: Generating local code -__package/zlib1g-dev: Generating remote code -__package/zlib1g-dev: Transferring object -__package/zlib1g-dev: Checking code-local -__package/zlib1g-dev: Executing code-local -__package/zlib1g-dev: Checking code-remote -__package/zlib1g-dev: Executing code-remote -__package/autoconf: Generating local code -__package/autoconf: Generating remote code -__package/autoconf: Transferring object -__package/autoconf: Checking code-local -__package/autoconf: Executing code-local -__package/autoconf: Checking code-remote -__package/autoconf: Executing code-remote -__package/libtool: Generating local code -__package/libtool: Generating remote code -__package/libtool: Transferring object -__package/libtool: Checking code-local -__package/libtool: Executing code-local -__package/libtool: Checking code-remote -__package/libtool: Executing code-remote -__package/traceroute-nanog: Generating local code -__package/traceroute-nanog: Generating remote code -__package/traceroute-nanog: Transferring object -__package/traceroute-nanog: Checking code-local -__package/traceroute-nanog: Executing code-local -__package/traceroute-nanog: Checking code-remote -__package/traceroute-nanog: Executing code-remote -__package/libncurses5-dev: Generating local code -__package/libncurses5-dev: Generating remote code -__package/libncurses5-dev: Transferring object -__package/libncurses5-dev: Checking code-local -__package/libncurses5-dev: Executing code-local -__package/libncurses5-dev: Checking code-remote -__package/libncurses5-dev: Executing code-remote -__package/libaio-dev: Generating local code -__package/libaio-dev: Generating remote code -__package/libaio-dev: Transferring object -__package/libaio-dev: Checking code-local -__package/libaio-dev: Executing code-local -__package/libaio-dev: Checking code-remote -__package/libaio-dev: Executing code-remote -__package/libboost-dev: Generating local code -__package/libboost-dev: Generating remote code -__package/libboost-dev: Transferring object -__package/libboost-dev: Checking code-local -__package/libboost-dev: Executing code-local -__package/libboost-dev: Checking code-remote -__package/libboost-dev: Executing code-remote -__package/xtightvncviewer: Generating local code -__package/xtightvncviewer: Generating remote code -__package/xtightvncviewer: Transferring object -__package/xtightvncviewer: Checking code-local -__package/xtightvncviewer: Executing code-local -__package/xtightvncviewer: Checking code-remote -__package/xtightvncviewer: Executing code-remote -__package/libxml2-dev: Generating local code -__package/libxml2-dev: Generating remote code -__package/libxml2-dev: Transferring object -__package/libxml2-dev: Checking code-local -__package/libxml2-dev: Executing code-local -__package/libxml2-dev: Checking code-remote -__package/libxml2-dev: Executing code-remote -__package/libtidy-dev: Generating local code -__package/libtidy-dev: Generating remote code -__package/libtidy-dev: Transferring object -__package/libtidy-dev: Checking code-local -__package/libtidy-dev: Executing code-local -__package/libtidy-dev: Checking code-remote -__package/libtidy-dev: Executing code-remote -__package/manpages: Generating local code -__package/manpages: Generating remote code -__package/manpages: Transferring object -__package/manpages: Checking code-local -__package/manpages: Executing code-local -__package/manpages: Checking code-remote -__package/manpages: Executing code-remote -__package/gcc-doc: Generating local code -__package/gcc-doc: Generating remote code -__package/gcc-doc: Transferring object -__package/gcc-doc: Checking code-local -__package/gcc-doc: Executing code-local -__package/gcc-doc: Checking code-remote -__package/gcc-doc: Executing code-remote -__package/fluxbox: Generating local code -__package/fluxbox: Generating remote code -__package/fluxbox: Transferring object -__package/fluxbox: Checking code-local -__package/fluxbox: Executing code-local -__package/fluxbox: Checking code-remote -__package/fluxbox: Executing code-remote -__package/libicu-dev: Generating local code -__package/libicu-dev: Generating remote code -__package/libicu-dev: Transferring object -__package/libicu-dev: Checking code-local -__package/libicu-dev: Executing code-local -__package/libicu-dev: Checking code-remote -__package/libicu-dev: Executing code-remote -__package/libc6-dev-i386: Generating local code -__package/libc6-dev-i386: Generating remote code -__package/libc6-dev-i386: Transferring object -__package/libc6-dev-i386: Checking code-local -__package/libc6-dev-i386: Executing code-local -__package/libc6-dev-i386: Checking code-remote -__package/libc6-dev-i386: Executing code-remote -__package/mercurial: Generating local code -__package/mercurial: Generating remote code -__package/mercurial: Transferring object -__package/mercurial: Checking code-local -__package/mercurial: Executing code-local -__package/mercurial: Checking code-remote -__package/mercurial: Executing code-remote -__package/git-doc: Generating local code -__package/git-doc: Generating remote code -__package/git-doc: Transferring object -__package/git-doc: Checking code-local -__package/git-doc: Executing code-local -__package/git-doc: Checking code-remote -__package/git-doc: Executing code-remote -__package/git-svn: Generating local code -__package/git-svn: Generating remote code -__package/git-svn: Transferring object -__package/git-svn: Checking code-local -__package/git-svn: Executing code-local -__package/git-svn: Checking code-remote -__package/git-svn: Executing code-remote -__package/libnuma-dev: Generating local code -__package/libnuma-dev: Generating remote code -__package/libnuma-dev: Transferring object -__package/libnuma-dev: Checking code-local -__package/libnuma-dev: Executing code-local -__package/libnuma-dev: Checking code-remote -__package/libnuma-dev: Executing code-remote -__package/gnuplot: Generating local code -__package/gnuplot: Generating remote code -__package/gnuplot: Transferring object -__package/gnuplot: Checking code-local -__package/gnuplot: Executing code-local -__package/gnuplot: Checking code-remote -__package/gnuplot: Executing code-remote -__package/puppet: Generating local code -__package/puppet: Generating remote code -__package/puppet: Transferring object -__package/puppet: Checking code-local -__package/puppet: Executing code-local -__package/puppet: Checking code-remote -__package/puppet: Executing code-remote -__package/screen: Generating local code -__package/screen: Generating remote code -__package/screen: Transferring object -__package/screen: Checking code-local -__package/screen: Executing code-local -__package/screen: Checking code-remote -__package/screen: Executing code-remote -__package/openntpd: Generating local code -__package/openntpd: Generating remote code -__package/openntpd: Transferring object -__package/openntpd: Checking code-local -__package/openntpd: Executing code-local -__package/openntpd: Checking code-remote -__package/openntpd: Executing code-remote -__package/gcc-multilib: Generating local code -__package/gcc-multilib: Generating remote code -__package/gcc-multilib: Transferring object -__package/gcc-multilib: Checking code-local -__package/gcc-multilib: Executing code-local -__package/gcc-multilib: Checking code-remote -__package/gcc-multilib: Executing code-remote -__package/libboost-regex-dev: Generating local code -__package/libboost-regex-dev: Generating remote code -__package/libboost-regex-dev: Transferring object -__package/libboost-regex-dev: Checking code-local -__package/libboost-regex-dev: Executing code-local -__package/libboost-regex-dev: Checking code-remote -__package/libboost-regex-dev: Executing code-remote -__package/g++-multilib: Generating local code -__package/g++-multilib: Generating remote code -__package/g++-multilib: Transferring object -__package/g++-multilib: Checking code-local -__package/g++-multilib: Executing code-local -__package/g++-multilib: Checking code-remote -__package/g++-multilib: Executing code-remote -__package/xfonts-base: Generating local code -__package/xfonts-base: Generating remote code -__package/xfonts-base: Transferring object -__package/xfonts-base: Checking code-local -__package/xfonts-base: Executing code-local -__package/xfonts-base: Checking code-remote -__package/xfonts-base: Executing code-remote -__package/rdesktop: Generating local code -__package/rdesktop: Generating remote code -__package/rdesktop: Transferring object -__package/rdesktop: Checking code-local -__package/rdesktop: Executing code-local -__package/rdesktop: Checking code-remote -__package/rdesktop: Executing code-remote -__package/build-essential: Generating local code -__package/build-essential: Generating remote code -__package/build-essential: Transferring object -__package/build-essential: Checking code-local -__package/build-essential: Executing code-local -__package/build-essential: Checking code-remote -__package/build-essential: Executing code-remote -__package/tightvncserver: Generating local code -__package/tightvncserver: Generating remote code -__package/tightvncserver: Transferring object -__package/tightvncserver: Checking code-local -__package/tightvncserver: Executing code-local -__package/tightvncserver: Checking code-remote -__package/tightvncserver: Executing code-remote -__package/python-crypto: Generating local code -__package/python-crypto: Generating remote code -__package/python-crypto: Transferring object -__package/python-crypto: Checking code-local -__package/python-crypto: Executing code-local -__package/python-crypto: Checking code-remote -__package/python-crypto: Executing code-remote -__package/libpam-krb5: Generating local code -__package/libpam-krb5: Generating remote code -__package/libpam-krb5: Transferring object -__package/libpam-krb5: Checking code-local -__package/libpam-krb5: Executing code-local -__package/libpam-krb5: Checking code-remote -__package/libpam-krb5: Executing code-remote -__package/libc6-dev: Generating local code -__package/libc6-dev: Generating remote code -__package/libc6-dev: Transferring object -__package/libc6-dev: Checking code-local -__package/libc6-dev: Executing code-local -__package/libc6-dev: Checking code-remote -__package/libc6-dev: Executing code-remote -__package/manpages-dev: Generating local code -__package/manpages-dev: Generating remote code -__package/manpages-dev: Transferring object -__package/manpages-dev: Checking code-local -__package/manpages-dev: Executing code-local -__package/manpages-dev: Checking code-remote -__package/manpages-dev: Executing code-remote -__package/ia32-libs: Generating local code -__package/ia32-libs: Generating remote code -__package/ia32-libs: Transferring object -__package/ia32-libs: Checking code-local -__package/ia32-libs: Executing code-local -__package/ia32-libs: Checking code-remote -__package/ia32-libs: Executing code-remote -__package/libxml-checker-perl: Generating local code -__package/libxml-checker-perl: Generating remote code -__package/libxml-checker-perl: Transferring object -__package/libxml-checker-perl: Checking code-local -__package/libxml-checker-perl: Executing code-local -__package/libxml-checker-perl: Checking code-remote -__package/libxml-checker-perl: Executing code-remote -__ethz_systems_root_via_ssh/subasui: Generating local code -__ethz_systems_root_via_ssh/subasui: Generating remote code -__ethz_systems_root_via_ssh/subasui: Transferring object -__ethz_systems_root_via_ssh/subasui: Checking code-local -__ethz_systems_root_via_ssh/subasui: Executing code-local -__ethz_systems_root_via_ssh/subasui: Checking code-remote -__ethz_systems_root_via_ssh/subasui: Executing code-remote -__ethz_systems_root_via_ssh/blukas: Generating local code -__ethz_systems_root_via_ssh/blukas: Generating remote code -__ethz_systems_root_via_ssh/blukas: Transferring object -__ethz_systems_root_via_ssh/blukas: Checking code-local -__ethz_systems_root_via_ssh/blukas: Executing code-local -__ethz_systems_root_via_ssh/blukas: Checking code-remote -__ethz_systems_root_via_ssh/blukas: Executing code-remote -__ethz_systems_root_via_ssh/petfisch: Generating local code -__ethz_systems_root_via_ssh/petfisch: Generating remote code -__ethz_systems_root_via_ssh/petfisch: Transferring object -__ethz_systems_root_via_ssh/petfisch: Checking code-local -__ethz_systems_root_via_ssh/petfisch: Executing code-local -__ethz_systems_root_via_ssh/petfisch: Checking code-remote -__ethz_systems_root_via_ssh/petfisch: Executing code-remote -__ethz_systems_motd/singleton: Generating local code -__ethz_systems_motd/singleton: Generating remote code -__ethz_systems_motd/singleton: Transferring object -__ethz_systems_motd/singleton: Checking code-local -__ethz_systems_motd/singleton: Executing code-local -__ethz_systems_motd/singleton: Checking code-remote -__ethz_systems_motd/singleton: Executing code-remote -__ethz_systems_sudo/singleton: Generating local code -__ethz_systems_sudo/singleton: Generating remote code -__ethz_systems_sudo/singleton: Transferring object -__ethz_systems_sudo/singleton: Checking code-local -__ethz_systems_sudo/singleton: Executing code-local -__ethz_systems_sudo/singleton: Checking code-remote -__ethz_systems_sudo/singleton: Executing code-remote -__ethz_sans_syslog/singleton: Generating local code -__ethz_sans_syslog/singleton: Generating remote code -__ethz_sans_syslog/singleton: Transferring object -__ethz_sans_syslog/singleton: Checking code-local -__ethz_sans_syslog/singleton: Executing code-local -__ethz_sans_syslog/singleton: Checking code-remote -__ethz_sans_syslog/singleton: Executing code-remote -__ethz_pam_krb5/singleton: Generating local code -__ethz_pam_krb5/singleton: Generating remote code -__ethz_pam_krb5/singleton: Transferring object -__ethz_pam_krb5/singleton: Checking code-local -__ethz_pam_krb5/singleton: Executing code-local -__ethz_pam_krb5/singleton: Checking code-remote -__ethz_pam_krb5/singleton: Executing code-remote -__ethz_dinfk_autofs/singleton: Generating local code -__ethz_dinfk_autofs/singleton: Generating remote code -__ethz_dinfk_autofs/singleton: Transferring object -__ethz_dinfk_autofs/singleton: Checking code-local -__ethz_dinfk_autofs/singleton: Executing code-local -__ethz_dinfk_autofs/singleton: Checking code-remote -__ethz_dinfk_autofs/singleton: Executing code-remote -__ethz_dinfk_ldap/singleton: Generating local code -__ethz_dinfk_ldap/singleton: Generating remote code -__ethz_dinfk_ldap/singleton: Transferring object -__ethz_dinfk_ldap/singleton: Checking code-local -__ethz_dinfk_ldap/singleton: Executing code-local -__ethz_dinfk_ldap/singleton: Checking code-remote -__ethz_dinfk_ldap/singleton: Executing code-remote -core: Debug: Mit Apr 27 14:19:30 CEST 2011 -core: Saving cache to /home/users/nico/oeffentlich/rechner/projekte/cdist-nutzung/cache/ikq04.ethz.ch -core: Debug: Mit Apr 27 14:19:31 CEST 2011 -core: cdist 1.6.2: Successfully finished run diff --git a/docs/dev/logs/2011-06-24.cinst_preos b/docs/dev/logs/2011-06-24.cinst_preos deleted file mode 100644 index 892ee5f7..00000000 --- a/docs/dev/logs/2011-06-24.cinst_preos +++ /dev/null @@ -1,20 +0,0 @@ -- new executable cinst-deploy-to -- types used by cinst are marked as such ('cinst-only') -- cdist-deploy-to and cinst-deploy-to read the same manifest -- cdist ignores types marked as 'cinst-only' -- cinst ignores types not marked as 'cinst-only' - -- update $__explorer/os to recognize preos - -- cinst types will ONLY BE CALLED if $__explorer/os == 'preos' - --------------------------------------------------------------------------------- -cinst types: -__partition_msdos /dev/sda1 --type 83 --size 100M --bootable -__partition_msdos /dev/sda2 --type 82 --size 512M -__fs_jfs /dev/sda1 --args "-c -q" -__fstab_entry /dev/sda1 --type jfs --mountpoint / --options noatime --freq 0 --passno 0 -__fstab_entry /dev/sda2 --type swap - - - diff --git a/docs/dev/logs/2011-06-25.trigger-graphic b/docs/dev/logs/2011-06-25.trigger-graphic deleted file mode 100644 index f17220e1..00000000 --- a/docs/dev/logs/2011-06-25.trigger-graphic +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - -client -------------------> trigger via ssh ----------> server - ~/.ssh/authorized_keys - -> cdist-deploy-to - -ssh -R - -server -> via cdist-deploy-to -> client - -cdist-mass-deploy -p diff --git a/docs/dev/logs/2011-07-01.type-gencode b/docs/dev/logs/2011-07-01.type-gencode deleted file mode 100644 index cafa8ef2..00000000 --- a/docs/dev/logs/2011-07-01.type-gencode +++ /dev/null @@ -1,9 +0,0 @@ -when all objects of a type are applied, then run the types gencode-{local,remote} scripts - --------------------------------------------------------------------------------- - -__mein_type/ - type/ # executed when all objects of this type have been applied - gencode-local - gencode-remote - diff --git a/docs/dev/logs/2011-07-01.type-global-explorers b/docs/dev/logs/2011-07-01.type-global-explorers deleted file mode 100644 index 302c2866..00000000 --- a/docs/dev/logs/2011-07-01.type-global-explorers +++ /dev/null @@ -1,22 +0,0 @@ -types can contribute global explorers --------------------------------------------------------------------------------- - -__mein_type/ - global/ - explorer/ - status-von-foo - anderer - -$out/explorer/ - hostname - os - ... - __mein_type/ - status-von-foo - anderer - - -todos: -- cdist scans types for global/explorer's -- when executing explorers, create the types namespace folder before running type gobal explorers - diff --git a/docs/dev/logs/2011-09-08.obsolete_debugging b/docs/dev/logs/2011-09-08.obsolete_debugging deleted file mode 100644 index 42413285..00000000 --- a/docs/dev/logs/2011-09-08.obsolete_debugging +++ /dev/null @@ -1,4 +0,0 @@ -Debugging cdist: - -[0:13] kr:cdist-nutzung% ./local/update-local-core && __cdist_debug=1 __cdist_local_base_dir=/tmp/cdist cdist-deploy-to ikq04.ethz.ch - diff --git a/docs/dev/logs/2011-09-12 b/docs/dev/logs/2011-09-12 deleted file mode 100644 index 1ace466f..00000000 --- a/docs/dev/logs/2011-09-12 +++ /dev/null @@ -1,110 +0,0 @@ -Benchmark from home/X201 (2 cores, 4 threads): - - ikq (1): 72.192397 - ikq (2): INFO: Total processing time for 2 hosts: 74.1845 - ikq* (6): INFO: Total processing time: 117.572312 - ikq* + ikr3 (9): INFO: Total processing time: 120.307662 - ikq* + ikr (14): INFO: Total processing time: 139.769807 - ikq* + ikr (18): INFO: Total processing time: 186.354398 - ikq* + ikr (22): INFO: Total processing time: 225.793533 - ikq* + ikr (26): INFO: Total processing time: 237.06687 - ikq* + ikr (31): INFO: Total processing time: 276.912414 - - -ikr07.ethz.ch ikr09.ethz.ch ikr10.ethz.ch ikr11.ethz.ch -ikr13.ethz.ch ikr14.ethz.ch ikr15.ethz.ch ikr16.ethz.ch -ikr17.ethz.ch ikr19.ethz.ch ikr20.ethz.ch ikr21.ethz.ch -ikr23.ethz.ch ikr24.ethz.ch ikr25.ethz.ch ikr26.ethz.ch -ikr27.ethz.ch ikr28.ethz.ch ikr29.ethz.ch ikr30.ethz.ch -ikr31.ethz.ch - -cdist -c ~/p/cdist-nutzung -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch ikq05.ethz.ch ikq06.ethz.ch ikq07.ethz.ch ikr01.ethz.ch ikr02.ethz.ch ikr03.ethz.ch ikr05.ethz.ch ikr07.ethz.ch ikr09.ethz.ch ikr10.ethz.ch ikr11.ethz.ch ikr13.ethz.ch ikr14.ethz.ch ikr15.ethz.ch ikr16.ethz.ch ikr17.ethz.ch ikr19.ethz.ch ikr20.ethz.ch ikr21.ethz.ch - - --------------------------------------------------------------------------------- -INFO: Total processing time for 1 hosts: 72.166661 -INFO: Total processing time for 2 hosts: 76.633228 -INFO: Total processing time for 3 host(s): 77.199817 -INFO: Total processing time for 4 host(s): 94.045175 -INFO: Total processing time for 5 host(s): 103.226354 -INFO: Total processing time for 6 host(s): 107.76097 -INFO: Total processing time for 7 host(s): 101.571705 -INFO: Total processing time for 8 host(s): 107.600093 -INFO: Total processing time for 9 host(s): 116.500371 -INFO: Total processing time for 10 host(s): 119.445805 -INFO: Total processing time for 11 host(s): 123.944385 -INFO: Total processing time for 12 host(s): 130.499098 -INFO: Total processing time for 13 host(s): 137.250861 -INFO: Total processing time for 14 host(s): 154.9841 -INFO: Total processing time for 15 host(s): 139.659637 -INFO: Total processing time for 16 host(s): 142.70005 -INFO: Total processing time for 17 host(s): 148.541452 -INFO: Total processing time for 18 host(s): 159.360809 -INFO: Total processing time for 19 host(s): 171.907864 -INFO: Total processing time for 20 host(s): 178.76695 -INFO: Total processing time for 21 host(s): 183.856671 -INFO: Total processing time for 22 host(s): 194.504221 -INFO: Total processing time for 23 host(s): 207.314842 -INFO: Total processing time for 24 host(s): 215.846502 -INFO: Total processing time for 25 host(s): 217.223581 -INFO: Total processing time for 26 host(s): 238.591705 -INFO: Total processing time for 27 host(s): 238.478493 -INFO: Total processing time for 28 host(s): 246.058718 -INFO: Total processing time for 29 host(s): 264.208372 -INFO: Total processing time for 30 host(s): 265.560685 -INFO: Total processing time for 31 host(s): 282.264488 - --------------------------------------------------------------------------------- -Use: - grep "^INFO: Total processing time" doc/dev/logs/2011-09-12 | sed 's/.*: //' - octave - times = [ /* paste here ] - plot(times) - # keep the graph - hold on - # Scale linearly with the single host value - plot((1:31)*times(1)) - --------------------------------------------------------------------------------- -code: - -octave -time = [ -72.166661 -76.633228 -77.199817 -94.045175 -103.226354 -107.76097 -101.571705 -107.600093 -116.500371 -119.445805 -123.944385 -130.499098 -137.250861 -154.9841 -139.659637 -142.70005 -148.541452 -159.360809 -171.907864 -178.76695 -183.856671 -194.504221 -207.314842 -215.846502 -217.223581 -238.591705 -238.478493 -246.058718 -264.208372 -265.560685 -282.264488 -] -plot(times, "-;cdist;", times(1)*[1:length(times)]', "-;linear;") -title("Configuration duration (cdist-2.0.0-rc4)") -ylabel("Number of hosts") -xlabel("Time in seconds") -print('cdist-2.0.0-rc4.png', '-dpng') - diff --git a/docs/dev/logs/2011-09-12.benchmark-home b/docs/dev/logs/2011-09-12.benchmark-home deleted file mode 100644 index 8cfc4971..00000000 --- a/docs/dev/logs/2011-09-12.benchmark-home +++ /dev/null @@ -1,6960 +0,0 @@ -INFO: Deploying to ikq02.ethz.ch -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -INFO: Finished run of ikq02.ethz.ch in 72.155556 seconds -I should cleanup /home/users/nico/.tmp/tmp013zxv -INFO: Total processing time for 1 hosts: 72.166661 -INFO: Deploying to ikq02.ethz.ch -INFO: Deploying to ikq03.ethz.ch -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -INFO: Finished run of ikq03.ethz.ch in 76.556882 seconds -I should cleanup /home/users/nico/.tmp/tmpduad9n -INFO: Finished run of ikq02.ethz.ch in 76.617933 seconds -I should cleanup /home/users/nico/.tmp/tmpjqi6ey -INFO: Total processing time for 2 hosts: 76.633228 -INFO: Deploying to ikq02.ethz.ch -INFO: Deploying to ikq03.ethz.ch -INFO: Deploying to ikq04.ethz.ch -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -INFO: Finished run of ikq03.ethz.ch in 75.974003 seconds -I should cleanup /home/users/nico/.tmp/tmpg1dcf2 -INFO: Finished run of ikq04.ethz.ch in 76.961455 seconds -I should cleanup /home/users/nico/.tmp/tmp_bsndy -INFO: Finished run of ikq02.ethz.ch in 77.188361 seconds -I should cleanup /home/users/nico/.tmp/tmp9b0x11 -INFO: Total processing time for 3 host(s): 77.199817 -INFO: Deploying to ikq02.ethz.ch -INFO: Deploying to ikq03.ethz.ch -INFO: Deploying to ikq04.ethz.ch -INFO: Deploying to ikq05.ethz.ch -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -INFO: Finished run of ikq04.ethz.ch in 75.857977 seconds -I should cleanup /home/users/nico/.tmp/tmpxhc33m -INFO: Finished run of ikq02.ethz.ch in 76.034966 seconds -I should cleanup /home/users/nico/.tmp/tmp0za5q0 -INFO: Finished run of ikq03.ethz.ch in 77.967854 seconds -I should cleanup /home/users/nico/.tmp/tmp_nt6ju -INFO: Finished run of ikq05.ethz.ch in 94.015012 seconds -I should cleanup /home/users/nico/.tmp/tmpihxpq1 -INFO: Total processing time for 4 host(s): 94.045175 -INFO: Deploying to ikq02.ethz.ch -INFO: Deploying to ikq03.ethz.ch -INFO: Deploying to ikq04.ethz.ch -INFO: Deploying to ikq05.ethz.ch -INFO: Deploying to ikq06.ethz.ch -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -INFO: Finished run of ikq03.ethz.ch in 84.249886 seconds -I should cleanup /home/users/nico/.tmp/tmp9pwps4 -INFO: Finished run of ikq04.ethz.ch in 84.70692 seconds -I should cleanup /home/users/nico/.tmp/tmp5q2_ov -INFO: Finished run of ikq06.ethz.ch in 84.831273 seconds -I should cleanup /home/users/nico/.tmp/tmpo5o5fi -INFO: Finished run of ikq02.ethz.ch in 85.648583 seconds -I should cleanup /home/users/nico/.tmp/tmp04au_u -INFO: Finished run of ikq05.ethz.ch in 103.18759 seconds -I should cleanup /home/users/nico/.tmp/tmpw5hgcq -INFO: Total processing time for 5 host(s): 103.226354 -INFO: Deploying to ikq02.ethz.ch -INFO: Deploying to ikq03.ethz.ch -INFO: Deploying to ikq04.ethz.ch -INFO: Deploying to ikq05.ethz.ch -INFO: Deploying to ikq06.ethz.ch -INFO: Deploying to ikq07.ethz.ch -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -INFO: Finished run of ikq06.ethz.ch in 88.717419 seconds -I should cleanup /home/users/nico/.tmp/tmp463z4s -INFO: Finished run of ikq04.ethz.ch in 88.791926 seconds -I should cleanup /home/users/nico/.tmp/tmpbdipwj -INFO: Finished run of ikq02.ethz.ch in 89.046225 seconds -I should cleanup /home/users/nico/.tmp/tmpk832sn -INFO: Finished run of ikq03.ethz.ch in 89.067941 seconds -I should cleanup /home/users/nico/.tmp/tmpvmj5rq -INFO: Finished run of ikq07.ethz.ch in 89.412403 seconds -I should cleanup /home/users/nico/.tmp/tmpyljtcf -INFO: Finished run of ikq05.ethz.ch in 107.729915 seconds -I should cleanup /home/users/nico/.tmp/tmpmfc384 -INFO: Total processing time for 6 host(s): 107.76097 -INFO: Deploying to ikq02.ethz.ch -INFO: Deploying to ikq03.ethz.ch -INFO: Deploying to ikq04.ethz.ch -INFO: Deploying to ikq05.ethz.ch -INFO: Deploying to ikq06.ethz.ch -INFO: Deploying to ikq07.ethz.ch -INFO: Deploying to ikr01.ethz.ch -scp: /var/lib/cdist/conf/explorer: No such file or directory -ERROR: Command failed: scp -qr /home/users/nico/p/cdist-nutzung/conf/explorer root@ikr01.ethz.ch:/var/lib/cdist/conf/explorer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -INFO: Finished run of ikq06.ethz.ch in 85.171819 seconds -I should cleanup /home/users/nico/.tmp/tmpjb2ow1 -INFO: Finished run of ikq02.ethz.ch in 85.507466 seconds -I should cleanup /home/users/nico/.tmp/tmpnql8_x -INFO: Finished run of ikq07.ethz.ch in 85.526465 seconds -I should cleanup /home/users/nico/.tmp/tmpl_34em -INFO: Finished run of ikq04.ethz.ch in 85.759357 seconds -I should cleanup /home/users/nico/.tmp/tmp807dx7 -INFO: Finished run of ikq03.ethz.ch in 85.897374 seconds -I should cleanup /home/users/nico/.tmp/tmpyjynp8 -INFO: Finished run of ikq05.ethz.ch in 101.540372 seconds -I should cleanup /home/users/nico/.tmp/tmpqgnkn1 -INFO: Total processing time for 7 host(s): 101.571705 -INFO: Deploying to ikq02.ethz.ch -INFO: Deploying to ikq03.ethz.ch -INFO: Deploying to ikq04.ethz.ch -INFO: Deploying to ikq05.ethz.ch -INFO: Deploying to ikq06.ethz.ch -INFO: Deploying to ikq07.ethz.ch -INFO: Deploying to ikr01.ethz.ch -INFO: Deploying to ikr02.ethz.ch -scp: /var/lib/cdist/conf/explorer: No such file or directory -ERROR: Command failed: scp -qr /home/users/nico/p/cdist-nutzung/conf/explorer root@ikr01.ethz.ch:/var/lib/cdist/conf/explorer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -INFO: Finished run of ikq07.ethz.ch in 88.958072 seconds -I should cleanup /home/users/nico/.tmp/tmpj824nd -INFO: Finished run of ikq04.ethz.ch in 89.290431 seconds -I should cleanup /home/users/nico/.tmp/tmpxi0eml -INFO: Finished run of ikq03.ethz.ch in 89.699189 seconds -I should cleanup /home/users/nico/.tmp/tmppx9o9p -INFO: Finished run of ikq06.ethz.ch in 89.807729 seconds -I should cleanup /home/users/nico/.tmp/tmpf3_ow_ -INFO: Finished run of ikq02.ethz.ch in 90.018545 seconds -I should cleanup /home/users/nico/.tmp/tmp6_ozkd -INFO: Finished run of ikr02.ethz.ch in 97.221764 seconds -I should cleanup /home/users/nico/.tmp/tmpsg71wy -INFO: Finished run of ikq05.ethz.ch in 107.564915 seconds -I should cleanup /home/users/nico/.tmp/tmp5zptvo -INFO: Total processing time for 8 host(s): 107.600093 -INFO: Deploying to ikq02.ethz.ch -INFO: Deploying to ikq03.ethz.ch -INFO: Deploying to ikq04.ethz.ch -INFO: Deploying to ikq06.ethz.ch -INFO: Deploying to ikq05.ethz.ch -INFO: Deploying to ikq07.ethz.ch -INFO: Deploying to ikr01.ethz.ch -INFO: Deploying to ikr02.ethz.ch -INFO: Deploying to ikr03.ethz.ch -scp: /var/lib/cdist/conf/explorer: No such file or directory -ERROR: Command failed: scp -qr /home/users/nico/p/cdist-nutzung/conf/explorer root@ikr01.ethz.ch:/var/lib/cdist/conf/explorer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -INFO: Finished run of ikq02.ethz.ch in 97.849914 seconds -I should cleanup /home/users/nico/.tmp/tmp3nnh2u -INFO: Finished run of ikq07.ethz.ch in 97.975998 seconds -I should cleanup /home/users/nico/.tmp/tmpbb7tm2 -INFO: Finished run of ikq06.ethz.ch in 98.577879 seconds -I should cleanup /home/users/nico/.tmp/tmpz03p9m -INFO: Finished run of ikq03.ethz.ch in 98.676198 seconds -I should cleanup /home/users/nico/.tmp/tmpye5yk9 -INFO: Finished run of ikq04.ethz.ch in 98.671269 seconds -I should cleanup /home/users/nico/.tmp/tmphuyj_f -INFO: Finished run of ikr02.ethz.ch in 109.003609 seconds -I should cleanup /home/users/nico/.tmp/tmpwepj8y -INFO: Finished run of ikr03.ethz.ch in 109.930106 seconds -I should cleanup /home/users/nico/.tmp/tmp6kinml -INFO: Finished run of ikq05.ethz.ch in 116.455232 seconds -I should cleanup /home/users/nico/.tmp/tmpxrp5bs -INFO: Total processing time for 9 host(s): 116.500371 -INFO: Deploying to ikq02.ethz.ch -INFO: Deploying to ikq03.ethz.ch -INFO: Deploying to ikq04.ethz.ch -INFO: Deploying to ikq05.ethz.ch -INFO: Deploying to ikq06.ethz.ch -INFO: Deploying to ikq07.ethz.ch -INFO: Deploying to ikr01.ethz.ch -INFO: Deploying to ikr02.ethz.ch -INFO: Deploying to ikr03.ethz.ch -INFO: Deploying to ikr05.ethz.ch -scp: /var/lib/cdist/conf/explorer: No such file or directory -ERROR: Command failed: scp -qr /home/users/nico/p/cdist-nutzung/conf/explorer root@ikr01.ethz.ch:/var/lib/cdist/conf/explorer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -INFO: Finished run of ikq04.ethz.ch in 103.832242 seconds -I should cleanup /home/users/nico/.tmp/tmp9o5jfq -INFO: Finished run of ikq02.ethz.ch in 104.073833 seconds -I should cleanup /home/users/nico/.tmp/tmpip0crc -INFO: Finished run of ikq06.ethz.ch in 104.439403 seconds -I should cleanup /home/users/nico/.tmp/tmpcf69h4 -INFO: Finished run of ikq07.ethz.ch in 104.863176 seconds -I should cleanup /home/users/nico/.tmp/tmpg0cr4s -INFO: Finished run of ikq03.ethz.ch in 104.975989 seconds -I should cleanup /home/users/nico/.tmp/tmp086l_6 -INFO: Finished run of ikr05.ethz.ch in 112.545759 seconds -I should cleanup /home/users/nico/.tmp/tmpdtb7q2 -INFO: Finished run of ikr02.ethz.ch in 113.6572 seconds -I should cleanup /home/users/nico/.tmp/tmp8n7m4x -INFO: Finished run of ikr03.ethz.ch in 113.657078 seconds -I should cleanup /home/users/nico/.tmp/tmpcyi98d -INFO: Finished run of ikq05.ethz.ch in 119.403885 seconds -I should cleanup /home/users/nico/.tmp/tmpjow046 -INFO: Total processing time for 10 host(s): 119.445805 -INFO: Deploying to ikq02.ethz.ch -INFO: Deploying to ikq03.ethz.ch -INFO: Deploying to ikq04.ethz.ch -INFO: Deploying to ikq05.ethz.ch -INFO: Deploying to ikq06.ethz.ch -INFO: Deploying to ikq07.ethz.ch -INFO: Deploying to ikr01.ethz.ch -INFO: Deploying to ikr02.ethz.ch -INFO: Deploying to ikr03.ethz.ch -INFO: Deploying to ikr05.ethz.ch -INFO: Deploying to ikr07.ethz.ch -scp: /var/lib/cdist/conf/explorer: No such file or directory -ERROR: Command failed: scp -qr /home/users/nico/p/cdist-nutzung/conf/explorer root@ikr01.ethz.ch:/var/lib/cdist/conf/explorer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -INFO: Finished run of ikq02.ethz.ch in 107.594849 seconds -I should cleanup /home/users/nico/.tmp/tmpam7130 -INFO: Finished run of ikq04.ethz.ch in 108.012557 seconds -I should cleanup /home/users/nico/.tmp/tmpksan74 -INFO: Finished run of ikq07.ethz.ch in 108.044124 seconds -I should cleanup /home/users/nico/.tmp/tmpbtfim0 -INFO: Finished run of ikq06.ethz.ch in 108.341489 seconds -I should cleanup /home/users/nico/.tmp/tmprweak0 -INFO: Finished run of ikq03.ethz.ch in 108.389863 seconds -I should cleanup /home/users/nico/.tmp/tmp0vl1nl -INFO: Finished run of ikr05.ethz.ch in 118.315184 seconds -I should cleanup /home/users/nico/.tmp/tmpcnj64y -INFO: Finished run of ikr07.ethz.ch in 119.454786 seconds -I should cleanup /home/users/nico/.tmp/tmp5f6dcf -INFO: Finished run of ikr02.ethz.ch in 119.734442 seconds -I should cleanup /home/users/nico/.tmp/tmpgx6lga -INFO: Finished run of ikr03.ethz.ch in 119.813266 seconds -I should cleanup /home/users/nico/.tmp/tmpza8ftn -INFO: Finished run of ikq05.ethz.ch in 123.912563 seconds -I should cleanup /home/users/nico/.tmp/tmpokg3bw -INFO: Total processing time for 11 host(s): 123.944385 -INFO: Deploying to ikq02.ethz.ch -INFO: Deploying to ikq03.ethz.ch -INFO: Deploying to ikq04.ethz.ch -INFO: Deploying to ikq05.ethz.ch -INFO: Deploying to ikq06.ethz.ch -INFO: Deploying to ikq07.ethz.ch -INFO: Deploying to ikr01.ethz.ch -INFO: Deploying to ikr02.ethz.ch -INFO: Deploying to ikr03.ethz.ch -INFO: Deploying to ikr05.ethz.ch -INFO: Deploying to ikr07.ethz.ch -INFO: Deploying to ikr09.ethz.ch -scp: /var/lib/cdist/conf/explorer: No such file or directory -ERROR: Command failed: scp -qr /home/users/nico/p/cdist-nutzung/conf/explorer root@ikr01.ethz.ch:/var/lib/cdist/conf/explorer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -INFO: Finished run of ikq06.ethz.ch in 112.532755 seconds -I should cleanup /home/users/nico/.tmp/tmpkwi6o4 -INFO: Finished run of ikq03.ethz.ch in 113.655432 seconds -I should cleanup /home/users/nico/.tmp/tmpheiprp -INFO: Finished run of ikq02.ethz.ch in 114.308282 seconds -I should cleanup /home/users/nico/.tmp/tmp1krz1m -INFO: Finished run of ikq07.ethz.ch in 114.580586 seconds -I should cleanup /home/users/nico/.tmp/tmpg23sal -INFO: Finished run of ikq04.ethz.ch in 114.981261 seconds -I should cleanup /home/users/nico/.tmp/tmplged7b -INFO: Finished run of ikr05.ethz.ch in 124.918792 seconds -I should cleanup /home/users/nico/.tmp/tmpsijvc9 -INFO: Finished run of ikr02.ethz.ch in 125.388647 seconds -I should cleanup /home/users/nico/.tmp/tmpw1e4ji -INFO: Finished run of ikr07.ethz.ch in 125.691531 seconds -I should cleanup /home/users/nico/.tmp/tmpx_9iz6 -INFO: Finished run of ikr03.ethz.ch in 126.951817 seconds -I should cleanup /home/users/nico/.tmp/tmpuikakt -INFO: Finished run of ikr09.ethz.ch in 126.947601 seconds -I should cleanup /home/users/nico/.tmp/tmpoyxlah -INFO: Finished run of ikq05.ethz.ch in 130.467261 seconds -I should cleanup /home/users/nico/.tmp/tmpobh15j -INFO: Total processing time for 12 host(s): 130.499098 -INFO: Deploying to ikq02.ethz.ch -INFO: Deploying to ikq03.ethz.ch -INFO: Deploying to ikq04.ethz.ch -INFO: Deploying to ikq05.ethz.ch -INFO: Deploying to ikq06.ethz.ch -INFO: Deploying to ikq07.ethz.ch -INFO: Deploying to ikr01.ethz.ch -INFO: Deploying to ikr02.ethz.ch -INFO: Deploying to ikr03.ethz.ch -INFO: Deploying to ikr05.ethz.ch -INFO: Deploying to ikr07.ethz.ch -INFO: Deploying to ikr09.ethz.ch -INFO: Deploying to ikr10.ethz.ch -scp: /var/lib/cdist/conf/explorer: No such file or directory -ERROR: Command failed: scp -qr /home/users/nico/p/cdist-nutzung/conf/explorer root@ikr01.ethz.ch:/var/lib/cdist/conf/explorer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -INFO: Finished run of ikq02.ethz.ch in 121.864821 seconds -I should cleanup /home/users/nico/.tmp/tmpfgqxt5 -INFO: Finished run of ikq04.ethz.ch in 121.929722 seconds -I should cleanup /home/users/nico/.tmp/tmps2c8x0 -INFO: Finished run of ikq03.ethz.ch in 122.486316 seconds -I should cleanup /home/users/nico/.tmp/tmpnmea2b -INFO: Finished run of ikq06.ethz.ch in 123.168465 seconds -I should cleanup /home/users/nico/.tmp/tmp_5ns1o -INFO: Finished run of ikq07.ethz.ch in 123.623172 seconds -I should cleanup /home/users/nico/.tmp/tmp86yazu -INFO: Finished run of ikr05.ethz.ch in 131.530627 seconds -I should cleanup /home/users/nico/.tmp/tmp_wjz4q -INFO: Finished run of ikr10.ethz.ch in 132.29461 seconds -I should cleanup /home/users/nico/.tmp/tmpd9b7e6 -INFO: Finished run of ikr02.ethz.ch in 132.860874 seconds -I should cleanup /home/users/nico/.tmp/tmp5ruwiq -INFO: Finished run of ikr07.ethz.ch in 133.120448 seconds -I should cleanup /home/users/nico/.tmp/tmpdg8gnz -INFO: Finished run of ikr09.ethz.ch in 133.144026 seconds -I should cleanup /home/users/nico/.tmp/tmpdqnwj8 -INFO: Finished run of ikr03.ethz.ch in 133.569501 seconds -I should cleanup /home/users/nico/.tmp/tmp0ib7vd -INFO: Finished run of ikq05.ethz.ch in 137.219204 seconds -I should cleanup /home/users/nico/.tmp/tmpjnp_34 -INFO: Total processing time for 13 host(s): 137.250861 -INFO: Deploying to ikq02.ethz.ch -INFO: Deploying to ikq03.ethz.ch -INFO: Deploying to ikq04.ethz.ch -INFO: Deploying to ikq05.ethz.ch -INFO: Deploying to ikq06.ethz.ch -INFO: Deploying to ikq07.ethz.ch -INFO: Deploying to ikr01.ethz.ch -INFO: Deploying to ikr02.ethz.ch -INFO: Deploying to ikr03.ethz.ch -INFO: Deploying to ikr05.ethz.ch -INFO: Deploying to ikr07.ethz.ch -INFO: Deploying to ikr09.ethz.ch -INFO: Deploying to ikr10.ethz.ch -INFO: Deploying to ikr11.ethz.ch -scp: /var/lib/cdist/conf/explorer: No such file or directory -ERROR: Command failed: scp -qr /home/users/nico/p/cdist-nutzung/conf/explorer root@ikr01.ethz.ch:/var/lib/cdist/conf/explorer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -INFO: Finished run of ikq04.ethz.ch in 137.290435 seconds -I should cleanup /home/users/nico/.tmp/tmp3qrvii -INFO: Finished run of ikq06.ethz.ch in 137.430914 seconds -I should cleanup /home/users/nico/.tmp/tmpbut7j0 -INFO: Finished run of ikq02.ethz.ch in 137.888909 seconds -I should cleanup /home/users/nico/.tmp/tmp4vyy9p -INFO: Finished run of ikq03.ethz.ch in 138.237095 seconds -I should cleanup /home/users/nico/.tmp/tmpfj1yim -INFO: Finished run of ikq07.ethz.ch in 138.392173 seconds -I should cleanup /home/users/nico/.tmp/tmpfw3bx4 -INFO: Finished run of ikr05.ethz.ch in 150.274366 seconds -I should cleanup /home/users/nico/.tmp/tmpyn7rh1 -INFO: Finished run of ikr10.ethz.ch in 150.478504 seconds -I should cleanup /home/users/nico/.tmp/tmpn50v6l -INFO: Finished run of ikr07.ethz.ch in 150.514287 seconds -I should cleanup /home/users/nico/.tmp/tmp_mvlp2 -INFO: Finished run of ikr09.ethz.ch in 151.015286 seconds -I should cleanup /home/users/nico/.tmp/tmpm549_r -INFO: Finished run of ikr03.ethz.ch in 151.541814 seconds -I should cleanup /home/users/nico/.tmp/tmpynae4z -INFO: Finished run of ikr11.ethz.ch in 151.624163 seconds -I should cleanup /home/users/nico/.tmp/tmpyerp4y -INFO: Finished run of ikr02.ethz.ch in 151.81055 seconds -I should cleanup /home/users/nico/.tmp/tmp1t9rdc -INFO: Finished run of ikq05.ethz.ch in 154.945986 seconds -I should cleanup /home/users/nico/.tmp/tmpwxljjr -INFO: Total processing time for 14 host(s): 154.9841 -INFO: Deploying to ikq02.ethz.ch -INFO: Deploying to ikq03.ethz.ch -INFO: Deploying to ikq04.ethz.ch -INFO: Deploying to ikq06.ethz.ch -INFO: Deploying to ikq05.ethz.ch -INFO: Deploying to ikq07.ethz.ch -INFO: Deploying to ikr01.ethz.ch -INFO: Deploying to ikr02.ethz.ch -INFO: Deploying to ikr03.ethz.ch -INFO: Deploying to ikr05.ethz.ch -INFO: Deploying to ikr07.ethz.ch -INFO: Deploying to ikr09.ethz.ch -INFO: Deploying to ikr10.ethz.ch -INFO: Deploying to ikr11.ethz.ch -INFO: Deploying to ikr13.ethz.ch -Warning: Permanently added 'ikr13.ethz.ch,129.132.186.26' (RSA) to the list of known hosts. -scp: /var/lib/cdist/conf/explorer: No such file or directory -ERROR: Command failed: scp -qr /home/users/nico/p/cdist-nutzung/conf/explorer root@ikr01.ethz.ch:/var/lib/cdist/conf/explorer -scp: /var/lib/cdist/conf/explorer: No such file or directory -ERROR: Command failed: scp -qr /home/users/nico/p/cdist-nutzung/conf/explorer root@ikr13.ethz.ch:/var/lib/cdist/conf/explorer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -INFO: Finished run of ikq03.ethz.ch in 120.523743 seconds -I should cleanup /home/users/nico/.tmp/tmp0_7fgv -INFO: Finished run of ikq02.ethz.ch in 121.060225 seconds -I should cleanup /home/users/nico/.tmp/tmpjxa6qw -INFO: Finished run of ikq04.ethz.ch in 121.754777 seconds -I should cleanup /home/users/nico/.tmp/tmpvnzs7k -INFO: Finished run of ikq07.ethz.ch in 121.782193 seconds -I should cleanup /home/users/nico/.tmp/tmp1o26v7 -INFO: Finished run of ikq06.ethz.ch in 122.575204 seconds -I should cleanup /home/users/nico/.tmp/tmp592kot -INFO: Finished run of ikr10.ethz.ch in 131.920153 seconds -I should cleanup /home/users/nico/.tmp/tmp_iwf_6 -INFO: Finished run of ikr05.ethz.ch in 132.153554 seconds -I should cleanup /home/users/nico/.tmp/tmpbk7wid -INFO: Finished run of ikr02.ethz.ch in 132.330635 seconds -I should cleanup /home/users/nico/.tmp/tmp9n2a4e -INFO: Finished run of ikr09.ethz.ch in 132.486383 seconds -I should cleanup /home/users/nico/.tmp/tmp__xwmz -INFO: Finished run of ikr07.ethz.ch in 136.013244 seconds -I should cleanup /home/users/nico/.tmp/tmp2gdyhj -INFO: Finished run of ikr11.ethz.ch in 136.471268 seconds -I should cleanup /home/users/nico/.tmp/tmphgxzio -INFO: Finished run of ikr03.ethz.ch in 136.565002 seconds -I should cleanup /home/users/nico/.tmp/tmpsdws1m -INFO: Finished run of ikq05.ethz.ch in 139.613692 seconds -I should cleanup /home/users/nico/.tmp/tmpp0lh4k -INFO: Total processing time for 15 host(s): 139.659637 -INFO: Deploying to ikq02.ethz.ch -INFO: Deploying to ikq03.ethz.ch -INFO: Deploying to ikq04.ethz.ch -INFO: Deploying to ikq05.ethz.ch -INFO: Deploying to ikq06.ethz.ch -INFO: Deploying to ikq07.ethz.ch -INFO: Deploying to ikr01.ethz.ch -INFO: Deploying to ikr03.ethz.ch -INFO: Deploying to ikr02.ethz.ch -INFO: Deploying to ikr05.ethz.ch -INFO: Deploying to ikr07.ethz.ch -INFO: Deploying to ikr09.ethz.ch -INFO: Deploying to ikr10.ethz.ch -INFO: Deploying to ikr11.ethz.ch -INFO: Deploying to ikr13.ethz.ch -INFO: Deploying to ikr14.ethz.ch -scp: /var/lib/cdist/conf/explorer: No such file or directory -ERROR: Command failed: scp -qr /home/users/nico/p/cdist-nutzung/conf/explorer root@ikr01.ethz.ch:/var/lib/cdist/conf/explorer -scp: /var/lib/cdist/conf/explorer: No such file or directory -ERROR: Command failed: scp -qr /home/users/nico/p/cdist-nutzung/conf/explorer root@ikr13.ethz.ch:/var/lib/cdist/conf/explorer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -INFO: Finished run of ikq06.ethz.ch in 123.802602 seconds -I should cleanup /home/users/nico/.tmp/tmpoag3uo -INFO: Finished run of ikq04.ethz.ch in 125.244272 seconds -I should cleanup /home/users/nico/.tmp/tmpzc8p8r -INFO: Finished run of ikq07.ethz.ch in 126.049417 seconds -I should cleanup /home/users/nico/.tmp/tmpg0wjs1 -INFO: Finished run of ikq02.ethz.ch in 126.635092 seconds -I should cleanup /home/users/nico/.tmp/tmpnhuefm -INFO: Finished run of ikq03.ethz.ch in 126.683252 seconds -I should cleanup /home/users/nico/.tmp/tmp569klp -INFO: Finished run of ikr10.ethz.ch in 135.902786 seconds -I should cleanup /home/users/nico/.tmp/tmp_pepbg -INFO: Finished run of ikr05.ethz.ch in 137.519519 seconds -I should cleanup /home/users/nico/.tmp/tmpog_4d2 -INFO: Finished run of ikr14.ethz.ch in 137.486553 seconds -I should cleanup /home/users/nico/.tmp/tmp35z1n7 -INFO: Finished run of ikr09.ethz.ch in 139.393357 seconds -I should cleanup /home/users/nico/.tmp/tmpa3d3le -INFO: Finished run of ikr11.ethz.ch in 139.367952 seconds -I should cleanup /home/users/nico/.tmp/tmpdyzpgw -INFO: Finished run of ikr03.ethz.ch in 139.772987 seconds -I should cleanup /home/users/nico/.tmp/tmprxzbm6 -INFO: Finished run of ikr02.ethz.ch in 139.962957 seconds -I should cleanup /home/users/nico/.tmp/tmpyrnk23 -INFO: Finished run of ikr07.ethz.ch in 140.554612 seconds -I should cleanup /home/users/nico/.tmp/tmpob7r8v -INFO: Finished run of ikq05.ethz.ch in 142.669111 seconds -I should cleanup /home/users/nico/.tmp/tmp8qcpjv -INFO: Total processing time for 16 host(s): 142.70005 -INFO: Deploying to ikq02.ethz.ch -INFO: Deploying to ikq03.ethz.ch -INFO: Deploying to ikq04.ethz.ch -INFO: Deploying to ikq05.ethz.ch -INFO: Deploying to ikq06.ethz.ch -INFO: Deploying to ikq07.ethz.ch -INFO: Deploying to ikr01.ethz.ch -INFO: Deploying to ikr02.ethz.ch -INFO: Deploying to ikr03.ethz.ch -INFO: Deploying to ikr05.ethz.ch -INFO: Deploying to ikr07.ethz.ch -INFO: Deploying to ikr09.ethz.ch -INFO: Deploying to ikr10.ethz.ch -INFO: Deploying to ikr11.ethz.ch -INFO: Deploying to ikr13.ethz.ch -INFO: Deploying to ikr14.ethz.ch -INFO: Deploying to ikr15.ethz.ch -scp: /var/lib/cdist/conf/explorer: No such file or directory -ERROR: Command failed: scp -qr /home/users/nico/p/cdist-nutzung/conf/explorer root@ikr01.ethz.ch:/var/lib/cdist/conf/explorer -scp: /var/lib/cdist/conf/explorer: No such file or directory -ERROR: Command failed: scp -qr /home/users/nico/p/cdist-nutzung/conf/explorer root@ikr13.ethz.ch:/var/lib/cdist/conf/explorer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -INFO: Finished run of ikq03.ethz.ch in 132.945203 seconds -I should cleanup /home/users/nico/.tmp/tmpzot_mg -INFO: Finished run of ikq07.ethz.ch in 132.982484 seconds -I should cleanup /home/users/nico/.tmp/tmpgsp6q2 -INFO: Finished run of ikq02.ethz.ch in 133.229802 seconds -I should cleanup /home/users/nico/.tmp/tmpd4zxn8 -INFO: Finished run of ikq04.ethz.ch in 133.299541 seconds -I should cleanup /home/users/nico/.tmp/tmp4zq45z -INFO: Finished run of ikq06.ethz.ch in 133.802036 seconds -I should cleanup /home/users/nico/.tmp/tmpzwrs5v -INFO: Finished run of ikr14.ethz.ch in 145.03485 seconds -I should cleanup /home/users/nico/.tmp/tmpbqcwz0 -INFO: Finished run of ikr02.ethz.ch in 145.416967 seconds -I should cleanup /home/users/nico/.tmp/tmp1lse41 -INFO: Finished run of ikr10.ethz.ch in 145.693574 seconds -I should cleanup /home/users/nico/.tmp/tmpur3wfv -INFO: Finished run of ikr07.ethz.ch in 145.978708 seconds -I should cleanup /home/users/nico/.tmp/tmpr0an2_ -INFO: Finished run of ikr05.ethz.ch in 146.286686 seconds -I should cleanup /home/users/nico/.tmp/tmpl29did -INFO: Finished run of ikr09.ethz.ch in 146.501529 seconds -I should cleanup /home/users/nico/.tmp/tmpydoin6 -INFO: Finished run of ikr15.ethz.ch in 147.016223 seconds -I should cleanup /home/users/nico/.tmp/tmpbcp5p8 -INFO: Finished run of ikr03.ethz.ch in 147.12484 seconds -I should cleanup /home/users/nico/.tmp/tmpuowz74 -INFO: Finished run of ikr11.ethz.ch in 147.286151 seconds -I should cleanup /home/users/nico/.tmp/tmph25hy8 -INFO: Finished run of ikq05.ethz.ch in 148.506819 seconds -I should cleanup /home/users/nico/.tmp/tmp7brn95 -INFO: Total processing time for 17 host(s): 148.541452 -INFO: Deploying to ikq02.ethz.ch -INFO: Deploying to ikq03.ethz.ch -INFO: Deploying to ikq04.ethz.ch -INFO: Deploying to ikq05.ethz.ch -INFO: Deploying to ikq06.ethz.ch -INFO: Deploying to ikq07.ethz.ch -INFO: Deploying to ikr01.ethz.ch -INFO: Deploying to ikr02.ethz.ch -INFO: Deploying to ikr03.ethz.ch -INFO: Deploying to ikr05.ethz.ch -INFO: Deploying to ikr07.ethz.ch -INFO: Deploying to ikr10.ethz.ch -INFO: Deploying to ikr09.ethz.ch -INFO: Deploying to ikr11.ethz.ch -INFO: Deploying to ikr13.ethz.ch -INFO: Deploying to ikr14.ethz.ch -INFO: Deploying to ikr15.ethz.ch -INFO: Deploying to ikr16.ethz.ch -scp: /var/lib/cdist/conf/explorer: No such file or directory -ERROR: Command failed: scp -qr /home/users/nico/p/cdist-nutzung/conf/explorer root@ikr01.ethz.ch:/var/lib/cdist/conf/explorer -scp: /var/lib/cdist/conf/explorer: No such file or directory -ERROR: Command failed: scp -qr /home/users/nico/p/cdist-nutzung/conf/explorer root@ikr13.ethz.ch:/var/lib/cdist/conf/explorer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -INFO: Finished run of ikq04.ethz.ch in 143.675686 seconds -I should cleanup /home/users/nico/.tmp/tmp82nal9 -INFO: Finished run of ikq06.ethz.ch in 144.765412 seconds -I should cleanup /home/users/nico/.tmp/tmppxbr5e -INFO: Finished run of ikq07.ethz.ch in 144.895368 seconds -I should cleanup /home/users/nico/.tmp/tmp2waolo -INFO: Finished run of ikq03.ethz.ch in 145.051027 seconds -I should cleanup /home/users/nico/.tmp/tmp4984jk -INFO: Finished run of ikq02.ethz.ch in 145.822406 seconds -I should cleanup /home/users/nico/.tmp/tmpaz8a8n -INFO: Finished run of ikr14.ethz.ch in 154.113672 seconds -I should cleanup /home/users/nico/.tmp/tmpxy2kg4 -INFO: Finished run of ikr10.ethz.ch in 156.984583 seconds -I should cleanup /home/users/nico/.tmp/tmp6ppd8k -INFO: Finished run of ikr02.ethz.ch in 157.091568 seconds -I should cleanup /home/users/nico/.tmp/tmpxxou_a -INFO: Finished run of ikr07.ethz.ch in 157.520308 seconds -I should cleanup /home/users/nico/.tmp/tmpow0v1c -INFO: Finished run of ikr09.ethz.ch in 157.634227 seconds -I should cleanup /home/users/nico/.tmp/tmpi3gg17 -INFO: Finished run of ikr03.ethz.ch in 157.85916 seconds -I should cleanup /home/users/nico/.tmp/tmp3aybb1 -INFO: Finished run of ikr05.ethz.ch in 157.896262 seconds -I should cleanup /home/users/nico/.tmp/tmphqwu6l -INFO: Finished run of ikr16.ethz.ch in 158.078375 seconds -I should cleanup /home/users/nico/.tmp/tmptkh_yn -INFO: Finished run of ikr11.ethz.ch in 158.379867 seconds -I should cleanup /home/users/nico/.tmp/tmp1mdfoi -INFO: Finished run of ikr15.ethz.ch in 158.426851 seconds -I should cleanup /home/users/nico/.tmp/tmp4lcx43 -INFO: Finished run of ikq05.ethz.ch in 159.319045 seconds -I should cleanup /home/users/nico/.tmp/tmp2f_gug -INFO: Total processing time for 18 host(s): 159.360809 -INFO: Deploying to ikq02.ethz.ch -INFO: Deploying to ikq03.ethz.ch -INFO: Deploying to ikq04.ethz.ch -INFO: Deploying to ikq05.ethz.ch -INFO: Deploying to ikq06.ethz.ch -INFO: Deploying to ikq07.ethz.ch -INFO: Deploying to ikr01.ethz.ch -INFO: Deploying to ikr02.ethz.ch -INFO: Deploying to ikr03.ethz.ch -INFO: Deploying to ikr05.ethz.ch -INFO: Deploying to ikr07.ethz.ch -INFO: Deploying to ikr09.ethz.ch -INFO: Deploying to ikr10.ethz.ch -INFO: Deploying to ikr11.ethz.ch -INFO: Deploying to ikr13.ethz.ch -INFO: Deploying to ikr14.ethz.ch -INFO: Deploying to ikr15.ethz.ch -INFO: Deploying to ikr16.ethz.ch -INFO: Deploying to ikr17.ethz.ch -scp: /var/lib/cdist/conf/explorer: No such file or directory -ERROR: Command failed: scp -qr /home/users/nico/p/cdist-nutzung/conf/explorer root@ikr01.ethz.ch:/var/lib/cdist/conf/explorer -scp: /var/lib/cdist/conf/explorer: No such file or directory -ERROR: Command failed: scp -qr /home/users/nico/p/cdist-nutzung/conf/explorer root@ikr13.ethz.ch:/var/lib/cdist/conf/explorer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -INFO: Finished run of ikq07.ethz.ch in 151.304278 seconds -I should cleanup /home/users/nico/.tmp/tmpqkb2pc -INFO: Finished run of ikq06.ethz.ch in 156.467966 seconds -I should cleanup /home/users/nico/.tmp/tmp35zxo7 -INFO: Finished run of ikq04.ethz.ch in 157.188747 seconds -I should cleanup /home/users/nico/.tmp/tmpvb0nxt -INFO: Finished run of ikq03.ethz.ch in 157.955866 seconds -I should cleanup /home/users/nico/.tmp/tmp4k7jgo -INFO: Finished run of ikq02.ethz.ch in 158.316461 seconds -I should cleanup /home/users/nico/.tmp/tmpeddhr1 -INFO: Finished run of ikr10.ethz.ch in 167.801774 seconds -I should cleanup /home/users/nico/.tmp/tmpn_7hlf -INFO: Finished run of ikr14.ethz.ch in 167.906681 seconds -I should cleanup /home/users/nico/.tmp/tmpdemdfp -INFO: Finished run of ikr02.ethz.ch in 169.536628 seconds -I should cleanup /home/users/nico/.tmp/tmpcaeatj -INFO: Finished run of ikr17.ethz.ch in 169.68007 seconds -I should cleanup /home/users/nico/.tmp/tmpzz1gwu -INFO: Finished run of ikr05.ethz.ch in 170.014506 seconds -I should cleanup /home/users/nico/.tmp/tmpksj9is -INFO: Finished run of ikr15.ethz.ch in 170.512682 seconds -I should cleanup /home/users/nico/.tmp/tmpdb72hk -INFO: Finished run of ikr09.ethz.ch in 170.696373 seconds -I should cleanup /home/users/nico/.tmp/tmpe3dz9b -INFO: Finished run of ikr07.ethz.ch in 170.923977 seconds -I should cleanup /home/users/nico/.tmp/tmpuvt1ke -INFO: Finished run of ikr11.ethz.ch in 170.89362 seconds -I should cleanup /home/users/nico/.tmp/tmpuk0_7g -INFO: Finished run of ikr03.ethz.ch in 171.598123 seconds -I should cleanup /home/users/nico/.tmp/tmp4i12vh -INFO: Finished run of ikr16.ethz.ch in 171.502924 seconds -I should cleanup /home/users/nico/.tmp/tmp55ix1x -INFO: Finished run of ikq05.ethz.ch in 171.874543 seconds -I should cleanup /home/users/nico/.tmp/tmp417ofh -INFO: Total processing time for 19 host(s): 171.907864 -INFO: Deploying to ikq02.ethz.ch -INFO: Deploying to ikq03.ethz.ch -INFO: Deploying to ikq04.ethz.ch -INFO: Deploying to ikq05.ethz.ch -INFO: Deploying to ikq06.ethz.ch -INFO: Deploying to ikq07.ethz.ch -INFO: Deploying to ikr01.ethz.ch -INFO: Deploying to ikr02.ethz.ch -INFO: Deploying to ikr03.ethz.ch -INFO: Deploying to ikr05.ethz.ch -INFO: Deploying to ikr07.ethz.ch -INFO: Deploying to ikr09.ethz.ch -INFO: Deploying to ikr10.ethz.ch -INFO: Deploying to ikr11.ethz.ch -INFO: Deploying to ikr13.ethz.ch -INFO: Deploying to ikr14.ethz.ch -INFO: Deploying to ikr15.ethz.ch -INFO: Deploying to ikr16.ethz.ch -INFO: Deploying to ikr17.ethz.ch -INFO: Deploying to ikr19.ethz.ch -scp: /var/lib/cdist/conf/explorer: No such file or directory -ERROR: Command failed: scp -qr /home/users/nico/p/cdist-nutzung/conf/explorer root@ikr01.ethz.ch:/var/lib/cdist/conf/explorer -scp: /var/lib/cdist/conf/explorer: No such file or directory -ERROR: Command failed: scp -qr /home/users/nico/p/cdist-nutzung/conf/explorer root@ikr13.ethz.ch:/var/lib/cdist/conf/explorer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -INFO: Finished run of ikq02.ethz.ch in 157.829713 seconds -I should cleanup /home/users/nico/.tmp/tmpqf9wcb -INFO: Finished run of ikq04.ethz.ch in 161.470424 seconds -I should cleanup /home/users/nico/.tmp/tmpaxrqmo -INFO: Finished run of ikq06.ethz.ch in 163.020342 seconds -I should cleanup /home/users/nico/.tmp/tmpt5dwxt -INFO: Finished run of ikq03.ethz.ch in 164.391855 seconds -I should cleanup /home/users/nico/.tmp/tmpd_5zb6 -INFO: Finished run of ikq07.ethz.ch in 165.180659 seconds -I should cleanup /home/users/nico/.tmp/tmp97ikmr -INFO: Finished run of ikr14.ethz.ch in 173.059971 seconds -I should cleanup /home/users/nico/.tmp/tmpefe37g -INFO: Finished run of ikr07.ethz.ch in 173.134127 seconds -I should cleanup /home/users/nico/.tmp/tmp7vam9i -INFO: Finished run of ikr05.ethz.ch in 174.793465 seconds -I should cleanup /home/users/nico/.tmp/tmplu772y -INFO: Finished run of ikr19.ethz.ch in 175.448245 seconds -I should cleanup /home/users/nico/.tmp/tmpkrzksf -INFO: Finished run of ikr02.ethz.ch in 175.624194 seconds -I should cleanup /home/users/nico/.tmp/tmpln5e7p -INFO: Finished run of ikr10.ethz.ch in 177.161247 seconds -I should cleanup /home/users/nico/.tmp/tmp04oa95 -INFO: Finished run of ikr17.ethz.ch in 177.641062 seconds -I should cleanup /home/users/nico/.tmp/tmpuke4jq -INFO: Finished run of ikr03.ethz.ch in 177.805503 seconds -I should cleanup /home/users/nico/.tmp/tmp9m6kgk -INFO: Finished run of ikr09.ethz.ch in 178.068981 seconds -I should cleanup /home/users/nico/.tmp/tmpwsvt18 -INFO: Finished run of ikr11.ethz.ch in 178.26438 seconds -I should cleanup /home/users/nico/.tmp/tmpvsc9oz -INFO: Finished run of ikr15.ethz.ch in 178.416205 seconds -I should cleanup /home/users/nico/.tmp/tmpmzzacs -INFO: Finished run of ikr16.ethz.ch in 178.473477 seconds -I should cleanup /home/users/nico/.tmp/tmplh_80t -INFO: Finished run of ikq05.ethz.ch in 178.735551 seconds -I should cleanup /home/users/nico/.tmp/tmpslnq9v -INFO: Total processing time for 20 host(s): 178.76695 -INFO: Deploying to ikq02.ethz.ch -INFO: Deploying to ikq03.ethz.ch -INFO: Deploying to ikq04.ethz.ch -INFO: Deploying to ikq06.ethz.ch -INFO: Deploying to ikq05.ethz.ch -INFO: Deploying to ikq07.ethz.ch -INFO: Deploying to ikr01.ethz.ch -INFO: Deploying to ikr02.ethz.ch -INFO: Deploying to ikr03.ethz.ch -INFO: Deploying to ikr05.ethz.ch -INFO: Deploying to ikr07.ethz.ch -INFO: Deploying to ikr09.ethz.ch -INFO: Deploying to ikr10.ethz.ch -INFO: Deploying to ikr11.ethz.ch -INFO: Deploying to ikr13.ethz.ch -INFO: Deploying to ikr14.ethz.ch -INFO: Deploying to ikr15.ethz.ch -INFO: Deploying to ikr16.ethz.ch -INFO: Deploying to ikr17.ethz.ch -INFO: Deploying to ikr19.ethz.ch -INFO: Deploying to ikr20.ethz.ch -scp: /var/lib/cdist/conf/explorer: No such file or directory -ERROR: Command failed: scp -qr /home/users/nico/p/cdist-nutzung/conf/explorer root@ikr01.ethz.ch:/var/lib/cdist/conf/explorer -scp: /var/lib/cdist/conf/explorer: No such file or directory -ERROR: Command failed: scp -qr /home/users/nico/p/cdist-nutzung/conf/explorer root@ikr13.ethz.ch:/var/lib/cdist/conf/explorer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -INFO: Finished run of ikq02.ethz.ch in 170.169321 seconds -I should cleanup /home/users/nico/.tmp/tmpdgynh9 -INFO: Finished run of ikq06.ethz.ch in 171.461174 seconds -I should cleanup /home/users/nico/.tmp/tmpwxtd79 -INFO: Finished run of ikq03.ethz.ch in 171.626668 seconds -I should cleanup /home/users/nico/.tmp/tmpiqc3ji -INFO: Finished run of ikq04.ethz.ch in 171.724653 seconds -I should cleanup /home/users/nico/.tmp/tmpdt2og0 -INFO: Finished run of ikq07.ethz.ch in 171.78001 seconds -I should cleanup /home/users/nico/.tmp/tmpl4krs7 -INFO: Finished run of ikr10.ethz.ch in 177.048099 seconds -I should cleanup /home/users/nico/.tmp/tmpne6_s_ -INFO: Finished run of ikr17.ethz.ch in 180.562186 seconds -I should cleanup /home/users/nico/.tmp/tmpl199q5 -INFO: Finished run of ikr19.ethz.ch in 181.223109 seconds -I should cleanup /home/users/nico/.tmp/tmpoky1qz -INFO: Finished run of ikr11.ethz.ch in 182.462812 seconds -I should cleanup /home/users/nico/.tmp/tmp2xfmtx -INFO: Finished run of ikr14.ethz.ch in 182.498966 seconds -I should cleanup /home/users/nico/.tmp/tmpbaa_1v -INFO: Finished run of ikr20.ethz.ch in 182.598193 seconds -I should cleanup /home/users/nico/.tmp/tmp0goxf_ -INFO: Finished run of ikr03.ethz.ch in 183.01005 seconds -I should cleanup /home/users/nico/.tmp/tmpa7d_j6 -INFO: Finished run of ikr15.ethz.ch in 182.994708 seconds -I should cleanup /home/users/nico/.tmp/tmphvktgk -INFO: Finished run of ikr07.ethz.ch in 183.413644 seconds -I should cleanup /home/users/nico/.tmp/tmpxfe884 -INFO: Finished run of ikr02.ethz.ch in 183.470895 seconds -I should cleanup /home/users/nico/.tmp/tmphd7ynb -INFO: Finished run of ikr05.ethz.ch in 183.46156 seconds -I should cleanup /home/users/nico/.tmp/tmpfniywk -INFO: Finished run of ikr16.ethz.ch in 183.371318 seconds -I should cleanup /home/users/nico/.tmp/tmpqsd782 -INFO: Finished run of ikr09.ethz.ch in 183.467264 seconds -I should cleanup /home/users/nico/.tmp/tmph84dh1 -INFO: Finished run of ikq05.ethz.ch in 183.813915 seconds -I should cleanup /home/users/nico/.tmp/tmp_w3anv -INFO: Total processing time for 21 host(s): 183.856671 -INFO: Deploying to ikq02.ethz.ch -INFO: Deploying to ikq03.ethz.ch -INFO: Deploying to ikq04.ethz.ch -INFO: Deploying to ikq05.ethz.ch -INFO: Deploying to ikq06.ethz.ch -INFO: Deploying to ikq07.ethz.ch -INFO: Deploying to ikr01.ethz.ch -INFO: Deploying to ikr02.ethz.ch -INFO: Deploying to ikr03.ethz.ch -INFO: Deploying to ikr05.ethz.ch -INFO: Deploying to ikr07.ethz.ch -INFO: Deploying to ikr09.ethz.ch -INFO: Deploying to ikr10.ethz.ch -INFO: Deploying to ikr11.ethz.ch -INFO: Deploying to ikr13.ethz.ch -INFO: Deploying to ikr14.ethz.ch -INFO: Deploying to ikr15.ethz.ch -INFO: Deploying to ikr16.ethz.ch -INFO: Deploying to ikr17.ethz.ch -INFO: Deploying to ikr19.ethz.ch -INFO: Deploying to ikr20.ethz.ch -INFO: Deploying to ikr21.ethz.ch -scp: /var/lib/cdist/conf/explorer: No such file or directory -ERROR: Command failed: scp -qr /home/users/nico/p/cdist-nutzung/conf/explorer root@ikr01.ethz.ch:/var/lib/cdist/conf/explorer -scp: /var/lib/cdist/conf/explorer: No such file or directory -ERROR: Command failed: scp -qr /home/users/nico/p/cdist-nutzung/conf/explorer root@ikr13.ethz.ch:/var/lib/cdist/conf/explorer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -INFO: Finished run of ikq06.ethz.ch in 169.955614 seconds -I should cleanup /home/users/nico/.tmp/tmplmg5_y -INFO: Finished run of ikq02.ethz.ch in 170.411064 seconds -I should cleanup /home/users/nico/.tmp/tmpwr3ygp -INFO: Finished run of ikq07.ethz.ch in 173.554952 seconds -I should cleanup /home/users/nico/.tmp/tmpso42zx -INFO: Finished run of ikq04.ethz.ch in 173.63845 seconds -I should cleanup /home/users/nico/.tmp/tmpsqgh9o -INFO: Finished run of ikq03.ethz.ch in 173.951844 seconds -I should cleanup /home/users/nico/.tmp/tmp8fjghd -INFO: Finished run of ikr20.ethz.ch in 185.922176 seconds -I should cleanup /home/users/nico/.tmp/tmpt3rtcq -INFO: Finished run of ikr07.ethz.ch in 191.153275 seconds -I should cleanup /home/users/nico/.tmp/tmpr39dmz -INFO: Finished run of ikr10.ethz.ch in 191.982504 seconds -I should cleanup /home/users/nico/.tmp/tmpz_ear7 -INFO: Finished run of ikr14.ethz.ch in 192.653998 seconds -I should cleanup /home/users/nico/.tmp/tmp7wvfhq -INFO: Finished run of ikr17.ethz.ch in 192.652562 seconds -I should cleanup /home/users/nico/.tmp/tmp51k0hh -INFO: Finished run of ikr19.ethz.ch in 192.814789 seconds -I should cleanup /home/users/nico/.tmp/tmp760hc3 -INFO: Finished run of ikr05.ethz.ch in 193.44574 seconds -I should cleanup /home/users/nico/.tmp/tmp73204x -INFO: Finished run of ikr09.ethz.ch in 193.537 seconds -I should cleanup /home/users/nico/.tmp/tmpf4z4q5 -INFO: Finished run of ikr16.ethz.ch in 193.584303 seconds -I should cleanup /home/users/nico/.tmp/tmp12jwnj -INFO: Finished run of ikr11.ethz.ch in 193.668931 seconds -I should cleanup /home/users/nico/.tmp/tmptudl3_ -INFO: Finished run of ikr02.ethz.ch in 193.800381 seconds -I should cleanup /home/users/nico/.tmp/tmpf588if -INFO: Finished run of ikr15.ethz.ch in 193.754252 seconds -I should cleanup /home/users/nico/.tmp/tmpp71hsb -INFO: Finished run of ikr03.ethz.ch in 193.866005 seconds -I should cleanup /home/users/nico/.tmp/tmppevhzu -INFO: Finished run of ikr21.ethz.ch in 193.84791 seconds -I should cleanup /home/users/nico/.tmp/tmpe0umjh -INFO: Finished run of ikq05.ethz.ch in 194.471906 seconds -I should cleanup /home/users/nico/.tmp/tmp6y2zuq -INFO: Total processing time for 22 host(s): 194.504221 -INFO: Deploying to ikq02.ethz.ch -INFO: Deploying to ikq03.ethz.ch -INFO: Deploying to ikq04.ethz.ch -INFO: Deploying to ikq05.ethz.ch -INFO: Deploying to ikq06.ethz.ch -INFO: Deploying to ikq07.ethz.ch -INFO: Deploying to ikr01.ethz.ch -INFO: Deploying to ikr02.ethz.ch -INFO: Deploying to ikr03.ethz.ch -INFO: Deploying to ikr05.ethz.ch -INFO: Deploying to ikr07.ethz.ch -INFO: Deploying to ikr09.ethz.ch -INFO: Deploying to ikr11.ethz.ch -INFO: Deploying to ikr10.ethz.ch -INFO: Deploying to ikr13.ethz.ch -INFO: Deploying to ikr14.ethz.ch -INFO: Deploying to ikr15.ethz.ch -INFO: Deploying to ikr16.ethz.ch -INFO: Deploying to ikr17.ethz.ch -INFO: Deploying to ikr19.ethz.ch -INFO: Deploying to ikr20.ethz.ch -INFO: Deploying to ikr21.ethz.ch -INFO: Deploying to ikr23.ethz.ch -scp: /var/lib/cdist/conf/explorer: No such file or directory -ERROR: Command failed: scp -qr /home/users/nico/p/cdist-nutzung/conf/explorer root@ikr01.ethz.ch:/var/lib/cdist/conf/explorer -scp: /var/lib/cdist/conf/explorer: No such file or directory -ERROR: Command failed: scp -qr /home/users/nico/p/cdist-nutzung/conf/explorer root@ikr13.ethz.ch:/var/lib/cdist/conf/explorer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -INFO: Finished run of ikq06.ethz.ch in 183.331036 seconds -I should cleanup /home/users/nico/.tmp/tmp3zzf35 -INFO: Finished run of ikq04.ethz.ch in 188.245634 seconds -I should cleanup /home/users/nico/.tmp/tmppsfm7g -INFO: Finished run of ikq07.ethz.ch in 189.097252 seconds -I should cleanup /home/users/nico/.tmp/tmpckmmbr -INFO: Finished run of ikq02.ethz.ch in 189.168067 seconds -I should cleanup /home/users/nico/.tmp/tmp_wbxqv -INFO: Finished run of ikq03.ethz.ch in 191.178122 seconds -I should cleanup /home/users/nico/.tmp/tmp4xyb0h -INFO: Finished run of ikr17.ethz.ch in 200.405666 seconds -I should cleanup /home/users/nico/.tmp/tmpwl3901 -INFO: Finished run of ikr20.ethz.ch in 201.125398 seconds -I should cleanup /home/users/nico/.tmp/tmpt4gwst -INFO: Finished run of ikr05.ethz.ch in 204.457668 seconds -I should cleanup /home/users/nico/.tmp/tmpquc21r -INFO: Finished run of ikr19.ethz.ch in 204.61935 seconds -I should cleanup /home/users/nico/.tmp/tmpth2imd -INFO: Finished run of ikr03.ethz.ch in 205.782259 seconds -I should cleanup /home/users/nico/.tmp/tmp5qgmy3 -INFO: Finished run of ikr02.ethz.ch in 206.089122 seconds -I should cleanup /home/users/nico/.tmp/tmp_0yydj -INFO: Finished run of ikr10.ethz.ch in 206.344087 seconds -I should cleanup /home/users/nico/.tmp/tmprppnti -INFO: Finished run of ikr14.ethz.ch in 206.487929 seconds -I should cleanup /home/users/nico/.tmp/tmpg1sm5o -INFO: Finished run of ikr07.ethz.ch in 206.592221 seconds -I should cleanup /home/users/nico/.tmp/tmpz8h8u7 -INFO: Finished run of ikr21.ethz.ch in 206.574162 seconds -I should cleanup /home/users/nico/.tmp/tmp29bf91 -INFO: Finished run of ikr09.ethz.ch in 206.757285 seconds -I should cleanup /home/users/nico/.tmp/tmpkfk0tl -INFO: Finished run of ikr16.ethz.ch in 206.751199 seconds -I should cleanup /home/users/nico/.tmp/tmpjxql2a -INFO: Finished run of ikr15.ethz.ch in 206.951335 seconds -I should cleanup /home/users/nico/.tmp/tmpslol4l -INFO: Finished run of ikq05.ethz.ch in 207.10716 seconds -I should cleanup /home/users/nico/.tmp/tmpryt7ok -INFO: Finished run of ikr23.ethz.ch in 207.047179 seconds -I should cleanup /home/users/nico/.tmp/tmph8jagj -INFO: Finished run of ikr11.ethz.ch in 207.16906 seconds -I should cleanup /home/users/nico/.tmp/tmpl2hbm8 -INFO: Total processing time for 23 host(s): 207.314842 -INFO: Deploying to ikq02.ethz.ch -INFO: Deploying to ikq03.ethz.ch -INFO: Deploying to ikq04.ethz.ch -INFO: Deploying to ikq05.ethz.ch -INFO: Deploying to ikq06.ethz.ch -INFO: Deploying to ikq07.ethz.ch -INFO: Deploying to ikr02.ethz.ch -INFO: Deploying to ikr01.ethz.ch -INFO: Deploying to ikr05.ethz.ch -INFO: Deploying to ikr03.ethz.ch -INFO: Deploying to ikr07.ethz.ch -INFO: Deploying to ikr09.ethz.ch -INFO: Deploying to ikr10.ethz.ch -INFO: Deploying to ikr11.ethz.ch -INFO: Deploying to ikr13.ethz.ch -INFO: Deploying to ikr14.ethz.ch -INFO: Deploying to ikr15.ethz.ch -INFO: Deploying to ikr16.ethz.ch -INFO: Deploying to ikr19.ethz.ch -INFO: Deploying to ikr17.ethz.ch -INFO: Deploying to ikr20.ethz.ch -INFO: Deploying to ikr21.ethz.ch -INFO: Deploying to ikr23.ethz.ch -INFO: Deploying to ikr24.ethz.ch -scp: /var/lib/cdist/conf/explorer: No such file or directory -ERROR: Command failed: scp -qr /home/users/nico/p/cdist-nutzung/conf/explorer root@ikr01.ethz.ch:/var/lib/cdist/conf/explorer -scp: /var/lib/cdist/conf/explorer: No such file or directory -ERROR: Command failed: scp -qr /home/users/nico/p/cdist-nutzung/conf/explorer root@ikr13.ethz.ch:/var/lib/cdist/conf/explorer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -INFO: Finished run of ikq07.ethz.ch in 187.618723 seconds -I should cleanup /home/users/nico/.tmp/tmpyoqguq -INFO: Finished run of ikq03.ethz.ch in 187.750961 seconds -I should cleanup /home/users/nico/.tmp/tmpjwp515 -INFO: Finished run of ikq02.ethz.ch in 196.709864 seconds -I should cleanup /home/users/nico/.tmp/tmpm221lr -INFO: Finished run of ikq06.ethz.ch in 197.81424 seconds -I should cleanup /home/users/nico/.tmp/tmpkyt260 -INFO: Finished run of ikq04.ethz.ch in 198.512346 seconds -I should cleanup /home/users/nico/.tmp/tmpkwgaqh -INFO: Finished run of ikr14.ethz.ch in 208.879349 seconds -I should cleanup /home/users/nico/.tmp/tmpnshneg -INFO: Finished run of ikr19.ethz.ch in 211.066451 seconds -I should cleanup /home/users/nico/.tmp/tmpc0tm26 -INFO: Finished run of ikr20.ethz.ch in 212.537745 seconds -I should cleanup /home/users/nico/.tmp/tmpw16xze -INFO: Finished run of ikr03.ethz.ch in 213.771479 seconds -I should cleanup /home/users/nico/.tmp/tmpa4pj9v -INFO: Finished run of ikr10.ethz.ch in 214.089014 seconds -I should cleanup /home/users/nico/.tmp/tmpbbmh5z -INFO: Finished run of ikr15.ethz.ch in 214.168849 seconds -I should cleanup /home/users/nico/.tmp/tmp_hj_82 -INFO: Finished run of ikr17.ethz.ch in 214.377309 seconds -I should cleanup /home/users/nico/.tmp/tmpvltd85 -INFO: Finished run of ikr21.ethz.ch in 214.424358 seconds -I should cleanup /home/users/nico/.tmp/tmp9fv334 -INFO: Finished run of ikr07.ethz.ch in 214.840774 seconds -I should cleanup /home/users/nico/.tmp/tmpqm165u -INFO: Finished run of ikr05.ethz.ch in 214.906573 seconds -I should cleanup /home/users/nico/.tmp/tmpsjzrd3 -INFO: Finished run of ikr02.ethz.ch in 214.947938 seconds -I should cleanup /home/users/nico/.tmp/tmpdomosr -INFO: Finished run of ikr09.ethz.ch in 214.892808 seconds -I should cleanup /home/users/nico/.tmp/tmpwv5fb2 -INFO: Finished run of ikr11.ethz.ch in 215.352163 seconds -I should cleanup /home/users/nico/.tmp/tmp0_c8kz -INFO: Finished run of ikq05.ethz.ch in 215.460435 seconds -I should cleanup /home/users/nico/.tmp/tmpypqk55 -INFO: Finished run of ikr16.ethz.ch in 215.318416 seconds -I should cleanup /home/users/nico/.tmp/tmpypq7ta -INFO: Finished run of ikr24.ethz.ch in 215.365107 seconds -I should cleanup /home/users/nico/.tmp/tmpri18dz -INFO: Finished run of ikr23.ethz.ch in 215.594156 seconds -I should cleanup /home/users/nico/.tmp/tmpglm4ku -INFO: Total processing time for 24 host(s): 215.846502 -INFO: Deploying to ikq02.ethz.ch -INFO: Deploying to ikq03.ethz.ch -INFO: Deploying to ikq04.ethz.ch -INFO: Deploying to ikq05.ethz.ch -INFO: Deploying to ikq07.ethz.ch -INFO: Deploying to ikq06.ethz.ch -INFO: Deploying to ikr01.ethz.ch -INFO: Deploying to ikr03.ethz.ch -INFO: Deploying to ikr02.ethz.ch -INFO: Deploying to ikr05.ethz.ch -INFO: Deploying to ikr07.ethz.ch -INFO: Deploying to ikr09.ethz.ch -INFO: Deploying to ikr10.ethz.ch -INFO: Deploying to ikr11.ethz.ch -INFO: Deploying to ikr13.ethz.ch -INFO: Deploying to ikr14.ethz.ch -INFO: Deploying to ikr15.ethz.ch -INFO: Deploying to ikr16.ethz.ch -INFO: Deploying to ikr19.ethz.ch -INFO: Deploying to ikr17.ethz.ch -INFO: Deploying to ikr20.ethz.ch -INFO: Deploying to ikr21.ethz.ch -INFO: Deploying to ikr23.ethz.ch -INFO: Deploying to ikr24.ethz.ch -INFO: Deploying to ikr25.ethz.ch -scp: /var/lib/cdist/conf/explorer: No such file or directory -ERROR: Command failed: scp -qr /home/users/nico/p/cdist-nutzung/conf/explorer root@ikr01.ethz.ch:/var/lib/cdist/conf/explorer -scp: /var/lib/cdist/conf/explorer: No such file or directory -ERROR: Command failed: scp -qr /home/users/nico/p/cdist-nutzung/conf/explorer root@ikr13.ethz.ch:/var/lib/cdist/conf/explorer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -INFO: Finished run of ikq07.ethz.ch in 188.442055 seconds -I should cleanup /home/users/nico/.tmp/tmprcj8hv -INFO: Finished run of ikq04.ethz.ch in 188.602631 seconds -I should cleanup /home/users/nico/.tmp/tmpe6svdv -INFO: Finished run of ikq02.ethz.ch in 191.545683 seconds -I should cleanup /home/users/nico/.tmp/tmpw7tyqo -INFO: Finished run of ikq06.ethz.ch in 191.972664 seconds -I should cleanup /home/users/nico/.tmp/tmpc3xcoh -INFO: Finished run of ikq03.ethz.ch in 200.27211 seconds -I should cleanup /home/users/nico/.tmp/tmpej_9wz -INFO: Finished run of ikr17.ethz.ch in 211.689402 seconds -I should cleanup /home/users/nico/.tmp/tmpab2j3n -INFO: Finished run of ikr20.ethz.ch in 213.782377 seconds -I should cleanup /home/users/nico/.tmp/tmpeb5m8a -INFO: Finished run of ikr25.ethz.ch in 214.437128 seconds -I should cleanup /home/users/nico/.tmp/tmpltec25 -INFO: Finished run of ikr10.ethz.ch in 214.723128 seconds -I should cleanup /home/users/nico/.tmp/tmpn3tnws -INFO: Finished run of ikr19.ethz.ch in 214.907271 seconds -I should cleanup /home/users/nico/.tmp/tmpimo16x -INFO: Finished run of ikr14.ethz.ch in 215.026046 seconds -I should cleanup /home/users/nico/.tmp/tmpf6wp_u -INFO: Finished run of ikr05.ethz.ch in 215.731064 seconds -I should cleanup /home/users/nico/.tmp/tmp_67b2k -INFO: Finished run of ikr24.ethz.ch in 215.736746 seconds -I should cleanup /home/users/nico/.tmp/tmpsj8gpp -INFO: Finished run of ikr11.ethz.ch in 216.207536 seconds -I should cleanup /home/users/nico/.tmp/tmpsvg8rs -INFO: Finished run of ikr09.ethz.ch in 216.40167 seconds -I should cleanup /home/users/nico/.tmp/tmpr76lo2 -INFO: Finished run of ikr02.ethz.ch in 216.476902 seconds -I should cleanup /home/users/nico/.tmp/tmpoa5woy -INFO: Finished run of ikr03.ethz.ch in 216.760169 seconds -I should cleanup /home/users/nico/.tmp/tmpoos_8z -INFO: Finished run of ikr23.ethz.ch in 216.673695 seconds -I should cleanup /home/users/nico/.tmp/tmphffunh -INFO: Finished run of ikr15.ethz.ch in 216.889297 seconds -I should cleanup /home/users/nico/.tmp/tmpaesns3 -INFO: Finished run of ikr07.ethz.ch in 217.052298 seconds -I should cleanup /home/users/nico/.tmp/tmpn87am6 -INFO: Finished run of ikr21.ethz.ch in 216.951911 seconds -I should cleanup /home/users/nico/.tmp/tmps2kfri -INFO: Finished run of ikr16.ethz.ch in 217.021147 seconds -I should cleanup /home/users/nico/.tmp/tmpfyxjsx -INFO: Finished run of ikq05.ethz.ch in 217.191655 seconds -I should cleanup /home/users/nico/.tmp/tmpx5i4km -INFO: Total processing time for 25 host(s): 217.223581 -INFO: Deploying to ikq02.ethz.ch -INFO: Deploying to ikq03.ethz.ch -INFO: Deploying to ikq04.ethz.ch -INFO: Deploying to ikq05.ethz.ch -INFO: Deploying to ikq06.ethz.ch -INFO: Deploying to ikq07.ethz.ch -INFO: Deploying to ikr01.ethz.ch -INFO: Deploying to ikr02.ethz.ch -INFO: Deploying to ikr03.ethz.ch -INFO: Deploying to ikr05.ethz.ch -INFO: Deploying to ikr07.ethz.ch -INFO: Deploying to ikr09.ethz.ch -INFO: Deploying to ikr10.ethz.ch -INFO: Deploying to ikr11.ethz.ch -INFO: Deploying to ikr13.ethz.ch -INFO: Deploying to ikr14.ethz.ch -INFO: Deploying to ikr15.ethz.ch -INFO: Deploying to ikr16.ethz.ch -INFO: Deploying to ikr17.ethz.ch -INFO: Deploying to ikr19.ethz.ch -INFO: Deploying to ikr20.ethz.ch -INFO: Deploying to ikr21.ethz.ch -INFO: Deploying to ikr23.ethz.ch -INFO: Deploying to ikr24.ethz.ch -INFO: Deploying to ikr25.ethz.ch -INFO: Deploying to ikr26.ethz.ch -scp: /var/lib/cdist/conf/explorer: No such file or directory -ERROR: Command failed: scp -qr /home/users/nico/p/cdist-nutzung/conf/explorer root@ikr01.ethz.ch:/var/lib/cdist/conf/explorer -scp: /var/lib/cdist/conf/explorer: No such file or directory -ERROR: Command failed: scp -qr /home/users/nico/p/cdist-nutzung/conf/explorer root@ikr13.ethz.ch:/var/lib/cdist/conf/explorer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -INFO: Finished run of ikq06.ethz.ch in 209.543172 seconds -I should cleanup /home/users/nico/.tmp/tmpb51g1n -INFO: Finished run of ikq03.ethz.ch in 210.337092 seconds -I should cleanup /home/users/nico/.tmp/tmpce1qe3 -INFO: Finished run of ikq02.ethz.ch in 210.760602 seconds -I should cleanup /home/users/nico/.tmp/tmpfnduir -INFO: Finished run of ikq07.ethz.ch in 211.315784 seconds -I should cleanup /home/users/nico/.tmp/tmpq3tw15 -INFO: Finished run of ikq04.ethz.ch in 213.717476 seconds -I should cleanup /home/users/nico/.tmp/tmp9b4_69 -INFO: Finished run of ikr03.ethz.ch in 233.40723 seconds -I should cleanup /home/users/nico/.tmp/tmpk_n0av -INFO: Finished run of ikr10.ethz.ch in 233.780751 seconds -I should cleanup /home/users/nico/.tmp/tmp91phvb -INFO: Finished run of ikr07.ethz.ch in 234.993885 seconds -I should cleanup /home/users/nico/.tmp/tmpexumzi -INFO: Finished run of ikr14.ethz.ch in 236.126748 seconds -I should cleanup /home/users/nico/.tmp/tmpyjxqk5 -INFO: Finished run of ikr05.ethz.ch in 236.907114 seconds -I should cleanup /home/users/nico/.tmp/tmp2mfxb9 -INFO: Finished run of ikr19.ethz.ch in 236.805215 seconds -I should cleanup /home/users/nico/.tmp/tmpmlyizv -INFO: Finished run of ikr20.ethz.ch in 237.000427 seconds -I should cleanup /home/users/nico/.tmp/tmpwy_utm -INFO: Finished run of ikr25.ethz.ch in 237.06996 seconds -I should cleanup /home/users/nico/.tmp/tmpgqrsfd -INFO: Finished run of ikr11.ethz.ch in 237.62119 seconds -I should cleanup /home/users/nico/.tmp/tmpwd0a1c -INFO: Finished run of ikr26.ethz.ch in 237.554682 seconds -I should cleanup /home/users/nico/.tmp/tmp7wsaqu -INFO: Finished run of ikr17.ethz.ch in 237.715835 seconds -I should cleanup /home/users/nico/.tmp/tmparrgy1 -INFO: Finished run of ikr15.ethz.ch in 237.961549 seconds -I should cleanup /home/users/nico/.tmp/tmpt74239 -INFO: Finished run of ikq05.ethz.ch in 238.126596 seconds -I should cleanup /home/users/nico/.tmp/tmpvfigmw -INFO: Finished run of ikr02.ethz.ch in 238.134702 seconds -I should cleanup /home/users/nico/.tmp/tmpb7v16x -INFO: Finished run of ikr16.ethz.ch in 238.099716 seconds -I should cleanup /home/users/nico/.tmp/tmpb0x56o -INFO: Finished run of ikr09.ethz.ch in 238.20569 seconds -I should cleanup /home/users/nico/.tmp/tmpl5qoyz -INFO: Finished run of ikr24.ethz.ch in 238.230154 seconds -I should cleanup /home/users/nico/.tmp/tmp93hwbz -INFO: Finished run of ikr21.ethz.ch in 238.300384 seconds -I should cleanup /home/users/nico/.tmp/tmp619s6n -INFO: Finished run of ikr23.ethz.ch in 238.322157 seconds -I should cleanup /home/users/nico/.tmp/tmpvb2kh5 -INFO: Total processing time for 26 host(s): 238.591705 -INFO: Deploying to ikq02.ethz.ch -INFO: Deploying to ikq03.ethz.ch -INFO: Deploying to ikq04.ethz.ch -INFO: Deploying to ikq05.ethz.ch -INFO: Deploying to ikq06.ethz.ch -INFO: Deploying to ikq07.ethz.ch -INFO: Deploying to ikr01.ethz.ch -INFO: Deploying to ikr02.ethz.ch -INFO: Deploying to ikr03.ethz.ch -INFO: Deploying to ikr05.ethz.ch -INFO: Deploying to ikr07.ethz.ch -INFO: Deploying to ikr09.ethz.ch -INFO: Deploying to ikr10.ethz.ch -INFO: Deploying to ikr11.ethz.ch -INFO: Deploying to ikr13.ethz.ch -INFO: Deploying to ikr14.ethz.ch -INFO: Deploying to ikr15.ethz.ch -INFO: Deploying to ikr17.ethz.ch -INFO: Deploying to ikr16.ethz.ch -INFO: Deploying to ikr19.ethz.ch -INFO: Deploying to ikr20.ethz.ch -INFO: Deploying to ikr21.ethz.ch -INFO: Deploying to ikr23.ethz.ch -INFO: Deploying to ikr24.ethz.ch -INFO: Deploying to ikr25.ethz.ch -INFO: Deploying to ikr26.ethz.ch -INFO: Deploying to ikr27.ethz.ch -scp: /var/lib/cdist/conf/explorer: No such file or directory -ERROR: Command failed: scp -qr /home/users/nico/p/cdist-nutzung/conf/explorer root@ikr01.ethz.ch:/var/lib/cdist/conf/explorer -scp: /var/lib/cdist/conf/explorer: No such file or directory -ERROR: Command failed: scp -qr /home/users/nico/p/cdist-nutzung/conf/explorer root@ikr13.ethz.ch:/var/lib/cdist/conf/explorer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -INFO: Finished run of ikq03.ethz.ch in 215.332411 seconds -I should cleanup /home/users/nico/.tmp/tmpjvsfb6 -INFO: Finished run of ikq02.ethz.ch in 217.196822 seconds -I should cleanup /home/users/nico/.tmp/tmptbx4cl -INFO: Finished run of ikq06.ethz.ch in 217.198258 seconds -I should cleanup /home/users/nico/.tmp/tmpm7ducc -INFO: Finished run of ikq07.ethz.ch in 220.168978 seconds -I should cleanup /home/users/nico/.tmp/tmpzum8_c -INFO: Finished run of ikq04.ethz.ch in 220.311359 seconds -I should cleanup /home/users/nico/.tmp/tmpf8oh_z -E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. -ERROR: Command failed: ssh root@ikr27.ethz.ch /var/lib/cdist/object/__package_apt/collectd/.cdist/code-remote -INFO: Finished run of ikr25.ethz.ch in 231.729276 seconds -I should cleanup /home/users/nico/.tmp/tmpkw4l8y -INFO: Finished run of ikr14.ethz.ch in 235.616386 seconds -I should cleanup /home/users/nico/.tmp/tmpierma3 -INFO: Finished run of ikr26.ethz.ch in 235.793067 seconds -I should cleanup /home/users/nico/.tmp/tmpf9hmfe -INFO: Finished run of ikr02.ethz.ch in 236.019716 seconds -I should cleanup /home/users/nico/.tmp/tmpd1x7cn -INFO: Finished run of ikr17.ethz.ch in 236.038355 seconds -I should cleanup /home/users/nico/.tmp/tmpwla840 -INFO: Finished run of ikr19.ethz.ch in 236.343239 seconds -I should cleanup /home/users/nico/.tmp/tmp16gann -INFO: Finished run of ikr20.ethz.ch in 236.550018 seconds -I should cleanup /home/users/nico/.tmp/tmpmfhiu3 -INFO: Finished run of ikr09.ethz.ch in 236.68465 seconds -I should cleanup /home/users/nico/.tmp/tmpm_jeke -INFO: Finished run of ikr07.ethz.ch in 237.023632 seconds -I should cleanup /home/users/nico/.tmp/tmpwpb50n -INFO: Finished run of ikr10.ethz.ch in 237.252747 seconds -I should cleanup /home/users/nico/.tmp/tmps57avh -INFO: Finished run of ikr05.ethz.ch in 237.343652 seconds -I should cleanup /home/users/nico/.tmp/tmpcz9apl -INFO: Finished run of ikq05.ethz.ch in 237.564124 seconds -I should cleanup /home/users/nico/.tmp/tmpgo8u_q -INFO: Finished run of ikr03.ethz.ch in 237.561235 seconds -I should cleanup /home/users/nico/.tmp/tmp37xbfa -INFO: Finished run of ikr16.ethz.ch in 237.55441 seconds -I should cleanup /home/users/nico/.tmp/tmp_y6cb0 -INFO: Finished run of ikr23.ethz.ch in 237.589377 seconds -I should cleanup /home/users/nico/.tmp/tmpmswsnx -INFO: Finished run of ikr11.ethz.ch in 237.791683 seconds -I should cleanup /home/users/nico/.tmp/tmprlbap0 -INFO: Finished run of ikr24.ethz.ch in 237.819221 seconds -I should cleanup /home/users/nico/.tmp/tmpjywrgt -INFO: Finished run of ikr15.ethz.ch in 238.148722 seconds -I should cleanup /home/users/nico/.tmp/tmpdefzkg -INFO: Finished run of ikr21.ethz.ch in 238.227193 seconds -I should cleanup /home/users/nico/.tmp/tmppsg0pc -INFO: Total processing time for 27 host(s): 238.478493 -INFO: Deploying to ikq02.ethz.ch -INFO: Deploying to ikq03.ethz.ch -INFO: Deploying to ikq04.ethz.ch -INFO: Deploying to ikq05.ethz.ch -INFO: Deploying to ikq06.ethz.ch -INFO: Deploying to ikq07.ethz.ch -INFO: Deploying to ikr01.ethz.ch -INFO: Deploying to ikr02.ethz.ch -INFO: Deploying to ikr03.ethz.ch -INFO: Deploying to ikr05.ethz.ch -INFO: Deploying to ikr09.ethz.ch -INFO: Deploying to ikr07.ethz.ch -INFO: Deploying to ikr10.ethz.ch -INFO: Deploying to ikr11.ethz.ch -INFO: Deploying to ikr13.ethz.ch -INFO: Deploying to ikr14.ethz.ch -INFO: Deploying to ikr15.ethz.ch -INFO: Deploying to ikr17.ethz.ch -INFO: Deploying to ikr16.ethz.ch -INFO: Deploying to ikr19.ethz.ch -INFO: Deploying to ikr20.ethz.ch -INFO: Deploying to ikr21.ethz.ch -INFO: Deploying to ikr23.ethz.ch -INFO: Deploying to ikr24.ethz.ch -INFO: Deploying to ikr25.ethz.ch -INFO: Deploying to ikr26.ethz.ch -INFO: Deploying to ikr27.ethz.ch -INFO: Deploying to ikr28.ethz.ch -scp: /var/lib/cdist/conf/explorer: No such file or directory -ERROR: Command failed: scp -qr /home/users/nico/p/cdist-nutzung/conf/explorer root@ikr01.ethz.ch:/var/lib/cdist/conf/explorer -scp: /var/lib/cdist/conf/explorer: No such file or directory -ERROR: Command failed: scp -qr /home/users/nico/p/cdist-nutzung/conf/explorer root@ikr13.ethz.ch:/var/lib/cdist/conf/explorer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -ERROR: Command failed: ssh root@ikr17.ethz.ch mkdir -p /var/lib/cdist/conf/type/__package_apt -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -INFO: Finished run of ikq04.ethz.ch in 215.567874 seconds -I should cleanup /home/users/nico/.tmp/tmp99c8j5 -INFO: Finished run of ikq06.ethz.ch in 219.752235 seconds -I should cleanup /home/users/nico/.tmp/tmpb1628u -INFO: Finished run of ikq07.ethz.ch in 221.491529 seconds -I should cleanup /home/users/nico/.tmp/tmpjr3i7w -INFO: Finished run of ikq02.ethz.ch in 222.054742 seconds -I should cleanup /home/users/nico/.tmp/tmpia1edb -INFO: Finished run of ikq03.ethz.ch in 229.509667 seconds -I should cleanup /home/users/nico/.tmp/tmpvdfr2q -INFO: Finished run of ikq05.ethz.ch in 231.337049 seconds -I should cleanup /home/users/nico/.tmp/tmpwz_8tv -E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. -ERROR: Command failed: ssh root@ikr27.ethz.ch /var/lib/cdist/object/__package_apt/collectd/.cdist/code-remote -INFO: Finished run of ikr20.ethz.ch in 239.14496 seconds -I should cleanup /home/users/nico/.tmp/tmpx63vlh -INFO: Finished run of ikr02.ethz.ch in 241.402815 seconds -I should cleanup /home/users/nico/.tmp/tmp_bmfp_ -INFO: Finished run of ikr25.ethz.ch in 241.948038 seconds -I should cleanup /home/users/nico/.tmp/tmpohdpq5 -INFO: Finished run of ikr05.ethz.ch in 243.861596 seconds -I should cleanup /home/users/nico/.tmp/tmpr_vxd_ -INFO: Finished run of ikr19.ethz.ch in 244.322837 seconds -I should cleanup /home/users/nico/.tmp/tmpripuph -INFO: Finished run of ikr10.ethz.ch in 244.439443 seconds -I should cleanup /home/users/nico/.tmp/tmp8wacqr -INFO: Finished run of ikr14.ethz.ch in 244.572394 seconds -I should cleanup /home/users/nico/.tmp/tmpuw2ppx -INFO: Finished run of ikr26.ethz.ch in 244.781803 seconds -I should cleanup /home/users/nico/.tmp/tmpt_4vqo -INFO: Finished run of ikr23.ethz.ch in 244.916033 seconds -I should cleanup /home/users/nico/.tmp/tmp9lgge8 -INFO: Finished run of ikr03.ethz.ch in 245.12315 seconds -I should cleanup /home/users/nico/.tmp/tmpb072wd -INFO: Finished run of ikr16.ethz.ch in 245.353491 seconds -I should cleanup /home/users/nico/.tmp/tmpsq8pj3 -INFO: Finished run of ikr11.ethz.ch in 245.445685 seconds -I should cleanup /home/users/nico/.tmp/tmpsomf09 -INFO: Finished run of ikr07.ethz.ch in 245.47506 seconds -I should cleanup /home/users/nico/.tmp/tmppu7tq2 -INFO: Finished run of ikr09.ethz.ch in 245.576609 seconds -I should cleanup /home/users/nico/.tmp/tmpoliguo -INFO: Finished run of ikr15.ethz.ch in 245.57091 seconds -I should cleanup /home/users/nico/.tmp/tmpic_4ln -INFO: Finished run of ikr28.ethz.ch in 245.673558 seconds -I should cleanup /home/users/nico/.tmp/tmpceanz0 -INFO: Finished run of ikr21.ethz.ch in 245.785506 seconds -I should cleanup /home/users/nico/.tmp/tmphd9b_a -INFO: Finished run of ikr24.ethz.ch in 245.762761 seconds -I should cleanup /home/users/nico/.tmp/tmp6q4lt_ -INFO: Total processing time for 28 host(s): 246.058718 -INFO: Deploying to ikq02.ethz.ch -INFO: Deploying to ikq03.ethz.ch -INFO: Deploying to ikq04.ethz.ch -INFO: Deploying to ikq05.ethz.ch -INFO: Deploying to ikq06.ethz.ch -INFO: Deploying to ikq07.ethz.ch -INFO: Deploying to ikr01.ethz.ch -INFO: Deploying to ikr02.ethz.ch -INFO: Deploying to ikr03.ethz.ch -INFO: Deploying to ikr05.ethz.ch -INFO: Deploying to ikr07.ethz.ch -INFO: Deploying to ikr09.ethz.ch -INFO: Deploying to ikr10.ethz.ch -INFO: Deploying to ikr11.ethz.ch -INFO: Deploying to ikr13.ethz.ch -INFO: Deploying to ikr14.ethz.ch -INFO: Deploying to ikr15.ethz.ch -INFO: Deploying to ikr16.ethz.ch -INFO: Deploying to ikr17.ethz.ch -INFO: Deploying to ikr19.ethz.ch -INFO: Deploying to ikr20.ethz.ch -INFO: Deploying to ikr21.ethz.ch -INFO: Deploying to ikr23.ethz.ch -INFO: Deploying to ikr24.ethz.ch -INFO: Deploying to ikr25.ethz.ch -INFO: Deploying to ikr26.ethz.ch -INFO: Deploying to ikr27.ethz.ch -INFO: Deploying to ikr28.ethz.ch -INFO: Deploying to ikr29.ethz.ch -scp: /var/lib/cdist/conf/explorer: No such file or directory -ERROR: Command failed: scp -qr /home/users/nico/p/cdist-nutzung/conf/explorer root@ikr01.ethz.ch:/var/lib/cdist/conf/explorer -scp: /var/lib/cdist/conf/explorer: No such file or directory -ERROR: Command failed: scp -qr /home/users/nico/p/cdist-nutzung/conf/explorer root@ikr13.ethz.ch:/var/lib/cdist/conf/explorer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -INFO: Finished run of ikq06.ethz.ch in 235.403198 seconds -I should cleanup /home/users/nico/.tmp/tmplh0yub -INFO: Finished run of ikq03.ethz.ch in 237.3758 seconds -I should cleanup /home/users/nico/.tmp/tmpnwzceq -INFO: Finished run of ikq07.ethz.ch in 238.054173 seconds -I should cleanup /home/users/nico/.tmp/tmpezdl2v -INFO: Finished run of ikq02.ethz.ch in 240.123134 seconds -I should cleanup /home/users/nico/.tmp/tmph4zyv1 -INFO: Finished run of ikq04.ethz.ch in 240.240325 seconds -I should cleanup /home/users/nico/.tmp/tmp1hgnqr -INFO: Finished run of ikr07.ethz.ch in 255.212756 seconds -I should cleanup /home/users/nico/.tmp/tmpu4etp8 -E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. -ERROR: Command failed: ssh root@ikr27.ethz.ch /var/lib/cdist/object/__package_apt/collectd/.cdist/code-remote -INFO: Finished run of ikr20.ethz.ch in 257.655047 seconds -I should cleanup /home/users/nico/.tmp/tmpraen0m -INFO: Finished run of ikr26.ethz.ch in 260.095529 seconds -I should cleanup /home/users/nico/.tmp/tmptw0mi2 -INFO: Finished run of ikq05.ethz.ch in 260.533335 seconds -I should cleanup /home/users/nico/.tmp/tmp8d93a8 -INFO: Finished run of ikr14.ethz.ch in 262.082391 seconds -I should cleanup /home/users/nico/.tmp/tmpcq9jn8 -INFO: Finished run of ikr09.ethz.ch in 262.202072 seconds -I should cleanup /home/users/nico/.tmp/tmpdvdnr6 -INFO: Finished run of ikr11.ethz.ch in 262.398554 seconds -I should cleanup /home/users/nico/.tmp/tmp78uy18 -INFO: Finished run of ikr17.ethz.ch in 262.513191 seconds -I should cleanup /home/users/nico/.tmp/tmpr97wjm -INFO: Finished run of ikr25.ethz.ch in 262.614397 seconds -I should cleanup /home/users/nico/.tmp/tmpjc9obd -INFO: Finished run of ikr02.ethz.ch in 263.127853 seconds -I should cleanup /home/users/nico/.tmp/tmpvkl1m9 -INFO: Finished run of ikr05.ethz.ch in 263.338641 seconds -I should cleanup /home/users/nico/.tmp/tmplyywfq -INFO: Finished run of ikr21.ethz.ch in 263.232372 seconds -I should cleanup /home/users/nico/.tmp/tmpatqdlm -INFO: Finished run of ikr15.ethz.ch in 263.457294 seconds -I should cleanup /home/users/nico/.tmp/tmprddqa0 -INFO: Finished run of ikr19.ethz.ch in 263.424671 seconds -I should cleanup /home/users/nico/.tmp/tmpq1ap51 -INFO: Finished run of ikr03.ethz.ch in 263.622373 seconds -I should cleanup /home/users/nico/.tmp/tmp_7rzac -INFO: Finished run of ikr16.ethz.ch in 263.564308 seconds -INFO: Finished run of ikr10.ethz.ch in 263.634145 seconds -I should cleanup /home/users/nico/.tmp/tmpspg21e -I should cleanup /home/users/nico/.tmp/tmpb1swlv -INFO: Finished run of ikr28.ethz.ch in 263.507415 seconds -I should cleanup /home/users/nico/.tmp/tmp54z8g_ -INFO: Finished run of ikr29.ethz.ch in 263.598878 seconds -I should cleanup /home/users/nico/.tmp/tmp2kr9cs -INFO: Finished run of ikr23.ethz.ch in 263.668785 seconds -I should cleanup /home/users/nico/.tmp/tmpxb7jsn -INFO: Finished run of ikr24.ethz.ch in 263.903858 seconds -I should cleanup /home/users/nico/.tmp/tmplikdv8 -INFO: Total processing time for 29 host(s): 264.208372 -INFO: Deploying to ikq02.ethz.ch -INFO: Deploying to ikq03.ethz.ch -INFO: Deploying to ikq04.ethz.ch -INFO: Deploying to ikq05.ethz.ch -INFO: Deploying to ikq06.ethz.ch -INFO: Deploying to ikq07.ethz.ch -INFO: Deploying to ikr01.ethz.ch -INFO: Deploying to ikr02.ethz.ch -INFO: Deploying to ikr03.ethz.ch -INFO: Deploying to ikr05.ethz.ch -INFO: Deploying to ikr07.ethz.ch -INFO: Deploying to ikr09.ethz.ch -INFO: Deploying to ikr10.ethz.ch -INFO: Deploying to ikr11.ethz.ch -INFO: Deploying to ikr13.ethz.ch -INFO: Deploying to ikr14.ethz.ch -INFO: Deploying to ikr15.ethz.ch -INFO: Deploying to ikr16.ethz.ch -INFO: Deploying to ikr19.ethz.ch -INFO: Deploying to ikr17.ethz.ch -INFO: Deploying to ikr20.ethz.ch -INFO: Deploying to ikr21.ethz.ch -INFO: Deploying to ikr24.ethz.ch -INFO: Deploying to ikr23.ethz.ch -INFO: Deploying to ikr25.ethz.ch -INFO: Deploying to ikr26.ethz.ch -INFO: Deploying to ikr27.ethz.ch -INFO: Deploying to ikr28.ethz.ch -INFO: Deploying to ikr29.ethz.ch -INFO: Deploying to ikr30.ethz.ch -scp: /var/lib/cdist/conf/explorer: No such file or directory -ERROR: Command failed: scp -qr /home/users/nico/p/cdist-nutzung/conf/explorer root@ikr01.ethz.ch:/var/lib/cdist/conf/explorer -scp: /var/lib/cdist/conf/explorer: No such file or directory -ERROR: Command failed: scp -qr /home/users/nico/p/cdist-nutzung/conf/explorer root@ikr13.ethz.ch:/var/lib/cdist/conf/explorer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -INFO: Finished run of ikq03.ethz.ch in 229.360922 seconds -I should cleanup /home/users/nico/.tmp/tmplykkga -INFO: Finished run of ikq02.ethz.ch in 231.154059 seconds -I should cleanup /home/users/nico/.tmp/tmppmmhz3 -INFO: Finished run of ikq04.ethz.ch in 233.577996 seconds -I should cleanup /home/users/nico/.tmp/tmppdxzl3 -INFO: Finished run of ikq07.ethz.ch in 237.22933 seconds -I should cleanup /home/users/nico/.tmp/tmpiomb4i -INFO: Finished run of ikq06.ethz.ch in 239.725816 seconds -I should cleanup /home/users/nico/.tmp/tmpqj3pl6 -E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. -ERROR: Command failed: ssh root@ikr27.ethz.ch /var/lib/cdist/object/__package_apt/collectd/.cdist/code-remote -INFO: Finished run of ikr20.ethz.ch in 258.466225 seconds -I should cleanup /home/users/nico/.tmp/tmpve9wdi -INFO: Finished run of ikr14.ethz.ch in 259.177486 seconds -I should cleanup /home/users/nico/.tmp/tmp_d36bl -INFO: Finished run of ikr17.ethz.ch in 260.754277 seconds -I should cleanup /home/users/nico/.tmp/tmpv5frqn -INFO: Finished run of ikr11.ethz.ch in 261.107312 seconds -I should cleanup /home/users/nico/.tmp/tmp5oacup -INFO: Finished run of ikr05.ethz.ch in 261.154726 seconds -I should cleanup /home/users/nico/.tmp/tmpghnptx -INFO: Finished run of ikq05.ethz.ch in 262.048584 seconds -I should cleanup /home/users/nico/.tmp/tmpugqfjj -INFO: Finished run of ikr25.ethz.ch in 262.233978 seconds -I should cleanup /home/users/nico/.tmp/tmppf3xu8 -INFO: Finished run of ikr10.ethz.ch in 262.713893 seconds -I should cleanup /home/users/nico/.tmp/tmpu2nkra -INFO: Finished run of ikr19.ethz.ch in 263.068704 seconds -I should cleanup /home/users/nico/.tmp/tmpi_jrg4 -INFO: Finished run of ikr02.ethz.ch in 264.085429 seconds -I should cleanup /home/users/nico/.tmp/tmpu6hfym -INFO: Finished run of ikr03.ethz.ch in 264.10239 seconds -I should cleanup /home/users/nico/.tmp/tmpzj0tpo -INFO: Finished run of ikr09.ethz.ch in 264.294349 seconds -I should cleanup /home/users/nico/.tmp/tmpkeo6qa -INFO: Finished run of ikr26.ethz.ch in 264.343501 seconds -I should cleanup /home/users/nico/.tmp/tmpofeovc -INFO: Finished run of ikr15.ethz.ch in 264.650148 seconds -I should cleanup /home/users/nico/.tmp/tmp2tooi_ -INFO: Finished run of ikr24.ethz.ch in 264.585275 seconds -I should cleanup /home/users/nico/.tmp/tmpk0vvl3 -INFO: Finished run of ikr07.ethz.ch in 264.743286 seconds -I should cleanup /home/users/nico/.tmp/tmp9lk9_m -INFO: Finished run of ikr30.ethz.ch in 264.505029 seconds -I should cleanup /home/users/nico/.tmp/tmpygy8g0 -INFO: Finished run of ikr23.ethz.ch in 264.681778 seconds -I should cleanup /home/users/nico/.tmp/tmpgd7nqn -INFO: Finished run of ikr29.ethz.ch in 264.590897 seconds -I should cleanup /home/users/nico/.tmp/tmp7m95p2 -INFO: Finished run of ikr16.ethz.ch in 264.863193 seconds -I should cleanup /home/users/nico/.tmp/tmpzqsbdu -INFO: Finished run of ikr21.ethz.ch in 264.933458 seconds -I should cleanup /home/users/nico/.tmp/tmphlqu6i -INFO: Finished run of ikr28.ethz.ch in 265.162021 seconds -I should cleanup /home/users/nico/.tmp/tmplpjyze -INFO: Total processing time for 30 host(s): 265.560685 -INFO: Deploying to ikq02.ethz.ch -INFO: Deploying to ikq03.ethz.ch -INFO: Deploying to ikq04.ethz.ch -INFO: Deploying to ikq05.ethz.ch -INFO: Deploying to ikq07.ethz.ch -INFO: Deploying to ikq06.ethz.ch -INFO: Deploying to ikr01.ethz.ch -INFO: Deploying to ikr02.ethz.ch -INFO: Deploying to ikr03.ethz.ch -INFO: Deploying to ikr05.ethz.ch -INFO: Deploying to ikr07.ethz.ch -INFO: Deploying to ikr09.ethz.ch -INFO: Deploying to ikr10.ethz.ch -INFO: Deploying to ikr11.ethz.ch -INFO: Deploying to ikr13.ethz.ch -INFO: Deploying to ikr14.ethz.ch -INFO: Deploying to ikr15.ethz.ch -INFO: Deploying to ikr16.ethz.ch -INFO: Deploying to ikr17.ethz.ch -INFO: Deploying to ikr19.ethz.ch -INFO: Deploying to ikr20.ethz.ch -INFO: Deploying to ikr21.ethz.ch -INFO: Deploying to ikr23.ethz.ch -INFO: Deploying to ikr24.ethz.ch -INFO: Deploying to ikr25.ethz.ch -INFO: Deploying to ikr27.ethz.ch -INFO: Deploying to ikr26.ethz.ch -INFO: Deploying to ikr28.ethz.ch -INFO: Deploying to ikr29.ethz.ch -INFO: Deploying to ikr30.ethz.ch -INFO: Deploying to ikr31.ethz.ch -scp: /var/lib/cdist/conf/explorer: No such file or directory -ERROR: Command failed: scp -qr /home/users/nico/p/cdist-nutzung/conf/explorer root@ikr01.ethz.ch:/var/lib/cdist/conf/explorer -scp: /var/lib/cdist/conf/explorer: No such file or directory -ERROR: Command failed: scp -qr /home/users/nico/p/cdist-nutzung/conf/explorer root@ikr13.ethz.ch:/var/lib/cdist/conf/explorer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/collectd/collectd.conf: Recording requirement __package/collectd -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/nullmailer/remotes: Recording requirement __package/nullmailer -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto.pub: Recording requirement __directory/etc/ethz/autofs -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/openntpd/ntpd.conf: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/default/openntpd_rc_config: Recording requirement __package/openntpd -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/sudoers.d/systems: Recording requirement __package/sudo -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/syslog-ng/syslog-ng.conf: Recording requirement __package/syslog-ng -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __directory/etc/ethz/autofs -__file/etc/ethz/autofs/auto_home: Recording requirement __package/python-ldap -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/auto.master: Recording requirement __package/autofs -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __package/libnss-ldapd -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -__file/etc/nsswitch.conf: Recording requirement __file//etc/nslcd.conf -INFO: Finished run of ikq03.ethz.ch in 245.694879 seconds -I should cleanup /home/users/nico/.tmp/tmp0aaihh -INFO: Finished run of ikq07.ethz.ch in 248.839127 seconds -I should cleanup /home/users/nico/.tmp/tmp4tv23i -INFO: Finished run of ikq04.ethz.ch in 250.96365 seconds -I should cleanup /home/users/nico/.tmp/tmp9oaog8 -INFO: Finished run of ikq02.ethz.ch in 251.910723 seconds -I should cleanup /home/users/nico/.tmp/tmpcy7p6n -INFO: Finished run of ikq06.ethz.ch in 252.163352 seconds -I should cleanup /home/users/nico/.tmp/tmp74it6k -E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. -ERROR: Command failed: ssh root@ikr27.ethz.ch /var/lib/cdist/object/__package_apt/collectd/.cdist/code-remote -E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. -ERROR: Command failed: ssh root@ikr31.ethz.ch /var/lib/cdist/object/__package_apt/collectd/.cdist/code-remote -INFO: Finished run of ikr05.ethz.ch in 277.210317 seconds -I should cleanup /home/users/nico/.tmp/tmp34x6v6 -INFO: Finished run of ikr10.ethz.ch in 277.482534 seconds -I should cleanup /home/users/nico/.tmp/tmprellu1 -INFO: Finished run of ikr14.ethz.ch in 279.009467 seconds -I should cleanup /home/users/nico/.tmp/tmpxxp654 -INFO: Finished run of ikr20.ethz.ch in 279.292188 seconds -I should cleanup /home/users/nico/.tmp/tmpw5ck4p -INFO: Finished run of ikr21.ethz.ch in 279.423259 seconds -I should cleanup /home/users/nico/.tmp/tmpe94eay -INFO: Finished run of ikr25.ethz.ch in 279.533419 seconds -I should cleanup /home/users/nico/.tmp/tmpbdgd2g -INFO: Finished run of ikq05.ethz.ch in 279.9565 seconds -I should cleanup /home/users/nico/.tmp/tmp5opdkg -INFO: Finished run of ikr07.ethz.ch in 280.496576 seconds -I should cleanup /home/users/nico/.tmp/tmpmqujdo -INFO: Finished run of ikr26.ethz.ch in 280.333344 seconds -I should cleanup /home/users/nico/.tmp/tmp63f8d8 -INFO: Finished run of ikr29.ethz.ch in 280.291517 seconds -I should cleanup /home/users/nico/.tmp/tmpnqfqpz -INFO: Finished run of ikr15.ethz.ch in 281.228734 seconds -I should cleanup /home/users/nico/.tmp/tmp42p3g5 -INFO: Finished run of ikr17.ethz.ch in 281.222566 seconds -I should cleanup /home/users/nico/.tmp/tmpn97co2 -INFO: Finished run of ikr19.ethz.ch in 281.258219 seconds -I should cleanup /home/users/nico/.tmp/tmpdc5pcf -INFO: Finished run of ikr30.ethz.ch in 281.333785 seconds -I should cleanup /home/users/nico/.tmp/tmp8t0k25 -INFO: Finished run of ikr11.ethz.ch in 281.610303 seconds -I should cleanup /home/users/nico/.tmp/tmph9g41k -INFO: Finished run of ikr28.ethz.ch in 281.513334 seconds -I should cleanup /home/users/nico/.tmp/tmpj44fq4 -INFO: Finished run of ikr02.ethz.ch in 281.870902 seconds -I should cleanup /home/users/nico/.tmp/tmprmqa8b -INFO: Finished run of ikr24.ethz.ch in 281.668327 seconds -I should cleanup /home/users/nico/.tmp/tmpcglj4f -INFO: Finished run of ikr03.ethz.ch in 282.150378 seconds -INFO: Finished run of ikr16.ethz.ch in 282.022936 seconds -I should cleanup /home/users/nico/.tmp/tmpa5nbnv -I should cleanup /home/users/nico/.tmp/tmpkpwd2x -INFO: Finished run of ikr23.ethz.ch in 281.993304 seconds -I should cleanup /home/users/nico/.tmp/tmpw0ts8q -INFO: Finished run of ikr09.ethz.ch in 282.136105 seconds -I should cleanup /home/users/nico/.tmp/tmp882egu -INFO: Total processing time for 31 host(s): 282.264488 diff --git a/docs/dev/logs/2011-09-13 b/docs/dev/logs/2011-09-13 deleted file mode 100644 index b55a2d4e..00000000 --- a/docs/dev/logs/2011-09-13 +++ /dev/null @@ -1,3 +0,0 @@ -Name for installer: - installer (flag) - $__installer (variable) - gesetzt oder nicht diff --git a/docs/dev/logs/2011-09-16.benchmark-r815-no-control-socket b/docs/dev/logs/2011-09-16.benchmark-r815-no-control-socket deleted file mode 100644 index 315ebf75..00000000 --- a/docs/dev/logs/2011-09-16.benchmark-r815-no-control-socket +++ /dev/null @@ -1,63 +0,0 @@ -48 core -model name : AMD Opteron(tm) Processor 6174 -128 GB RAM -Dell PowerEdge R815 - -root@sgs-r815-01:~/cdist-nutzung# grep "Total processing time for" deploy-all-benchmark-noikr13 -INFO: Total processing time for 1 host(s): 257.641541 -INFO: Total processing time for 2 host(s): 257.025783 -INFO: Total processing time for 3 host(s): 258.933088 -INFO: Total processing time for 4 host(s): 259.253074 -INFO: Total processing time for 5 host(s): 260.331896 -INFO: Total processing time for 6 host(s): 262.051349 -INFO: Total processing time for 7 host(s): 323.820878 -INFO: Total processing time for 8 host(s): 329.081856 -INFO: Total processing time for 9 host(s): 333.346278 -INFO: Total processing time for 10 host(s): 334.832419 -INFO: Total processing time for 11 host(s): 330.572375 -INFO: Total processing time for 12 host(s): 331.726628 -INFO: Total processing time for 13 host(s): 331.740591 -INFO: Total processing time for 14 host(s): 331.237139 -INFO: Total processing time for 15 host(s): 331.718861 -INFO: Total processing time for 16 host(s): 332.374645 -INFO: Total processing time for 17 host(s): 331.510445 -INFO: Total processing time for 18 host(s): 332.030743 -INFO: Total processing time for 19 host(s): 332.193198 -INFO: Total processing time for 20 host(s): 333.933765 -INFO: Total processing time for 21 host(s): 335.292953 -INFO: Total processing time for 22 host(s): 337.253608 -INFO: Total processing time for 23 host(s): 337.831493 -INFO: Total processing time for 24 host(s): 339.024737 -INFO: Total processing time for 25 host(s): 343.515044 -INFO: Total processing time for 26 host(s): 339.759678 -INFO: Total processing time for 27 host(s): 339.378998 -INFO: Total processing time for 28 host(s): 339.640378 -INFO: Total processing time for 29 host(s): 340.885614 -INFO: Total processing time for 30 host(s): 341.836923 -INFO: Total processing time for 31 host(s): 343.825758 -INFO: Total processing time for 32 host(s): 344.176089 -INFO: Total processing time for 33 host(s): 345.408518 -INFO: Total processing time for 34 host(s): 347.15322 -INFO: Total processing time for 35 host(s): 351.330649 -INFO: Total processing time for 36 host(s): 347.640758 -INFO: Total processing time for 37 host(s): 347.381126 -INFO: Total processing time for 38 host(s): 347.053406 -INFO: Total processing time for 39 host(s): 347.453166 -INFO: Total processing time for 40 host(s): 347.84804 -INFO: Total processing time for 41 host(s): 349.035272 -INFO: Total processing time for 42 host(s): 349.41507 -INFO: Total processing time for 43 host(s): 351.208072 -INFO: Total processing time for 44 host(s): 351.788401 -INFO: Total processing time for 45 host(s): 351.730259 -INFO: Total processing time for 46 host(s): 515.693497 -INFO: Total processing time for 47 host(s): 352.702677 -INFO: Total processing time for 48 host(s): 353.418003 -INFO: Total processing time for 49 host(s): 355.07111 -INFO: Total processing time for 50 host(s): 354.622388 -INFO: Total processing time for 51 host(s): 355.192521 -INFO: Total processing time for 52 host(s): 355.283238 -INFO: Total processing time for 53 host(s): 358.112329 -INFO: Total processing time for 54 host(s): 357.717426 -INFO: Total processing time for 55 host(s): 357.748707 -INFO: Total processing time for 56 host(s): 358.902118 -INFO: Total processing time for 57 host(s): 367.817594 diff --git a/docs/dev/logs/2011-09-16.benchmark-r815-no-control-socket.dmidecode b/docs/dev/logs/2011-09-16.benchmark-r815-no-control-socket.dmidecode deleted file mode 100644 index f96db8b3..00000000 --- a/docs/dev/logs/2011-09-16.benchmark-r815-no-control-socket.dmidecode +++ /dev/null @@ -1,1373 +0,0 @@ -# dmidecode 2.9 -SMBIOS 2.6 present. -101 structures occupying 5955 bytes. -Table at 0xDF79C000. - -Handle 0xDA00, DMI type 218, 11 bytes -OEM-specific Type - Header and Data: - DA 0B 00 DA B0 00 17 00 0E 20 00 - -Handle 0x0000, DMI type 0, 24 bytes -BIOS Information - Vendor: Dell Inc. - Version: 1.0.0 - Release Date: 04/08/2010 - Address: 0xF0000 - Runtime Size: 64 kB - ROM Size: 4096 kB - Characteristics: - ISA is supported - PCI is supported - PNP is supported - BIOS is upgradeable - BIOS shadowing is allowed - Boot from CD is supported - Selectable boot is supported - EDD is supported - Japanese floppy for Toshiba 1.2 MB is supported (int 13h) - 5.25"/360 KB floppy services are supported (int 13h) - 5.25"/1.2 MB floppy services are supported (int 13h) - 3.5"/720 KB floppy services are supported (int 13h) - 8042 keyboard services are supported (int 9h) - Serial services are supported (int 14h) - CGA/mono video services are supported (int 10h) - ACPI is supported - USB legacy is supported - BIOS boot specification is supported - Function key-initiated network boot is supported - Targeted content distribution is supported - BIOS Revision: 1.0 - -Handle 0x0100, DMI type 1, 27 bytes -System Information - Manufacturer: Dell Inc. - Product Name: PowerEdge R815 - Version: Not Specified - Serial Number: HYGTS4J - UUID: 44454C4C-5900-1047-8054-C8C04F53344A - Wake-up Type: Power Switch - SKU Number: Not Specified - Family: Not Specified - -Handle 0x0200, DMI type 2, 9 bytes -Base Board Information - Manufacturer: Dell Inc. - Product Name: 06JC9T - Version: A00 - Serial Number: ..CN7475104Q0184. - -Handle 0x0300, DMI type 3, 21 bytes -Chassis Information - Manufacturer: Dell Inc. - Type: Rack Mount Chassis - Lock: Present - Version: Not Specified - Serial Number: HYGTS4J - Asset Tag: Not Specified - Boot-up State: Safe - Power Supply State: Safe - Thermal State: Safe - Security Status: Unknown - OEM Information: 0x00000000 - Height: 2 U - Number Of Power Cords: Unspecified - Contained Elements: 0 - -Handle 0x0400, DMI type 4, 40 bytes -Processor Information - Socket Designation: CPU1 - Type: Central Processor - Family: - Manufacturer: AMD - ID: 91 0F 10 00 FF FB 8B 17 - Version: AMD Opteron(tm) Processor 6174 - Voltage: 1.1 V - External Clock: 3200 MHz - Max Speed: 3600 MHz - Current Speed: 2200 MHz - Status: Populated, Enabled - Upgrade: - L1 Cache Handle: 0x0700 - L2 Cache Handle: 0x0701 - L3 Cache Handle: 0x0702 - Serial Number: Not Specified - Asset Tag: Not Specified - Part Number: Not Specified - Core Count: 12 - Core Enabled: 12 - Thread Count: 12 - Characteristics: - 64-bit capable - -Handle 0x0401, DMI type 4, 40 bytes -Processor Information - Socket Designation: CPU2 - Type: Central Processor - Family: - Manufacturer: AMD - ID: 91 0F 10 00 FF FB 8B 17 - Version: AMD Opteron(tm) Processor 6174 - Voltage: 1.1 V - External Clock: 3200 MHz - Max Speed: 3600 MHz - Current Speed: 2200 MHz - Status: Populated, Idle - Upgrade: - L1 Cache Handle: 0x0703 - L2 Cache Handle: 0x0704 - L3 Cache Handle: 0x0705 - Serial Number: Not Specified - Asset Tag: Not Specified - Part Number: Not Specified - Core Count: 12 - Core Enabled: 12 - Thread Count: 12 - Characteristics: - 64-bit capable - -Handle 0x0402, DMI type 4, 40 bytes -Processor Information - Socket Designation: CPU3 - Type: Central Processor - Family: - Manufacturer: AMD - ID: 91 0F 10 00 FF FB 8B 17 - Version: AMD Opteron(tm) Processor 6174 - Voltage: 1.1 V - External Clock: 3200 MHz - Max Speed: 3600 MHz - Current Speed: 2200 MHz - Status: Populated, Idle - Upgrade: - L1 Cache Handle: 0x0706 - L2 Cache Handle: 0x0707 - L3 Cache Handle: 0x0708 - Serial Number: Not Specified - Asset Tag: Not Specified - Part Number: Not Specified - Core Count: 12 - Core Enabled: 12 - Thread Count: 12 - Characteristics: - 64-bit capable - -Handle 0x0403, DMI type 4, 40 bytes -Processor Information - Socket Designation: CPU4 - Type: Central Processor - Family: - Manufacturer: AMD - ID: 91 0F 10 00 FF FB 8B 17 - Version: AMD Opteron(tm) Processor 6174 - Voltage: 1.1 V - External Clock: 3200 MHz - Max Speed: 3600 MHz - Current Speed: 2200 MHz - Status: Populated, Idle - Upgrade: - L1 Cache Handle: 0x0709 - L2 Cache Handle: 0x070A - L3 Cache Handle: 0x070B - Serial Number: Not Specified - Asset Tag: Not Specified - Part Number: Not Specified - Core Count: 12 - Core Enabled: 12 - Thread Count: 12 - Characteristics: - 64-bit capable - -Handle 0x0700, DMI type 7, 19 bytes -Cache Information - Socket Designation: Not Specified - Configuration: Enabled, Not Socketed, Level 1 - Operational Mode: Write Back - Location: Internal - Installed Size: 768 KB - Maximum Size: 768 KB - Supported SRAM Types: - Unknown - Installed SRAM Type: Unknown - Speed: Unknown - Error Correction Type: Multi-bit ECC - System Type: Unified - Associativity: 2-way Set-associative - -Handle 0x0701, DMI type 7, 19 bytes -Cache Information - Socket Designation: Not Specified - Configuration: Enabled, Not Socketed, Level 2 - Operational Mode: Write Back - Location: Internal - Installed Size: 6144 KB - Maximum Size: 6144 KB - Supported SRAM Types: - Unknown - Installed SRAM Type: Unknown - Speed: Unknown - Error Correction Type: Multi-bit ECC - System Type: Unified - Associativity: 16-way Set-associative - -Handle 0x0702, DMI type 7, 19 bytes -Cache Information - Socket Designation: Not Specified - Configuration: Enabled, Not Socketed, Level 3 - Operational Mode: Write Back - Location: Internal - Installed Size: 10240 KB - Maximum Size: 10240 KB - Supported SRAM Types: - Unknown - Installed SRAM Type: Unknown - Speed: Unknown - Error Correction Type: Multi-bit ECC - System Type: Unified - Associativity: Other - -Handle 0x0703, DMI type 7, 19 bytes -Cache Information - Socket Designation: Not Specified - Configuration: Enabled, Not Socketed, Level 1 - Operational Mode: Write Back - Location: Internal - Installed Size: 768 KB - Maximum Size: 768 KB - Supported SRAM Types: - Unknown - Installed SRAM Type: Unknown - Speed: Unknown - Error Correction Type: Multi-bit ECC - System Type: Unified - Associativity: 2-way Set-associative - -Handle 0x0704, DMI type 7, 19 bytes -Cache Information - Socket Designation: Not Specified - Configuration: Enabled, Not Socketed, Level 2 - Operational Mode: Write Back - Location: Internal - Installed Size: 6144 KB - Maximum Size: 6144 KB - Supported SRAM Types: - Unknown - Installed SRAM Type: Unknown - Speed: Unknown - Error Correction Type: Multi-bit ECC - System Type: Unified - Associativity: 16-way Set-associative - -Handle 0x0705, DMI type 7, 19 bytes -Cache Information - Socket Designation: Not Specified - Configuration: Enabled, Not Socketed, Level 3 - Operational Mode: Write Back - Location: Internal - Installed Size: 10240 KB - Maximum Size: 10240 KB - Supported SRAM Types: - Unknown - Installed SRAM Type: Unknown - Speed: Unknown - Error Correction Type: Multi-bit ECC - System Type: Unified - Associativity: Other - -Handle 0x0706, DMI type 7, 19 bytes -Cache Information - Socket Designation: Not Specified - Configuration: Enabled, Not Socketed, Level 1 - Operational Mode: Write Back - Location: Internal - Installed Size: 768 KB - Maximum Size: 768 KB - Supported SRAM Types: - Unknown - Installed SRAM Type: Unknown - Speed: Unknown - Error Correction Type: Multi-bit ECC - System Type: Unified - Associativity: 2-way Set-associative - -Handle 0x0707, DMI type 7, 19 bytes -Cache Information - Socket Designation: Not Specified - Configuration: Enabled, Not Socketed, Level 2 - Operational Mode: Write Back - Location: Internal - Installed Size: 6144 KB - Maximum Size: 6144 KB - Supported SRAM Types: - Unknown - Installed SRAM Type: Unknown - Speed: Unknown - Error Correction Type: Multi-bit ECC - System Type: Unified - Associativity: 16-way Set-associative - -Handle 0x0708, DMI type 7, 19 bytes -Cache Information - Socket Designation: Not Specified - Configuration: Enabled, Not Socketed, Level 3 - Operational Mode: Write Back - Location: Internal - Installed Size: 10240 KB - Maximum Size: 10240 KB - Supported SRAM Types: - Unknown - Installed SRAM Type: Unknown - Speed: Unknown - Error Correction Type: Multi-bit ECC - System Type: Unified - Associativity: Other - -Handle 0x0709, DMI type 7, 19 bytes -Cache Information - Socket Designation: Not Specified - Configuration: Enabled, Not Socketed, Level 1 - Operational Mode: Write Back - Location: Internal - Installed Size: 768 KB - Maximum Size: 768 KB - Supported SRAM Types: - Unknown - Installed SRAM Type: Unknown - Speed: Unknown - Error Correction Type: Multi-bit ECC - System Type: Unified - Associativity: 2-way Set-associative - -Handle 0x070A, DMI type 7, 19 bytes -Cache Information - Socket Designation: Not Specified - Configuration: Enabled, Not Socketed, Level 2 - Operational Mode: Write Back - Location: Internal - Installed Size: 6144 KB - Maximum Size: 6144 KB - Supported SRAM Types: - Unknown - Installed SRAM Type: Unknown - Speed: Unknown - Error Correction Type: Multi-bit ECC - System Type: Unified - Associativity: 16-way Set-associative - -Handle 0x070B, DMI type 7, 19 bytes -Cache Information - Socket Designation: Not Specified - Configuration: Enabled, Not Socketed, Level 3 - Operational Mode: Write Back - Location: Internal - Installed Size: 10240 KB - Maximum Size: 10240 KB - Supported SRAM Types: - Unknown - Installed SRAM Type: Unknown - Speed: Unknown - Error Correction Type: Multi-bit ECC - System Type: Unified - Associativity: Other - -Handle 0x0800, DMI type 8, 9 bytes -Port Connector Information - Internal Reference Designator: Not Specified - Internal Connector Type: None - External Reference Designator: Not Specified - External Connector Type: DB-15 female - Port Type: Video Port - -Handle 0x0801, DMI type 8, 9 bytes -Port Connector Information - Internal Reference Designator: Not Specified - Internal Connector Type: None - External Reference Designator: Not Specified - External Connector Type: DB-15 female - Port Type: Video Port - -Handle 0x0802, DMI type 8, 9 bytes -Port Connector Information - Internal Reference Designator: Not Specified - Internal Connector Type: None - External Reference Designator: Not Specified - External Connector Type: Access Bus (USB) - Port Type: USB - -Handle 0x0803, DMI type 8, 9 bytes -Port Connector Information - Internal Reference Designator: Not Specified - Internal Connector Type: None - External Reference Designator: Not Specified - External Connector Type: Access Bus (USB) - Port Type: USB - -Handle 0x0804, DMI type 8, 9 bytes -Port Connector Information - Internal Reference Designator: Not Specified - Internal Connector Type: None - External Reference Designator: Not Specified - External Connector Type: Access Bus (USB) - Port Type: USB - -Handle 0x0805, DMI type 8, 9 bytes -Port Connector Information - Internal Reference Designator: Not Specified - Internal Connector Type: None - External Reference Designator: Not Specified - External Connector Type: Access Bus (USB) - Port Type: USB - -Handle 0x0806, DMI type 8, 9 bytes -Port Connector Information - Internal Reference Designator: Not Specified - Internal Connector Type: None - External Reference Designator: Not Specified - External Connector Type: Access Bus (USB) - Port Type: USB - -Handle 0x0807, DMI type 8, 9 bytes -Port Connector Information - Internal Reference Designator: Not Specified - Internal Connector Type: None - External Reference Designator: Not Specified - External Connector Type: Access Bus (USB) - Port Type: USB - -Handle 0x0808, DMI type 8, 9 bytes -Port Connector Information - Internal Reference Designator: INT_USB - Internal Connector Type: Access Bus (USB) - External Reference Designator: Not Specified - External Connector Type: None - Port Type: USB - -Handle 0x0809, DMI type 126, 9 bytes -Inactive - -Handle 0x080A, DMI type 126, 9 bytes -Inactive - -Handle 0x080B, DMI type 8, 9 bytes -Port Connector Information - Internal Reference Designator: Not Specified - Internal Connector Type: None - External Reference Designator: Not Specified - External Connector Type: RJ-45 - Port Type: Network Port - -Handle 0x080C, DMI type 8, 9 bytes -Port Connector Information - Internal Reference Designator: Not Specified - Internal Connector Type: None - External Reference Designator: Not Specified - External Connector Type: RJ-45 - Port Type: Network Port - -Handle 0x080D, DMI type 8, 9 bytes -Port Connector Information - Internal Reference Designator: Not Specified - Internal Connector Type: None - External Reference Designator: Not Specified - External Connector Type: RJ-45 - Port Type: Network Port - -Handle 0x080E, DMI type 8, 9 bytes -Port Connector Information - Internal Reference Designator: Not Specified - Internal Connector Type: None - External Reference Designator: Not Specified - External Connector Type: RJ-45 - Port Type: Network Port - -Handle 0x080F, DMI type 8, 9 bytes -Port Connector Information - Internal Reference Designator: Not Specified - Internal Connector Type: None - External Reference Designator: Not Specified - External Connector Type: DB-9 male - Port Type: Serial Port 16550A Compatible - -Handle 0x0900, DMI type 9, 17 bytes -System Slot Information - Designation: PCI1 - Type: x8 - Current Usage: Available - Length: Long - Characteristics: - 3.3 V is provided - PME signal is supported - -Handle 0x0901, DMI type 9, 17 bytes -System Slot Information - Designation: PCI2 - Type: x4 - Current Usage: Available - Length: Short - Characteristics: - 3.3 V is provided - PME signal is supported - -Handle 0x0902, DMI type 9, 17 bytes -System Slot Information - Designation: PCI3 - Type: x8 - Current Usage: Available - Length: Short - Characteristics: - 3.3 V is provided - PME signal is supported - -Handle 0x0903, DMI type 9, 17 bytes -System Slot Information - Designation: PCI4 - Type: x8 - Current Usage: Available - Length: Short - Characteristics: - 3.3 V is provided - PME signal is supported - -Handle 0x0904, DMI type 9, 17 bytes -System Slot Information - Designation: PCI5 - Type: x8 - Current Usage: Available - Length: Long - Characteristics: - 3.3 V is provided - PME signal is supported - -Handle 0x0905, DMI type 9, 17 bytes -System Slot Information - Designation: PCI6 - Type: x8 - Current Usage: Available - Length: Long - Characteristics: - 3.3 V is provided - PME signal is supported - -Handle 0x0A00, DMI type 10, 16 bytes -On Board Device 1 Information - Type: Video - Status: Enabled - Description: Embedded Matrox G200 Video -On Board Device 2 Information - Type: Ethernet - Status: Enabled - Description: Embedded Broadcom 5709C NIC 1 -On Board Device 3 Information - Type: Ethernet - Status: Enabled - Description: Embedded Broadcom 5709C NIC 2 -On Board Device 4 Information - Type: Ethernet - Status: Enabled - Description: Embedded Broadcom 5709C NIC 3 -On Board Device 5 Information - Type: Ethernet - Status: Enabled - Description: Embedded Broadcom 5709C NIC 4 -On Board Device 6 Information - Type: SAS Controller - Status: Enabled - Description: Integrated SAS Controller - -Handle 0x0B00, DMI type 11, 5 bytes -OEM Strings - String 1: Dell System - String 2: 5[0000] - -Handle 0x7E00, DMI type 126, 154 bytes -Inactive - -Handle 0x0C00, DMI type 12, 5 bytes -System Configuration Options - Option 1: NVRAM_CLR: Clear user settable NVRAM areas and set defaults - Option 2: PWRD_EN: Close to enable password - -Handle 0x0D00, DMI type 13, 22 bytes -BIOS Language Information - Installable Languages: 1 - en|US|iso8859-1 - Currently Installed Language: en|US|iso8859-1 - -Handle 0x1000, DMI type 16, 15 bytes -Physical Memory Array - Location: System Board Or Motherboard - Use: System Memory - Error Correction Type: Multi-bit ECC - Maximum Capacity: 256 GB - Error Information Handle: Not Provided - Number Of Devices: 32 - -Handle 0x1100, DMI type 17, 28 bytes -Memory Device - Array Handle: 0x1000 - Error Information Handle: Not Provided - Total Width: 72 bits - Data Width: 64 bits - Size: 4096 MB - Form Factor: DIMM - Set: 1 - Locator: DIMM_A1 - Bank Locator: Not Specified - Type: - Type Detail: Synchronous - Speed: 1333 MHz (0.8 ns) - Manufacturer: 80CE80B380CE - Serial Number: 851CFBE6 - Asset Tag: 02101861 - Part Number: M393B5170EH1-CH9 - -Handle 0x1101, DMI type 17, 28 bytes -Memory Device - Array Handle: 0x1000 - Error Information Handle: Not Provided - Total Width: 72 bits - Data Width: 64 bits - Size: 4096 MB - Form Factor: DIMM - Set: 1 - Locator: DIMM_A2 - Bank Locator: Not Specified - Type: - Type Detail: Synchronous - Speed: 1333 MHz (0.8 ns) - Manufacturer: 80CE80B380CE - Serial Number: 851CFBC6 - Asset Tag: 02101861 - Part Number: M393B5170EH1-CH9 - -Handle 0x1102, DMI type 17, 28 bytes -Memory Device - Array Handle: 0x1000 - Error Information Handle: Not Provided - Total Width: 72 bits - Data Width: 64 bits - Size: 4096 MB - Form Factor: DIMM - Set: 2 - Locator: DIMM_A3 - Bank Locator: Not Specified - Type: - Type Detail: Synchronous - Speed: 1333 MHz (0.8 ns) - Manufacturer: 80CE80B380CE - Serial Number: 851CFBFF - Asset Tag: 02101861 - Part Number: M393B5170EH1-CH9 - -Handle 0x1103, DMI type 17, 28 bytes -Memory Device - Array Handle: 0x1000 - Error Information Handle: Not Provided - Total Width: 72 bits - Data Width: 64 bits - Size: 4096 MB - Form Factor: DIMM - Set: 2 - Locator: DIMM_A4 - Bank Locator: Not Specified - Type: - Type Detail: Synchronous - Speed: 1333 MHz (0.8 ns) - Manufacturer: 80CE80B380CE - Serial Number: 851CFC05 - Asset Tag: 02101861 - Part Number: M393B5170EH1-CH9 - -Handle 0x1104, DMI type 17, 28 bytes -Memory Device - Array Handle: 0x1000 - Error Information Handle: Not Provided - Total Width: 72 bits - Data Width: 64 bits - Size: 4096 MB - Form Factor: DIMM - Set: 3 - Locator: DIMM_A5 - Bank Locator: Not Specified - Type: - Type Detail: Synchronous - Speed: 1333 MHz (0.8 ns) - Manufacturer: 80CE80B380CE - Serial Number: 851CFBB0 - Asset Tag: 02101861 - Part Number: M393B5170EH1-CH9 - -Handle 0x1105, DMI type 17, 28 bytes -Memory Device - Array Handle: 0x1000 - Error Information Handle: Not Provided - Total Width: 72 bits - Data Width: 64 bits - Size: 4096 MB - Form Factor: DIMM - Set: 3 - Locator: DIMM_A6 - Bank Locator: Not Specified - Type: - Type Detail: Synchronous - Speed: 1333 MHz (0.8 ns) - Manufacturer: 80CE80B380CE - Serial Number: 851CFBED - Asset Tag: 02101861 - Part Number: M393B5170EH1-CH9 - -Handle 0x1106, DMI type 17, 28 bytes -Memory Device - Array Handle: 0x1000 - Error Information Handle: Not Provided - Total Width: 72 bits - Data Width: 64 bits - Size: 4096 MB - Form Factor: DIMM - Set: 4 - Locator: DIMM_A7 - Bank Locator: Not Specified - Type: - Type Detail: Synchronous - Speed: 1333 MHz (0.8 ns) - Manufacturer: 80CE80B380CE - Serial Number: 851CFC06 - Asset Tag: 02101861 - Part Number: M393B5170EH1-CH9 - -Handle 0x1107, DMI type 17, 28 bytes -Memory Device - Array Handle: 0x1000 - Error Information Handle: Not Provided - Total Width: 72 bits - Data Width: 64 bits - Size: 4096 MB - Form Factor: DIMM - Set: 4 - Locator: DIMM_A8 - Bank Locator: Not Specified - Type: - Type Detail: Synchronous - Speed: 1333 MHz (0.8 ns) - Manufacturer: 80CE80B380CE - Serial Number: 851CFBF7 - Asset Tag: 02101861 - Part Number: M393B5170EH1-CH9 - -Handle 0x1108, DMI type 17, 28 bytes -Memory Device - Array Handle: 0x1000 - Error Information Handle: Not Provided - Total Width: 72 bits - Data Width: 64 bits - Size: 4096 MB - Form Factor: DIMM - Set: 5 - Locator: DIMM_B1 - Bank Locator: Not Specified - Type: - Type Detail: Synchronous - Speed: 1333 MHz (0.8 ns) - Manufacturer: 80CE80B380CE - Serial Number: 851CFB92 - Asset Tag: 02101861 - Part Number: M393B5170EH1-CH9 - -Handle 0x1109, DMI type 17, 28 bytes -Memory Device - Array Handle: 0x1000 - Error Information Handle: Not Provided - Total Width: 72 bits - Data Width: 64 bits - Size: 4096 MB - Form Factor: DIMM - Set: 5 - Locator: DIMM_B2 - Bank Locator: Not Specified - Type: - Type Detail: Synchronous - Speed: 1333 MHz (0.8 ns) - Manufacturer: 80CE80B380CE - Serial Number: 851CFBF4 - Asset Tag: 02101861 - Part Number: M393B5170EH1-CH9 - -Handle 0x110A, DMI type 17, 28 bytes -Memory Device - Array Handle: 0x1000 - Error Information Handle: Not Provided - Total Width: 72 bits - Data Width: 64 bits - Size: 4096 MB - Form Factor: DIMM - Set: 6 - Locator: DIMM_B3 - Bank Locator: Not Specified - Type: - Type Detail: Synchronous - Speed: 1333 MHz (0.8 ns) - Manufacturer: 80CE80B380CE - Serial Number: 851CFBC7 - Asset Tag: 02101861 - Part Number: M393B5170EH1-CH9 - -Handle 0x110B, DMI type 17, 28 bytes -Memory Device - Array Handle: 0x1000 - Error Information Handle: Not Provided - Total Width: 72 bits - Data Width: 64 bits - Size: 4096 MB - Form Factor: DIMM - Set: 6 - Locator: DIMM_B4 - Bank Locator: Not Specified - Type: - Type Detail: Synchronous - Speed: 1333 MHz (0.8 ns) - Manufacturer: 80CE80B380CE - Serial Number: 851CFC26 - Asset Tag: 02101861 - Part Number: M393B5170EH1-CH9 - -Handle 0x110C, DMI type 17, 28 bytes -Memory Device - Array Handle: 0x1000 - Error Information Handle: Not Provided - Total Width: 72 bits - Data Width: 64 bits - Size: 4096 MB - Form Factor: DIMM - Set: 7 - Locator: DIMM_B5 - Bank Locator: Not Specified - Type: - Type Detail: Synchronous - Speed: 1333 MHz (0.8 ns) - Manufacturer: 80CE80B380CE - Serial Number: 851CFBE4 - Asset Tag: 02101861 - Part Number: M393B5170EH1-CH9 - -Handle 0x110D, DMI type 17, 28 bytes -Memory Device - Array Handle: 0x1000 - Error Information Handle: Not Provided - Total Width: 72 bits - Data Width: 64 bits - Size: 4096 MB - Form Factor: DIMM - Set: 7 - Locator: DIMM_B6 - Bank Locator: Not Specified - Type: - Type Detail: Synchronous - Speed: 1333 MHz (0.8 ns) - Manufacturer: 80CE80B380CE - Serial Number: 851CFBA4 - Asset Tag: 02101861 - Part Number: M393B5170EH1-CH9 - -Handle 0x110E, DMI type 17, 28 bytes -Memory Device - Array Handle: 0x1000 - Error Information Handle: Not Provided - Total Width: 72 bits - Data Width: 64 bits - Size: 4096 MB - Form Factor: DIMM - Set: 8 - Locator: DIMM_B7 - Bank Locator: Not Specified - Type: - Type Detail: Synchronous - Speed: 1333 MHz (0.8 ns) - Manufacturer: 80CE80B380CE - Serial Number: 851CFBB6 - Asset Tag: 02101861 - Part Number: M393B5170EH1-CH9 - -Handle 0x110F, DMI type 17, 28 bytes -Memory Device - Array Handle: 0x1000 - Error Information Handle: Not Provided - Total Width: 72 bits - Data Width: 64 bits - Size: 4096 MB - Form Factor: DIMM - Set: 8 - Locator: DIMM_B8 - Bank Locator: Not Specified - Type: - Type Detail: Synchronous - Speed: 1333 MHz (0.8 ns) - Manufacturer: 80CE80B380CE - Serial Number: 851CFB0D - Asset Tag: 02101861 - Part Number: M393B5170EH1-CH9 - -Handle 0x1110, DMI type 17, 28 bytes -Memory Device - Array Handle: 0x1000 - Error Information Handle: Not Provided - Total Width: 72 bits - Data Width: 64 bits - Size: 4096 MB - Form Factor: DIMM - Set: 9 - Locator: DIMM_C1 - Bank Locator: Not Specified - Type: - Type Detail: Synchronous - Speed: 1333 MHz (0.8 ns) - Manufacturer: 80CE80B380CE - Serial Number: 851CFC37 - Asset Tag: 02101861 - Part Number: M393B5170EH1-CH9 - -Handle 0x1111, DMI type 17, 28 bytes -Memory Device - Array Handle: 0x1000 - Error Information Handle: Not Provided - Total Width: 72 bits - Data Width: 64 bits - Size: 4096 MB - Form Factor: DIMM - Set: 9 - Locator: DIMM_C2 - Bank Locator: Not Specified - Type: - Type Detail: Synchronous - Speed: 1333 MHz (0.8 ns) - Manufacturer: 80CE80B380CE - Serial Number: 851CFC23 - Asset Tag: 02101861 - Part Number: M393B5170EH1-CH9 - -Handle 0x1112, DMI type 17, 28 bytes -Memory Device - Array Handle: 0x1000 - Error Information Handle: Not Provided - Total Width: 72 bits - Data Width: 64 bits - Size: 4096 MB - Form Factor: DIMM - Set: 10 - Locator: DIMM_C3 - Bank Locator: Not Specified - Type: - Type Detail: Synchronous - Speed: 1333 MHz (0.8 ns) - Manufacturer: 80CE80B380CE - Serial Number: 851CFB0E - Asset Tag: 02101861 - Part Number: M393B5170EH1-CH9 - -Handle 0x1113, DMI type 17, 28 bytes -Memory Device - Array Handle: 0x1000 - Error Information Handle: Not Provided - Total Width: 72 bits - Data Width: 64 bits - Size: 4096 MB - Form Factor: DIMM - Set: 10 - Locator: DIMM_C4 - Bank Locator: Not Specified - Type: - Type Detail: Synchronous - Speed: 1333 MHz (0.8 ns) - Manufacturer: 80CE80B380CE - Serial Number: 851CFB04 - Asset Tag: 02101861 - Part Number: M393B5170EH1-CH9 - -Handle 0x1114, DMI type 17, 28 bytes -Memory Device - Array Handle: 0x1000 - Error Information Handle: Not Provided - Total Width: 72 bits - Data Width: 64 bits - Size: 4096 MB - Form Factor: DIMM - Set: 11 - Locator: DIMM_C5 - Bank Locator: Not Specified - Type: - Type Detail: Synchronous - Speed: 1333 MHz (0.8 ns) - Manufacturer: 80CE80B380CE - Serial Number: 851CFBF6 - Asset Tag: 02101861 - Part Number: M393B5170EH1-CH9 - -Handle 0x1115, DMI type 17, 28 bytes -Memory Device - Array Handle: 0x1000 - Error Information Handle: Not Provided - Total Width: 72 bits - Data Width: 64 bits - Size: 4096 MB - Form Factor: DIMM - Set: 11 - Locator: DIMM_C6 - Bank Locator: Not Specified - Type: - Type Detail: Synchronous - Speed: 1333 MHz (0.8 ns) - Manufacturer: 80CE80B380CE - Serial Number: 851CFC21 - Asset Tag: 02101861 - Part Number: M393B5170EH1-CH9 - -Handle 0x1116, DMI type 17, 28 bytes -Memory Device - Array Handle: 0x1000 - Error Information Handle: Not Provided - Total Width: 72 bits - Data Width: 64 bits - Size: 4096 MB - Form Factor: DIMM - Set: 12 - Locator: DIMM_C7 - Bank Locator: Not Specified - Type: - Type Detail: Synchronous - Speed: 1333 MHz (0.8 ns) - Manufacturer: 80CE80B380CE - Serial Number: 851CFC28 - Asset Tag: 02101861 - Part Number: M393B5170EH1-CH9 - -Handle 0x1117, DMI type 17, 28 bytes -Memory Device - Array Handle: 0x1000 - Error Information Handle: Not Provided - Total Width: 72 bits - Data Width: 64 bits - Size: 4096 MB - Form Factor: DIMM - Set: 12 - Locator: DIMM_C8 - Bank Locator: Not Specified - Type: - Type Detail: Synchronous - Speed: 1333 MHz (0.8 ns) - Manufacturer: 80CE80B380CE - Serial Number: 851CFBAC - Asset Tag: 02101861 - Part Number: M393B5170EH1-CH9 - -Handle 0x1118, DMI type 17, 28 bytes -Memory Device - Array Handle: 0x1000 - Error Information Handle: Not Provided - Total Width: 72 bits - Data Width: 64 bits - Size: 4096 MB - Form Factor: DIMM - Set: 13 - Locator: DIMM_D1 - Bank Locator: Not Specified - Type: - Type Detail: Synchronous - Speed: 1333 MHz (0.8 ns) - Manufacturer: 80CE80B380CE - Serial Number: 851CFBCD - Asset Tag: 02101861 - Part Number: M393B5170EH1-CH9 - -Handle 0x1119, DMI type 17, 28 bytes -Memory Device - Array Handle: 0x1000 - Error Information Handle: Not Provided - Total Width: 72 bits - Data Width: 64 bits - Size: 4096 MB - Form Factor: DIMM - Set: 13 - Locator: DIMM_D2 - Bank Locator: Not Specified - Type: - Type Detail: Synchronous - Speed: 1333 MHz (0.8 ns) - Manufacturer: 80CE80B380CE - Serial Number: 851CFBBD - Asset Tag: 02101861 - Part Number: M393B5170EH1-CH9 - -Handle 0x111A, DMI type 17, 28 bytes -Memory Device - Array Handle: 0x1000 - Error Information Handle: Not Provided - Total Width: 72 bits - Data Width: 64 bits - Size: 4096 MB - Form Factor: DIMM - Set: 14 - Locator: DIMM_D3 - Bank Locator: Not Specified - Type: - Type Detail: Synchronous - Speed: 1333 MHz (0.8 ns) - Manufacturer: 80CE80B380CE - Serial Number: 851CFAD0 - Asset Tag: 02101861 - Part Number: M393B5170EH1-CH9 - -Handle 0x111B, DMI type 17, 28 bytes -Memory Device - Array Handle: 0x1000 - Error Information Handle: Not Provided - Total Width: 72 bits - Data Width: 64 bits - Size: 4096 MB - Form Factor: DIMM - Set: 14 - Locator: DIMM_D4 - Bank Locator: Not Specified - Type: - Type Detail: Synchronous - Speed: 1333 MHz (0.8 ns) - Manufacturer: 80CE80B380CE - Serial Number: 851CFBBC - Asset Tag: 02101861 - Part Number: M393B5170EH1-CH9 - -Handle 0x111C, DMI type 17, 28 bytes -Memory Device - Array Handle: 0x1000 - Error Information Handle: Not Provided - Total Width: 72 bits - Data Width: 64 bits - Size: 4096 MB - Form Factor: DIMM - Set: 15 - Locator: DIMM_D5 - Bank Locator: Not Specified - Type: - Type Detail: Synchronous - Speed: 1333 MHz (0.8 ns) - Manufacturer: 80CE80B380CE - Serial Number: 851CFB2A - Asset Tag: 02101861 - Part Number: M393B5170EH1-CH9 - -Handle 0x111D, DMI type 17, 28 bytes -Memory Device - Array Handle: 0x1000 - Error Information Handle: Not Provided - Total Width: 72 bits - Data Width: 64 bits - Size: 4096 MB - Form Factor: DIMM - Set: 15 - Locator: DIMM_D6 - Bank Locator: Not Specified - Type: - Type Detail: Synchronous - Speed: 1333 MHz (0.8 ns) - Manufacturer: 80CE80B380CE - Serial Number: 851CFBEB - Asset Tag: 02101861 - Part Number: M393B5170EH1-CH9 - -Handle 0x111E, DMI type 17, 28 bytes -Memory Device - Array Handle: 0x1000 - Error Information Handle: Not Provided - Total Width: 72 bits - Data Width: 64 bits - Size: 4096 MB - Form Factor: DIMM - Set: 16 - Locator: DIMM_D7 - Bank Locator: Not Specified - Type: - Type Detail: Synchronous - Speed: 1333 MHz (0.8 ns) - Manufacturer: 80CE80B380CE - Serial Number: 851CFADB - Asset Tag: 02101861 - Part Number: M393B5170EH1-CH9 - -Handle 0x111F, DMI type 17, 28 bytes -Memory Device - Array Handle: 0x1000 - Error Information Handle: Not Provided - Total Width: 72 bits - Data Width: 64 bits - Size: 4096 MB - Form Factor: DIMM - Set: 16 - Locator: DIMM_D8 - Bank Locator: Not Specified - Type: - Type Detail: Synchronous - Speed: 1333 MHz (0.8 ns) - Manufacturer: 80CE80B380CE - Serial Number: 851CFBC9 - Asset Tag: 02101861 - Part Number: M393B5170EH1-CH9 - -Handle 0x1300, DMI type 19, 15 bytes -Memory Array Mapped Address - Starting Address: 0x00000000000 - Ending Address: 0x000DFFFFFFF - Range Size: 3584 MB - Physical Array Handle: 0x1000 - Partition Width: 0 - -Handle 0x1301, DMI type 19, 15 bytes -Memory Array Mapped Address - Starting Address: 0x00100000000 - Ending Address: 0x0201FFFFFFF - Range Size: 127488 MB - Physical Array Handle: 0x1000 - Partition Width: 0 - -Handle 0x2000, DMI type 32, 11 bytes -System Boot Information - Status: No errors detected - -Handle 0x2600, DMI type 38, 18 bytes -IPMI Device Information - Interface Type: KCS (Keyboard Control Style) - Specification Version: 2.0 - I2C Slave Address: 0x10 - NV Storage Device: Not Present - Base Address: 0x0000000000000CA8 (I/O) - Register Spacing: 32-bit Boundaries - -Handle 0x2900, DMI type 41, 11 bytes -Unknown Type - Header and Data: - 29 0B 00 29 01 85 01 00 00 01 00 - Strings: - Embedded NIC 1 - -Handle 0x2901, DMI type 41, 11 bytes -Unknown Type - Header and Data: - 29 0B 01 29 01 85 02 00 00 01 01 - Strings: - Embedded NIC 2 - -Handle 0x2902, DMI type 41, 11 bytes -Unknown Type - Header and Data: - 29 0B 02 29 01 85 03 00 00 02 00 - Strings: - Embedded NIC 3 - -Handle 0x2903, DMI type 41, 11 bytes -Unknown Type - Header and Data: - 29 0B 03 29 01 85 04 00 00 02 01 - Strings: - Embedded NIC 4 - -Handle 0x2904, DMI type 41, 11 bytes -Unknown Type - Header and Data: - 29 0B 04 29 01 8A 04 00 00 05 00 - Strings: - Integrated SAS - -Handle 0x2905, DMI type 126, 11 bytes -Inactive - -Handle 0x2906, DMI type 41, 11 bytes -Unknown Type - Header and Data: - 29 0B 06 29 01 83 04 00 00 0A 18 - Strings: - Embedded Video - -Handle 0xD000, DMI type 208, 16 bytes -OEM-specific Type - Header and Data: - D0 10 00 D0 02 00 FE 00 44 04 00 00 01 01 00 00 - -Handle 0xD200, DMI type 210, 12 bytes -OEM-specific Type - Header and Data: - D2 0C 00 D2 F8 03 04 03 06 80 04 05 - -Handle 0xD400, DMI type 212, 127 bytes -OEM-specific Type - Header and Data: - D4 7F 00 D4 70 00 71 00 00 10 2D 2E 42 00 11 FE - 01 43 00 11 FE 00 70 01 11 9F 20 6F 01 11 9F 00 - 00 00 11 9F 20 00 00 11 9F 00 31 40 11 FB 00 32 - 40 11 FB 04 9D 00 11 FD 02 9E 00 11 FD 00 9F 00 - 26 FE 01 A0 00 26 FE 00 28 40 26 DF 20 29 40 26 - DF 00 38 02 27 BF 40 39 02 27 BF 00 F1 01 27 FC - 01 F2 01 27 FC 02 F3 01 27 FC 03 F5 01 27 F3 04 - F6 01 27 F3 08 F7 01 27 F3 0C FF FF 00 00 00 - -Handle 0xD401, DMI type 212, 252 bytes -OEM-specific Type - Header and Data: - D4 FC 01 D4 70 00 71 00 03 40 5A 6D 5C 00 78 BF - 40 5D 00 78 BF 00 6C 01 57 FC 00 6B 01 57 FC 01 - 6A 01 57 FC 02 12 02 57 EF 00 11 02 57 EF 10 00 - 00 5B FB 04 00 00 5B FB 00 77 01 54 FC 00 78 01 - 54 FC 01 79 01 54 FC 02 7A 01 54 FC 03 33 40 54 - CF 00 34 40 54 CF 10 35 40 54 CF 20 36 40 54 CF - 30 1A 40 54 FB 04 1B 40 54 FB 00 1C 40 54 F7 08 - 1D 40 54 F7 00 43 40 58 DF 20 42 40 58 DF 00 24 - 40 58 BF 40 25 40 58 BF 00 6E 00 58 FC 01 2D 00 - 58 FC 02 DA 01 58 FC 03 22 40 58 EF 10 23 40 58 - EF 00 BB 00 58 F3 04 BC 00 58 F3 08 DB 01 58 F3 - 0C 2D 02 55 FE 01 2E 02 55 FE 00 D8 00 55 7F 80 - D9 00 55 7F 00 54 02 56 DF 00 57 02 56 DF 20 4D - 02 56 BF 00 4E 02 56 BF 40 2D 01 56 7F 80 2E 01 - 56 7F 00 00 C0 5C 00 0A 03 C0 67 00 05 83 00 76 - 00 00 84 00 77 00 00 FF FF 00 00 00 - -Handle 0xD402, DMI type 212, 177 bytes -OEM-specific Type - Header and Data: - D4 B1 02 D4 72 00 73 00 00 C0 DD DE D3 00 80 00 - 02 D4 00 82 00 02 D5 00 84 00 02 D6 00 86 00 02 - 4A 01 C6 BF 40 4B 01 C6 BF 00 00 90 AC 00 00 01 - 90 AD 00 00 00 00 C9 EB 14 00 00 C9 EF 10 DA 00 - C9 FB 04 00 00 C9 EB 00 00 00 C9 7F 00 00 00 C9 - 7F 80 CA 00 C9 FC 00 CB 00 C9 FC 01 00 00 C9 FC - 02 DE 00 E3 FE 01 26 40 C2 FE 01 27 40 C2 FE 00 - 17 01 CA FE 00 18 01 CA FE 01 00 00 CA FD 00 00 - 00 CA FD 02 35 01 CB FC 00 37 01 CB FC 01 02 40 - C6 DF 00 01 40 C6 DF 20 FC 01 C5 BF 00 FD 01 C5 - BF 40 00 00 C5 7F 80 00 00 C5 7F 00 FF FF 00 00 - 00 - -Handle 0xD403, DMI type 212, 132 bytes -OEM-specific Type - Header and Data: - D4 84 03 D4 72 00 73 00 00 C0 DD DE 32 02 C0 07 - 10 31 02 C0 07 20 6F 02 C0 07 30 70 02 C0 07 40 - 71 02 C0 07 50 72 02 C0 07 60 6E 02 C0 07 00 00 - 00 C6 FE 00 00 00 C6 FE 01 40 01 C7 EF 10 41 01 - C7 EF 00 C4 01 D0 FE 00 C5 01 D0 FE 01 73 01 D0 - BF 40 74 01 D0 BF 00 AB 02 D0 DF 20 AC 02 D0 DF - 00 A9 02 D0 EF 10 AA 02 D0 EF 00 6A 02 DB FE 00 - 6B 02 DB FE 01 7B 02 DB FD 00 7C 02 DB FD 02 FF - FF 00 00 00 - -Handle 0xD800, DMI type 216, 9 bytes -OEM-specific Type - Header and Data: - D8 09 00 D8 01 02 01 00 00 - Strings: - MATROX - VGA/VBE BIOS, Version V3.8WO - -Handle 0xDE00, DMI type 222, 16 bytes -OEM-specific Type - Header and Data: - DE 10 00 DE 01 08 FF FF 00 00 00 00 00 00 00 01 - -Handle 0x7F00, DMI type 127, 4 bytes -End Of Table - diff --git a/docs/dev/logs/2011-10-04 b/docs/dev/logs/2011-10-04 deleted file mode 100644 index f3bb852d..00000000 --- a/docs/dev/logs/2011-10-04 +++ /dev/null @@ -1,3 +0,0 @@ -Testing for single tests: - PYTHONPATH=$PYTHONPATH:$(pwd -P)/lib python3 -m unittest cdist.test.test_install.Install.test_explorer_ran - diff --git a/docs/dev/logs/2011-10-05 b/docs/dev/logs/2011-10-05 deleted file mode 100644 index 39fc48a2..00000000 --- a/docs/dev/logs/2011-10-05 +++ /dev/null @@ -1,116 +0,0 @@ -Config/Install/Deploy/Run: - target host - remote_cmd_prefix - ssh user@bla sudo foo????? - remote_cp_prefix - cp statt scp oder so - - debug -> env für alles += __debug - - -Storage/Metaobject/Tree? == Path? - base_dir? - nimmt objekte - - Sammelt Objekte - - Ist prepared hier? - -Object - "Infos" / Datenhalde - - Base_Dir-Abhängigkeit? - wo - - out_dir - wo speichern - - nur eigenes verzeichnis interessant? - -> nicht für shell code / aka gencode! - -> __global abhängigkeit - - object.gencode()? - - hast du type-explorer? - ja? - führe JEDEN remote aus - speichere ausgabe in object - nein: - fertig - hast du gencode-{local,remote}? - ja? - führe local oder remote aus - speichere ausgabe in s/^gen// - nein: - fertig - - hast du code-{local,remote}? - ja? - führe local oder remote aus - nein: - fertig - - ich habe ... - object_id - type - type.singleton() == False -> require object_id - parameter gegeben - requirements / order - - type_explorer := methode zum ausführen? - - cdist.object.Object(type, id) - - methoden: - gen_code - code - run_manifest - manifest == ort - -Type - singleton: ja / nein - install: ja / nein - type_explorer := liste - - optional_parameter - required_parameter - - TypeExplorer - verwandt oder == explorer - Verwandschaft klären! - - sehr abhängig von base_dir! - - welche gibt es? - - was für optionen haben sie - - cdist.type.Type("/path/to/type") - Tree/Path vieh, das liste von $_ speichert - Einfach iterieren - - - -Explorer - execute(env) - env == __explorer -> nur im explorer - -z.B. BaseExplorer oder andersherum GlobalExplorer - -Manifest - -Exec - wrapper um auszuführen, - error handling, - output redirection (variable, file, beides, socat :-) - - --------------------------------------------------------------------------------- - -- base_dir (conf/, type, ...) -- manifest (initiale) - $methode_mit_inhalt_von_manifest? - run_manifest(code) - ob sinnvoll? - geht auch mit stdin oder datei - - stdin -> muss in tmp-datei, für sh -e? -- --------------------------------------------------------------------------------- - -save output of shell in buffer instead of displaying? - -> freedom to decide whether to display or not! diff --git a/docs/dev/logs/2011-10-06 b/docs/dev/logs/2011-10-06 deleted file mode 100644 index 14edab51..00000000 --- a/docs/dev/logs/2011-10-06 +++ /dev/null @@ -1,30 +0,0 @@ -GlobalExplorer - list_explorers() - list_explorers_names() - - base_dir - __init__(name) - out_dir - env - name = id - path - return_code - return_value - --------------------------------------------------------------------------------- -Exec: - -normal: - -scp /from/where $USER@$HOST:REMOTE_BASE/cdist-internal -ssh $USER@$HOST MY_CMD_THAT_NEEDS_TO_RUN_IN_BIN_SH (including ENV) - -sudo: - -scp $USER@$HOST:REMOTE_BASE/cdist-internal -ssh $USER@$HOST sudo MY_CMD_THAT_NEEDS_TO_RUN_IN_BIN_SH (including ENV) - -chroot: - -[sudo] cp file /chroot/THE_HOST_BASE/REMOTE_BASE/cdist-internal -[sudo] chroot /chroot MY_CMD_THAT_NEEDS_TO_RUN_IN_BIN_SH (including ENV) diff --git a/docs/dev/logs/2011-10-06.ssh_scp_sudo_chroot b/docs/dev/logs/2011-10-06.ssh_scp_sudo_chroot deleted file mode 100644 index ec89a999..00000000 --- a/docs/dev/logs/2011-10-06.ssh_scp_sudo_chroot +++ /dev/null @@ -1,87 +0,0 @@ -Commands needed: - conf/cmd/remote_exec - conf/cmd/copy - -If ! conf/cmd/remote_exec: - use builtin -If ! conf/cmd/copy: - use builtin - --------------------------------------------------------------------------------- - ---cmd-dir? -$__cdist_cmd_dir - --------------------------------------------------------------------------------- - -> Depend on session! - -Builtin: - cdist.exec.run_or_fail(["scp", "-qr", source, - self.remote_user + "@" + - self.target_host + ":" + - destination]) - -self.remote_prefix = ["ssh", self.remote_user + "@" + self.target_host] - - self.remote_user = remote_user - self.remote_prefix = remote_prefix - --------------------------------------------------------------------------------- -What is in a session? - - base_dir - target_host - --------------------------------------------------------------------------------- -remote_user - pseudo-static, can be hardcoded again --------------------------------------------------------------------------------- - -Result: - -os.environ['__remote_exec'] = ["ssh", "-l", "root" ] - -os.environ['__remote_exec'] = ["ssh", "-o", "User=root" ] -os.environ['__remote_copy'] = ["scp", "-o", "User=root" ] - - -__remote_exec=~/sudossh __remote_copy=... cdist config localhost - -~/sudossh hostname $@... -~/sudocopy a hostname:b - -~/chrootssh -~/chrootcopy - - - -a) - 3 cmd verzeichnnise: cdist, sudo, chroot - pro aufruf variable ändern - -b) - 1 dir, mit zeug - pro aufruf variablen ändern - - -conf/cmd/remote_exec - -args for __remote_exec - $1 = hostname - $2 - ... = stuff to be executed in /bin/sh on remote side - $2 - $7 = env - $7 - 12 = cmd - - -args for __remote_copy - $1 = file here - $2 = hostname:destination - --------------------------------------------------------------------------------- -There needs to be an easy way to change those cmds! --------------------------------------------------------------------------------- -Env-Passing: - _a=b test -> test can access $_a - _a=b test $_a -> $1 = "", because _a is *not* set within the shell - _a=b; test -> can access $_a - _a=b; test $_a -> $1 == "b" diff --git a/docs/dev/logs/2011-10-11.emulator-output b/docs/dev/logs/2011-10-11.emulator-output deleted file mode 100644 index d1f066c5..00000000 --- a/docs/dev/logs/2011-10-11.emulator-output +++ /dev/null @@ -1,8 +0,0 @@ -Debug: -DEBUG: Namespace(name=None, state='installed') -DEBUG: Object output dir = /home/users/nico/.tmp/tmpsdaonx/out/object/__package_pacman/zsh/.cdist -DEBUG: Object param dir = /home/users/nico/.tmp/tmpsdaonx/out/object/__package_pacman/zsh/.cdist/parameter -DEBUG: /home/users/nico/.tmp/tmpsdaonx/out/object/__package_pacman/zsh/.cdist/parameter/state<-state = installed -DEBUG: zsh:Writing requirements: -DEBUG: Finished __package_pacman/zsh{'state': 'installed', 'name': None} - diff --git a/docs/dev/logs/2011-10-12 b/docs/dev/logs/2011-10-12 deleted file mode 100644 index 22caf05e..00000000 --- a/docs/dev/logs/2011-10-12 +++ /dev/null @@ -1,8 +0,0 @@ -Todo today + tests: - -- explorer (nico) - - create env here -- exec -> local+remote (steven) -- make configinstall work again (nico) -- make manifest work (steven) - - create env here diff --git a/docs/dev/logs/2011-10-13.output b/docs/dev/logs/2011-10-13.output deleted file mode 100644 index 3eb68e1f..00000000 --- a/docs/dev/logs/2011-10-13.output +++ /dev/null @@ -1,10 +0,0 @@ -[17:07] brief:cdist% ./bin/cdist config localhost -cat: /home/users/nico/.tmp/tmpfgy16_/out/object/__directory/tmp/foo/bar/.cdist/explorer/exists: No such file or directory -chgrp: cannot access `/tmp/foo/bar': No such file or directory -ERROR: localhost: Code that raised the error: -chgrp -R "postdrop" "/tmp/foo/bar" -chown -R "nico" "/tmp/foo/bar" - -ERROR: Remote script execution failed: /var/lib/cdist/object/__directory/tmp/foo/bar/.cdist/code-remote ['ssh', '-o', 'User=root', '-q', 'localhost', '/bin/sh', '-e', '/var/lib/cdist/object/__directory/tmp/foo/bar/.cdist/code-remote'] -[17:08] brief:cdist% - diff --git a/docs/dev/logs/2011-10-14.error-output b/docs/dev/logs/2011-10-14.error-output deleted file mode 100644 index 4414de13..00000000 --- a/docs/dev/logs/2011-10-14.error-output +++ /dev/null @@ -1,46 +0,0 @@ -[23:24] brief:cdist% ./bin/cdist config -c ~/p/cdist-nutzung -v ikq04.ethz.ch -INFO: ikq04.ethz.ch: Deploying to ikq04.ethz.ch -INFO: ikq04.ethz.ch: Running object manifests and type explorers -cat: /home/users/nico/.tmp/tmpf969y2/out/object/__addifnosuchline/ssh-root-blukas/.cdist/parameter/line: No such file or directory -#!/bin/sh -# -# 2010-2011 Daniel Roth (dani-cdist@d-roth.li) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -if [ -f "$__object/parameter/file" ]; then - file=$(cat "$__object/parameter/file") -else - file="/$__object_id" -fi - -regex=$(cat "$__object/parameter/line") -if [ -f "$file" ]; then - grep -q "^$regex\$" "$file" - if [ $? -eq 1 ]; then - echo "NOTFOUND" - else - echo "FOUND" - fi -else - echo "NOTFOUND" -fi -ERROR: ikq04.ethz.ch: Code that raised the error: -None -ERROR: Remote script execution failed: /var/lib/cdist/conf/type/__addifnosuchline/explorer/findline ['ssh', '-o', 'User=root', '-q', 'ikq04.ethz.ch', '__explorer=/var/lib/cdist/conf/explorer', '__object_fq=__addifnosuchline/ssh-root-blukas/.cdist', '__target_host=ikq04.ethz.ch', '__object_id=ssh-root-blukas', '__type_explorer=/var/lib/cdist/conf/type/__addifnosuchline/explorer', '__object=/home/users/nico/.tmp/tmpf969y2/out/object/__addifnosuchline/ssh-root-blukas/.cdist', '/bin/sh', '-e', '/var/lib/cdist/conf/type/__addifnosuchline/explorer/findline'] -[23:25] brief:cdist% diff --git a/docs/dev/logs/2011-10-15.prefix-output-missing b/docs/dev/logs/2011-10-15.prefix-output-missing deleted file mode 100644 index 05788fd5..00000000 --- a/docs/dev/logs/2011-10-15.prefix-output-missing +++ /dev/null @@ -1,10 +0,0 @@ -Prefix is missing in some parts for a run, they all need to include -the hostname (required for clean parallel processing) - -[0:13] brief:cdist% ./bin/cdist config -c ~/p/cdist-nutzung -v ikq04.ethz.ch -INFO: ikq04.ethz.ch: Running global explorers -INFO: Running initial manifest /home/users/nico/p/cdist-nutzung/conf/manifest -INFO: ikq04.ethz.ch: Running object manifests and type explorers -ERROR: requirements object_id may not start with /: __file//etc/nslcd.conf -ERROR: ikq04.ethz.ch: Code that raised the error: - diff --git a/docs/dev/logs/2011-10-15.ugly-output-on-breaking-explorer b/docs/dev/logs/2011-10-15.ugly-output-on-breaking-explorer deleted file mode 100644 index 921f0c90..00000000 --- a/docs/dev/logs/2011-10-15.ugly-output-on-breaking-explorer +++ /dev/null @@ -1,43 +0,0 @@ -[0:15] brief:cdist% ./bin/cdist config -c ~/p/cdist-nutzung -v ikq04.ethz.ch -INFO: ikq04.ethz.ch: Running global explorers -INFO: Running initial manifest /home/users/nico/p/cdist-nutzung/conf/manifest -INFO: ikq04.ethz.ch: Running object manifests and type explorers -/var/lib/cdist/conf/type/__file/explorer/.exists.swp: 1: Syntax error: ")" unexpected -Traceback (most recent call last): - File "/home/users/nico/oeffentlich/rechner/projekte/cdist/lib/cdist/exec/remote.py", line 147, in run_script - return subprocess.check_output(command).decode() - File "/usr/lib/python3.2/subprocess.py", line 518, in check_output - raise CalledProcessError(retcode, cmd, output=output) -subprocess.CalledProcessError: Command '['ssh', '-o', 'User=root', '-q', 'ikq04.ethz.ch', '__explorer=/var/lib/cdist/conf/explorer', '__object_fq=__file/etc/cdist-configured/.cdist', '__target_host=ikq04.ethz.ch', '__object_id=etc/cdist-configured', '__type_explorer=/var/lib/cdist/conf/type/__file/explorer', '__object=/var/lib/cdist/object/__file/etc/cdist-configured/.cdist', '/bin/sh', '-e', '/var/lib/cdist/conf/type/__file/explorer/.exists.swp']' returned non-zero exit status 2 - -During handling of the above exception, another exception occurred: - -Traceback (most recent call last): - File "./bin/cdist", line 161, in - commandline() - File "./bin/cdist", line 103, in commandline - args.func(args) - File "./bin/cdist", line 106, in config - configinstall(args, mode=cdist.config.Config) - File "./bin/cdist", line 133, in configinstall - c.deploy_and_cleanup() - File "/home/users/nico/oeffentlich/rechner/projekte/cdist/lib/cdist/config_install.py", line 71, in deploy_and_cleanup - self.deploy_to() - File "/home/users/nico/oeffentlich/rechner/projekte/cdist/lib/cdist/config_install.py", line 65, in deploy_to - self.stage_prepare() - File "/home/users/nico/oeffentlich/rechner/projekte/cdist/lib/cdist/config_install.py", line 94, in stage_prepare - self.object_prepare(cdist_object) - File "/home/users/nico/oeffentlich/rechner/projekte/cdist/lib/cdist/config_install.py", line 122, in object_prepare - self.run_type_explorers(cdist_object) - File "/home/users/nico/oeffentlich/rechner/projekte/cdist/lib/cdist/config_install.py", line 115, in run_type_explorers - output = self.explorer.run_type_explorer(explorer, cdist_object) - File "/home/users/nico/oeffentlich/rechner/projekte/cdist/lib/cdist/core/explorer.py", line 135, in run_type_explorer - return self.remote.run_script(script, env=env, return_output=True) - File "/home/users/nico/oeffentlich/rechner/projekte/cdist/lib/cdist/exec/remote.py", line 151, in run_script - script_content = self.run(["cat", script], return_output=True) - File "/home/users/nico/oeffentlich/rechner/projekte/cdist/lib/cdist/exec/remote.py", line 97, in run - return self.run_command(cmd, env=env, return_output=return_output) - File "/home/users/nico/oeffentlich/rechner/projekte/cdist/lib/cdist/exec/remote.py", line 117, in run_command - return subprocess.check_output(command).decode() -UnicodeDecodeError: 'utf8' codec can't decode byte 0xb6 in position 17: invalid start byte - diff --git a/docs/dev/logs/2011-10-16.keyboardirqoutputs b/docs/dev/logs/2011-10-16.keyboardirqoutputs deleted file mode 100644 index 5d843dac..00000000 --- a/docs/dev/logs/2011-10-16.keyboardirqoutputs +++ /dev/null @@ -1,143 +0,0 @@ -1) - -[0:19] brief:~% ./p/cdist/bin/cdist config -v localhost -INFO: localhost: Running global explorers -INFO: localhost: Running initial manifest /home/users/nico/oeffentlich/rechner/projekte/cdist/conf/manifest -^Chandling in config -Traceback (most recent call last): - File "/usr/lib/python3.2/functools.py", line 176, in wrapper - result = cache[key] -KeyError: (, '[ \\f\\t]*(\\\\\\r?\\n[ \\f\\t]*)*(#[^\\r\\n]*)?((([0-9]+[jJ]|(([0-9]+\\.[0-9]*|\\.[0-9]+)([eE][-+]?[0-9]+)?|[0-9]+[eE][-+]?[0-9]+)[jJ])|(([0-9]+\\.[0-9]*|\\.[0-9]+)([eE][-+]?[0-9]+)?|[0-9]+[eE][-+]?[0-9]+)|(0[xX][0-9a-fA-F]+|0[bB][01]+|0[oO][0-7]+|(?:0+|[1-9][0-9]*)))|((\\*\\*=?|>>=?|<<=?|!=|//=?|->|[+\\-*/%&|^=<>]=?|~)|[][(){}]|(\\r?\\n|\\.\\.\\.|[:;.,@]))|([bB]?[rR]?\'[^\\n\'\\\\]*(?:\\\\.[^\\n\'\\\\]*)*\'|[bB]?[rR]?"[^\\n"\\\\]*(?:\\\\.[^\\n"\\\\]*)*")|\\w+)', 32) - -During handling of the above exception, another exception occurred: - -Traceback (most recent call last): - File "/usr/lib/python3.2/site.py", line 58, in - import traceback - File "/usr/lib/python3.2/traceback.py", line 3, in - import linecache - File "/usr/lib/python3.2/linecache.py", line 10, in - import tokenize - File "/usr/lib/python3.2/tokenize.py", line 118, in - _compile, (Token, PseudoToken, Single3, Double3)) - File "/usr/lib/python3.2/tokenize.py", line 115, in _compile - return re.compile(expr, re.UNICODE) - File "/usr/lib/python3.2/re.py", line 206, in compile - return _compile(pattern, flags) - File "/usr/lib/python3.2/re.py", line 255, in _compile - return _compile_typed(type(pattern), pattern, flags) - File "/usr/lib/python3.2/functools.py", line 180, in wrapper - result = user_function(*args, **kwds) - File "/usr/lib/python3.2/re.py", line 267, in _compile_typed - return sre_compile.compile(pattern, flags) - File "/usr/lib/python3.2/sre_compile.py", line 495, in compile - code = _code(p, flags) - File "/usr/lib/python3.2/sre_compile.py", line 477, in _code - _compile_info(code, p, flags) - File "/usr/lib/python3.2/sre_compile.py", line 366, in _compile_info -[0:19] brief:~% lo, hi = pattern.getwidth() - File "/usr/lib/python3.2/sre_parse.py", line 163, in getwidth - i, j = av[1].getwidth() - File "/usr/lib/python3.2/sre_parse.py", line 153, in getwidth - l, h = av.getwidth() - File "/usr/lib/python3.2/sre_parse.py", line 163, in getwidth - i, j = av[1].getwidth() - File "/usr/lib/python3.2/sre_parse.py", line 153, in getwidth - l, h = av.getwidth() - File "/usr/lib/python3.2/sre_parse.py", line 163, in getwidth - i, j = av[1].getwidth() - File "/usr/lib/python3.2/sre_parse.py", line 153, in getwidth - l, h = av.getwidth() - File "/usr/lib/python3.2/sre_parse.py", line 163, in getwidth - i, j = av[1].getwidth() - File "/usr/lib/python3.2/sre_parse.py", line 153, in getwidth - l, h = av.getwidth() - File "/usr/lib/python3.2/sre_parse.py", line 163, in getwidth - i, j = av[1].getwidth() - File "/usr/lib/python3.2/sre_parse.py", line 148, in getwidth - for op, av in self.data: -KeyboardInterrupt - -2) -[0:19] brief:~% ./p/cdist/bin/cdist config -v localhost -INFO: localhost: Running global explorers -INFO: localhost: Running initial manifest /home/users/nico/oeffentlich/rechner/projekte/cdist/conf/manifest -^CFatal Python error: Py_Initialize: can't initialize sys standard streams -Traceback (most recent call last): - File "/usr/lib/python3.2/io.py", line 60, in -handling in config - import _io - File "/usr/lib/python3.2/os.py", line 26, in -[0:19] brief:~% import sys, errno -KeyboardInterrupt -/home/users/nico/oeffentlich/rechner/projekte/cdist/conf/manifest/init: line 6: 8370 Aborted __directory /tmp/foo/bar --parents yes --owner nico --group postdrop --recursive yes - -[0:19] brief:~% - -3) - -[1:12] brief:cdist% ./bin/cdist config -vp -c ~/p/cdist-nutzung ikq05.ethz.ch ikq06.ethz.ch ikq07.ethz.ch -INFO: ikq06.ethz.ch: Running global explorers -INFO: ikq05.ethz.ch: Running global explorers -INFO: ikq07.ethz.ch: Running global explorers -INFO: ikq07.ethz.ch: Running initial manifest /home/users/nico/p/cdist-nutzung/conf/manifest -INFO: ikq06.ethz.ch: Running initial manifest /home/users/nico/p/cdist-nutzung/conf/manifest -INFO: ikq05.ethz.ch: Running initial manifest /home/users/nico/p/cdist-nutzung/conf/manifest -INFO: ikq07.ethz.ch: Running object manifests and type explorers -INFO: ikq07.ethz.ch: Running manifest and explorers for __ethz_collectd/singleton -INFO: ikq05.ethz.ch: Running object manifests and type explorers -INFO: ikq05.ethz.ch: Running manifest and explorers for __ethz_collectd/singleton -^Ccatch, ikq05.ethz.ch -catch, ikq07.ethz.ch -[1:12] brief:cdist% ./bin/cdist config -vp -c ~/p/cdist-nutzung ikq05.ethz.ch ikq06.ethz.ch ikq07.ethz.ch -INFO: ikq05.ethz.ch: Running global explorers -INFO: ikq06.ethz.ch: Running global explorers -INFO: ikq07.ethz.ch: Running global explorers -INFO: ikq05.ethz.ch: Running initial manifest /home/users/nico/p/cdist-nutzung/conf/manifest -INFO: ikq06.ethz.ch: Running initial manifest /home/users/nico/p/cdist-nutzung/conf/manifest -INFO: ikq07.ethz.ch: Running initial manifest /home/users/nico/p/cdist-nutzung/conf/manifest -^CTraceback (most recent call last): - File "/usr/lib/python3.2/site.py", line 529, in -catch, ikq05.ethz.ch -Fatal Python error: Py_Initialize: can't initialize sys standard streams -Traceback (most recent call last): - File "/usr/lib/python3.2/io.py", line 60, in -catch, ikq07.ethz.ch - main() - File "/usr/lib/python3.2/site.py", line 517, in main -catch, ikq06.ethz.ch - known_paths = addusersitepackages(known_paths) - File "/usr/lib/python3.2/site.py", line 263, in addusersitepackages -Fatal Python error: Py_Initialize: can't initialize sys standard streams -Traceback (most recent call last): - File "/usr/lib/python3.2/io.py", line 60, in - user_site = getusersitepackages() - File "/usr/lib/python3.2/site.py", line 238, in getusersitepackages - user_base = getuserbase() # this will also set USER_BASE - File "/usr/lib/python3.2/site.py", line 228, in getuserbase - USER_BASE = get_config_var('userbase') - File "/usr/lib/python3.2/sysconfig.py", line 577, in get_config_var - return get_config_vars().get(name) - File "/usr/lib/python3.2/sysconfig.py", line 474, in get_config_vars - _init_posix(_CONFIG_VARS) - File "/usr/lib/python3.2/sysconfig.py", line 344, in _init_posix - parse_config_h(f, vars) - File "/usr/lib/python3.2/sysconfig.py", line 386, in parse_config_h - line = fp.readline() - File "/usr/lib/python3.2/codecs.py", line 302, in decode - self.buffer = data[consumed:] -KeyboardInterrupt - import _io - File "/usr/lib/python3.2/os.py", line 49, in - import posixpath as path - File "/usr/lib/python3.2/posixpath.py", line 11, in - import _io - File "/usr/lib/python3.2/os.py", line 44, in - """ from posix import * -KeyboardInterrupt -/home/users/nico/p/cdist-nutzung/conf/manifest/init: line 10: 19830 Aborted __ethz_systems_root_via_ssh $ik --state present - -KeyboardInterrupt -[1:12] brief:cdist% /home/users/nico/p/cdist-nutzung/conf/manifest/init: line 10: 19829 Aborted __ethz_systems_root_via_ssh $ik --state present - - diff --git a/docs/dev/logs/2011-10-18.requirement-object b/docs/dev/logs/2011-10-18.requirement-object deleted file mode 100644 index 47873aa4..00000000 --- a/docs/dev/logs/2011-10-18.requirement-object +++ /dev/null @@ -1,8 +0,0 @@ -require="__broken_type/foo" breaks too late - -- always catch OSError/IOError: (check all occurences) -- type __director does not exist, abort in emulator - - if called type is not existing - - if required type is not existing -- type constructor fails if type does not exist -- test type emulator with non existent types -> should raise NoSuchTypeError diff --git a/docs/dev/logs/2011-10-18.traceback-gencode b/docs/dev/logs/2011-10-18.traceback-gencode deleted file mode 100644 index 3de967c1..00000000 --- a/docs/dev/logs/2011-10-18.traceback-gencode +++ /dev/null @@ -1,28 +0,0 @@ -[...] -INFO: sgv-sysadmin-01: Running gencode and code for __director/home/services/nfs -Traceback (most recent call last): - File "./bin/cdist", line 211, in - commandline() - File "./bin/cdist", line 110, in commandline - args.func(args) - File "./bin/cdist", line 113, in config - configinstall(args, mode=cdist.config.Config) - File "./bin/cdist", line 131, in configinstall - if not configinstall_onehost(host, args, mode, parallel=False): - File "./bin/cdist", line 177, in configinstall_onehost - c.deploy_and_cleanup() - File "/home/users/nico/oeffentlich/rechner/projekte/cdist-nutzung/lib/cdist/config_install.py", line 71, in deploy_and_cleanup - self.deploy_to() - File "/home/users/nico/oeffentlich/rechner/projekte/cdist-nutzung/lib/cdist/config_install.py", line 66, in deploy_to - self.stage_run() - File "/home/users/nico/oeffentlich/rechner/projekte/cdist-nutzung/lib/cdist/config_install.py", line 164, in stage_run - self.object_run(cdist_object) - File "/home/users/nico/oeffentlich/rechner/projekte/cdist-nutzung/lib/cdist/config_install.py", line 143, in object_run - self.object_run(required_object) - File "/home/users/nico/oeffentlich/rechner/projekte/cdist-nutzung/lib/cdist/config_install.py", line 135, in object_run - cdist_object.ran = True - File "/home/users/nico/oeffentlich/rechner/projekte/cdist-nutzung/lib/cdist/util/fsproperty.py", line 237, in __set__ - open(path, "w").close() -IOError: [Errno 2] No such file or directory: '/home/users/nico/.tmp/tmp2gau4p/out/object/__director/home/services/nfs/.cdist/ran' -[10:43] brief:cdist-nutzung% - diff --git a/docs/dev/logs/2011-11-15.startup-yannick b/docs/dev/logs/2011-11-15.startup-yannick deleted file mode 100644 index e4a28587..00000000 --- a/docs/dev/logs/2011-11-15.startup-yannick +++ /dev/null @@ -1,9 +0,0 @@ -- create new branch -- entry point = conf/manifest/init -- make man for reference -- doc: change to version directory - -- add sudo example -- ports are configured in ~/.ssh/config -- cdist daustrap $rechner - - alles gut mit enimal passwort eingeben diff --git a/docs/dev/logs/2011-11-16.workflow-example.dia b/docs/dev/logs/2011-11-16.workflow-example.dia deleted file mode 100644 index 8dab4a2c..00000000 Binary files a/docs/dev/logs/2011-11-16.workflow-example.dia and /dev/null differ diff --git a/docs/dev/logs/2011-11-16.workflow-example.png b/docs/dev/logs/2011-11-16.workflow-example.png deleted file mode 100644 index 07a0f126..00000000 Binary files a/docs/dev/logs/2011-11-16.workflow-example.png and /dev/null differ diff --git a/docs/dev/logs/2011-11-17.workflow-example.dia b/docs/dev/logs/2011-11-17.workflow-example.dia deleted file mode 100644 index 7a9cd0f7..00000000 Binary files a/docs/dev/logs/2011-11-17.workflow-example.dia and /dev/null differ diff --git a/docs/dev/logs/2012-01-06.python3-in-distros b/docs/dev/logs/2012-01-06.python3-in-distros deleted file mode 100644 index 38a4b30d..00000000 --- a/docs/dev/logs/2012-01-06.python3-in-distros +++ /dev/null @@ -1,52 +0,0 @@ -Any: [supported everywhere [tm]] - Python 3.2.2 (via source) - => solution for distros with python < 3.2 - -Arch: [supported] - python 3.2.2-2 - -CentOS: [no python 3] - Python 2.6.6 - -Debian: [supported in testing] - Package python3 - squeeze (stable) (python): interactive high-level object-oriented language (default python3 version) 3.1.3-12: all - wheezy (testing) (python): interactive high-level object-oriented language (default python3 version) 3.2.2~rc1-2: all - sid (unstable) (python): interactive high-level object-oriented language (default python3 version) 3.2.2~rc1-2: all - -Fedora: [supported since 2011-05-24] - 14: python3-3.1.2-14.fc14 - 15: python3-3.2-1.fc15 - 16: python3-3.2.1-1.fc16 - 17: python3-3.2.2-8.fc17 - -FreeBSD: - python32 - 3.2.2 - -Gentoo: - python 3.2.2 - -NetBSD: - python 3.1.4 - -OpenBSD: - 2.7.1 on -current - 2.5 & 3.2 maintained in ports - -OpenSuse [supported since 2011-11] - 11.4: python3-3.1.3-3.3.x86_64.rpm - 12.1: python3-3.2.1-5.1.3.x86_64.rpm - -Redhat 6: [no python 3] - See Centos 6 - -Slackware: [no python 3] - python-2.6.6-i486-1.txz - -Ubuntu: [>= natty, supported since 2011-04] - Package python3 - lucid (python): An interactive high-level object-oriented language (default python3 version) 3.1.2-0ubuntu1: all - maverick (python): interactive high-level object-oriented language (default python3 version) 3.1.3-3ubuntu5~really3.1.2: all - natty (python): interactive high-level object-oriented language (default python3 version) 3.2-1ubuntu1: all - oneiric (python): interactive high-level object-oriented language (default python3 version) 3.2.2-0ubuntu2: all - precise (python): interactive high-level object-oriented language (default python3 version) 3.2.2-0ubuntu2: all diff --git a/docs/dev/logs/2012-01-07.urls b/docs/dev/logs/2012-01-07.urls deleted file mode 100644 index 9139c3ce..00000000 --- a/docs/dev/logs/2012-01-07.urls +++ /dev/null @@ -1 +0,0 @@ -https://news.ycombinator.com/item?id=3422678 diff --git a/docs/dev/logs/2012-01-18.urls b/docs/dev/logs/2012-01-18.urls deleted file mode 100644 index 5120faa1..00000000 --- a/docs/dev/logs/2012-01-18.urls +++ /dev/null @@ -1,2 +0,0 @@ -http://haarts.tumblr.com/post/16015091140/cdist-the-setup -http://d.hatena.ne.jp/kinneko/20120111/p26 diff --git a/docs/dev/logs/2012-02-08.explorer-depends-on-another-type b/docs/dev/logs/2012-02-08.explorer-depends-on-another-type deleted file mode 100644 index c76626d5..00000000 --- a/docs/dev/logs/2012-02-08.explorer-depends-on-another-type +++ /dev/null @@ -1,36 +0,0 @@ -If a type explorer depends on a command that will be generated by another type, -the operation fails, as can be seen below. - -This may be a corner case, but is hapenning with __package_pip and -__python_virtualenv. - -[19:10] brief:cdist% ./bin/cdist config -v loch -INFO: loch: Running global explorers -INFO: loch: Running initial manifest /home/users/nico/privat/firmen/local.ch/vcs/cdist/conf/manifest -INFO: loch: Running object manifests and type explorers -INFO: loch: Running manifest and explorers for __git/root/shinken -INFO: loch: Running manifest and explorers for __package_pip/pyro -/var/lib/cdist/conf/type/__package_pip/explorer/state: line 38: /root/shinken_virtualenv/bin/pip: No such file or directory -INFO: loch: Running manifest and explorers for __python_virtualenv/root/shinken_virtualenv -INFO: loch: Running manifest and explorers for __directory/pyro -INFO: loch: Running manifest and explorers for __directory/root/shinken -INFO: loch: Running manifest and explorers for __directory/root/shinken_virtualenv -INFO: loch: Running manifest and explorers for __package/git -INFO: loch: Running manifest and explorers for __package/python-virtualenv -INFO: loch: Running manifest and explorers for __package_pacman/git -INFO: loch: Running manifest and explorers for __package_pacman/python-virtualenv -INFO: loch: Generating and executing code -INFO: loch: Generating and executing code for __package_pacman/git -INFO: loch: Generating and executing code for __package/git -INFO: loch: Generating and executing code for __directory/root/shinken -INFO: loch: Generating and executing code for __git/root/shinken -fatal: write error: No space left on device -fatal: index-pack failed -ERROR: loch: Code that raised the error: -git clone --quiet "git://github.com/naparuba/shinken.git" "/root/shinken" - -ERROR: Remote script execution failed: ssh -o User=root -q loch /bin/sh -e /var/lib/cdist/object/__git/root/shinken/.cdist/code-remote -WARNING: Failed to deploy to the following hosts: loch -INFO: Total processing time for 1 host(s): 340.62370681762695 -[19:17] brief:cdist% ./bin/cdist config -v loch - diff --git a/docs/dev/logs/2012-02-10.object_id-and-slashes b/docs/dev/logs/2012-02-10.object_id-and-slashes deleted file mode 100644 index de46a1f8..00000000 --- a/docs/dev/logs/2012-02-10.object_id-and-slashes +++ /dev/null @@ -1,18 +0,0 @@ -__typename /foo/bar # possible, usual use case -require="__a//b" __typename /foo/bar # possible and happens often for __a/$id in loops - -__typename /foo/bar/ # trailing slash will be stripped, can be documented - -__typename /foo//bar//baz # // will be converted to / implicitly through fs; error prone; disallow - -require="__a//b//c" __typename # // will be converted to / implicitly through fs; error prone; disallow - - -Solution: - - 1) allow require __a//b: type __a, object id /b - => strip first slash of object id, as we do in non-dep-mode - 2) allow _one_ trailing /: __type /foo/bar/ and require="__foo/abc/" - => strip one leading slash of object id - 3) disallow // within object id - 4) disallow starting or ending / after 1) and 2) diff --git a/docs/dev/logs/2012-02-13.dependencies b/docs/dev/logs/2012-02-13.dependencies deleted file mode 100644 index 3b0f3f21..00000000 --- a/docs/dev/logs/2012-02-13.dependencies +++ /dev/null @@ -1,23 +0,0 @@ -possible dependencies: - - - unix pattern __foo/* - - object: __foo//bar, __foo/bar - - singleton with object_id: __foo/singleton - - singleton without object_id: __foo/ - -solving dependencies: - - solve_dep(object, run_list): - - list = [me] - - if status == IN_DEPENDENCY: - fail: circular dependency - - status = IN_DEPENDENCY - - create_list_of_deps(object) - - try pattern expansion - - for each dependency: - if object does not exist: - fail - else: - list.append(solve_dep(object, run_list)): - - status == IN_LIST - - return [me, dependencies [, dependencies of dependencies]] diff --git a/docs/dev/logs/2012-02-15.steven b/docs/dev/logs/2012-02-15.steven deleted file mode 100644 index 2d513728..00000000 --- a/docs/dev/logs/2012-02-15.steven +++ /dev/null @@ -1,132 +0,0 @@ -- parameter/setting default from manifest - ==> BRANCH[feature_default_parameters], - ==> PERSON[Steven or Nico] - ==> PROPOSAL(1) - - current bug - - proposal 1: parameter/default/$name (for optional ones) - - new way - - catches --state absent|present - - needs changes of types - - also possible for explorer - - support for it in core? - - handling of ${o} $o "$o" ? - - handling which variables? - - introduction of "templating language" - - aka macros - - possible problems: - - inconsistency - - redoing shell functionality - - raising expectations for more templating from users - - possible benefit - - no need for eval - - once in core, not everytime in type - - OTOH: one extra word. - - a=$(cat $__object/parameter/name) vs. $(eval $(cat $__object/parameter/name)) - - only possible for static defaults - - --name overrides name not possible vs. object_id - - Is this the only case???? - - if yes: don't care. - - possible solution: - - echo '/$__object_id' > typename/parameter/default/name - - eval $(cat $__object/parameter/name) - - probably allows code injection - - is possible anyway??? - - $(cat /etc/shadow) - - other eval side effects??? - - none: go for it - - some: have headache - - many: don't do - - proposal 2: 2 dbs (user input vs. stuff changable by type) - - explicit 2nd db [parameter_user and parameter/] - - not very clean (both agreed) - - proposal 3: parameter are read-only - - breaks current types (in core probably elsewhere) - - can't enforce, but user is on his own => breaks, her problem - + clean seperation between core and type (nico) - - parameter belongs to type not core (steven) - - proposal 4: core ignores changes in parameter/* of object - - implicit 2nd db [see automagic below] - - steven+++ - - does not work with divergent emulator not being in core - - because emulators primary db __is__ fs. - -1 manifest: - -__foo bar == emulator -echo present > $__global/object/__foo/bar/parameter/state - -# fails -__foo bar == emulator - -! automagic / filesystem - ! fsproperty: - - kill, write explicitly to disk - ==> BRANCH[cleanup_fsproperty] - ==> PERSON[Steven] - ==> PROPOSAL(just cleanup) - - - implicit/automatic writes/read to fs - - explicit interfaces are better then implicit - - same problems as in cdist 1.x to 2.x move! (environment!) - - format on disk should not change/dictate code flow - - degrade python to shell (nico++! steven--) - - user should not care about python, ruby, .net or ASM implementation (steven++ nico++) - - ? proposal 1: diverge emulator / core - - emulator verifies input - - emulator writes to fs - - core reads/syncs from/to fs before passing control to user - - ? proposal 2: emulator is dumb and passes data to core - - core creates objects - - no fs involved - - core reads/syncs from/to fs before passing control to user - - passing: - - full objects via pickle - - parameters only - - how??? - - unix socket? - - not everywhere possible? - - tcp / ip - - not everywhere possible - - chroot / local only - - rfc 1149 - - not everywhere possible - - missing avian carriers - - 0mq - - not everywhere possible - - not installed - - shm (ipcs and friends) - - not everywhere possible - - no /dev/shm, different libraries? cleanups needed... - - what speaks against FS? - - emulator_input/.../ - - - nico: to fancy probably - -! boolean implementation - ==> BRANCH[feature_boolean_parameter] - ==> PERSON[Steven] - - nico: - - parameters/boolean: document - - argparse changes (consider parameters/boolean) - - create - - can be implemented with changes in emulator - - use store_true, del if false => never seen by core - - INDEPENDENT INDEPENDT OF FS.PROPERTIES!!111111! - -- emulator: - - how much integrated into core - - also: using CdistObject???? - - dependency on filesystem: good (nico) | bad (steven) - -- singleton / support without object_id - - not discussed - -- __apt_ppa: - ==> BRANCH[bugfix_do_not_change_state_in_manifest] - ==> PERSON[Nico] - -- logging divergent between emulator / core - - no problem (nico) - - may be helpful (steven) diff --git a/docs/dev/logs/2012-02-17.keyboardirq b/docs/dev/logs/2012-02-17.keyboardirq deleted file mode 100644 index 8ce59681..00000000 --- a/docs/dev/logs/2012-02-17.keyboardirq +++ /dev/null @@ -1,48 +0,0 @@ -Somewhere there is still a race condition: - -INFO: monitoring03: Running manifest and explorers for __file/etc/yum.repos.d/epel.repo -^C^CTraceback (most recent call last): - File "./bin/cdist", line 204, in - import logging - File "/usr/lib/python3.2/logging/__init__.py", line 27, in - from string import Template - File "/usr/lib/python3.2/string.py", line 178, in - class Formatter: - File "/usr/lib/python3.2/string.py", line 179, in Formatter - def format(self, format_string, *args, **kwargs): -KeyboardInterrupt - -During handling of the above exception, another exception occurred: - -Traceback (most recent call last): - File "./bin/cdist", line 232, in - sys.exit(0) -NameError: name 'sys' is not defined -^C^CFatal Python error: Py_Initialize: can't initialize sys standard streams -Traceback (most recent call last): - File "/usr/lib/python3.2/encodings/latin_1.py", line 8, in - """ -KeyboardInterrupt -^C% [12:19] brief:cdist% - - --------------------------------------------------------------------------------- -[13:50] brief:cdist% ./bin/cdist config -vp monitoring02 -INFO: monitoring02: Running global explorers -INFO: monitoring02: Running initial manifest /home/users/nico/privat/firmen/local.ch/vcs/cdist/conf/manifest -INFO: monitoring02: Running object manifests and type explorers -INFO: monitoring02: Running manifest and explorers for __localch_shinken/singleton -^CTraceback (most recent call last): - File "/usr/lib/python3.2/site.py", line 58, in - import traceback - File "/usr/lib/python3.2/traceback.py", line 3, in - import linecache - File "/usr/lib/python3.2/linecache.py", line 10, in - import tokenize - File "/usr/lib/python3.2/tokenize.py", line 49, in - class TokenInfo(collections.namedtuple('TokenInfo', 'type string start end line')): - File "/usr/lib/python3.2/collections.py", line 363, in namedtuple - exec(class_definition, namespace) - File "", line 1, in -KeyboardInterrupt - diff --git a/docs/dev/logs/2012-02-20.debug-jake-deps b/docs/dev/logs/2012-02-20.debug-jake-deps deleted file mode 100644 index 2ae39f50..00000000 --- a/docs/dev/logs/2012-02-20.debug-jake-deps +++ /dev/null @@ -1,8 +0,0 @@ -require="__package/pkg-config" \ - __package libxml2 --version "2.7.8_1" --state installed --pkgsite http://192.168.196.70 - -Kein - INFO: www: Generating and executing code for __package_pkg_freebsd/libxml2 - -für - __package/libxml2 diff --git a/docs/dev/logs/2012-02-20.error-does-not-contain-host b/docs/dev/logs/2012-02-20.error-does-not-contain-host deleted file mode 100644 index 5838c011..00000000 --- a/docs/dev/logs/2012-02-20.error-does-not-contain-host +++ /dev/null @@ -1,26 +0,0 @@ -- errors do not contain host -- it's not logged which hosts failed! - -INFO: monitoring02: Running manifest and explorers for __directory/opt/local.ch/sys/shinken/host.d -INFO: monitoring03: Running manifest and explorers for __file/usr/sbin/iptables-rebuild -INFO: monitoring03: Running manifest and explorers for __git/opt/local.ch/sys/shinken/shinken -INFO: monitoring02: Running manifest and explorers for __file/etc/iptables.d/005_start -INFO: monitoring03: Running manifest and explorers for __localch_rsyncd/singleton -ERROR: Object __localch_iptables/xensnmp already exists with conflicting parameters: -/home/users/nico/privat/firmen/local.ch/vcs/cdist/conf/manifest/init: {'rule': '-A RH-Firewall-1-INPUT -p tcp --dport 161 -j ACCEPT'} -/home/users/nico/privat/firmen/local.ch/vcs/cdist/conf/type/__localch_rsyncd/manifest: {'rule': '-A RH-Firewall-1-INPUT -p tcp --dport 873 -j ACCEPT'} -ERROR: Command failed: /bin/sh -e /home/users/nico/privat/firmen/local.ch/vcs/cdist/conf/type/__localch_rsyncd/manifest -INFO: monitoring02: Running manifest and explorers for __file/etc/iptables.d/500_xensnmp -INFO: monitoring02: Running manifest and explorers for __file/etc/iptables.d/995_end -INFO: monitoring02: Running manifest and explorers for __file/etc/rsyncd.conf -INFO: monitoring02: Running manifest and explorers for __file/etc/yum.repos.d/epel.repo -INFO: monitoring02: Running manifest and explorers for __file/etc/yum.repos.d/rpmforge.repo -INFO: monitoring02: Running manifest and explorers for __file/usr/sbin/iptables-rebuild -INFO: monitoring02: Running manifest and explorers for __git/opt/local.ch/sys/shinken/shinken -INFO: monitoring02: Running manifest and explorers for __localch_rsyncd/singleton -ERROR: Object __localch_iptables/xensnmp already exists with conflicting parameters: -/home/users/nico/privat/firmen/local.ch/vcs/cdist/conf/manifest/init: {'rule': '-A RH-Firewall-1-INPUT -p tcp --dport 161 -j ACCEPT'} -/home/users/nico/privat/firmen/local.ch/vcs/cdist/conf/type/__localch_rsyncd/manifest: {'rule': '-A RH-Firewall-1-INPUT -p tcp --dport 873 -j ACCEPT'} -ERROR: Command failed: /bin/sh -e /home/users/nico/privat/firmen/local.ch/vcs/cdist/conf/type/__localch_rsyncd/manifest -INFO: Total processing time for 2 host(s): 14.245397090911865 -[16:53] brief:cdist% diff --git a/docs/dev/logs/2012-05-23.urls b/docs/dev/logs/2012-05-23.urls deleted file mode 100644 index e37407b3..00000000 --- a/docs/dev/logs/2012-05-23.urls +++ /dev/null @@ -1,5 +0,0 @@ -http://nu-ex.com/cv.html - -https://lists.metalab.at/pipermail/devops/2012-January/000089.html - -http://www.ir0nik.com/wordpress/?p=121 diff --git a/docs/dev/logs/2012-05-24.makedirs.py-python3.1 b/docs/dev/logs/2012-05-24.makedirs.py-python3.1 deleted file mode 100644 index 5ad82b29..00000000 --- a/docs/dev/logs/2012-05-24.makedirs.py-python3.1 +++ /dev/null @@ -1,27 +0,0 @@ -# From curl http://armstrong.cc/~steven/tmp/makedirs.py: - -#!/usr/bin/env python2 - -import os - -def makedirs(path, mode=0o777, exist_ok=False): - try: - os.makedirs(path, mode=mode, exist_ok=exist_ok) - except TypeError: - try: - os.makedirs(path, mode=mode) - except OSError as e: - if exist_ok and e.errno == 17: # File exists - pass - else: - raise - - -makedirs('/tmp/python/makedirs') - -try: - makedirs('/tmp/python/makedirs') -except OSError as e: - print(e) - -makedirs('/tmp/python/makedirs', exist_ok=True) diff --git a/docs/dev/logs/2012-05-24.preos b/docs/dev/logs/2012-05-24.preos deleted file mode 100644 index e4f988a7..00000000 --- a/docs/dev/logs/2012-05-24.preos +++ /dev/null @@ -1,72 +0,0 @@ -Todo for preos: - -get debian installer (?) - x86, amd64 -configure sshd - add authorized_keys -output files - tftp: cuni: curl -s "http://http.us.debian.org/debian/dists/$version/main/installer-$arch/current/images/netboot/netboot.tar.gz" | tar xz - iso - - -http://wiki.debian.org/DebianInstaller/ --------------------------------------------------------------------------------- -debootstrap: - [19:33] brief:hack% sudo debootstrap squeeze ./debian-squeeze - [19:30] brief:hack# du -sh . - 213M . - -install kernel - [19:35] brief:hack# chroot debian-squeeze/ apt-get -y install linux-image-amd64 - [19:37] brief:debian-squeeze# ls boot/initrd* - boot/initrd.img-2.6.32-5-amd64 - [19:37] brief:debian-squeeze# ls boot/vmlinuz* - boot/vmlinuz-2.6.32-5-amd64 - -install sshd - [19:37] brief:hack# chroot debian-squeeze/ apt-get -y --force-yes install openssh-server - - - connect back? - - generate sshd keys? - --------------------------------------------------------------------------------- -initramfs: - find . -print0 | bsdcpio $( (( QUIET )) && echo '--quiet' ) -R 0:0 -0oH newc | $COMPRESSION $COMPRESSION_OPTIONS > "$IMGPATH" - - /init for booting - find . -print0 | cpio --null -ov --format=newc | gzip -9 > /boot/my-initramfs.cpio.gz - cpio -H newc -o - find . | cpio -H newc -o > ../initramfs.cpio # <-- this is the actual initramfs - - -[19:39] brief:debian-squeeze# find . | bsdcpio -H newc -o > ../initramfs.cpio -[19:43] brief:debian-squeeze# xz ../initramfs.cpio - - --------------------------------------------------------------------------------- -cdrom: - http://tldp.org/HOWTO/Bootdisk-HOWTO/cd-roms.html - --------------------------------------------------------------------------------- - -[19:34] brief:hack# chroot debian-squeeze/ apt-cache search kernel | grep linux-image -linux-image-2.6.32-5-amd64-dbg - Debugging infos for Linux 2.6.32-5-amd64 -linux-image-2.6.32-5-amd64 - Linux 2.6.32 for 64-bit PCs -linux-image-2.6.32-5-openvz-amd64-dbg - Debugging infos for Linux 2.6.32-5-openvz-amd64 -linux-image-2.6.32-5-openvz-amd64 - Linux 2.6.32 for 64-bit PCs, OpenVZ support -linux-image-2.6.32-5-vserver-amd64-dbg - Debugging infos for Linux 2.6.32-5-vserver-amd64 -linux-image-2.6.32-5-vserver-amd64 - Linux 2.6.32 for 64-bit PCs, Linux-VServer support -linux-image-2.6.32-5-xen-amd64-dbg - Debugging infos for Linux 2.6.32-5-xen-amd64 -linux-image-2.6.32-5-xen-amd64 - Linux 2.6.32 for 64-bit PCs, Xen dom0 support -linux-image-2.6-amd64 - Linux 2.6 for 64-bit PCs (meta-package) -linux-image-2.6-openvz-amd64 - Linux 2.6 for 64-bit PCs (meta-package), OpenVZ support -linux-image-2.6-vserver-amd64 - Linux 2.6 for 64-bit PCs (meta-package), Linux-VServer support -linux-image-2.6-xen-amd64 - Linux 2.6 for 64-bit PCs (meta-package), Xen dom0 support -linux-image-amd64 - Linux for 64-bit PCs (meta-package) -linux-image-openvz-amd64 - Linux for 64-bit PCs (meta-package), OpenVZ support -linux-image-vserver-amd64 - Linux for 64-bit PCs (meta-package), Linux-VServer support -linux-image-xen-amd64 - Linux for 64-bit PCs (meta-package), Xen dom0 support -[19:34] brief:hack# - --------------------------------------------------------------------------------- - diff --git a/docs/dev/logs/2012-05-30.ifconfig-outputs b/docs/dev/logs/2012-05-30.ifconfig-outputs deleted file mode 100644 index c314cce8..00000000 --- a/docs/dev/logs/2012-05-30.ifconfig-outputs +++ /dev/null @@ -1,177 +0,0 @@ -Here are some "ifconfig -a" outputs that help for the explorer/ifaces parser. - -The current regexp is 's/^(.*)(:[[:space:]]*flags=|Link encap).*/\1/p' - - -You should get the interface list when you run: - - ifconfig -a | sed -n -r 's/^(.*)(:[[:space:]]*flags=|Link encap).*/\1/p' - -If you don't maybe try to replace the sed -r option by -E (works on Darwin). - - -If you still don't get any output, the regexp might be wrong. - - - -On Archlinux: ---8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<-- -lo: flags=73 mtu 16436 metric 1 - inet 127.0.0.1 netmask 255.0.0.0 - inet6 ::1 prefixlen 128 scopeid 0x10 - loop txqueuelen 0 (Local Loopback) - RX packets 300081 bytes 49637437 (47.3 MiB) - RX errors 0 dropped 0 overruns 0 frame 0 - TX packets 300081 bytes 49637437 (47.3 MiB) - TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 - -wlan0: flags=4163 mtu 1500 metric 1 - inet 192.168.1.38 netmask 255.255.255.0 broadcast 192.168.1.255 - inet6 fe80::ba8d:12ff:fe15:fdfa prefixlen 64 scopeid 0x20 - ether b8:8d:12:15:fd:fa txqueuelen 1000 (Ethernet) - RX packets 421381 bytes 442228597 (421.7 MiB) - RX errors 0 dropped 0 overruns 0 frame 0 - TX packets 319266 bytes 41111233 (39.2 MiB) - TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 ---8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<-- - -On Debian Linux: ---8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<-- -eth0 Link encap:Ethernet HWaddr 00:16:17:55:2d:00 - inet addr:172.16.5.2 Bcast:172.16.255.255 Mask:255.255.0.0 - inet6 addr: fe80::216:17ff:fe55:2d00/64 Scope:Link - UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 - RX packets:2854022168 errors:5 dropped:0 overruns:0 frame:4 - TX packets:2200088072 errors:0 dropped:0 overruns:0 carrier:0 - collisions:0 txqueuelen:1000 - RX bytes:2708386800354 (2.4 TiB) TX bytes:531552070314 (495.0 GiB) - Base address:0x3000 Memory:d0120000-d0140000 - -eth0:1 Link encap:Ethernet HWaddr 00:16:17:55:2d:00 - inet addr:172.16.5.1 Bcast:172.16.255.255 Mask:255.255.0.0 - UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 - Base address:0x3000 Memory:d0120000-d0140000 - -lo Link encap:Local Loopback - inet addr:127.0.0.1 Mask:255.0.0.0 - inet6 addr: ::1/128 Scope:Host - UP LOOPBACK RUNNING MTU:16436 Metric:1 - RX packets:36487087 errors:0 dropped:0 overruns:0 frame:0 - TX packets:36487087 errors:0 dropped:0 overruns:0 carrier:0 - collisions:0 txqueuelen:0 - RX bytes:3388870184 (3.1 GiB) TX bytes:3388870184 (3.1 GiB) - -sit0 Link encap:IPv6-in-IPv4 - NOARP MTU:1480 Metric:1 - RX packets:0 errors:0 dropped:0 overruns:0 frame:0 - TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 - collisions:0 txqueuelen:0 - RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) - -tap0 Link encap:Ethernet HWaddr 16:db:17:fb:a1:4a - inet addr:10.254.0.1 Bcast:10.254.255.255 Mask:255.255.0.0 - inet6 addr: fe80::14db:17ff:fefb:a14a/64 Scope:Link - UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 - RX packets:0 errors:0 dropped:0 overruns:0 frame:0 - TX packets:6 errors:0 dropped:0 overruns:0 carrier:0 - collisions:0 txqueuelen:100 - RX bytes:0 (0.0 B) TX bytes:468 (468.0 B) - -bond0 Link encap:Ethernet HWaddr 00:13:72:3c:bf:57 - inet6 addr: fe80::213:72ff:fe3c:bf57/64 Scope:Link - UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1 - RX packets:6930494799 errors:0 dropped:38584515 overruns:0 frame:17 - TX packets:1678579772 errors:0 dropped:0 overruns:0 carrier:0 - collisions:0 txqueuelen:0 - RX bytes:10006832472618 (9.1 TiB) TX bytes:168031719693 (156.4 GiB) - -bond0.123 Link encap:Ethernet HWaddr 00:13:72:3c:bf:57 - inet addr:10.73.38.250 Bcast:10.73.38.255 Mask:255.255.255.0 - inet6 addr: fe80::213:72ff:fe3c:bf57/64 Scope:Link - UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 - RX packets:12382478 errors:0 dropped:5777 overruns:0 frame:0 - TX packets:564 errors:0 dropped:0 overruns:0 carrier:0 - collisions:0 txqueuelen:0 - RX bytes:586071334 (558.9 MiB) TX bytes:64180 (62.6 KiB) - -tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 - inet addr:172.31.255.9 P-t-P:172.31.255.10 Mask:255.255.255.255 - UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1 - RX packets:9655 errors:0 dropped:0 overruns:0 frame:0 - TX packets:15118 errors:0 dropped:0 overruns:0 carrier:0 - collisions:0 txqueuelen:100 - RX bytes:1760236 (1.6 MiB) TX bytes:14929984 (14.2 MiB) ---8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<-- - -On OpenBSD: ---8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<-- -lo0: flags=8049 mtu 33160 - priority: 0 - groups: lo - inet6 ::1 prefixlen 128 - inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3 - inet 127.0.0.1 netmask 0xff000000 -em0: flags=8843 mtu 1500 - lladdr 00:50:56:b3:00:15 - priority: 0 - groups: egress - media: Ethernet autoselect (1000baseT full-duplex,master) - status: active - inet6 XXXX::XXX:XXXX:XXXX:XX%em0 prefixlen 64 scopeid 0x1 - inet6 XXXX:XXX:XXX:XX::XXX prefixlen 64 - inet XXX.XXX.XXX.XXX netmask 0xffffffc0 broadcast XXX.XXX.XXX.XXX -enc0: flags=0<> - priority: 0 - groups: enc - status: active -pflog0: flags=141 mtu 33160 - priority: 0 - groups: pflog -tun1: flags=8051 mtu 1500 - priority: 0 - groups: tun - status: active - inet 172.31.255.13 --> 172.31.255.14 netmask 0xffffffff -tun2: flags=8011 mtu 1500 - priority: 0 - groups: tun - status: down - inet 172.31.253.1 --> 172.31.253.2 netmask 0xffffffff -tun0: flags=8051 mtu 1500 - priority: 0 - groups: tun - status: active - inet 172.31.254.1 --> 172.31.254.2 netmask 0xffffffff ---8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<-- - -On Darwin: ---8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<-- -lo0: flags=8049 mtu 16384 - inet6 ::1 prefixlen 128 - inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 - inet 127.0.0.1 netmask 0xff000000 -gif0: flags=8010 mtu 1280 -stf0: flags=0<> mtu 1280 -en0: flags=8863 mtu 1500 - ether 34:15:9e:2e:8b:aa - inet6 fe80::3615:9eff:fe2e:8baa%en0 prefixlen 64 scopeid 0x4 - inet 192.168.1.102 netmask 0xffffff00 broadcast 192.168.1.255 - media: autoselect (100baseTX ) - status: active -en1: flags=8863 mtu 1500 - ether 7c:6d:62:a3:6f:57 - inet6 fe80::7e6d:62ff:fea3:6f57%en1 prefixlen 64 scopeid 0x5 - inet 192.168.2.105 netmask 0xffffff00 broadcast 192.168.2.255 - media: autoselect - status: active -fw0: flags=8863 mtu 4078 - lladdr 34:15:9e:ff:fe:2e:8b:aa - media: autoselect - status: inactive -tun0: flags=8851 mtu 1500 - inet 172.31.255.29 --> 172.31.255.30 netmask 0xffffffff - open (pid 24727) -tun1: flags=8851 mtu 1500 - inet 172.31.254.25 --> 172.31.254.26 netmask 0xffffffff - open (pid 24757) ---8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<-- diff --git a/docs/dev/logs/2012-05-31.csh-compatibilty b/docs/dev/logs/2012-05-31.csh-compatibilty deleted file mode 100644 index b653a826..00000000 --- a/docs/dev/logs/2012-05-31.csh-compatibilty +++ /dev/null @@ -1,10 +0,0 @@ -If root's shell is csh or other non-sh compatible, we have problems. -See https://github.com/telmich/cdist/issues/54. - -Stuff to try out: - - - "-o SendEnv name" [may break remote exec/copy] - - cat * | /bin/sh -s could also work, needs testing though - -Somebody who is affected should give this a try, especially the 2nd -variant. diff --git a/docs/dev/logs/2012-06-06.wikipedia b/docs/dev/logs/2012-06-06.wikipedia deleted file mode 100644 index a9654f1b..00000000 --- a/docs/dev/logs/2012-06-06.wikipedia +++ /dev/null @@ -1,134 +0,0 @@ -{{db-spam}} -{{Infobox software -|name = cdist -|logo = -|screenshot = -|caption = -|collapsible = -|author = Nico Schottelius, Steven Armstrong -|developer = -|released = 2010 -|latest release version = 2.0.13 -|latest release date = 05-Jun-2012 -|frequently updated = -|programming language = [[Python_(programming_language)|Python]], [[Bourne shell]] -|operating system = [[GNU/Linux]], [[Unix-like]] -|platform = -|size = -|language = -|status = -|genre = [[Configuration management]] -|license = [[GPLv3]]. -|website = http://www.nico.schottelius.org/software/cdist/ -}} - -'''cdist''' is a configuration management system, which adheres to the [[KISS_principle]]. It is being used in small up to enterprise grade environments. -cdist is an alternative to other configuration management systems [[CFEngine]], [[Bcfg2]], [[Chef (software)|Chef]] and [[Puppet (software)|Puppet]]. -cdist development started in 2010 at [[ETH Zurich]] and is actively being developed by a lot of [[FOSS]] contributors -and maintained by the two main developers Nico Schottelius and -Steven Armstrong. cdist is being watched on github by more than 100 people and has more than 30 forks.cdist development at https://github.com/telmich/cdist -The major part of the discussion about cdist happens on the mailinglistcdist mailinglist http://l.schottelius.org/mailman/listinfo/cdist -and on the IRC channel #cstar in the [[Freenode]] network. cdist is being used at various companies in Switzerland (for instance at [[ETH Zurich]]), the USA, Germany and France. - - -Its core is written in [[Python (programming language)|Python]] and the types are -written in [[Bourne Shell]]. Cdist is released under the [[GNU General Public License|GPL]]. -cdist has been a no. 1 topic on [[Hacker News]] for some time.cdist on [[Hacker News]] https://news.ycombinator.com/item?id=3422678 - - -== Architecture == - -cdist is split into two components: - -* The core -* The configuration - -=== Core === - -The core of cdist is implemented in Python 3 and provides the executables to configure target hosts. The core operates in a push model: It connects -from the source host '''to''' the target hosts and configures the machines. For communication and file transfer [[SSH]] is being used. -To allow parallel configuration of hosts, the core supports a parallel mode in which it creates a child process for every connection. -This model allows cdist to scale horizontally with the available computing resources: If at a certain limit is reached and the capacity of the -available CPUs has been used, adding another CPU or distributing cdist to multiple hosts allows to configure more hosts in parallel. - -=== Configuration === - -The configuration is written in [[Bourne Shell]] and consists of - -* The initial manifest (which defines which host is assigned which types) -* Global Explorers (to gain information about the target system) -* Types (which provide all functionality and consist of a manifest, type explorers and gencode scripts) - -Although all of these are written in Shell script, the order of execution in the manifests does not matter: cdist employs a idempotent -configuration. - -=== Comparison === - -In comparison to most other configuration management software, cdist does not have any requirements on the target host besides SSH and a bourne shell. -It requires Python 3.2 on the source host, though.Why cdist requires Python 3.2 on the source host - http://www.nico.schottelius.org/blog/cdist-python-3.2-requirement/ -cdist operates in push based approach, in which a server pushes configurations to the client and the clients do not poll for updates. - -== Configuration DSL == - -All user configurable parts are contained in manifests or gencode-scripts, which are shell scripts. -Shell scripts were chosen, because Unix System Administrators are usually profound in reading -and writing shell scripts. - -cdist reads its configuration from the initial manifest ('''conf/manifest/init'''), in which hosts are mapped to -types: - -
-case "$__target_host" in
-    myhostname)
-        __package zsh --state present
-        __addifnosuchline /tmp/cdist-welcome --line "Welcome to cdist"
-    ;;
-esac
-
- -When using the types in cdist, they are called like normal programs in manifests and can make use of -advanced parameter parsing as well as reading from stdin: - -
-# Provide a default file, but let the user change it
-__file /home/frodo/.bashrc --source "/etc/skel/.bashrc" \
-   --state exists \
-   --owner frodo --mode 0600
-
-# Take file content from stdin
-__file /tmp/whatever --owner root --group root --mode 644 --source - << DONE
-Here goes the content for /tmp/whatever
-DONE
-
- -Dependencies are expressed by setting up the '''require''' environment variable: -
-      __directory /tmp/foobar
-      require="__directory//tmp/foobar" __file /tmp/foobar/baz
-
- -Access to paths and files within types is given by environment variables like $__object. - - -== See also == -{{Portal|Free software}} -* [[Comparison of open source configuration management software]] - -== References == -{{reflist}} - -== External links == -* [http://www.nico.schottelius.org/software/cdist/ cdist Website] -* [https://github.com/telmich/cdist Github home] -* [http://l.schottelius.org/mailman/listinfo/cdist cdist mailinglist] -* [https://freecode.com/projects/cdist cdist on freecode] - - -[[Category:Configuration management]] -[[Category:Free software programmed in Python]] -[[Category:2010 software]] -[[Category:Linux configuration utilities]] -[[Category:Mac OS X]] -[[Category:Linux package management-related software]] -[[Category:Unix package management-related software]] - diff --git a/docs/dev/logs/2012-06-15.explorer-dep-problem b/docs/dev/logs/2012-06-15.explorer-dep-problem deleted file mode 100644 index 30803032..00000000 --- a/docs/dev/logs/2012-06-15.explorer-dep-problem +++ /dev/null @@ -1,4 +0,0 @@ -Known bug rediscovered: - Explorer for __start_on_boot mysql runs before __package mysql was finished. - -Requires two runs to actually finish the task. diff --git a/docs/dev/logs/2012-09-03.dep-ideas.xoj b/docs/dev/logs/2012-09-03.dep-ideas.xoj deleted file mode 100644 index b2ab927e..00000000 Binary files a/docs/dev/logs/2012-09-03.dep-ideas.xoj and /dev/null differ diff --git a/docs/dev/logs/2012-10-17.conflicting-types-problem b/docs/dev/logs/2012-10-17.conflicting-types-problem deleted file mode 100644 index 5f35ddf7..00000000 --- a/docs/dev/logs/2012-10-17.conflicting-types-problem +++ /dev/null @@ -1,27 +0,0 @@ -Seen error: - -INFO: dns-vm-inx01: Generating and executing code for __package/bind-chroot -INFO: dns-vm-inx01: Generating and executing code for __directory/var/named -INFO: dns-vm-snr01: Running manifest and explorers for __directory/opt/local.ch/sys/icinga/conf.d -INFO: dns-vm-inx02: Running manifest and explorers for __directory/opt/local.ch/sys -mkdir: cannot create directory `/var/named': File exists -ERROR: Command failed: ssh -o User=root -q dns-vm-inx01 umask 077; /bin/sh -e /var/lib/cdist/object/__directory/var/named/.cdist/code-remote -INFO: dns-vm-snr01: Running manifest and explorers for __directory/opt/local.ch/web -INFO: dns-vm-inx02: Running manifest and explorers for __directory/opt/local.ch/sys/bin -INFO: dns-vm-snr02: Running manifest and explorers for __directory/opt/local.ch/web - - -Problem source: - -__directory/var/named explorer detects that the directory is missing -__package/named gencode-remote installs package, which creates directory -__directory/var/named gencode-remote outputs mkdir - -Solutions: - - - don't use __directory, because __package does already the job (clean solution) - - re-run explorer before gencode-* stage - - gencode-remote would have caught that - -Not sure yet - although the latter feature has been requested, the first -solution looks better (more clean) to this problem. diff --git a/docs/dev/logs/2012-10-25.version-split b/docs/dev/logs/2012-10-25.version-split deleted file mode 100644 index f381c48f..00000000 --- a/docs/dev/logs/2012-10-25.version-split +++ /dev/null @@ -1,4 +0,0 @@ -x store version in .version -x when distributed / packaged, include .version into sourcecode - split into two files -x when in git checkout, use dynamic versioning diff --git a/docs/dev/logs/2012-10-29.installed_paths b/docs/dev/logs/2012-10-29.installed_paths deleted file mode 100644 index 3587390e..00000000 --- a/docs/dev/logs/2012-10-29.installed_paths +++ /dev/null @@ -1,34 +0,0 @@ - -Installed paths: (read first) - os.path.dirname(cdist.__file__) - - /conf/explorer - /conf/type - -User paths: (read after, overwrite)? - - $HOME/.cdist - - /explorer - /type - - /manifest - - /cache - -Additional paths: - - CDIST_EXPLORER_EXTRA_PATH=... - CDIST_TYPE_EXTRA_PATH=... - - or - - -c dir -c dir2 -c ... => - add types and explorer from those directories - last one wins? - because they can only be appended to existing "$PATH" - -Open questions: - - - How to tell types to use global explorer? - - How to tell types to find other types? diff --git a/docs/dev/logs/2012-10-30.path-for-types-and-global-explorer-implementation b/docs/dev/logs/2012-10-30.path-for-types-and-global-explorer-implementation deleted file mode 100644 index 8a683a40..00000000 --- a/docs/dev/logs/2012-10-30.path-for-types-and-global-explorer-implementation +++ /dev/null @@ -1,8 +0,0 @@ -- Allow list of base directories, which may contain explorer/ or type/ subdirectories - - can use the existing -c parameter, only allow it to be specified multiple times -- for each directory, link the given explorer and types to a temporary conf/ directory - similar to bin/ -- last one wins strategy - - what is expected by the user - - diff --git a/docs/dev/logs/2012-11-02.cdist-vs-centralised-development.xoj b/docs/dev/logs/2012-11-02.cdist-vs-centralised-development.xoj deleted file mode 100644 index 56303893..00000000 Binary files a/docs/dev/logs/2012-11-02.cdist-vs-centralised-development.xoj and /dev/null differ diff --git a/docs/dev/logs/2012-11-02.migration_to_2.1 b/docs/dev/logs/2012-11-02.migration_to_2.1 deleted file mode 100644 index 6c736a5c..00000000 --- a/docs/dev/logs/2012-11-02.migration_to_2.1 +++ /dev/null @@ -1,47 +0,0 @@ -create a new branch to ensure nothing breaks - - % git checkout -b 2.1_merge - -fetch latest upstream changes (change origin if you use another -remote name for upstream cdist) - - % git fetch -v origin - -Now try to merge upstream into the new branch. - - - % git merge origin/2.1 - -fix any conflicts that may have been occurred due to local changes -and then **git add** and *git commit** those changes. - -As the types have a new location, **cdist/conf/** now, you have to move -your own types there as well: - - % git mv conf/type/* cdist/conf/ - -The manifest location also changed, so move this one as well: - - % git mv conf/manifest/* cdist/conf/manifest/ - -Use **git status** to review the changes and ensure they -are in the git database: - - % git commit -m "Move types and manifests for 2.1 migration" - -This should be everything necessary for a 2.1 migration. Test the result -by running cdist on one of your staging hosts: - - % ./bin/cdist config -v staging-host - - -You can now cleanup the empty conf/ directory: - - % rmdir conf/* && rmdir conf - - - --------------------------------------------------------------------------------- - -Boolean parameter introduced: - __directory /path/to --parents yes => __directory /path/to --parents diff --git a/docs/dev/logs/2012-11-15.cdist-sexy-interaction.svg b/docs/dev/logs/2012-11-15.cdist-sexy-interaction.svg deleted file mode 100644 index 788de83c..00000000 --- a/docs/dev/logs/2012-11-15.cdist-sexy-interaction.svg +++ /dev/null @@ -1,282 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - cdist - - - - configures hosts - - - - - sexy - - - - - - manages inventory - - - - - - installs hosts(missing) - - - - interact - - - - - - - - visualises inventory(missing) - - - - - - diff --git a/docs/dev/logs/2012-11-18.problematic-side-effects b/docs/dev/logs/2012-11-18.problematic-side-effects deleted file mode 100644 index 032a9f80..00000000 --- a/docs/dev/logs/2012-11-18.problematic-side-effects +++ /dev/null @@ -1,22 +0,0 @@ -- Problem: Installing xbmc package creates user xbmc. -As xbmc is the first user, it gets the uid 1000. - -Later on trying to create the user "nutzer" with uid 1000 fails, because -xbmc already has that uid. - - -INFO: matte: Generating and executing code for __package/upower -INFO: matte: Generating and executing code for __nico_managed_desktop/singleton -ln -s '/usr/lib/systemd/system/slim.service' '/etc/systemd/system/display-manager.service' -INFO: matte: Generating and executing code for __directory/etc/sudoers.d -INFO: matte: Generating and executing code for __file/etc/sudoers.d/nico -INFO: matte: Generating and executing code for __cdistmarker/singleton -INFO: matte: Generating and executing code for __package_pacman/sudo -INFO: matte: Generating and executing code for __package/sudo -INFO: matte: Generating and executing code for __package_pacman/xf86-video-intel -INFO: matte: Generating and executing code for __user/nutzer -useradd: UID 1000 is not unique -ERROR: matte: Command failed: ssh -o User=root -q matte umask 077; /bin/sh -e /var/lib/cdist/object/__user/nutzer/.cdist/code-remote -INFO: Total processing time for 1 host(s): 3512.761916399002 -ERROR: Failed to deploy to the following hosts: matte -[17:40] brief:nico% ./bin/cdist config -v matte diff --git a/docs/dev/logs/2012-11-21.idea-shell-testing b/docs/dev/logs/2012-11-21.idea-shell-testing deleted file mode 100644 index 2a657053..00000000 --- a/docs/dev/logs/2012-11-21.idea-shell-testing +++ /dev/null @@ -1,3 +0,0 @@ -Use roundup for testing included types? - - http://bmizerany.github.com/roundup/ diff --git a/docs/dev/logs/2012-11-21.roadmap-proposal b/docs/dev/logs/2012-11-21.roadmap-proposal deleted file mode 100644 index cd60ffe6..00000000 --- a/docs/dev/logs/2012-11-21.roadmap-proposal +++ /dev/null @@ -1,6 +0,0 @@ -Target version proposed date features -2.1. 2012-12-01 initial support for before/after requirements -2.2. 2013-03-01 initial notifications support, - replace require="" with before/after -2.3. 2013-06-01 installation support: pre-os and install types -2.4. 2013-09-01 performance speedup via parallelisation diff --git a/docs/dev/logs/2012-12-11.dependencies b/docs/dev/logs/2012-12-11.dependencies deleted file mode 100644 index 1c0adad8..00000000 --- a/docs/dev/logs/2012-12-11.dependencies +++ /dev/null @@ -1,139 +0,0 @@ -2.1.0 behaviour: - - -__git foo - __package git --state present - -__git bar - __package git --state present - - -require="__git/foo" __git bar: - - __git bar - __git foo - __package git --state present - __package git --state present - __git foo <---| - __package git --state present ---| - - -> detects circular dependency - --------------------------------------------------------------------------------- - -require="__apt_repository/somewhere-where-you-can-find-package-git __git/foo" __git bar - - __git bar - __apt_repository somewhere-where-you-can-find-package-git - - __git foo - __package git --state present - __package_apt git depends nachher auf __apt_repository - __package git --state present - __git foo <---| - __package git --state present ---| - __apt_repository somewhere-where-you-can-find-package-git - -possible solutions: - - __package git does not depend on __git foo (clear dependency) - - because it DOES NOT depend on it! - - but we don't know whether this is always true :-/ - - multiple instances of __package git exist, with - - different required BY - - different requirements - - define non inheritent dependencies (?) - - because __git bar really depends only on __git foo - - proposal: introduce require_non_recursive and require_recursive (previously: require) - - recording the source of the dependency and use it to assist resolving (?) - __package git: - inherited require: __git foo von __git bar - __git foo: - inherited autorequire: __package git durch Nutzung - - break out circular references (?) - - if either of both parties is only locked by the other, allow execution of this one? - --------------------------------------------------------------------------------- - -__package foo - __package_apt foo - -__package bar - __package_apt bar - -require="__package/foo" __package bar - - __package bar - __package foo - __package_apt foo - __package_apt bar - __package foo - - --------------------------------------------------------------------------------- - -__type1 var1 - __type2 FIX - -__type1 var2 - __type2 FIX - - --------------------------------------------------------------------------------- -facts: - - use is different from require="", as use makes USED depend on parent deps - - use = called/defined in the manifest of a type - - it is currently not recorded, where an object gained its requirements and autorequirements --------------------------------------------------------------------------------- -requirements: - - a type should be a black box: - I can require an object and it is ensured, - everything it needs is executed before me. - --------------------------------------------------------------------------------- -possible implementations -- requiring it should include everything it USES --------------------------------------------------------------------------------- -solutions: - __type1 DEPENDS but does not use __type2 FIX - - --------------------------------------------------------------------------------- - -Change proposal: - -Each object only depends on the objects it directly requires, tree build to -ensure correct running behaviour: - - -__git bar - __git foo - __package git --state present - -__git foo - __package git --state present - -Order: - -1) - __package/git (leaf node!) - -2) - __git/foo (new leaf node!) - -3) - __git/bar (new leaf node!) - - -For __package: - -__sometype bar - __package foo - -__package foo - __package_apt foo - -1) __package_apt/foo (leaf node) - -2) __package/foo (new leaf node) - -3) __sometype/bar (new leaf node) diff --git a/docs/dev/logs/2013-01-03.dependencies-visualised.xoj b/docs/dev/logs/2013-01-03.dependencies-visualised.xoj deleted file mode 100644 index 715d2583..00000000 Binary files a/docs/dev/logs/2013-01-03.dependencies-visualised.xoj and /dev/null differ diff --git a/docs/dev/logs/2013-01-03.dependency-issue b/docs/dev/logs/2013-01-03.dependency-issue deleted file mode 100644 index 91db9425..00000000 --- a/docs/dev/logs/2013-01-03.dependency-issue +++ /dev/null @@ -1,27 +0,0 @@ - -Problem shown by using __rbenv: - -__rbenv/nicotest - __git /home/nico/.rbenv - __package git - __directory /home/nico/.rbenv - - require="__git/home/nico/.rbenv" - __git /home/nico/.rbenv/plugins/ruby-build - __package git - __directory /home/nico/.rbenv/plugins/ruby-build - - -1) if children do NOT automatically depend on their parents requiremnts - - __directory /home/nico/.rbenv/plugins/ruby-build fails: - because __directory /home/nico/.rbenv/plugins is created by - __git /home/nico/.rbenv, but __directory /home/nico/.rbenv/plugins/ruby-build - does not depend on __git /home/nico/.rbenv - -2) if children DO automatically depend on their parents requiremnts - __package git from __git /home/nico/.rbenv/plugins/ruby-build depends on __git /home/nico/.rbenv. - - __git /home/nico/.rbenv depends on __package git (via autorequire) - - => circular dependency, they depend on each other diff --git a/docs/dev/logs/2013-01-20.notifications b/docs/dev/logs/2013-01-20.notifications deleted file mode 100644 index be326196..00000000 --- a/docs/dev/logs/2013-01-20.notifications +++ /dev/null @@ -1,20 +0,0 @@ -Allow cross-type communication - -Sending notifications is possible from - - - manifest - - gencode-local - - gencode-remote - -Sending a notification from an object means writing to the file "notifications" into -its object: - - echo mytest >> "$__object/notifications" # a type reports something - -Reading / Reacting on notifications works by accessing the file -referred to be "$__notifications". All notifications are prefixed with -the object name ($__object_name) and are appended into this file. - -To find out, whether a file was copied, run: - - grep __file/etc/passwd:copy "$__notifications" diff --git a/docs/dev/logs/2013-01-20.triggers b/docs/dev/logs/2013-01-20.triggers deleted file mode 100644 index dc13c746..00000000 --- a/docs/dev/logs/2013-01-20.triggers +++ /dev/null @@ -1,49 +0,0 @@ -An alternative / complementary approach to notifications: triggers (or actions?) - -A type may support various actions by creating files in its subdirectory -"actions". Other types can trigger an action of a different type or object -by calling them (indirectly?): - - -if grep "__file/etc/nginx/conf.d/.*:copy" "$__notifications"; then - - # Call action from a type - cdist trigger __nginx/reload -fi - - -Not sure whether this approach (calling "actions" of other types) is sane, -as nginx should probably better know if it should be restarted "itself". - - --------------------------------------------------------------------------------- - -Alternate approach: - -__nginx_vhost www.some-domain.ch --custom << eof -some custom code for __nginx_vhost inclusion -eof - -__nginx_vhost: - - manifest: - # __nginx_vhost requires __nginx: creates directories - - require"$__object_name" __nginx --require-only - - # Do WE or __file ... depend on nginx? - cdist require __nginx - - # Create file that contains the giving code - __file /etc/nginx/conf.d/www.some-domain.ch - - require="__nginx" __file /etc/nginx/conf.d/www.some-domain.ch - -__nginx: - manifest: - __package nginx --state present - - __file some-custom-files - - gencode-remote: - if first_install or file changed: diff --git a/docs/dev/logs/2013-02-05.debugging-wrong-singleton-type-parameter b/docs/dev/logs/2013-02-05.debugging-wrong-singleton-type-parameter deleted file mode 100644 index 5169b678..00000000 --- a/docs/dev/logs/2013-02-05.debugging-wrong-singleton-type-parameter +++ /dev/null @@ -1,34 +0,0 @@ -Traceback (most recent call last): - File "/home/users/nico/p/cdist/cdist/bin/../scripts/cdist", line 230, in - commandline() - File "/home/users/nico/p/cdist/cdist/bin/../scripts/cdist", line 104, in commandline - args.func(args) - File "/home/users/nico/p/cdist/cdist/bin/../scripts/cdist", line 107, in config - configinstall(args, mode=cdist.config.Config) - File "/home/users/nico/p/cdist/cdist/bin/../scripts/cdist", line 143, in configinstall - configinstall_onehost(host, args, mode, parallel=False) - File "/home/users/nico/p/cdist/cdist/bin/../scripts/cdist", line 180, in configinstall_onehost - c.deploy_and_cleanup() - File "/home/users/nico/oeffentlich/rechner/projekte/cdist/cdist/cdist/config_install.py", line 74, in deploy_and_cleanup - self.deploy_to() - File "/home/users/nico/oeffentlich/rechner/projekte/cdist/cdist/cdist/config_install.py", line 68, in deploy_to - self.stage_prepare() - File "/home/users/nico/oeffentlich/rechner/projekte/cdist/cdist/cdist/config_install.py", line 91, in stage_prepare - self.context.local.type_path): - File "/home/users/nico/oeffentlich/rechner/projekte/cdist/cdist/cdist/core/cdist_object.py", line 80, in list_objects - yield cls(cdist.core.CdistType(type_base_path, type_name), object_base_path, object_id=object_id) - File "/home/users/nico/oeffentlich/rechner/projekte/cdist/cdist/cdist/core/cdist_object.py", line 65, in __init__ - self.validate_object_id() - File "/home/users/nico/oeffentlich/rechner/projekte/cdist/cdist/cdist/core/cdist_object.py", line 130, in validate_object_id - (self.cdist_type.name, self.parameters)) - File "/home/users/nico/oeffentlich/rechner/projekte/cdist/cdist/cdist/util/fsproperty.py", line 210, in __get__ - return self._get_attribute(instance, owner) - File "/home/users/nico/oeffentlich/rechner/projekte/cdist/cdist/cdist/util/fsproperty.py", line 202, in _get_attribute - path = self._get_path(instance) - File "/home/users/nico/oeffentlich/rechner/projekte/cdist/cdist/cdist/util/fsproperty.py", line 190, in _get_path - path = path(instance) - File "/home/users/nico/oeffentlich/rechner/projekte/cdist/cdist/cdist/core/cdist_object.py", line 192, in - parameters = fsproperty.DirectoryDictProperty(lambda obj: os.path.join(obj.base_path, obj.parameter_path)) -AttributeError: 'CdistObject' object has no attribute 'parameter_path' -[22:37] brief:~% - diff --git a/docs/dev/logs/2013-02-05.weird-notsingleton-type-error b/docs/dev/logs/2013-02-05.weird-notsingleton-type-error deleted file mode 100644 index 23693777..00000000 --- a/docs/dev/logs/2013-02-05.weird-notsingleton-type-error +++ /dev/null @@ -1,15 +0,0 @@ - -Hard to find the source bug/problem: - -DEBUG: solr.petspremium.de: (emulator) __file//etc/solr/solr.xml: Finished __file/etc/solr/solr.xml/.cdist {'mode': '0644', 'source': '/home/users/nico/.tmp/tmpn27s24/out/conf/type/__petspremium_solr/files/solr/solr.xml'} -+ for file in '$(find . -type f | sed '\''s,^./,,'\'')' -+ dfile=/etc/solr/web.xml -+ reqdir=/etc/solr -+ require=__directory/etc/solr -+ __file /etc/solr/web.xml --source /home/users/nico/.tmp/tmpn27s24/out/conf/type/__petspremium_solr/files/solr/web.xml --mode 0644 -DEBUG: solr.petspremium.de: (emulator): /home/users/nico/.tmp/tmpn27s24/out/bin/__file: Namespace(mode='0644', object_id=['/etc/solr/web.xml'], source='/home/users/nico/.tmp/tmpn27s24/out/conf/type/__petspremium_solr/files/solr/web.xml') -DEBUG: solr.petspremium.de: (emulator) __file//etc/solr/web.xml: Recording requirement: __directory/etc/solr -DEBUG: solr.petspremium.de: (emulator) __file//etc/solr/web.xml: Finished __file/etc/solr/web.xml/.cdist {'source': '/home/users/nico/.tmp/tmpn27s24/out/conf/type/__petspremium_solr/files/solr/web.xml', 'mode': '0644'} -ERROR: solr.petspremium.de: Type __directory requires object id (is not a singleton type) -INFO: Total processing time for 1 host(s): 9.756716251373291 -ERROR: Failed to deploy to the following hosts: solr.petspremium.de diff --git a/docs/dev/logs/2013-04-03.dependency-discussion b/docs/dev/logs/2013-04-03.dependency-discussion deleted file mode 100644 index 29b5b5b5..00000000 --- a/docs/dev/logs/2013-04-03.dependency-discussion +++ /dev/null @@ -1,30 +0,0 @@ -Steven, Nico - -Discussion raised due to proposal from Arkaitz Jimenez - --------------------------------------------------------------------------------- - -Proposal changes back to cdist behaviour as of 2011 (see commit 61b7b68). - -Change would introduce: - -- no direct stage based running -- stages only in object (not globally) -- cannot build full dependency list before beginning - - Thus wildcard requirements (require="__file/*") don't work anymore - -Accepting this or similar approaches means: - -- Drop wildcard requirements (is undocumented anyway) -- Type execution is closed (again) - -Furthermore/other points: - -- Change cdist to continue run as long as possible - - Don't stop if an object fails - - Record failure, print at the end (and exit non zero) - -- Logging - - Catch output of manifest, gencode, code, do not display directly - - Print at the end - - Prefix with hostname as usual! diff --git a/docs/dev/logs/2013-04-08.execution-graph.xoj b/docs/dev/logs/2013-04-08.execution-graph.xoj deleted file mode 100644 index 25d48d3b..00000000 Binary files a/docs/dev/logs/2013-04-08.execution-graph.xoj and /dev/null differ diff --git a/docs/dev/logs/2013-04-10.discussion b/docs/dev/logs/2013-04-10.discussion deleted file mode 100644 index 648ed470..00000000 --- a/docs/dev/logs/2013-04-10.discussion +++ /dev/null @@ -1,77 +0,0 @@ -Steven, Nico (ETH office) - -- Try out patch for dependency resolver changing from [nico] - - Add tests - - Cleanup code: - - remove all old resolver parts (including tests!) - - remve wildcard matching pattern code - -- Cache: [nobody] - - Should cache be usable by types? - - Should all run outputs be stored? - - Different caches for install and config - -- Replace fsproperties with cconfig [steven] - -- Maybe support "rerun from previous version (cache)"? [nobody] - - need to include initial manifest(s!) - - copy/link types - - save remote-{exec,copy} parameters (copy or save argument list) - - - cdist replay / oldconfig ? - -- Support diffing two configurations [nobody] - - cdist diff ? - -- Nested Types [both] - - Motivation: - - Put everything related into one directory - - Have a look at it when Arkaitz pushes out pull request - - Implementations: - - 1) Arkaitz - - Folder structure Call Object - __package/ __package abc __package/abc - __package/type/pkg __package.pkg abc __package.pkg/abc - __package/type/pkg/type/green __package.pkg.green abc __package.pkg.green/abc - - ... - - __package.pkg __package.pkg abc __package.pkg/abc - - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - => Need to forbid types with "." in the name! - - 2) Steven (earlier version) - - Folder structure Call Object - __package/.type __package abc __package/abc - __package/pkg/.type __package.pkg abc __package.pkg/abc - __package/pkg/green/.type __package.pkg.green abc __package.pkg.green/abc - - - Clashes: - - if __. and __ and subtype exist both (in both implementations) - -- Install [nobody] - - Merge into master? - - Needs some cleanups - -- PreOS [nobody] - - cdist preos / preos-generate - --output= - --arch=[i386|amd64|arm??] - --type=[usb, cdrom/iso, floppy, pxe] - --other-params (?) - - - Maybe implement using cdist config indirectly and a type __preos - - - Can be: - - Internally only (devs) - - Usable by end users - - - Requirements: - - git - - buildchain - - toolchain for target arch - - ... diff --git a/docs/dev/logs/2013-04-12.execution-order b/docs/dev/logs/2013-04-12.execution-order deleted file mode 100644 index 5100eeda..00000000 --- a/docs/dev/logs/2013-04-12.execution-order +++ /dev/null @@ -1,44 +0,0 @@ -Old: - -- global explores (all) -- initial manifest -- for each object - execute type explorers - execute manifest - - continue until all objects (including newly created) - have their type explorers/manifests run -- build dependency tree -- for each object - execute gencode-* - execute code-* - -New: -- run all global explorers -- run initial manifest - creates zero or more cdist_objects -- for each cdist_object - if not cdist_object.has_unfullfilled_requirements: - execute type explorers - execute manifest - may create new objects, resulting in autorequirements - - # Gained requirements during manifest run - if object.has_auto_requirements(): - continue - - cdist_object.execute gencode-* - cdist_object.execute code-* - - -Requirements / Test cases for requirments / resolver: - - - omnipotence - - - - --------------------------------------------------------------------------------- -ERROR: localhost: The following objects could not be resolved: __cdistmarker/singleton requires autorequires ; __directory/etc/sudoers.d requires autorequires ; __file/etc/sudoers.d/nico requires __directory/etc/sudoers.d autorequires ; __file/etc/motd requires autorequires ; __package_pacman/atop requires autorequires ; __package_pacman/screen requires autorequires ; __package_pacman/strace requires autorequires ; __package_pacman/vim requires autorequires ; __package_pacman/zsh requires autorequires ; __package_pacman/lftp requires autorequires ; __package_pacman/nmap requires autorequires ; __package_pacman/ntp requires autorequires ; __package_pacman/rsync requires autorequires ; __package_pacman/rtorrent requires autorequires ; __package_pacman/wget requires autorequires ; __package_pacman/nload requires autorequires ; __package_pacman/iftop requires autorequires ; __package_pacman/mosh requires autorequires ; __package_pacman/git requires autorequires ; __package_pacman/mercurial requires autorequires ; __package_pacman/netcat requires autorequires ; __package_pacman/python-virtualenv requires autorequires ; __package_pacman/wireshark-cli requires autorequires ; __package_pacman/sudo requires autorequires -INFO: Total processing time for 1 host(s): 32.30426597595215 -ERROR: Failed to deploy to the following hosts: localhost - diff --git a/docs/dev/logs/2013-05-04.ssh b/docs/dev/logs/2013-05-04.ssh deleted file mode 100644 index 176e5b62..00000000 --- a/docs/dev/logs/2013-05-04.ssh +++ /dev/null @@ -1,340 +0,0 @@ -- analysis of ssh connections for callback - SSH_CLIENT='::1 38502 22' - SSH_CONNECTION='::1 38502 ::1 22' - - -> callback possible to source host - - - -[ target host ] <--------------| - | | - | | - | | - | trigger | configuration - | | - v | -[ configuration host ] ----| - - -- dynamic port allocation for tunneling - - [1:37] bento:~% ssh -R 0:localhost:22 localhost - Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts. - Allocated port 53161 for remote forward to localhost:22 - - SSH_AUTH_SOCK=/tmp/ssh-zDCWbUVcUK/agent.30749 - SSH_CLIENT='::1 38587 22' - SSH_CONNECTION='::1 38587 ::1 22' - SSH_TTY=/dev/pts/21 - - -- ssh_config: - DynamicForward - LocalForward - RemoteForward - -- testing - -[1:52] bento:cdist% netstat -anp | grep 56844 -(Not all processes could be identified, non-owned process info - will not be shown, you would have to be root to see it all.) -tcp 0 0 127.0.0.1:56844 0.0.0.0:* LISTEN - -tcp6 0 0 ::1:56844 :::* LISTEN - -[1:53] bento:cdist% - - -[1:48] bento:~% ssh -R 0:localhost:22 localhost -Allocated port 56844 for remote forward to localhost:22 -... - -- chatting - -01:42 -!- Irssi: Join to #openssh was synced in 0 secs -01:42 < telmich> good evening -01:43 < telmich> I am trying to make use of remote port forwarding using dynamic port - allocation (port=0) -- I am wondering if there is an easy way to - access the port number on the remote side easily? -01:44 < telmich> background for this question is: I'd like to allow various clients to - login to a configuration server, which then configures the clients by - using the tunnel the client provides for the server to ssh back into -02:07 < BasketCase> telmich: afaik you need to use a tool like ss/netstat/lsof to see what port it has open - -- ssh debug - -[11:37] bento:~% ssh -R 0:localhost:22 localhost -Allocated port 33562 for remote forward to localhost:22 - - .. . .x+=:. s - dF @88> z` ^% :8 - '88bu. %8P . server aes128-ctr hmac-md5-etm@openssh.com zlib@openssh.com [preauth] -debug1: kex: server->client aes128-ctr hmac-md5-etm@openssh.com zlib@openssh.com [preauth] -debug1: expecting SSH2_MSG_KEX_ECDH_INIT [preauth] -debug1: SSH2_MSG_NEWKEYS sent [preauth] -debug1: expecting SSH2_MSG_NEWKEYS [preauth] -debug1: SSH2_MSG_NEWKEYS received [preauth] -debug1: KEX done [preauth] -debug1: userauth-request for user root service ssh-connection method none [preauth] -debug1: attempt 0 failures 0 [preauth] -debug1: PAM: initializing for "root" -debug1: PAM: setting PAM_RHOST to "localhost.localdomain" -debug1: PAM: setting PAM_TTY to "ssh" -debug1: userauth-request for user root service ssh-connection method publickey [preauth] -debug1: attempt 1 failures 0 [preauth] -debug1: test whether pkalg/pkblob are acceptable [preauth] -debug1: temporarily_use_uid: 0/0 (e=0/0) -debug1: trying public key file /root/.ssh/authorized_keys -debug1: fd 4 clearing O_NONBLOCK -debug1: matching key found: file /root/.ssh/authorized_keys, line 2 -Found matching RSA key: 2e:1b:3f:10:01:1d:21:6c:6c:1e:3d:a9:33:ba:3c:f7 -debug1: restore_uid: 0/0 -Postponed publickey for root from ::1 port 57848 ssh2 [preauth] -debug1: userauth-request for user root service ssh-connection method publickey [preauth] -debug1: attempt 2 failures 0 [preauth] -debug1: temporarily_use_uid: 0/0 (e=0/0) -debug1: trying public key file /root/.ssh/authorized_keys -debug1: fd 4 clearing O_NONBLOCK -debug1: matching key found: file /root/.ssh/authorized_keys, line 2 -Found matching RSA key: 2e:1b:3f:10:01:1d:21:6c:6c:1e:3d:a9:33:ba:3c:f7 -debug1: restore_uid: 0/0 -debug1: ssh_rsa_verify: signature correct -debug1: do_pam_account: called -Accepted publickey for root from ::1 port 57848 ssh2 -debug1: monitor_child_preauth: root has been authenticated by privileged process -debug1: Enabling compression at level 6. [preauth] -debug1: monitor_read_log: child log fd closed -debug1: PAM: establishing credentials -debug1: Entering interactive session for SSH2. -debug1: server_init_dispatch_20 -debug1: server_input_global_request: rtype tcpip-forward want_reply 1 -debug1: server_input_global_request: tcpip-forward listen localhost port 0 -debug1: Local forwarding listening on ::1 port 0. -debug1: Allocated listen port 33562 -debug1: channel 0: new [port listener] -debug1: Local forwarding listening on 127.0.0.1 port 33562. -debug1: channel 1: new [port listener] -debug1: server_input_channel_open: ctype session rchan 0 win 1048576 max 16384 -debug1: input_session_request -debug1: channel 2: new [server-session] -debug1: session_new: session 0 -debug1: session_open: channel 2 -debug1: session_open: session 0: link with channel 2 -debug1: server_input_channel_open: confirm session -debug1: server_input_global_request: rtype no-more-sessions@openssh.com want_reply 0 -debug1: server_input_channel_req: channel 2 request auth-agent-req@openssh.com reply 0 -debug1: session_by_channel: session 0 channel 2 -debug1: session_input_channel_req: session 0 req auth-agent-req@openssh.com -debug1: temporarily_use_uid: 0/0 (e=0/0) -debug1: restore_uid: 0/0 -debug1: channel 3: new [auth socket] -debug1: server_input_channel_req: channel 2 request pty-req reply 1 -debug1: session_by_channel: session 0 channel 2 -debug1: session_input_channel_req: session 0 req pty-req -debug1: Allocating pty. -debug1: session_pty_req: session 0 alloc /dev/pts/32 -debug1: server_input_channel_req: channel 2 request shell reply 1 -debug1: session_by_channel: session 0 channel 2 -debug1: session_input_channel_req: session 0 req shell -debug1: Setting controlling tty using TIOCSCTTY. - --------------------------------------------------------------------------------- -debug1: server_input_global_request: rtype tcpip-forward want_reply 1 -debug1: server_input_global_request: tcpip-forward listen localhost port 0 -debug1: Local forwarding listening on ::1 port 0. -debug1: Allocated listen port 33562 -debug1: channel 0: new [port listener] -debug1: Local forwarding listening on 127.0.0.1 port 33562. - -[11:49] bento:openssh-6.2p1% grep "Allocated listen port" -r . -./channels.c: debug("Allocated listen port %d", -[11:49] bento:openssh-6.2p1% - - --------------------------------------------------------------------------------- -[11:54] bento:~% ssh -R 0:localhost:22 -R 0:192.168.1.1:33 localhost -Allocated port 48392 for remote forward to localhost:22 -Allocated port 37515 for remote forward to 192.168.1.1:33 - - - - -debug1: server_input_global_request: rtype tcpip-forward want_reply 1 -debug1: server_input_global_request: tcpip-forward listen localhost port 0 -debug1: Local forwarding listening on ::1 port 0. -debug1: Allocated listen port 48392 -debug1: channel 0: new [port listener] -debug1: Local forwarding listening on 127.0.0.1 port 48392. -debug1: channel 1: new [port listener] -debug1: server_input_global_request: rtype tcpip-forward want_reply 1 -debug1: server_input_global_request: tcpip-forward listen localhost port 0 -debug1: Local forwarding listening on ::1 port 0. -debug1: Allocated listen port 37515 -debug1: channel 2: new [port listener] -debug1: Local forwarding listening on 127.0.0.1 port 37515. -debug1: channel 3: new [port listener] -debug1: server_input_channel_open: ctype session rchan 0 win 1048576 max 16384 -debug1: input_session_request -debug1: channel 4: new [server-session] -debug1: session_new: session 0 -debug1: session_open: channel 4 -debug1: session_open: session 0: link with channel 4 - -debug1: Local forwarding listening on ::1 port 5555. -debug1: channel 0: new [port listener] -debug1: Local forwarding listening on 127.0.0.1 port 5555. -debug1: channel 1: new [port listener] -debug1: server_input_global_request: rtype tcpip-forward want_reply 1 -debug1: server_input_global_request: tcpip-forward listen localhost port 4444 -debug1: Local forwarding listening on ::1 port 4444. -debug1: channel 2: new [port listener] -debug1: Local forwarding listening on 127.0.0.1 port 4444. -debug1: channel 3: new [port listener] -debug1: server_input_channel_open: ctype session rchan 0 win 1048576 max 16384 -debug1: input_session_request -debug1: channel 4: new [server-session] -debug1: session_new: session 0 -debug1: session_open: channel 4 - --------------------------------------------------------------------------------- - -[12:06] bento:openssh-6.2p1% grep SSH_CONNECTION -r * -audit-bsm.c: case SSH_CONNECTION_CLOSE: -audit.c: {SSH_CONNECTION_CLOSE, "CONNECTION_CLOSE"}, -audit.c: {SSH_CONNECTION_ABANDON, "CONNECTION_ABANDON"}, -audit.h: SSH_CONNECTION_CLOSE, /* closed after attempting auth or session */ -audit.h: SSH_CONNECTION_ABANDON, /* closed without completing auth */ -audit-linux.c: case SSH_CONNECTION_CLOSE: -monitor.c: case SSH_CONNECTION_CLOSE: -regress/proxy-connect.sh: SSH_CONNECTION=`${SSH} -$p -F $OBJ/ssh_proxy 999.999.999.999 'echo $SSH_CONNECTION'` -regress/proxy-connect.sh: if [ "$SSH_CONNECTION" != "UNKNOWN 65535 UNKNOWN 65535" ]; then -regress/proxy-connect.sh: fail "bad SSH_CONNECTION" -session.c: child_set_env(&env, &envsize, "SSH_CONNECTION", buf); -sftp-server.c: if ((cp = getenv("SSH_CONNECTION")) != NULL) { -sftp-server.c: error("Malformed SSH_CONNECTION variable: \"%s\"", -sftp-server.c: getenv("SSH_CONNECTION")); -ssh.0: SSH_CONNECTION Identifies the client and server ends of the -ssh.1:.It Ev SSH_CONNECTION -sshd.c: PRIVSEP(audit_event(SSH_CONNECTION_CLOSE)); -sshd.c: audit_event(SSH_CONNECTION_ABANDON); -[12:06] bento:openssh-6.2p1% - --------------------------------------------------------------------------------- -debug1: Remote connections from LOCALHOST:5555 forwarded to local address localhost:22 - --------------------------------------------------------------------------------- -[12:42] bento:openssh-6.2p1% grep tcpip-forward * -channels.c: packet_put_cstring("tcpip-forward"); -channels.c: packet_put_cstring("cancel-tcpip-forward"); -Binary file channels.o matches -grep: contrib: Is a directory -Binary file libssh.a matches -grep: openbsd-compat: Is a directory -grep: regress: Is a directory -grep: scard: Is a directory -serverloop.c: if (strcmp(rtype, "tcpip-forward") == 0) { -serverloop.c: debug("server_input_global_request: tcpip-forward listen %s port %d", -serverloop.c: } else if (strcmp(rtype, "cancel-tcpip-forward") == 0) { -serverloop.c: debug("%s: cancel-tcpip-forward addr %s port %d", __func__, -Binary file serverloop.o matches -Binary file ssh matches -Binary file sshd matches -Binary file ssh-keyscan matches -Binary file ssh-keysign matches -[12:42] bento:openssh-6.2p1% - --------------------------------------------------------------------------------- -Channel information for (remote) forwarding: - - c = channel_new("port listener", type, sock, sock, -1, - CHAN_TCP_WINDOW_DEFAULT, CHAN_TCP_PACKET_DEFAULT, - 0, "port listener", 1); - c->path = xstrdup(host); - c->host_port = port_to_connect; - c->listening_addr = addr == NULL ? NULL : xstrdup(addr); - if (listen_port == 0 && allocated_listen_port != NULL && - !(datafellows & SSH_BUG_DYNAMIC_RPORT)) - c->listening_port = *allocated_listen_port; - else - c->listening_port = listen_port; - --------------------------------------------------------------------------------- - -Code handling remote forwarding in the client: -- ssh_init_forwarding - - channel_request_remote_forwarding - Sends hostname + port for ssh1 only - not send in ssh2 - -Code handling forwarding / listening in the server: - -- channel_new: creates channels, 2 per listener (ipv4/ipv6) - - channels_alloc contains number of channels -- server_input_global_request - Reads only listen port, not hostname/port to connect to - - channel_setup_remote_fwd_listener - - channel_setup_remote_fwd_listener - -Code handling environment variables: - -- child_set_env -1236 child_set_env(&env, &envsize, "SSH_CONNECTION", buf); - diff --git a/docs/dev/logs/2013-05-17.ssh-callback-socat b/docs/dev/logs/2013-05-17.ssh-callback-socat deleted file mode 100644 index 69428309..00000000 --- a/docs/dev/logs/2013-05-17.ssh-callback-socat +++ /dev/null @@ -1,40 +0,0 @@ - -start ssh -to controlhost, -bind other side to -localhost:22 - - -targethost ------> ssh ------> controlhost - | - | - socat: connect stdin/stdout to ? - start cdist with port information - added - - -Use - -socat - - --------------------------------------------------------------------------------- - TCP:: - Connects to [TCP service] on [IP address] using TCP/IP version 4 or 6 depending on address specifi‐ - cation, name resolution, or option pf. - Option groups: FD,SOCKET,IP4,IP6,TCP,RETRY - Useful options: crnl, bind, pf, connect-timeout, tos, mtudiscover, mss, nodelay, nonblock, sourceport, retry, - readbytes - See also: TCP4, TCP6, TCP-LISTEN, UDP, SCTP-CONNECT, UNIX-CONNECT - -forever --------------------------------------------------------------------------------- -[root@nico-dev-vm-snr01 yum.repos.d]# ps aux | grep socat -nico 25035 0.0 0.0 41640 1524 ? Ss 13:27 0:00 socat - TCP-LISTEN:1234 -root 25037 0.0 0.0 103240 836 pts/1 S+ 13:27 0:00 grep socat -[root@nico-dev-vm-snr01 yum.repos.d]# - - - --------------------------------------------------------------------------------- - diff --git a/docs/dev/logs/2013-07-12.release b/docs/dev/logs/2013-07-12.release deleted file mode 100644 index da4b296c..00000000 --- a/docs/dev/logs/2013-07-12.release +++ /dev/null @@ -1,38 +0,0 @@ -- setup release date in docs/changelog to today manually - -- checkout master branch - [ - x check if date is correct in docs/changelog - x ensure all unittests work - - requires (wrong/outdated) versionfile! - x compile manpages - x compile speeches - ] - [ - x add manpages to website repo - x add speeches to website repo - x rsync cdist docs to website repo & add to website repo - x create blog entry & add to website repo - ] - x upload website - x fix latest link for manpages - x send mail to mailinglist -> also requires git tag & git release - x should also require web-release including blog! - - - create PKGBUILD for archlinux release - - x create git tag / read description - t if necessary create version branch - x change to version branch and merge tag! - x update git repos - x update website from repo - x create release on freecode - - x create versionfile - x make pypi release - x make archlinux release - -manual last steps: - -- announce on linkedin -- announce on twitter diff --git a/docs/dev/logs/2013-07-25.source-error-does-not-stop-cdist b/docs/dev/logs/2013-07-25.source-error-does-not-stop-cdist deleted file mode 100644 index b0c43971..00000000 --- a/docs/dev/logs/2013-07-25.source-error-does-not-stop-cdist +++ /dev/null @@ -1,56 +0,0 @@ -Symptom: - running something in a manifest and that fails does not exist - the cdist run - -Analysis: - Find out what the shell does: - - [23:56] bento:testshell% cat a.sh - # source something that fails - . b.sh - [23:57] bento:testshell% cat b.sh - nosuchcommand - [23:57] bento:testshell% sh -e a.sh - a.sh: 2: .: b.sh: not found - [23:57] bento:testshell% echo $? - 2 - - -> exit 2 -> looks good - - - Find out what the python does: - - [23:57] bento:testshell% python3 - Python 3.3.2 (default, May 21 2013, 15:40:45) - [GCC 4.8.0 20130502 (prerelease)] on linux - Type "help", "copyright", "credits" or "license" for more information. - >>> import subprocess - >>> subprocess.check_call(["/bin/sh", "-e", "a.sh"]) - a.sh: 2: .: b.sh: not found - Traceback (most recent call last): - File "", line 1, in - File "/usr/lib/python3.3/subprocess.py", line 544, in check_call - raise CalledProcessError(retcode, cmd) - subprocess.CalledProcessError: Command '['/bin/sh', '-e', 'a.sh']' returned non-zero exit status 2 - >>> - - -Conclusion: - Manifests that execute (!) other shell scripts does - not necessarily give the -e flag to the other script - -> called script can have failures, but exit 0 - if something the last thing executed does exit 0! - -Solution: - Instead of doing stuff like - "$__manifest/special" - - use - sh -e "$__manifest/special" - - or source the script: - . "$__manifest/special" - - (runs the script in the same namespace/process as everything in the - calling script) - diff --git a/docs/dev/logs/2013-08-07.shell b/docs/dev/logs/2013-08-07.shell deleted file mode 100644 index 3fa9f139..00000000 --- a/docs/dev/logs/2013-08-07.shell +++ /dev/null @@ -1,2 +0,0 @@ -What about having a cdist shell to have a shell with all available types? -Let's give it a try! diff --git a/docs/dev/logs/2013-08-12.release b/docs/dev/logs/2013-08-12.release deleted file mode 100644 index 1db05681..00000000 --- a/docs/dev/logs/2013-08-12.release +++ /dev/null @@ -1,28 +0,0 @@ -- already on 2.3.0-1 during release - - user bug: there should be no changes / commits during a release process - -hard linking docs/man/man7/cdist-type__user.7 -> cdist-2.3.0-1-g8192c2c/docs/man/man7 -hard linking docs/man/man7/cdist-type__user.html -> cdist-2.3.0-1-g8192c2c/docs/man/man7 -hard linking docs/man/man7/cdist-type__user_groups.7 -> cdist-2.3.0-1-g8192c2c/docs/man/man7 -hard linking docs/man/man7/cdist-type__user_groups.html -> cdist-2.3.0-1-g8192c2c/docs/man/man7 -hard linking scripts/cdist -> cdist-2.3.0-1-g8192c2c/scripts -creating dist -Creating tar archive -removing 'cdist-2.3.0-1-g8192c2c' (and everything under it) -running upload -Submitting dist/cdist-2.3.0-1-g8192c2c.tar.gz to http://pypi.python.org/pypi -Server response (200): OK -touch .lock-pypi -./PKGBUILD.in 2.3.0 -==> Retrieving sources... - -> Downloading cdist-2.3.0.tar.gz... - % Total % Received % Xferd Average Speed Time Time Time Current - Dload Upload Total Spent Left Speed - 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 - 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 -curl: (22) The requested URL returned error: 404 Not Found -==> ERROR: Failure while downloading cdist-2.3.0.tar.gz - Aborting... -make: *** [PKGBUILD] Error 1 -[12:38] bento:cdist% - diff --git a/docs/dev/logs/2013-08-18.cache-enhancement b/docs/dev/logs/2013-08-18.cache-enhancement deleted file mode 100644 index 95052dfe..00000000 --- a/docs/dev/logs/2013-08-18.cache-enhancement +++ /dev/null @@ -1,17 +0,0 @@ -- always save cache = outdir - - even if run aborts (for debugging) - - add a state flag -- save cache in a date based directory -- also add support for a per-host pidfile -- allow user to specify cache dir - to give - full flexibility -- drop context - it is a very small unecessary wrapper - - maye introduce cdist.log instead! -- replace out_path with out_base - - directory under which all the subdirectories are - created - -> by default ~/.cdist/run - -> out_base_path -- drop support for deprecated environment variables - __cdist_out_dir - __cdist_remote_out_dir diff --git a/docs/dev/logs/2013-08-27-notifications.xoj b/docs/dev/logs/2013-08-27-notifications.xoj deleted file mode 100644 index c34c4676..00000000 Binary files a/docs/dev/logs/2013-08-27-notifications.xoj and /dev/null differ diff --git a/docs/dev/logs/2013-08-28.release b/docs/dev/logs/2013-08-28.release deleted file mode 100644 index 23e23d88..00000000 --- a/docs/dev/logs/2013-08-28.release +++ /dev/null @@ -1,5 +0,0 @@ -- release process releases pypi from something - that is git describe based, not changelog based... - - - git describe should equal changelog, but may be - inconsistent due to branch merging! diff --git a/docs/dev/logs/2013-09-05.test-cp b/docs/dev/logs/2013-09-05.test-cp deleted file mode 100644 index 1f02ee5d..00000000 --- a/docs/dev/logs/2013-09-05.test-cp +++ /dev/null @@ -1,34 +0,0 @@ -Test copy copys symlinks - making real files would be better - -Test how to use cp: - -[12:54] bento:~% cd test -[12:54] bento:test% ln -s /etc/passwd -[12:54] bento:test% cd .. -[12:54] bento:~% cp -r test test2 -[12:54] bento:~% ls -lh test2/ -total 4.0K -lrwxrwxrwx 1 nico nico 11 Sep 5 12:54 passwd -> /etc/passwd -[12:54] bento:~% rm -rf test2/ - --------------------------------------------------------------------------------- -[12:54] bento:~% ls -lh test2/ -total 4.0K -lrwxrwxrwx 1 nico nico 11 Sep 5 12:54 passwd -> /etc/passwd -[12:54] bento:~% rm -rf test2/ -[12:54] bento:~% cp -r --dereference test test2 -[12:56] bento:~% ls -l test2/ -total 4 --rw------- 1 nico nico 960 Sep 5 12:56 passwd -[12:56] bento:~% - --------------------------------------------------------------------------------- -[13:04] bento:cdist% git describe -2.3.2 -[13:09] bento:cdist% vi MANIFEST.in -[13:09] bento:cdist% vi MANIFEST -[13:09] bento:cdist% vi setup.py -[13:09] bento:cdist% cat cdist/version.py -VERSION = "2.3.1-34-g7acf041" -[13:10] bento:cdist% - diff --git a/docs/dev/logs/2013-10-03.ossawards/infos b/docs/dev/logs/2013-10-03.ossawards/infos deleted file mode 100644 index a18c686f..00000000 --- a/docs/dev/logs/2013-10-03.ossawards/infos +++ /dev/null @@ -1,13 +0,0 @@ -Required for the ossawards until 2013-10-06: - - all source code - - licenses GPLv3 - - installation instructions, - - On Linux do the following: - - pip install - - - - necessary documents and - - a demo video onto our web hard. - - installation - - cdist via cdist - - presentation - - build from existing ones (?) diff --git a/docs/dev/logs/2013-10-29.__line b/docs/dev/logs/2013-10-29.__line deleted file mode 100644 index bc15de2c..00000000 --- a/docs/dev/logs/2013-10-29.__line +++ /dev/null @@ -1,6 +0,0 @@ -- fix handling of fixed strings - - ensure special characters are not interpreted -[12:18] bento:~% cat /etc/bash.bashrc -cat: /etc/bash.bashrc: Permission denied -[12:19] bento:~% - diff --git a/docs/dev/logs/2013-11-25.notifications b/docs/dev/logs/2013-11-25.notifications deleted file mode 100644 index 33c6f31b..00000000 --- a/docs/dev/logs/2013-11-25.notifications +++ /dev/null @@ -1,50 +0,0 @@ -Follow up from 2013-01-20: - - - (re-)create message file per object? - - yes, but do not necessarily save in object space - - save $anywhere - - - object_run - - current notifications are imported into a file available at $__messages_in - - after object run, everything that has been written to $__messages_out is merged into the $__messages file - - - functions: - self.explorer.run_global_explorers(self.local.global_explorer_out_path) - self.manifest.run_initial_manifest(self.local.initial_manifest) - self.local.run_script(initial_manifest, env=self.env_initial_manifest(initial_manifest)) - self.explorer.run_type_explorers(cdist_object) - self.manifest.run_type_manifest(cdist_object) - self.local.run_script(type_manifest, env=self.env_type_manifest(cdist_object)) - self.code.run_gencode_local(cdist_object) - self.local.run_script(script, env=env, return_output=True) - self.code.run_gencode_remote(cdist_object) - self.local.run_script(script, env=env, return_output=True) - - - - message support in ... - - initialmanifest - yes - - explorer - no - - only locally - yes - - - how to use notification / messaging in cdist - - can be used in all local scripts: - - initial manifest - - type manifest - - type gencode-* - - order of object exeution is random or as you requested using require="" - - - example use: - -__file/gencode-local: - if [ "$local_cksum" != "$remote_cksum" ]; then - echo "$__remote_copy" "$source" "${__target_host}:${destination}" - echo "copy" >> "$__messages_out" - fi - -__nginx/manifest: - __file /etc/nginx/sites-enabled/myfile --source "$__type/files/nginx-config" - -__nginx/gencode-remote: - if grep -q "__file/etc/nginx/sites-enabled/myfile:copy" "$__messages_in"; then - echo /etc/init.d/nginx restart - fi diff --git a/docs/dev/logs/2013-11-28.preos b/docs/dev/logs/2013-11-28.preos deleted file mode 100644 index f8561135..00000000 --- a/docs/dev/logs/2013-11-28.preos +++ /dev/null @@ -1,2 +0,0 @@ -- debootstrap for the moment -- add triggers: https://github.com/telmich/cdist/issues/214 diff --git a/docs/dev/logs/2013-12-12.discussion b/docs/dev/logs/2013-12-12.discussion deleted file mode 100644 index 58d25517..00000000 --- a/docs/dev/logs/2013-12-12.discussion +++ /dev/null @@ -1,6 +0,0 @@ -With Steven - -- Implement environments - - for configuring "anything" including switches - - can disable / use other global explorers -- 98% of our framework is generic and can be used for any applikation diff --git a/docs/dev/logs/2014-01-09.preos b/docs/dev/logs/2014-01-09.preos deleted file mode 100644 index 1a3f2ddc..00000000 --- a/docs/dev/logs/2014-01-09.preos +++ /dev/null @@ -1,109 +0,0 @@ -- debootstrap - x setup arch - x allow cdist to configure debootstrapped directory using cdist - x include sshd - x configure network (eth0, dhcp) - x various mkfs variants - - various fdisk tools - - x add option for different initial manifest - x allow -, stdin usage - x allow to replace current manifest (later) - - x trigger - - can be handled in the manifest of the user - - - remove /var/cache/apt/archives/* ? - - later, optimisation level - - - - bug: cdist config als root! - - - fix linux-image name (amd64) - - - ln -s /sbin/init /init - - - blog! - - self configuring - - x pxe - /pxe/ - - pxelinux.0 - - linux - - initramfs - - pxelinux.cfg/ - - default - - - iso - - later - - usb stick (+efi version) - - later - - - add unit tests - -- testing with qemu - [22:43] bento:vm-tests% qemu-system-x86_64 -m 2G -boot order=cn -drive file=testhd1,if=virtio -net nic -net user,tftp=$(pwd -P)/tftp,bootfile=/pxelinux.0,hostfwd=tcp::7777-:22 -enable-kvm - -- create preos - [22:43] bento:preos-tests% echo __panter_root_ssh_keys | sudo cdist preos -vp /home/users/nico/vm-tests/tftp -c /home/users/nico/preos-tests/preos03/ -i - - - --------------------------------------------------------------------------------- - -[1:16] bento:~% sudo cdist preos -vc ~nico/preos-tests/preos03 -INFO: cdist: version 3.0.0-38-gea286c6 -INFO: /home/users/nico/preos-tests/preos03: Running global explorers -INFO: /home/users/nico/preos-tests/preos03: Running initial manifest /tmp/tmpxbquwe/manifest -INFO: /home/users/nico/preos-tests/preos03: Running manifest and explorers for __file/etc/network/interfaces -INFO: /home/users/nico/preos-tests/preos03: Generating code for __file/etc/network/interfaces -INFO: /home/users/nico/preos-tests/preos03: Running manifest and explorers for __package/xfsprogs -INFO: /home/users/nico/preos-tests/preos03: Running manifest and explorers for __package/reiser4progs -INFO: /home/users/nico/preos-tests/preos03: Running manifest and explorers for __package/jfsutils -INFO: /home/users/nico/preos-tests/preos03: Running manifest and explorers for __package/e2fsprogs -INFO: /home/users/nico/preos-tests/preos03: Running manifest and explorers for __package/btrfs-tools -INFO: /home/users/nico/preos-tests/preos03: Running manifest and explorers for __package/file -INFO: /home/users/nico/preos-tests/preos03: Running manifest and explorers for __package/syslinux -INFO: /home/users/nico/preos-tests/preos03: Running manifest and explorers for __package/openssh-server -INFO: /home/users/nico/preos-tests/preos03: Running manifest and explorers for __package/linux-image-amd64 -INFO: /home/users/nico/preos-tests/preos03: Running manifest and explorers for __package_apt/linux-image-amd64 -INFO: /home/users/nico/preos-tests/preos03: Generating code for __package_apt/linux-image-amd64 -INFO: /home/users/nico/preos-tests/preos03: Running manifest and explorers for __package_apt/openssh-server -INFO: /home/users/nico/preos-tests/preos03: Generating code for __package_apt/openssh-server -INFO: /home/users/nico/preos-tests/preos03: Running manifest and explorers for __package_apt/syslinux -INFO: /home/users/nico/preos-tests/preos03: Generating code for __package_apt/syslinux -INFO: /home/users/nico/preos-tests/preos03: Running manifest and explorers for __package_apt/file -INFO: /home/users/nico/preos-tests/preos03: Generating code for __package_apt/file -INFO: /home/users/nico/preos-tests/preos03: Running manifest and explorers for __package_apt/btrfs-tools -INFO: /home/users/nico/preos-tests/preos03: Generating code for __package_apt/btrfs-tools -INFO: /home/users/nico/preos-tests/preos03: Running manifest and explorers for __package_apt/e2fsprogs -INFO: /home/users/nico/preos-tests/preos03: Generating code for __package_apt/e2fsprogs -INFO: /home/users/nico/preos-tests/preos03: Running manifest and explorers for __package_apt/jfsutils -INFO: /home/users/nico/preos-tests/preos03: Generating code for __package_apt/jfsutils -INFO: /home/users/nico/preos-tests/preos03: Running manifest and explorers for __package_apt/reiser4progs -INFO: /home/users/nico/preos-tests/preos03: Generating code for __package_apt/reiser4progs -INFO: /home/users/nico/preos-tests/preos03: Running manifest and explorers for __package_apt/xfsprogs -INFO: /home/users/nico/preos-tests/preos03: Generating code for __package_apt/xfsprogs -INFO: /home/users/nico/preos-tests/preos03: Generating code for __package/xfsprogs -INFO: /home/users/nico/preos-tests/preos03: Generating code for __package/reiser4progs -INFO: /home/users/nico/preos-tests/preos03: Generating code for __package/jfsutils -INFO: /home/users/nico/preos-tests/preos03: Generating code for __package/e2fsprogs -INFO: /home/users/nico/preos-tests/preos03: Generating code for __package/btrfs-tools -INFO: /home/users/nico/preos-tests/preos03: Generating code for __package/file -INFO: /home/users/nico/preos-tests/preos03: Generating code for __package/syslinux -INFO: /home/users/nico/preos-tests/preos03: Generating code for __package/openssh-server -INFO: /home/users/nico/preos-tests/preos03: Generating code for __package/linux-image-amd64 -INFO: /home/users/nico/preos-tests/preos03: Finished successful run in 2.546635866165161 seconds -[1:16] bento:~% - --------------------------------------------------------------------------------- -[21:14] bento:vm-tests% qemu-system-x86_64 -m 2G -boot order=cn -drive file=testhd1,if=virtio -net nic -net user,tftp=$(pwd -P)/tftp,bootfile=/pxelinux.0 - --------------------------------------------------------------------------------- -[21:16] bento:preos-tests% sudo cdist preos -vp /home/users/nico/vm-tests/tftp /home/users/nico/preos-tests/preos03/ -INFO: cdist: version 3.0.0-42-g0d78ab3 -INFO: cdist.preos: Creating kernel ... -INFO: cdist.preos: Creating initramfs ... -760780 blocks -INFO: cdist.preos: Creating pxe configuration ... -INFO: cdist.preos: Creating pxelinux.0 ... - diff --git a/docs/dev/logs/2014-01-20.environments b/docs/dev/logs/2014-01-20.environments deleted file mode 100644 index 88fe42b9..00000000 --- a/docs/dev/logs/2014-01-20.environments +++ /dev/null @@ -1,44 +0,0 @@ -raw quote from irc - -16:00 < sar> telmich: btw, ich denke nicht dass man install schon zu gross bewerben - sollte -16:00 < telmich> sar: ack -16:00 < sar> telmich: imho sollten wir erst die cdist environments implementieren, - install waere dann eines davon -16:00 < sar> config ein anderes -16:01 < sar> foobar noch ein anderes -16:01 < sar> es macht einfach keinen sinn auf type ebene install vs nicht-install zu - unterscheiden -16:02 < telmich> sar: environments sind bei mir noch nicht ganz im gehirn (ganicht?) - angelangt - hast du (nochmal?) kurz eine idee, was du damit meinst? -16:02 < sar> telmich: wenn man cdist anschaut, dann macht es eigentlich folgendes: -16:03 < sar> - definiere objekte mit hilfe von types -16:03 < sar> - deps zwischen objekten -16:03 < sar> - queue von objekten abarbeiten und auf $etwas anwenden -16:03 < sar> das ist alles -16:04 < sar> telmich: das ist eigentlich ziemlich generisch -16:04 < sar> telmich: fuer mich wuerde es sich hier anbieten das auch so zu - abstrahieren -16:05 < sar> telmich: ein environment (nenn das mal so weil kein besserer name zzt) - koennte das wie $objekt auf $etwas bestimmen -16:05 < sar> telmich: und auch was fuer types es in diesem environment gibt -16:06 < telmich> sar: klingt gut -16:06 < sar> telmich: e.g. es gibt ein environment fuer config -> was wir jetzt haben -16:06 < sar> eins fuer install -> += was im install branch ist (nur die types), den - python code brauchts nacher nicht mehr -16:07 < sar> eins fuer cisco-switch -> hat types um mit cisco zu spielen -16:07 < sar> usw -16:07 < sar> ein environment hat auch eigene remote-{exec,copy} scripte -16:08 < sar> und vielleicht globale explorer, vielleicht auch nicht -16:08 < sar> ein enviroment ist ein cconfig style directory -16:09 < sar> wo man cdist drueber laufen laesst -16:09 < sar> so was in der art -16:13 < telmich> sar: hmmja...klingt gut -16:15 < telmich> vielleicht etwas für cdist 4 oder cdist 5 :-) -16:15 < telmich> aber ich denke auf jeden fall als grundgedanke behaltbar -16:16 < telmich> ok für dich, wenn ich den chat ins docs/dev/logs kopiere als - erinnerungs -16:16 < telmich> s/s$/?/? -16:16 < telmich> s/?$// -16:20 < sar> klar - diff --git a/docs/dev/logs/2014-02-13.discussion b/docs/dev/logs/2014-02-13.discussion deleted file mode 100644 index 70c0f4fc..00000000 --- a/docs/dev/logs/2014-02-13.discussion +++ /dev/null @@ -1,86 +0,0 @@ -With Steven - -t marker .cdist breaks - - use random marker that starts with .cdist- - - has fixed number of following characters (like 6 or 10) - - write marker name to $__global/marker - - export $__global/marker path as $__marker - - document variable in cdist-reference - - also document the pattern how the marker is built - so that other people may be able to dig into the structure - from outside - -t save method - - in $__global/method - - values - - config - - install - - document path and description in cdist-reference - -t save whole runtime in cache - - missing items - - initial manifest may be specified on commandline - - always save the initial manifest to $__global/initial-manifest - - currently it is a lost tempfile - - remote exec / remote copy - - save to $__global/remote_exec - - save to $__global/remote_copy - - stdout and stderr of everything - - need to implement Steven's patch of stderr/stdout capturing - - exit code of cdist - - if it is complete, we can use it for replay / reconfigure - -- new idea: replay / reconfig / reinstall - - --from-cache? - -t stderr/stdout - - capture all messages - - prefix with target_host - - implementation exists in one of Steven's branches - - ping steven for updated pull request - -x on error dump all information about the failing object - - where created - - stderr - - stdout - - parameter (+values) - - everything known [tm] - -t multiple versions of cache - - see #298 - -t absolute path of types, explorer - - resolve instead of using the temporary link name - - #305 - -t report command - - from cache? - - #306 - -t add session to "run directories" - - instead of /var/lib/cdist (remote) - - instead of static dir in cache - - same id remote and local - - maybe timestamp - - in or excluding the pid of cdist? - -- cache - - also save when cdist fails - - save exit code - - be able to restore config - -- new command: cdist clean-cache - - --since - - --keep-versions --keep-lala $num - -- cdist 4.0.0pre2 - - cleanup in preos - -- logging for types - cdist log ...? - - - cdist logserver - - $__global/log.socket - - fifo? - echo into logpipe? - diff --git a/docs/dev/logs/2014-02-18.unauthenticated-packages b/docs/dev/logs/2014-02-18.unauthenticated-packages deleted file mode 100644 index 5fc6357b..00000000 --- a/docs/dev/logs/2014-02-18.unauthenticated-packages +++ /dev/null @@ -1,18 +0,0 @@ -- we cannot install packages, which are not authenticated: - -INFO: voicerepublic-staging.sky.ungleich.ch: Executing code for __package_apt/deb-multimedia-keyring -Reading package lists... -Building dependency tree... -Reading state information... -The following NEW packages will be installed: - deb-multimedia-keyring - 0 upgraded, 1 newly installed, 0 to remove and 13 not upgraded. - Need to get 14.4 kB of archives. - After this operation, 46.1 kB of additional disk space will be used. - WARNING: The following packages cannot be authenticated! - deb-multimedia-keyring - E: There are problems and -y was used without --force-yes - ERROR: voicerepublic-staging.sky.ungleich.ch: Command failed: ssh -o User=root -q voicerepublic-staging.sky.ungleich.ch /bin/sh -e /var/lib/cdist/object/__package_apt/deb-multimedia-keyring/.cdist/code-remote - INFO: cdist: Total processing time for 1 host(s): 72.07943892478943 - ERROR: cdist: Failed to configure the following hosts: voicerepublic-staging.sky.ungleich.ch - diff --git a/docs/dev/logs/2014-05-06.object-marker b/docs/dev/logs/2014-05-06.object-marker deleted file mode 100644 index 4878a2f5..00000000 --- a/docs/dev/logs/2014-05-06.object-marker +++ /dev/null @@ -1,14 +0,0 @@ -Change object marker from .cdist to .cdist-TEMPNAME to allow using -object ids that contain / are .cdist. - -Changes required: - - cdist/emulator.py: - needs to know suffix/name - tests: - allow object id named /.cdist - tests: - many - cdist/config.py: - have suffix - diff --git a/docs/dev/logs/2014-09-10.preos-keys b/docs/dev/logs/2014-09-10.preos-keys deleted file mode 100644 index 53d3721a..00000000 --- a/docs/dev/logs/2014-09-10.preos-keys +++ /dev/null @@ -1,18 +0,0 @@ - -cdist preos keyramfs --keyfile --keyfile - -[17:51] freiheit:vcs% mkdir preos-keys -[17:51] freiheit:vcs% mkdir -p preos-keys/root/.ssh -[17:56] freiheit:vcs% - -chown root:root -R preos-keys/ -chmod 0600 preos-keys/root/.ssh/authorized_keys - -chmod 0700 preos-keys/root/ -chmod 0700 preos-keys/root/.ssh/ - -[18:20:17] freiheit:/home/users/nico/.ungleich/ungleich/vcs/preos-keys# find . | cpio -H newc -o | gzip -9 > ../initramfs.cpio.gz -4 blocks -[18:21:08] freiheit:/home/users/nico/.ungleich/ungleich/vcs/preos-keys# - - diff --git a/docs/dev/logs/2014-11-11.discussion b/docs/dev/logs/2014-11-11.discussion deleted file mode 100644 index a04d2823..00000000 --- a/docs/dev/logs/2014-11-11.discussion +++ /dev/null @@ -1,104 +0,0 @@ -- logging/cache destination - local: - ~/.cdist/log/by-host/$__target/host/config/YYYY/MM/DD/hhmmss/ - ~/.cdist/log/by-session/YYYY/MM/DD/hhmmss/$__target_host/ - config/ - install/ - export/ - remote: - /var/lib/cdist/YYYY-MM-DD-hhmmss-$sourcehost.$pid - - rm old directories on remote side - -- support for tags - - for partial configuration - - supports also install - - on object definition, define - - a) don't care (i.e. no tags) - - b) require tag (only if this tag is setup) - - c) require not tag (only if this tag is *not* setup) - - d) what if both given (conflicting) - - names for parameters: - - cdist config / cdist type - --if-tag / --not-if-tag / --require-tag - --not-if-tag - -- logging - - command line - - stdin of cdist - - stdout/stderr/stdin of types - - new: stdout/stderr - - initial manifest - - if coming from stdin - -- logging configurable - - to be discussed - -- sudo remote - - cp to tmp & mv - - umask issue? - -- install - - via tagged types - - - -- export - - one /export script per type - - exports of type running after object's code is done - - global export should also exist after everything - - PR & merge - - change DONE status to CODE_DONE - - introduce EXPORT_DONE - - -- preos - - merge with debian support only - - we are open to support --os-type later - -- stackable remotes - - change API for remote_exec and remote_copy - - new minor version - - PR & merge - -- locking - - optional - - remote lock - - based on $(ls /var/lib/cdist/) > 0 - -- ideas for parallelisation - - run explorer in parallel - - type - - object - - objects without dependencies can be run in parallel - -- connection test - - just implement - -- multi user environment - - not really needed [at the moment] - - can be implemented by - - git branches - - setting the output dir - -- python2 support with __future__ - - steven votes against it - - nico does not care too much to object - - -- pull based - - sshd / stdin + stdout - - use Use ProxyCommand with stdin/stdout - - http://www.nico.schottelius.org/blog/openssh-6.2-add-callback-functionality-using-dynamic-remote-port-forwarding/ - - - cdist grant-pull-access - - generate user - - ssh pubkeypair - - call wraper script on targethost - - it is shell! - - ssh cdistuser@controlhost - -- config replay/redo/undo - - not now - - -- have a new discussion about handling uris diff --git a/docs/dev/logs/2015-02-10.installation_from_usb_stick b/docs/dev/logs/2015-02-10.installation_from_usb_stick deleted file mode 100644 index b655bc18..00000000 --- a/docs/dev/logs/2015-02-10.installation_from_usb_stick +++ /dev/null @@ -1,49 +0,0 @@ -Objective: - - Create a bootable media that contains everything to install and configure a system. - -Ideas: - -* usb stick -** uefi vs. bios -** contains cdist config -** static ip (?) (if at all) -** hostname setup to localhost -** install and config support -* preos from existing OS? -** requires kernel -** requires initramfs (self build) -** missing tools: cdist preos --config hostname... -* testing with qemu -* syslinux/isolinux? - -Program: - -- get tools -- get kernel - - provide fallback on cdist page - - archlinux: /boot/vmlinuz-linux -- create initramfs? -- create bootable media - - iso - - uefi-usb - - bios-usb - -Tasks: - -- Setup test environment - - qemu launcher - /usr/bin/qemu-system-x86_64 -boot d -m 256 -cdrom '/home/users/nico/oeffentlich/rechner/projekte/cdist/cdist/cdist-preos.iso' -- Create bootable image -- Test image - -Log: - -mkdir iso -cp /boot/vmlinuz-linux iso/ -cp /usr/lib/syslinux/bios/isolinux.bin iso/ - -[22:36] freiheit:cdist% genisoimage -v -V "cdist preos v0.1" -cache-inodes -J -l -no-emul-boot -boot-load-size 4 -b isolinux.bin -c boot.cat -o cdist-preos.iso iso - -[22:38] freiheit:cdist% genisoimage -r -V "cdist preos v0.2" -cache-inodes -J -l -no-emul-boot -boot-load-size 4 -b isolinux.bin -c boot.cat -o cdist-preos.iso iso - diff --git a/docs/dev/logs/2015-02-22.allow_dot_cdist b/docs/dev/logs/2015-02-22.allow_dot_cdist deleted file mode 100644 index 58a1b041..00000000 --- a/docs/dev/logs/2015-02-22.allow_dot_cdist +++ /dev/null @@ -1,29 +0,0 @@ -- locate code that references .cdist - - cdist_object.py -- need to change code that handles objects? - - setup object marker - exec/local.py - - cdist/emulator.py - - need to know the marker name - - shell.py - - test/manifest/__init__.py - - core/code.py: - - core/manifest.py: - - core/manifest.py: - - list_object_names() needs to know the marker -- used BY: - - list_objects - - cdist/test/cdist_object/__init__.py - - cdist/config.py - - cdist/test/cdist_object/__init__.py - - - list_object_names - - needs to have object_marker - -- or modify object code to load name -- setup a per-run random name - - local.py -- use the per-run random name -- create test - - def __init__(self, cdist_type, base_path, object_marker=".cdist", object_id=''): - diff --git a/docs/dev/logs/2015-03-28.preos-from-os b/docs/dev/logs/2015-03-28.preos-from-os deleted file mode 100644 index 93dc9e79..00000000 --- a/docs/dev/logs/2015-03-28.preos-from-os +++ /dev/null @@ -1,32 +0,0 @@ -- basics of config - - wrapping to config - - testbed for CaaS! -- allow to include .cdist -- generate - - pxe - - iso -- package... - - mkfs - - fdisk* - - kernel - -- types (?) - - iso? - - - -- based on Arch Linux - -- new types for iso? - -- change __cdistmarker to accept prefix - -- ISO / USB - genisoimage -r -V "cdist preos v0.2" -cache-inodes -J -l -no-emul-boot -boot-load-size 4 -b isolinux.bin -c boot.cat -o cdist-preos.iso iso - - - have a look at archiso? - - http://www.syslinux.org/wiki/index.php/Isohybrid - -> uefi - -> mbr - -- PXE diff --git a/docs/dev/logs/2017-04-27.execution-order.org b/docs/dev/logs/2017-04-27.execution-order.org deleted file mode 100644 index 5ee32062..00000000 --- a/docs/dev/logs/2017-04-27.execution-order.org +++ /dev/null @@ -1,5 +0,0 @@ -* After constructs don't exist - Flow as implemented on 2013-04-12 has the problem of not allowing - *after* constructs. -* "Type explorer & manifests only" is broken - Doesn't catch external dependencies diff --git a/docs/dev/logs/dependency-tree-with-fruits b/docs/dev/logs/dependency-tree-with-fruits deleted file mode 100644 index 322dc6e3..00000000 --- a/docs/dev/logs/dependency-tree-with-fruits +++ /dev/null @@ -1,29 +0,0 @@ -1. Manifests need type explorers to be run before - Only this way the manifest can use the values - -2. Type explorers can depend on the (successful) execution of other objects - A type explorer may lookup values (ownership, size, processes, etc.) - that are depending on the code of other objects. - -3. The 'require="a" b' dependency specifies only that execution of b needs to wait until a is finished - Other requirements given at another position may not be - executed before b, as cdist interprets require="a" as - "a is everything that is needed to realise b" - -4. The 'require' state is thus *not* suitable to trigger reloads - A type b, which uses the require="" statement to wait for all - require="" dependencies, may be executed in an incomplete - status. - -5. Depending on multiple dependencies defined at different locations requires all objects to be present - Because otherwise the dependent object cannot be sure that the - list of objects it waits for is complete. - -6. If a statement requires all objects to be present, all manifests must have run already. - If all manifests have run already, also all type explorers have run already (#1). - If all type explorers have run already, some objects may have been finished completly already (#2). - -7. Because of #4 and #6, we need to introduce another dependency that allows reloading after - -8. Because the object could be finished already due to a 'require' dependency, we need another script - Maybe "gen-post-run-local", "gen-post-run-remote" diff --git a/docs/dev/todo/TAKEME b/docs/dev/todo/TAKEME deleted file mode 100644 index 4d097091..00000000 --- a/docs/dev/todo/TAKEME +++ /dev/null @@ -1,45 +0,0 @@ -UNASSIGNED TODOS ----------------- -The following list of todos has not been assigned to any developer. -Feel free to pick one! - -CORE ----- -- remove var=foo calls on remote side. Use -o SendEnv (yeah, see ssh_config(5)) - -TESTS ------ -- multiple defines of object: - - fail if different parameters - - succeed if same parameters -- verify that all env variables in doc/man/cdist-reference.text.sh - exist in the right stages -- test DependencyResolver - - -USER INTERFACE --------------- -- Cache - - add example how to use - - export variable $__cache - -> for current host - -> add function to cdist-config, import from cdist-cache - -- Define / document "this is what should be on host X" - and have it parsable by different (shinken) tool - -> given after manifest run already! - -- use absent/present for state by default? -- buggy output with packages that don't exist in archlinux and fedora: - python3 vs. python - -TYPES ------- -- Add testing framework (proposed by Evax Software) -- __user - add option to include --create-home -- __cron: Support --file to be used instead of user cron (probably direct support - of /etc/cron.d) - -- Support uci from openwrt? - - http://wiki.openwrt.org/doc/uci diff --git a/docs/dev/todo/performance-ideas b/docs/dev/todo/performance-ideas deleted file mode 100644 index 0320affa..00000000 --- a/docs/dev/todo/performance-ideas +++ /dev/null @@ -1,3 +0,0 @@ -- Use one pipe-shell for type execution -- Parallelise gencode and code-run of all objects -- Diff against local cache only instead of real target diff --git a/docs/gfx/cdist-and-sexy-white.png b/docs/gfx/cdist-and-sexy-white.png deleted file mode 100644 index 1366b9c2..00000000 Binary files a/docs/gfx/cdist-and-sexy-white.png and /dev/null differ diff --git a/docs/gfx/cdist-logo-1024-scaled.png b/docs/gfx/cdist-logo-1024-scaled.png deleted file mode 100644 index 4be8d4c9..00000000 Binary files a/docs/gfx/cdist-logo-1024-scaled.png and /dev/null differ diff --git a/docs/gfx/cdist-logo-cm.png b/docs/gfx/cdist-logo-cm.png deleted file mode 100644 index 7d988cdc..00000000 Binary files a/docs/gfx/cdist-logo-cm.png and /dev/null differ diff --git a/docs/gfx/font-used b/docs/gfx/font-used deleted file mode 100644 index 46d3e5d3..00000000 --- a/docs/gfx/font-used +++ /dev/null @@ -1 +0,0 @@ -fraktur diff --git a/docs/gfx/instalation-using-preos.odg b/docs/gfx/instalation-using-preos.odg deleted file mode 100644 index 6424bbc5..00000000 Binary files a/docs/gfx/instalation-using-preos.odg and /dev/null differ diff --git a/docs/gfx/label-cdist-ngcm.odt b/docs/gfx/label-cdist-ngcm.odt deleted file mode 100644 index 5e73b332..00000000 Binary files a/docs/gfx/label-cdist-ngcm.odt and /dev/null differ diff --git a/docs/legal/Benedikt_Koeppel.email b/docs/legal/Benedikt_Koeppel.email deleted file mode 100644 index 71fb39e9..00000000 --- a/docs/legal/Benedikt_Koeppel.email +++ /dev/null @@ -1,185 +0,0 @@ -From kaction Fri Jul 22 10:45:09 2016 -Return-path: -Envelope-to: KAction@gnu.org -Delivery-date: Fri, 22 Jul 2016 03:42:02 -0400 -Received: from fencepost.gnu.org [208.118.235.10] - by searing with POP3 (fetchmail-6.3.26) - for (single-drop); Fri, 22 Jul 2016 10:45:09 +0300 (MSK) -Received: from eggs.gnu.org ([2001:4830:134:3::10]:42146) - by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) - (Exim 4.82) - (envelope-from ) - id 1bQV5t-0001Ct-WA - for KAction@gnu.org; Fri, 22 Jul 2016 03:42:02 -0400 -Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) - (envelope-from ) - id 1bQV5r-000365-7C - for KAction@gnu.org; Fri, 22 Jul 2016 03:42:00 -0400 -X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org -X-Spam-Level: -X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,HTML_MESSAGE, - T_DKIM_INVALID autolearn=disabled version=3.3.2 -Received: from mail-oi0-x22f.google.com ([2607:f8b0:4003:c06::22f]:32858) - by eggs.gnu.org with esmtp (Exim 4.71) - (envelope-from ) - id 1bQV5q-00035k-WC - for KAction@gnu.org; Fri, 22 Jul 2016 03:41:59 -0400 -Received: by mail-oi0-x22f.google.com with SMTP id j185so152015483oih.0 - for ; Fri, 22 Jul 2016 00:41:58 -0700 (PDT) -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=benediktkoeppel.ch; s=google; - h=mime-version:in-reply-to:references:from:date:message-id:subject:to; - bh=blJePxf1Q0zVh1kUkaKI6tKoOKbPV9CkRqLrYN8tz+4=; - b=VSpfcDF2tO+mgrTfZGlhHaqbtfYNe/QCbkSH5jWx8CVaItTuu88pTzdHuNZPtYrlQO - KZ6R/7xJrqGdWnKFCUibDAKI1Pd9OAx+ahQsYT5M7eKQt+nM9cMxaiyBjTTPfpF9UVa/ - /anpDGs/Bs6Z/p6c3ElNJOunfeEeS7kscr+Do= -X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=1e100.net; s=20130820; - h=x-gm-message-state:mime-version:in-reply-to:references:from:date - :message-id:subject:to; - bh=blJePxf1Q0zVh1kUkaKI6tKoOKbPV9CkRqLrYN8tz+4=; - b=azAT/E+JYRP5bGvTI3t2BGCNsNfHxSWK+NKOtaWNYo1lyATKw9nJsSl1g6osLeanFr - JjpwlqHUN7v18z5ETqI+kvrmUShZjrgzGYE+yQuq++E4z/0C2YOUf+XZkGFVACguKRNt - HmOufiJNmkB2fYsIRMw3R21hLnM5QkIBlujmwbdxrtWyQSQ8Mfr4+sOnfp1ltHKaixIe - phfyJ6K6qP2h71VShDZmopg8Sg9rz6DSHbFDy8Ka9UTT3DXC+sLpdKFAfSebl0Tgd0eE - r0JND1fwL3pDQCxo4uK+GVM3q/usdTgzBwLnlg22clN1eca2oqrqdQdLQzgGuWYOmQg9 - +tTg== -X-Gm-Message-State: AEkoous0GycxMsszEEqNZrxNJGSADUJISKsdXl4E3+tACC8xUjLdUl3dFeAjSq6rGKkDeLMDrrfVceDa+nAo8A== -X-Received: by 10.157.19.98 with SMTP id q31mr1158747otq.125.1469173317562; - Fri, 22 Jul 2016 00:41:57 -0700 (PDT) -MIME-Version: 1.0 -Received: by 10.202.93.135 with HTTP; Fri, 22 Jul 2016 00:41:38 -0700 (PDT) -In-Reply-To: -References: -From: =?UTF-8?Q?Benedikt_K=C3=B6ppel?= -Date: Fri, 22 Jul 2016 09:41:38 +0200 -Message-ID: -Subject: Re: cdist contribution relicensing -To: Dmitry Bogatov -Content-Type: multipart/alternative; boundary=001a1135177ab4fbf60538349102 -X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] -X-Received-From: 2607:f8b0:4003:c06::22f -X-UIDL: S)T"!() wrote: - -> -> Hello, dear contributors of cdist project! -> -> Recently we discovered licensing issue with your contribution. Namely, -> while most of code is GPLv3+, including some of code written by you, -> manpages (man.txt, now man.rst) are GPLv3 only licensed. -> -> On behalf of cdist releasers (Darko and Nico), I (another cdist -> contributor and cdist Debian maintainer) ask you to permit relicense -> your contribution from GPLv3 to GPLv3+. Without your permission, we -> would be stuck the day when GPLv4 come (hope it will never come, but -> still), or have to reimplement your contribution. -> -> If you agree, please respond with something like -> -> I, #name# <#email#> permit to relicense all my contribution to -> cdist project, source code https://github.com/ungleich/cdist -> to GNU General Public license, version 3 or (at your option) -> any later version, as published by Free Software Foundation. -> -> #day# Jule 2016 year. -> -> If possible, GPG-sign such email. Do not include anything else -> valuable in this email that you do not want to be stored forever in -> public. -> -> Dear contributors, when replying to this email, please do not send -> copy to other contributors -- save their inbox storage. -> -> Thank you in advance for one more contribution. -> -> -- -> Accept: text/plain, text/x-diff -> Accept-Language: eo,en,ru -> X-Web-Site: sinsekvu.github.io -> - ---001a1135177ab4fbf60538349102 -Content-Type: text/html; charset=UTF-8 -Content-Transfer-Encoding: quoted-printable - -

On Wed, Jul 20, 2016 at 5:09 PM, = -Dmitry Bogatov <KAction@gnu.org> wrote:

-Hello, dear contributors of cdist project!
-
-Recently we discovered licensing issue with your contribution. Namely,
-while most of code is GPLv3+, including some of code written by you,
-manpages (man.txt, now man.rst) are GPLv3 only licensed.
-
-On behalf of cdist releasers (Darko and Nico), I (another cdist
-contributor and cdist Debian maintainer) ask you to permit relicense
-your contribution from GPLv3 to GPLv3+. Without your permission, we
-would be stuck the day when GPLv4 come (hope it will never come, but
-still), or have to reimplement your contribution.
-
-If you agree, please respond with something like
-
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 I, #name# <#email#> permit to relicense a= -ll my contribution to
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 cdist project, source code https://gith= -ub.com/ungleich/cdist
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 to GNU General Public license, version 3 or (at= - your option)
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 any later version, as published by Free Softwar= -e Foundation.
-
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 #day# Jule 2016 year.
-
-If possible, GPG-sign such email. Do not include anything else
-valuable in this email that you do not want to be stored forever in
-public.
-
-Dear contributors, when replying to this email, please do not send
-copy to other contributors -- save their inbox storage.
-
-Thank you in advance for one more contribution.
-
---
-Accept: text/plain, text/x-diff
-Accept-Language: eo,en,ru
-X-Web-Site: sinsekvu.github.io
-

- ---001a1135177ab4fbf60538349102-- - diff --git a/docs/legal/Chase_James.email b/docs/legal/Chase_James.email deleted file mode 100644 index c57c62fd..00000000 --- a/docs/legal/Chase_James.email +++ /dev/null @@ -1,185 +0,0 @@ -From kaction Wed Jul 20 21:30:05 2016 -Return-path: -Envelope-to: KAction@gnu.org -Delivery-date: Wed, 20 Jul 2016 14:25:53 -0400 -Received: from fencepost.gnu.org [208.118.235.10] - by searing with POP3 (fetchmail-6.3.26) - for (single-drop); Wed, 20 Jul 2016 21:30:05 +0300 (MSK) -Received: from eggs.gnu.org ([2001:4830:134:3::10]:48289) - by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) - (Exim 4.82) - (envelope-from ) - id 1bPwBt-00025s-Lu - for KAction@gnu.org; Wed, 20 Jul 2016 14:25:53 -0400 -Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) - (envelope-from ) - id 1bPwBr-0007tM-Uq - for KAction@gnu.org; Wed, 20 Jul 2016 14:25:53 -0400 -X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org -X-Spam-Level: -X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,HTML_MESSAGE, - T_DKIM_INVALID autolearn=disabled version=3.3.2 -Received: from mail-io0-x236.google.com ([2607:f8b0:4001:c06::236]:32874) - by eggs.gnu.org with esmtp (Exim 4.71) - (envelope-from ) - id 1bPwBr-0007t9-NK - for KAction@gnu.org; Wed, 20 Jul 2016 14:25:51 -0400 -Received: by mail-io0-x236.google.com with SMTP id 38so55303707iol.0 - for ; Wed, 20 Jul 2016 11:25:50 -0700 (PDT) -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=nu-ex-com.20150623.gappssmtp.com; s=20150623; - h=mime-version:references:in-reply-to:from:date:message-id:subject:to; - bh=jeiFw5Oto9q90WQrIDawOh/M0DSQuTm6MsNWzCa2iqM=; - b=w2EjWx2jk9uB85wrWykVmNEy9QEg28aOHaekBeO8iyoODPF2j8MsXjtXhvUs+4ZxLF - 9fo3qkCLMV9NrPtteb8y4y5kTjbAHJsskIf7r2vdmG1VavbaHlkg8RNya2D90M46cJtz - uaQHQsup+ukaia6j5rQOSq96ioa+hB6mDifxDyvuHY8nbnKnZ3ZYcs+XWnMEBFYa+fPr - Uy/WEnszBVLXVBWh8DN4KNYNuIenzTo0UBSscrriq4vVs3+7uzqimK2jK2OGYAx6sNot - S/DRbSGlY4HRrELgfL654UZsdExXAgphu1X+ibAjCaFjPPK/Nn+rOBif9KFmjLI5c+pF - tLQw== -X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=1e100.net; s=20130820; - h=x-gm-message-state:mime-version:references:in-reply-to:from:date - :message-id:subject:to; - bh=jeiFw5Oto9q90WQrIDawOh/M0DSQuTm6MsNWzCa2iqM=; - b=QzC2SV8Hl3lehpfi0nN2IboohDGuxFsjoqLSL38THT412ruqWgwQoVLbBQg4XRmAgg - rrT2sR8LCCTHJqUBjFlaTIOAFxxWj8ji9E9p9BNTHHvQ6Gqhl5U3SOPAXvtFtoEPEoLa - 9EyNGzjO7VqsZHoYcYgXf/Tpw8Nsro14Lnv7ShbPS5ZNitwwXlVO+7v1FvxxARQskM3a - NWmw5/8fXLqsd5bQATq6Lq3APmV2wZFmVdJ9QZam9BZHqq5X11hLf6t4r0OgEyhwZ4/o - MX1rJvYL7Qnc3Gy6iQJTw8IJeECYP1jJ+g87C15kgKiyE70x2Xg/dPTPi5wuO2OSBnNq - 0gAg== -X-Gm-Message-State: ALyK8tKkwgnTTOBYgFgESByuR5isjDNaKDDSP1OBDQYyhq6gPsDbGeLfq9zPZ7jm2ZciBSSvH2DS7EF+bA/qcw== -X-Received: by 10.107.130.170 with SMTP id m42mr43873568ioi.78.1469039149834; - Wed, 20 Jul 2016 11:25:49 -0700 (PDT) -MIME-Version: 1.0 -References: -In-Reply-To: -From: nx -Date: Wed, 20 Jul 2016 18:25:40 +0000 -Message-ID: -Subject: Re: cdist contribution relicensing -To: Dmitry Bogatov -Content-Type: multipart/alternative; boundary=001a113bd076affa64053815546c -X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] -X-Received-From: 2607:f8b0:4001:c06::236 -X-UIDL: ~j$"!G$!#!92;"!/;T"! - ---001a113bd076affa64053815546c -Content-Type: text/plain; charset=UTF-8 - -I, Chase James , permit to relicense all my -contribution to cdist project, source code https://github.com/ungleich/cdist - to GNU General Public license, version 3 or (at your option) any later -version, as published by Free Software Foundation. - -20 July 2016 - -On Wed, Jul 20, 2016 at 11:10 AM Dmitry Bogatov wrote: - -> -> Hello, dear contributors of cdist project! -> -> Recently we discovered licensing issue with your contribution. Namely, -> while most of code is GPLv3+, including some of code written by you, -> manpages (man.txt, now man.rst) are GPLv3 only licensed. -> -> On behalf of cdist releasers (Darko and Nico), I (another cdist -> contributor and cdist Debian maintainer) ask you to permit relicense -> your contribution from GPLv3 to GPLv3+. Without your permission, we -> would be stuck the day when GPLv4 come (hope it will never come, but -> still), or have to reimplement your contribution. -> -> If you agree, please respond with something like -> -> I, #name# <#email#> permit to relicense all my contribution to -> cdist project, source code https://github.com/ungleich/cdist -> to GNU General Public license, version 3 or (at your option) -> any later version, as published by Free Software Foundation. -> -> #day# Jule 2016 year. -> -> If possible, GPG-sign such email. Do not include anything else -> valuable in this email that you do not want to be stored forever in -> public. -> -> Dear contributors, when replying to this email, please do not send -> copy to other contributors -- save their inbox storage. -> -> Thank you in advance for one more contribution. -> -> -- -> Accept: text/plain, text/x-diff -> Accept-Language: eo,en,ru -> X-Web-Site: sinsekvu.github.io -> - ---001a113bd076affa64053815546c -Content-Type: text/html; charset=UTF-8 -Content-Transfer-Encoding: quoted-printable - -
I, Chase James <nx-cdist@nu-ex.com>, permit to relicense a= -ll my contribution to=C2=A0cdist project,= - source code=C2=A0= -https://github.com/ungleich/cdist=C2=A0to GNU General Public license, version 3 or (at your option)=C2= -=A0any later version, as published by Fre= -e Software Foundation.

20 July 2016
= -

On Wed, Jul 20, 2016 = -at 11:10 AM Dmitry Bogatov <KAction@g= -nu.org> wrote:

-Hello, dear contributors of cdist project!
-
-Recently we discovered licensing issue with your contribution. Namely,
-while most of code is GPLv3+, including some of code written by you,
-manpages (man.txt, now man.rst) are GPLv3 only licensed.
-
-On behalf of cdist releasers (Darko and Nico), I (another cdist
-contributor and cdist Debian maintainer) ask you to permit relicense
-your contribution from GPLv3 to GPLv3+. Without your permission, we
-would be stuck the day when GPLv4 come (hope it will never come, but
-still), or have to reimplement your contribution.
-
-If you agree, please respond with something like
-
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 I, #name# <#email#> permit to relicense a= -ll my contribution to
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 cdist project, source code https://gith= -ub.com/ungleich/cdist
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 to GNU General Public license, version 3 or (at= - your option)
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 any later version, as published by Free Softwar= -e Foundation.
-
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 #day# Jule 2016 year.
-
-If possible, GPG-sign such email. Do not include anything else
-valuable in this email that you do not want to be stored forever in
-public.
-
-Dear contributors, when replying to this email, please do not send
-copy to other contributors -- save their inbox storage.
-
-Thank you in advance for one more contribution.
-
---
-Accept: text/plain, text/x-diff
-Accept-Language: eo,en,ru
-X-Web-Site: sinsekvu.github.io
-
- ---001a113bd076affa64053815546c-- - diff --git a/docs/legal/Christian_Warden.email b/docs/legal/Christian_Warden.email deleted file mode 100644 index 798b3201..00000000 --- a/docs/legal/Christian_Warden.email +++ /dev/null @@ -1,122 +0,0 @@ -From kaction Wed Jul 20 18:25:04 2016 -Return-path: -Envelope-to: KAction@gnu.org -Delivery-date: Wed, 20 Jul 2016 11:20:15 -0400 -Received: from fencepost.gnu.org [208.118.235.10] - by searing with POP3 (fetchmail-6.3.26) - for (single-drop); Wed, 20 Jul 2016 18:25:04 +0300 (MSK) -Received: from eggs.gnu.org ([2001:4830:134:3::10]:34238) - by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) - (Exim 4.82) - (envelope-from ) - id 1bPtIF-000809-Ob - for KAction@gnu.org; Wed, 20 Jul 2016 11:20:15 -0400 -Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) - (envelope-from ) - id 1bPtIB-0006jv-SP - for KAction@gnu.org; Wed, 20 Jul 2016 11:20:15 -0400 -X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org -X-Spam-Level: -X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD, - T_DKIM_INVALID autolearn=disabled version=3.3.2 -Received: from sage.xerus.org ([207.210.217.189]:21397) - by eggs.gnu.org with esmtp (Exim 4.71) - (envelope-from ) - id 1bPtIB-0006cm-9G - for KAction@gnu.org; Wed, 20 Jul 2016 11:20:11 -0400 -DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xerus.org; s=sage; - h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:To:From:Date; bh=O5u4neMHAeGrtpVYFlmpULGNH1YPNhLUEaWPXxzf2xk=; - b=KjzaEXo/CKeUuLj2B1Hrf3krvsJgkMnjqvjJM2KfFJWsiiHU9qPlUtaETBG9jE9tD5MTjg/5/Wr/4u+CnA3xLeNBMIDrFaLaPW2vdlqFsRSVsjl3g/a4LqNrIZcU60/Lwlzb4ber5Y5i69MUX4Y/m1p57FjXTlqONbZZzOa82WQ=; -Received: from c-71-59-214-243.hsd1.or.comcast.net ([71.59.214.243] helo=speedy.xerus.org) - by sage.xerus.org (envelope-from ) - with esmtpsa (Exim 4.80 #2 (Debian)) - id 1bPtHk-0005To-3h - for ; Wed, 20 Jul 2016 08:19:44 -0700 -Received: from cwarden by speedy.xerus.org with local (Exim 4.80) - (envelope-from ) - id 1bPtHj-0007NB-6e - for KAction@gnu.org; Wed, 20 Jul 2016 08:19:43 -0700 -Date: Wed, 20 Jul 2016 08:19:43 -0700 -From: "Christian G. Warden" -To: Dmitry Bogatov -Subject: Re: cdist contribution relicensing -Message-ID: <20160720151943.GD8681@xerus.org> -References: -MIME-Version: 1.0 -Content-Type: multipart/signed; micalg=pgp-sha1; - protocol="application/pgp-signature"; boundary="eAbsdosE1cNLO4uF" -Content-Disposition: inline -In-Reply-To: -X-Face: jD^+@)>yf8|'#1~7ie$N]>2XN},k*wInk~T->gX/l"0?GDg#b;M[;(4'R94H`6,~p"&"(`$ - ?KVH_(2BuS[Zi(IFt,DWb'j77JZMQ~S0mN]o^>zAGQOaz6/uCSFu(O,jf*(e<*'Sa~yW1k1RC0xhd1 - ]'F2p]Wvt3bJ$i2E69!rDttE@/nw?1kS#-#Al(p=G\{Jj4GaRlN(V=R@+&dqD{`v7Y{!WE_?H!iD2D - Z$ -User-Agent: Mutt/1.6.0 (2016-04-01) -X-Sender-Verification: OK -X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] -X-Received-From: 207.210.217.189 -X-UIDL: Dh>"!+M_"!, waive all copyright and -related rights in my contribution to the cdist project. - -Christian - -On Wed, Jul 20, 2016 at 06:09:46PM +0300, Dmitry Bogatov wrote: ->=20 -> Hello, dear contributors of cdist project! ->=20 -> Recently we discovered licensing issue with your contribution. Namely, -> while most of code is GPLv3+, including some of code written by you, -> manpages (man.txt, now man.rst) are GPLv3 only licensed. ->=20 -> On behalf of cdist releasers (Darko and Nico), I (another cdist -> contributor and cdist Debian maintainer) ask you to permit relicense -> your contribution from GPLv3 to GPLv3+. Without your permission, we -> would be stuck the day when GPLv4 come (hope it will never come, but -> still), or have to reimplement your contribution. ->=20 -> If you agree, please respond with something like ->=20 -> I, #name# <#email#> permit to relicense all my contribution to -> cdist project, source code https://github.com/ungleich/cdist -> to GNU General Public license, version 3 or (at your option) -> any later version, as published by Free Software Foundation. ->=20 -> #day# Jule 2016 year. ->=20 -> If possible, GPG-sign such email. Do not include anything else -> valuable in this email that you do not want to be stored forever in -> public. ->=20 -> Dear contributors, when replying to this email, please do not send -> copy to other contributors -- save their inbox storage. ->=20 -> Thank you in advance for one more contribution. ->=20 -> -- -> Accept: text/plain, text/x-diff -> Accept-Language: eo,en,ru -> X-Web-Site: sinsekvu.github.io - - - ---eAbsdosE1cNLO4uF -Content-Type: application/pgp-signature; name="signature.asc" - ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1 - -iEYEARECAAYFAlePlo8ACgkQXSJ4OU73l6Ap6wCgjNo7oLH8G6KUECBOTyCoGbMk -wgAAoJHq5Tx5EWNO9pg3YvBtff5m1iHx -=srJn ------END PGP SIGNATURE----- - ---eAbsdosE1cNLO4uF-- - diff --git a/docs/legal/Daniel_Heule.email b/docs/legal/Daniel_Heule.email deleted file mode 100644 index a66e468c..00000000 --- a/docs/legal/Daniel_Heule.email +++ /dev/null @@ -1,97 +0,0 @@ -From kaction Thu Jul 21 09:20:03 2016 -Return-path: -Envelope-to: KAction@gnu.org -Delivery-date: Thu, 21 Jul 2016 02:15:43 -0400 -Received: from fencepost.gnu.org [208.118.235.10] - by searing with POP3 (fetchmail-6.3.26) - for (single-drop); Thu, 21 Jul 2016 09:20:03 +0300 (MSK) -Received: from eggs.gnu.org ([2001:4830:134:3::10]:60463) - by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) - (Exim 4.82) - (envelope-from ) - id 1bQ7Go-0005is-V4 - for KAction@gnu.org; Thu, 21 Jul 2016 02:15:43 -0400 -Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) - (envelope-from ) - id 1bQ7Gk-0006QB-Hy - for KAction@gnu.org; Thu, 21 Jul 2016 02:15:41 -0400 -X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org -X-Spam-Level: -X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,HTML_MESSAGE, - RCVD_IN_DNSWL_NONE autolearn=disabled version=3.3.2 -Received: from mail3.sfsservices.biz ([194.93.112.48]:32812) - by eggs.gnu.org with esmtp (Exim 4.71) - (envelope-from ) - id 1bQ7Gk-0006Pg-Ay - for KAction@gnu.org; Thu, 21 Jul 2016 02:15:38 -0400 -X-Received: from localhost (localhost [127.0.0.1]) - by mail3.sfsservices.biz (Postfix) with ESMTP id 4F7C37E219FD - for ; Thu, 21 Jul 2016 08:15:33 +0200 (CEST) -X-Virus-Scanned: amavisd-new at sfsservices.biz -X-Received: from mail3.sfsservices.biz ([127.0.0.1]) - by localhost (mail3.sfsservices.biz [127.0.0.1]) (amavisd-new, port 10023) - with ESMTP id 42FFY6pT6H_v for ; - Thu, 21 Jul 2016 08:15:33 +0200 (CEST) -X-Received: from chsfsd14.sfs-intra.net (chsfsln0001.sfs-intra.net [INTERNAL-IP]) - by mail3.sfsservices.biz (Postfix) with ESMTP - for ; Thu, 21 Jul 2016 08:15:33 +0200 (CEST) -In-Reply-To: -References: -To: Dmitry Bogatov -MIME-Version: 1.0 -Subject: Antwort: cdist contribution relicensing -X-KeepSent: 3BCE55E5:113E83E4-C1257FF7:002232C0; - type=4; name=$KeepSent -X-Mailer: IBM Notes Release 9.0.1FP3 January 13, 2015 -Message-ID: -From: Daniel Heule -Date: Thu, 21 Jul 2016 08:15:32 +0200 -X-MIMETrack: Serialize by Router on chsfsd14/SFS(Release 9.0.1FP6|April 20, 2016) at - 21.07.2016 08:15:32, - Serialize complete at 21.07.2016 08:15:32 -Content-Type: multipart/alternative; boundary="=_alternative 00226206C1257FF7_=" -X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] -X-Received-From: 194.93.112.48 -X-UIDL: LCD"!0Gb!!dH-"!0ma"! - -Dies ist eine mehrteilige Nachricht im MIME-Format. ---=_alternative 00226206C1257FF7_= -Content-Type: text/plain; charset="ISO-8859-1" -Content-Transfer-Encoding: quoted-printable - -I, Daniel Heule, hda@sfs.biz permit to relicense all my contribution to -cdist project, source code https://github.com/ungleich/cdist -to GNU General Public license, version 3 or (at your option) -any later version, as published by Free Software Foundation. - -21 Jule 2016. - - - -Mit freundlichen Gr=FCssen / Kind regards - -Daniel Heule - ---=_alternative 00226206C1257FF7_= -Content-Type: text/html; charset="ISO-8859-1" -Content-Transfer-Encoding: quoted-printable - -I, Daniel Heule, hda@sfs.biz permit to relicense all -my contribution to
-cdist project, source code
https://github.com/ungleich/cdist
-to GNU General Public license, version 3 or (at your option)
-any later version, as published by Free Software Foundation.
-
-21 Jule 2016.
-
-
-
-
Mit freundlichen Gr=FCssen / Kind re= -gards
-
-
Daniel Heule -
---=_alternative 00226206C1257FF7_=-- - diff --git a/docs/legal/Daniel_Maher.email b/docs/legal/Daniel_Maher.email deleted file mode 100644 index 3e7ab892..00000000 --- a/docs/legal/Daniel_Maher.email +++ /dev/null @@ -1,180 +0,0 @@ -From kaction Thu Jul 21 17:05:06 2016 -Return-path: -Envelope-to: KAction@gnu.org -Delivery-date: Thu, 21 Jul 2016 10:00:45 -0400 -Received: from fencepost.gnu.org [208.118.235.10] - by searing with POP3 (fetchmail-6.3.26) - for (single-drop); Thu, 21 Jul 2016 17:05:06 +0300 (MSK) -Received: from eggs.gnu.org ([2001:4830:134:3::10]:51771) - by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) - (Exim 4.82) - (envelope-from ) - id 1bQEWr-0007dw-7V - for KAction@gnu.org; Thu, 21 Jul 2016 10:00:45 -0400 -Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) - (envelope-from ) - id 1bQEWm-0005MY-BL - for KAction@gnu.org; Thu, 21 Jul 2016 10:00:44 -0400 -X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org -X-Spam-Level: * -X-Spam-Status: No, score=1.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, - FREEMAIL_REPLY,HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 -Received: from mail-lf0-x22f.google.com ([2a00:1450:4010:c07::22f]:33089) - by eggs.gnu.org with esmtp (Exim 4.71) - (envelope-from ) - id 1bQEWl-0005Lm-Ra - for KAction@gnu.org; Thu, 21 Jul 2016 10:00:40 -0400 -Received: by mail-lf0-x22f.google.com with SMTP id b199so62920486lfe.0 - for ; Thu, 21 Jul 2016 07:00:39 -0700 (PDT) -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=gmail.com; s=20120113; - h=mime-version:in-reply-to:references:from:date:message-id:subject:to; - bh=QxAnWA/6Ux99c9jwOxhyzuW7Mgg4vOlk5/YLw6lG7vI=; - b=GxRkrDAKMCBYgbFXFw//11UoxJ1DI3SANR2ZJTIGfJQWun/PdH/UIp9Y/yrUgReQ52 - aF+/xiGwZtwAtNrW5x5sH8t6eKTEDX98F44kqyTn8W0r4UKlFveIGyqGLKhwgiysUa7s - V7t4HeZHf6KuS1M2v7pGHfY8RWNKkcqbAfc1o5RvSf5w7Fma7vwYTfHhpOTHymjJ6Q0r - 9Ite/jxAuZkg1MD1AQftYpJX1MHpEvsZfSwNNl/rc06onY8uF5/WCbORoDJdDvnFnIle - UKDqPxvOO5b82FH1t4YZQy3qN6uJEZj5XHTHNVe0wmnl09hkKJgq2OF7ih1tKLPhxyo+ - MhJw== -X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=1e100.net; s=20130820; - h=x-gm-message-state:mime-version:in-reply-to:references:from:date - :message-id:subject:to; - bh=QxAnWA/6Ux99c9jwOxhyzuW7Mgg4vOlk5/YLw6lG7vI=; - b=Um0d/lugkccoSfexFcSRQXYK9NPQW24ciOdTfq6HfF1io3u/LCeIg8Vevtk0aY2aJd - 88LeTX66bYD3s3fDRaAo3/GFnjD48IaXkkLNqXD9WHvLdC01RHVerPU0gG0drd28gFfS - BLr6EO7Eyx1VNNFw9eT9PSkzJdRBA73h6zv+/eJLLSI+xz2e9oMlixZ4UnVj7Zc2GDBD - QKftxgjr499rVbkRDXCvjBhEEUdYVJSPlr+gNCnmfy9Me6tqRvjWOwGbxwvnOj/DZ0Lc - s7F7oy6K3DnJMweLH48JsQLiOp4FDJjMydhrxavr2FZ1xdTtDXQzxQCPZfyJsilteQKd - VX1A== -X-Gm-Message-State: ALyK8tJIaYrPzw331bl+6pm5hf75dGrGWIlW3nvRHHCunoAIji4D3HIofy8DADE4ckYnaOxRSf6aYlYIrHPoYg== -X-Received: by 10.25.22.152 with SMTP id 24mr24682317lfw.180.1469109638281; - Thu, 21 Jul 2016 07:00:38 -0700 (PDT) -MIME-Version: 1.0 -Received: by 10.25.85.141 with HTTP; Thu, 21 Jul 2016 07:00:18 -0700 (PDT) -In-Reply-To: -References: -From: dan maher -Date: Thu, 21 Jul 2016 16:00:18 +0200 -Message-ID: -Subject: Re: cdist contribution relicensing -To: Dmitry Bogatov -Content-Type: multipart/alternative; boundary=001a11408306203f8e053825be9d -X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] -X-Received-From: 2a00:1450:4010:c07::22f -X-UIDL: PnS!!MF-!!Y1/!!@L permit to relicense all -my contribution to - cdist project, source code https://github.com/ungleich/cdist - to GNU General Public license, version 3 or (at your option) - any later version, as published by Free Software Foundation. - - 21 July 2016. - -On 20 July 2016 at 17:09, Dmitry Bogatov wrote: - -> -> Hello, dear contributors of cdist project! -> -> Recently we discovered licensing issue with your contribution. Namely, -> while most of code is GPLv3+, including some of code written by you, -> manpages (man.txt, now man.rst) are GPLv3 only licensed. -> -> On behalf of cdist releasers (Darko and Nico), I (another cdist -> contributor and cdist Debian maintainer) ask you to permit relicense -> your contribution from GPLv3 to GPLv3+. Without your permission, we -> would be stuck the day when GPLv4 come (hope it will never come, but -> still), or have to reimplement your contribution. -> -> If you agree, please respond with something like -> -> I, #name# <#email#> permit to relicense all my contribution to -> cdist project, source code https://github.com/ungleich/cdist -> to GNU General Public license, version 3 or (at your option) -> any later version, as published by Free Software Foundation. -> -> #day# Jule 2016 year. -> -> If possible, GPG-sign such email. Do not include anything else -> valuable in this email that you do not want to be stored forever in -> public. -> -> Dear contributors, when replying to this email, please do not send -> copy to other contributors -- save their inbox storage. -> -> Thank you in advance for one more contribution. -> -> -- -> Accept: text/plain, text/x-diff -> Accept-Language: eo,en,ru -> X-Web-Site: sinsekvu.github.io -> - ---001a11408306203f8e053825be9d -Content-Type: text/html; charset=UTF-8 -Content-Transfer-Encoding: quoted-printable - -
=C2=A0 =C2=A0 =C2=A0 =C2=A0 I, Daniel MAHER <phrawzty+cdist@gmail.com> permit= - to relicense all my contribution to
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 cdist project, source code https://gith= -ub.com/ungleich/cdist
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 to GNU General Public license, version 3 or (at= - your option)
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 any later version, as published by Free Softwar= -e Foundation.
-
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 21 July 2016.
<= -br>
On 20 July 2016 at 17:09, Dmitry Bogatov <KAct= -ion@gnu.org> wrote:

-Hello, dear contributors of cdist project!
-
-Recently we discovered licensing issue with your contribution. Namely,
-while most of code is GPLv3+, including some of code written by you,
-manpages (man.txt, now man.rst) are GPLv3 only licensed.
-
-On behalf of cdist releasers (Darko and Nico), I (another cdist
-contributor and cdist Debian maintainer) ask you to permit relicense
-your contribution from GPLv3 to GPLv3+. Without your permission, we
-would be stuck the day when GPLv4 come (hope it will never come, but
-still), or have to reimplement your contribution.
-
-If you agree, please respond with something like
-
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 I, #name# <#email#> permit to relicense a= -ll my contribution to
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 cdist project, source code https://gith= -ub.com/ungleich/cdist
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 to GNU General Public license, version 3 or (at= - your option)
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 any later version, as published by Free Softwar= -e Foundation.
-
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 #day# Jule 2016 year.
-
-If possible, GPG-sign such email. Do not include anything else
-valuable in this email that you do not want to be stored forever in
-public.
-
-Dear contributors, when replying to this email, please do not send
-copy to other contributors -- save their inbox storage.
-
-Thank you in advance for one more contribution.
-
---
-Accept: text/plain, text/x-diff
-Accept-Language: eo,en,ru
-X-Web-Site: sinsekvu.github.io
-

- ---001a11408306203f8e053825be9d-- - diff --git a/docs/legal/Giel_van_Schijndel.email b/docs/legal/Giel_van_Schijndel.email deleted file mode 100644 index 2f085653..00000000 --- a/docs/legal/Giel_van_Schijndel.email +++ /dev/null @@ -1,85 +0,0 @@ -From kaction Thu Jul 21 01:10:04 2016 -Return-path: -Envelope-to: KAction@gnu.org -Delivery-date: Wed, 20 Jul 2016 18:06:32 -0400 -Received: from fencepost.gnu.org [208.118.235.10] - by searing with POP3 (fetchmail-6.3.26) - for (single-drop); Thu, 21 Jul 2016 01:10:04 +0300 (MSK) -Received: from eggs.gnu.org ([2001:4830:134:3::10]:44575) - by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) - (Exim 4.82) - (envelope-from ) - id 1bPzdP-0004KA-R1 - for KAction@gnu.org; Wed, 20 Jul 2016 18:06:31 -0400 -Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) - (envelope-from ) - id 1bPzdL-0005W4-Bl - for KAction@gnu.org; Wed, 20 Jul 2016 18:06:30 -0400 -X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org -X-Spam-Level: -X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD - autolearn=disabled version=3.3.2 -Received: from khitomer.mortis.eu ([185.27.175.75]:55475) - by eggs.gnu.org with esmtp (Exim 4.71) - (envelope-from ) - id 1bPzdL-0005VB-4y - for KAction@gnu.org; Wed, 20 Jul 2016 18:06:27 -0400 -Received: from salidar.dom.custoft.eu (unknown [IPv6:2001:981:4eab:1:7016:52bb:c51b:646d]) - (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) - (Client CN "Giel van Schijndel", Issuer "CAcert Class 3 Root" (not verified)) - by khitomer.mortis.eu (Postfix) with ESMTPS id 0634E1D8 - for ; Thu, 21 Jul 2016 00:06:24 +0200 (CEST) -Received: by salidar.dom.custoft.eu (Postfix, from userid 2079) - id BA3033216E; Thu, 21 Jul 2016 00:06:22 +0200 (CEST) -Date: Thu, 21 Jul 2016 00:06:22 +0200 -From: Giel van Schijndel -To: Dmitry Bogatov -Subject: Re: cdist contribution relicensing -Message-ID: <20160720220622.GC2228@salidar.dom.custoft.eu> -References: -MIME-Version: 1.0 -Content-Type: multipart/signed; micalg=pgp-sha1; - protocol="application/pgp-signature"; boundary="2qXFWqzzG3v1+95a" -Content-Disposition: inline -In-Reply-To: -OpenPGP: id=CEE5E742; url=http://gpg.mortis.eu/me.asc -User-Agent: Mutt/1.6.0 (2016-04-01) -X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x -X-Received-From: 185.27.175.75 -X-UIDL: Kgn!!Pf9!!I,+!!#DW"! - - ---2qXFWqzzG3v1+95a -Content-Type: text/plain; charset=us-ascii -Content-Disposition: inline -Content-Transfer-Encoding: quoted-printable - -I, Giel van Schijndel, hereby give permission to any recipients of my -contributions to the cdist project done up to this date, to redistribute -these or derivatives thereof under the terms of the GNU General Public -License as published by the Free Software Foundation, either version 3 -of the License, or (at your option) any later version. For clarity: -these contributions should be reachable through the Git commit -identifiable by SHA-1 160-bit hash 7e57575f9e1ad0909750d116e9eabc15c1c77e2c -to be considered "up to this date". - -Signed, July 21th, 2016. - ---=20 -Met vriendelijke groet, -With kind regards, -Giel van Schijndel - ---2qXFWqzzG3v1+95a -Content-Type: application/pgp-signature; name="signature.asc" - ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1 - -iEYEARECAAYFAleP9dgACgkQZBYm/87l50LVfQCfXo/2XqCwreH0VEmsmYzE5nE/ -zlMAn0D8/9qif3bAwOwDtvFKJWtfabrg -=f6r/ ------END PGP SIGNATURE----- - ---2qXFWqzzG3v1+95a-- - diff --git a/docs/legal/Jacob_Guffey.email b/docs/legal/Jacob_Guffey.email deleted file mode 100644 index a9892deb..00000000 --- a/docs/legal/Jacob_Guffey.email +++ /dev/null @@ -1,64 +0,0 @@ -From kaction Sat Jul 23 01:20:04 2016 -Return-path: -Envelope-to: KAction@gnu.org -Delivery-date: Fri, 22 Jul 2016 18:19:30 -0400 -Received: from fencepost.gnu.org [208.118.235.10] - by searing with POP3 (fetchmail-6.3.26) - for (single-drop); Sat, 23 Jul 2016 01:20:04 +0300 (MSK) -Received: from eggs.gnu.org ([2001:4830:134:3::10]:57472) - by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) - (Exim 4.82) - (envelope-from ) - id 1bQin4-0006js-EH - for KAction@gnu.org; Fri, 22 Jul 2016 18:19:30 -0400 -Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) - (envelope-from ) - id 1bQin0-00078i-0H - for KAction@gnu.org; Fri, 22 Jul 2016 18:19:29 -0400 -X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org -X-Spam-Level: -X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD - autolearn=disabled version=3.3.2 -Received: from jhsmtdmz01x.jointheirstm.org ([69.28.94.113]:64009) - by eggs.gnu.org with esmtp (Exim 4.71) - (envelope-from ) - id 1bQimz-00078K-Rx - for KAction@gnu.org; Fri, 22 Jul 2016 18:19:25 -0400 -Received: from moshe.jointheirstm.org (c-98-253-78-203.hsd1.in.comcast.net [98.253.78.203]) - by JHSMTDMZ01X.jointheirstm.org (Postfix) with ESMTPSA id 922972AE606 - for ; Fri, 22 Jul 2016 18:19:23 -0400 (EDT) -Subject: Re: cdist contribution relicensing -To: Dmitry Bogatov -References: -From: Jake Guffey -Message-ID: <57929BB9.1080104@Jointheirstm.org> -Date: Fri, 22 Jul 2016 18:18:33 -0400 -User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 - Thunderbird/38.5.0 -MIME-Version: 1.0 -In-Reply-To: -Content-Type: text/plain; charset=windows-1252 -Content-Transfer-Encoding: 7bit -X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x -X-Received-From: 69.28.94.113 -X-UIDL: B!'#!_Z2!![?h"!'Ij"! - ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA256 - -I, Jacob Guffey , permit to relicense -all my contributions to the cdist project, source code -https://github.com/ungleich/cdist to GNU General Public license, -version 3 or (at the maintainer's option) any later version, as -published by Free Software Foundation. - -2016-07-22 - ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2 - -iF4EAREIAAYFAleSm7YACgkQT+o/hrTzJc0NQwD/b2hjXG6UCJXnVUANmWnVy+/L -ae+7lZhFL8UklI5cb/0BAOC7jjH8FfKz1lL/Arqw4SM64yy3wiwvJjqJDtmuumWl -=VLlV ------END PGP SIGNATURE----- - diff --git a/docs/legal/README b/docs/legal/README deleted file mode 100644 index 91a2a0d3..00000000 --- a/docs/legal/README +++ /dev/null @@ -1,10 +0,0 @@ -Around 20 Jule 2016 year was discovered issue, that while all code is -GPLv3+ licensed, type documentation is GPLv3 only. As such -contributors was emailed to ask them permission to relicense to -GPLv3+. - -This directory contains emails, containing permission with all -headers. Not sure about legal significance, since email is so easy to -forge, but it is best option availiable. - - -- Dmitry Bogatov Wed, 20 Jul 2016 18:25:27 +0300 diff --git a/docs/legal/Ricardo_Catalinas.email b/docs/legal/Ricardo_Catalinas.email deleted file mode 100644 index 306ec073..00000000 --- a/docs/legal/Ricardo_Catalinas.email +++ /dev/null @@ -1,183 +0,0 @@ -From kaction Wed Jul 20 18:15:05 2016 -Return-path: -Envelope-to: KAction@gnu.org -Delivery-date: Wed, 20 Jul 2016 11:13:48 -0400 -Received: from fencepost.gnu.org [208.118.235.10] - by searing with POP3 (fetchmail-6.3.26) - for (single-drop); Wed, 20 Jul 2016 18:15:05 +0300 (MSK) -Received: from eggs.gnu.org ([2001:4830:134:3::10]:33032) - by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) - (Exim 4.82) - (envelope-from ) - id 1bPtBz-0007Ty-T1 - for KAction@gnu.org; Wed, 20 Jul 2016 11:13:48 -0400 -Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) - (envelope-from ) - id 1bPtBx-0005MG-9h - for KAction@gnu.org; Wed, 20 Jul 2016 11:13:46 -0400 -X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org -X-Spam-Level: -X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, - HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 -Received: from mail-wm0-x22f.google.com ([2a00:1450:400c:c09::22f]:36812) - by eggs.gnu.org with esmtp (Exim 4.71) - (envelope-from ) - id 1bPtBw-0005Lt-Ul - for KAction@gnu.org; Wed, 20 Jul 2016 11:13:45 -0400 -Received: by mail-wm0-x22f.google.com with SMTP id q128so60444546wma.1 - for ; Wed, 20 Jul 2016 08:13:44 -0700 (PDT) -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=gmail.com; s=20120113; - h=mime-version:in-reply-to:references:date:message-id:subject:from:to; - bh=YrPuTGXNLw9oFiHKKS+IheiScrs5DuAEvUTlakl0Mxg=; - b=WyUhnGVNalPpcJVnkHrFy1wNBjA/S7fZujrzehx9NGmJFOnawS4GJeatEZ4Pdj3hcq - sBzndUsU57BoYVn99QGM5eELbngARMKyU81V3sobYs5oeP6tFdKxnDpedgS6+yTKXLjP - ZH/tJiINIpXhjSxJkqw8q/dV5SKz6do840Roj1234XUKinRnUPX+zJt3Kjy2M+/dDfL8 - wp5u9xTIS1c9cA3xYN/rdrsIjbRkgo01Yh1wVaZBYpaWFybX09uOSo4fXFGZ6rKQl8iJ - 3M+S3+wQxaP2PZzj9z0eV/GVNM5+5lVcmUjI/PAqIq6nS6mOawolTB078FMFD9cvDRtS - KiNg== -X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=1e100.net; s=20130820; - h=x-gm-message-state:mime-version:in-reply-to:references:date - :message-id:subject:from:to; - bh=YrPuTGXNLw9oFiHKKS+IheiScrs5DuAEvUTlakl0Mxg=; - b=EwpgAswQ/18QAMRKkz00dKKmXL7loG/R2ZX6KjvFCsBb0x8sV90eWI+17vBF+GVS1y - k6pXyyfLBFgeFBlgjN8oqaSqHhKNoOzWLNKHpOwAW+WnJ/SyprpxdU1BHz2ZOMDTOJuP - 9NTW8LoB4fU24ns1Yor6ykRMeBGQZDvTT3Zi4JsU48522W1WRXXH/Y4sJRm/hdlSaU18 - 1UN7ySE0Oey6Ufk+yG7M6EwJvY7ZI+zRlPsoknGwofg8H6VH7mKBcDvHc71Wk5tGOVMN - iJeKjmgmReG38Em5C+uGO0h9zjsIYZsYC8dUyRCkfNLD66pRdpFuRFIWhG/PU1aH9hIo - Wlng== -X-Gm-Message-State: ALyK8tLwjExHqmfFbrI69OlGTEDrsSCXwwBlBtD3gfpXU42hI/M5850STADANQROCfznBfKvk/zO9N4+82n/hA== -MIME-Version: 1.0 -X-Received: by 10.194.209.163 with SMTP id mn3mr1847437wjc.45.1469027623430; - Wed, 20 Jul 2016 08:13:43 -0700 (PDT) -Received: by 10.194.228.10 with HTTP; Wed, 20 Jul 2016 08:13:43 -0700 (PDT) -Received: by 10.194.228.10 with HTTP; Wed, 20 Jul 2016 08:13:43 -0700 (PDT) -In-Reply-To: -References: -Date: Wed, 20 Jul 2016 16:13:43 +0100 -Message-ID: -Subject: Re: cdist contribution relicensing -From: =?UTF-8?Q?Ricardo_Catalinas_Jim=C3=A9nez?= -To: Dmitry Bogatov -Content-Type: multipart/alternative; boundary=047d7b3a8d24a8fb78053812a524 -X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] -X-Received-From: 2a00:1450:400c:c09::22f -X-UIDL: H8X!!VF3!!(#b"!\C)!! - ---047d7b3a8d24a8fb78053812a524 -Content-Type: text/plain; charset=UTF-8 - - I, Ricardo Catalinas permit to relicense all my -contribution to - cdist project, source codehttps://github.com/ungleich/cdist - to GNU General Public license, version 3 or (at your option) - any later version, as published by Free Software Foundation. - - 20th Jule 2016 year - -/Ricardo - -On Jul 20, 2016 4:11 PM, "Dmitry Bogatov" wrote: - -> -> Hello, dear contributors of cdist project! -> -> Recently we discovered licensing issue with your contribution. Namely, -> while most of code is GPLv3+, including some of code written by you, -> manpages (man.txt, now man.rst) are GPLv3 only licensed. -> -> On behalf of cdist releasers (Darko and Nico), I (another cdist -> contributor and cdist Debian maintainer) ask you to permit relicense -> your contribution from GPLv3 to GPLv3+. Without your permission, we -> would be stuck the day when GPLv4 come (hope it will never come, but -> still), or have to reimplement your contribution. -> -> If you agree, please respond with something like -> -> I, #name# <#email#> permit to relicense all my contribution to -> cdist project, source code https://github.com/ungleich/cdist -> to GNU General Public license, version 3 or (at your option) -> any later version, as published by Free Software Foundation. -> -> #day# Jule 2016 year. -> -> If possible, GPG-sign such email. Do not include anything else -> valuable in this email that you do not want to be stored forever in -> public. -> -> Dear contributors, when replying to this email, please do not send -> copy to other contributors -- save their inbox storage. -> -> Thank you in advance for one more contribution. -> -> -- -> Accept: text/plain, text/x-diff -> Accept-Language: eo,en,ru -> X-Web-Site: sinsekvu.github.io -> - ---047d7b3a8d24a8fb78053812a524 -Content-Type: text/html; charset=UTF-8 -Content-Transfer-Encoding: quoted-printable - -

=C2=A0 I, Ricardo Catalinas <jimenezrick@gmail.com> permit to relicense all my contr= -ibution to
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 cdist project, source codehttps://github.com/ungleich/cdist
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 to GNU General Public license, version 3 or (at= - your option)
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 any later version, as published by Free Softwar= -e Foundation.

-

=C2=A0 =C2=A0 =C2=A0 =C2=A0 20th Jule 2016 year

-

/Ricardo

-

On Jul 20, 2016 4= -:11 PM, "Dmitry Bogatov" <K= -Action@gnu.org> wrote:

-Hello, dear contributors of cdist project!
-
-Recently we discovered licensing issue with your contribution. Namely,
-while most of code is GPLv3+, including some of code written by you,
-manpages (man.txt, now man.rst) are GPLv3 only licensed.
-
-On behalf of cdist releasers (Darko and Nico), I (another cdist
-contributor and cdist Debian maintainer) ask you to permit relicense
-your contribution from GPLv3 to GPLv3+. Without your permission, we
-would be stuck the day when GPLv4 come (hope it will never come, but
-still), or have to reimplement your contribution.
-
-If you agree, please respond with something like
-
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 I, #name# <#email#> permit to relicense a= -ll my contribution to
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 cdist project, source code https://gith= -ub.com/ungleich/cdist
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 to GNU General Public license, version 3 or (at= - your option)
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 any later version, as published by Free Softwar= -e Foundation.
-
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 #day# Jule 2016 year.
-
-If possible, GPG-sign such email. Do not include anything else
-valuable in this email that you do not want to be stored forever in
-public.
-
-Dear contributors, when replying to this email, please do not send
-copy to other contributors -- save their inbox storage.
-
-Thank you in advance for one more contribution.
-
---
-Accept: text/plain, text/x-diff
-Accept-Language: eo,en,ru
-X-Web-Site: sinsekvu.github.io
-
- ---047d7b3a8d24a8fb78053812a524-- - diff --git a/docs/legal/Steven_Armstrong.email b/docs/legal/Steven_Armstrong.email deleted file mode 100644 index 02951a32..00000000 --- a/docs/legal/Steven_Armstrong.email +++ /dev/null @@ -1,57 +0,0 @@ -From kaction Thu Jul 21 00:55:04 2016 -Return-path: -Envelope-to: KAction@gnu.org -Delivery-date: Wed, 20 Jul 2016 17:51:39 -0400 -Received: from fencepost.gnu.org [208.118.235.10] - by searing with POP3 (fetchmail-6.3.26) - for (single-drop); Thu, 21 Jul 2016 00:55:04 +0300 (MSK) -Received: from eggs.gnu.org ([2001:4830:134:3::10]:42614) - by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) - (Exim 4.82) - (envelope-from ) - id 1bPzP1-0005f6-89 - for KAction@gnu.org; Wed, 20 Jul 2016 17:51:39 -0400 -Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) - (envelope-from ) - id 1bPzOx-00032C-RS - for KAction@gnu.org; Wed, 20 Jul 2016 17:51:38 -0400 -X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org -X-Spam-Level: -X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD - autolearn=disabled version=3.3.2 -Received: from wolke.armstrong.cc ([136.243.209.126]:37928) - by eggs.gnu.org with esmtp (Exim 4.71) - (envelope-from ) - id 1bPzOx-00031o-L9 - for KAction@gnu.org; Wed, 20 Jul 2016 17:51:35 -0400 -Sender: steven@armstrong.cc -Subject: Re: cdist contribution relicensing -To: Dmitry Bogatov -References: -From: Steven Armstrong -Message-ID: -Date: Wed, 20 Jul 2016 23:51:28 +0200 -MIME-Version: 1.0 -In-Reply-To: -Content-Type: text/plain; charset=windows-1252; format=flowed -Content-Transfer-Encoding: 7bit -X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] -X-Received-From: 136.243.209.126 -X-UIDL: b-6"!eP*"!*!D"!c+f!! - -Dmitry Bogatov wrote on 07/20/16 17:09: -> I, #name# <#email#> permit to relicense all my contribution to -> cdist project, source code https://github.com/ungleich/cdist -> to GNU General Public license, version 3 or (at your option) -> any later version, as published by Free Software Foundation. -> -> #day# Jule 2016 year. - -I, Steven Armstrong , permit to re-license -all my contribution to the cdist project source code -https://github.com/ungleich/cdist to GNU General Public license, version -3 or (at your option) any later version, as published by Free Software -Foundation. - -20 July 2016 - diff --git a/docs/legal/Thomas_Oettli.email b/docs/legal/Thomas_Oettli.email deleted file mode 100644 index eb515a59..00000000 --- a/docs/legal/Thomas_Oettli.email +++ /dev/null @@ -1,342 +0,0 @@ -From kaction Tue Aug 2 13:59:41 2016 -Return-path: -Envelope-to: KAction@gnu.org -Delivery-date: Tue, 02 Aug 2016 05:50:23 -0400 -Received: from fencepost.gnu.org [208.118.235.10] - by searing with POP3 (fetchmail-6.3.26) - for (single-drop); Tue, 02 Aug 2016 13:59:41 +0300 (MSK) -Received: from eggs.gnu.org ([2001:4830:134:3::10]:41424) - by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) - (Exim 4.82) - (envelope-from ) - id 1bUWL9-0006S9-Ft - for KAction@gnu.org; Tue, 02 Aug 2016 05:50:23 -0400 -Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) - (envelope-from ) - id 1bUWL1-0007oE-Eo - for KAction@gnu.org; Tue, 02 Aug 2016 05:50:21 -0400 -X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org -X-Spam-Level: -X-Spam-Status: No, score=0.9 required=5.0 tests=BAYES_50,HTML_MESSAGE, - RCVD_IN_DNSWL_NONE,TVD_FW_GRAPHIC_NAME_MID autolearn=disabled version=3.3.2 -Received: from mail2.sfsservices.biz ([194.93.112.42]:43385) - by eggs.gnu.org with esmtp (Exim 4.71) - (envelope-from ) - id 1bUWKe-0007eL-5Z - for KAction@gnu.org; Tue, 02 Aug 2016 05:50:15 -0400 -X-Received: from localhost (localhost [127.0.0.1]) - by mail2.sfsservices.biz (Postfix) with ESMTP id B80B68BEA15B - for ; Tue, 2 Aug 2016 11:49:19 +0200 (CEST) -X-Virus-Scanned: amavisd-new at sfsservices.biz -X-Received: from mail2.sfsservices.biz ([127.0.0.1]) - by localhost (mail2.sfsservices.biz [127.0.0.1]) (amavisd-new, port 10023) - with ESMTP id Kq9SpRTVO-tm for ; - Tue, 2 Aug 2016 11:49:19 +0200 (CEST) -X-Received: from chsfsd15.sfs-intra.net (chsfsln0002.sfs-intra.net [INTERNAL-IP]) - by mail2.sfsservices.biz (Postfix) with ESMTP - for ; Tue, 2 Aug 2016 11:49:19 +0200 (CEST) -In-Reply-To: -References: -Subject: Antwort: cdist contribution relicensing -X-KeepSent: A672E59F:C63BD8B2-C1258003:0035E697; - type=4; name=$KeepSent -To: Dmitry Bogatov -X-Mailer: IBM Notes Release 9.0.1 October 14, 2013 -Message-ID: -From: Thomas Oettli -Date: Tue, 2 Aug 2016 11:49:18 +0200 -X-MIMETrack: Serialize by Router on chsfsd15/SFS(Release 9.0.1FP6|April 20, 2016) at - 02.08.2016 11:49:19 -MIME-Version: 1.0 -Content-type: multipart/related; - Boundary="0__=4EBB0A90DFA660078f9e8a93df938690918c4EBB0A90DFA66007" -X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] -X-Received-From: 194.93.112.42 -X-UIDL: Jb%#!^\~!!pT3"!DD="! - ---0__=4EBB0A90DFA660078f9e8a93df938690918c4EBB0A90DFA66007 -Content-type: multipart/alternative; - Boundary="1__=4EBB0A90DFA660078f9e8a93df938690918c4EBB0A90DFA66007" - ---1__=4EBB0A90DFA660078f9e8a93df938690918c4EBB0A90DFA66007 -Content-type: text/plain; charset=UTF-8 -Content-transfer-encoding: quoted-printable - - -I, Thomas Oettli permit to relicense all my contribution= - to -cdist project, source code https://github.com/ungleich/cdist -to GNU General Public license, version 3 or (at your option) -any later version, as published by Free Software Foundation. - - - -Thomas Oettli -Systemengineer SAP & Linux - -SFS services AG, Corporate IT -Rosenbergsaustrasse 8, CH-9435 Heerbrugg -T +41 71 72 75269 F +41 71 72 75237 -thomas.oettli@sfs.biz www.sfs.biz - - - -Denken Sie an die Umwelt bevor Sie drucken. - Please consider your -environment before printing. - - - - -Von: Dmitry Bogatov -An: Andi Br=C3=B6nnimann , Benedikt Koeppel - , Chase Allen James - , Christian G. Warden , - Daniel Heule , Daniel Maher , Dominique Roux , - Evax Software , Giel van Schijndel , Jake Guffey , J= -ake - Guffey , Nico Schottelius - , Ramon Salvad=C3=B3 - , Ricardo Catalinas Jim=C3=A9nez - , Steven Armstrong - , Thomas Oettli -Kopie: Darko Poljak , Nico Schottelius - -Datum: 20.07.2016 17:11 -Betreff: cdist contribution relicensing - - - - -Hello, dear contributors of cdist project! - -Recently we discovered licensing issue with your contribution. Namely, -while most of code is GPLv3+, including some of code written by you, -manpages (man.txt, now man.rst) are GPLv3 only licensed. - -On behalf of cdist releasers (Darko and Nico), I (another cdist -contributor and cdist Debian maintainer) ask you to permit relicense -your contribution from GPLv3 to GPLv3+. Without your permission, we -would be stuck the day when GPLv4 come (hope it will never come, but -still), or have to reimplement your contribution. - -If you agree, please respond with something like - - I, #name# <#email#> permit to relicense all my contribution to - cdist project, source code https://github.com/ungleich/cdist - to GNU General Public license, version 3 or (at your option) - any later version, as published by Free Software Foundation. - - #day# Jule 2016 year. - -If possible, GPG-sign such email. Do not include anything else -valuable in this email that you do not want to be stored forever in -public. - -Dear contributors, when replying to this email, please do not send -copy to other contributors -- save their inbox storage. - -Thank you in advance for one more contribution. - --- -Accept: text/plain, text/x-diff -Accept-Language: eo,en,ru -X-Web-Site: sinsekvu.github.io -[Anhang "attsga4c.dat" gel=C3=B6scht von Thomas Oettli/otho/SFS]= - ---1__=4EBB0A90DFA660078f9e8a93df938690918c4EBB0A90DFA66007 -Content-type: text/html; charset=UTF-8 -Content-Disposition: inline -Content-transfer-encoding: quoted-printable - - -

I, Thomas Oettli <otho@sfs.biz> permit to= - relicense all my contribution to
-cdist project, source code
https://github.com/ungleich/cdist
-to GNU General Public license, version 3 or (at your option)
-any later version, as published by Free Software Foundation.

-
-
-
-Thomas Oettli
-Systemengineer SAP & Linux

-
-SFS services AG, Corporate IT
-Rosenbergsaustrasse 8, CH-9435 Heerbrugg
-T +41 71 72 75269   F +41 71 72 75237  

-
thomas.oettli@sfs.biz      www.sfs.biz
-
-
-
-3D"Denken
-
-
-3D"InactiveDmitry Bogatov ---20.07.2016 17:11:48---Hello, dear contribu= -tors of cdist project! Recently we discovered licensing issue with your= - contribu
-
-Von: Dmitry Bogatov <KAction@gnu.org>= -
-An: Andi Br=C3=B6nnimann <andi-cdist@v-n= -et.ch>, Benedikt Koeppel <code@benediktkoeppel.ch>, Chase Alle= -n James <nx-cdist@nu-ex.com>, Christian G. Warden <cwarden@xer= -us.org>, Daniel Heule <hda@sfs.biz>, Daniel Maher <phrawzty= -+cdist@gmail.com>, Dominique Roux <dominique.roux4@gmail.com>,= - Evax Software <contact@evax.fr>, Giel van Schijndel <giel+cdi= -st@mortis.eu>, Jake Guffey <jake.guffey@eprotex.com>, Jake Guf= -fey <jake.guffey@jointheirstm.org>, Nico Schottelius <nico-cdi= -st@schottelius.org>, Ramon Salvad=C3=B3 <rsalvado@gnuine.com>,= - Ricardo Catalinas Jim=C3=A9nez <jimenezrick@gmail.com>, Steven A= -rmstrong <steven-cdist@armstrong.cc>, Thomas Oettli <otho@sfs.= -biz>
-Kopie: Darko Poljak <darko.poljak@gmail.= -com>, Nico Schottelius <nico.schottelius@ungleich.ch> -Datum: 20.07.2016 17:11
-Betreff: = -cdist contribution relicensing
-



-
-
-
-Hello, dear contributors of cdist project!
-
-Recently we discovered licensing issue with your contribution. Namely,<= -br> -while most of code is GPLv3+, including some of code written by you, -manpages (man.txt, now man.rst) are GPLv3 only licensed.
-
-On behalf of cdist releasers (Darko and Nico), I (another cdist
-contributor and cdist Debian maintainer) ask you to permit relicense -your contribution from GPLv3 to GPLv3+. Without your permission, we
= - -would be stuck the day when GPLv4 come (hope it will never come, but -still), or have to reimplement your contribution.
-
-If you agree, please respond with something like
-
- I, #name# <#email#> permit to relicense all my contribution to= -
- cdist project, source code
https://github.com/ungleich/cdist
- to GNU General Public license, version 3 or (at your option)
- any later version, as published by Free Software Foundation.
-
-        #day# Jule 2016 year.
-
-If possible, GPG-sign such email. Do not include anything else
-valuable in this email that you do not want to be stored forever in
= - -public.
-
-Dear contributors, when replying to this email, please do not send
-copy to other contributors -- save their inbox storage.
-
-Thank you in advance for one more contribution.
-
---
-Accept: text/plain, text/x-diff
-Accept-Language: eo,en,ru
-X-Web-Site: sinsekvu.github.io
-[Anhang "attsga4c.dat" gel=C3=B6scht von Thomas Oettli/otho/S= -FS]

-= - - ---1__=4EBB0A90DFA660078f9e8a93df938690918c4EBB0A90DFA66007-- - - ---0__=4EBB0A90DFA660078f9e8a93df938690918c4EBB0A90DFA66007 -Content-type: image/gif; - name="16993833.gif" -Content-Disposition: inline; filename="16993833.gif" -Content-ID: <1__=4EBB0A90DFA660078f9e8a93df@sfs-intra.net> -Content-transfer-encoding: base64 - -R0lGODlhVgAqAOUAAPA4IP////AwGPAoEPi4sPBIMPAwEPCAcPiYkPA4GPBwYPjAuPCQgPiooOgg -CPBYSOggAPBAKPAoCPBQOPCIePCIgPiYiPjQyPB4aPigkOgYAPBoWOgoCPBgSPBgUPBoUPCYiPjw -8PBYQPCYkPigmPjAsPjIwPjg2Pjo4Pjw6OgoEPAgCPBIOPjY0PjY2Pjg4PBQQPB4YPCAePCQiPio -mPiwqPjo6PAgAPBAMPBwWPCAaPiQiPiwoPjIyPjQ0Pj48CwAAAAAVgAqAEAI/wADCBTogwIMAAgT -KlwIIAKDgRApTChAsaLFixU9uIAIEYUFDxhDVpyQQWABhgAEbJjBoKXLly4RhIC4YADDBB1kHNjJ -s+fOGhBRpnzgsyhPCicGpoAgtClDBy8E1nRKFSGHgSiYVnUKwQYCm1udCjggFaxCAyU5qlWLgENY -sRTWyp1Lt67du3gHOhDwtq/fv2EFqBA4gS9ghQ7KHk6YWOADw4sRehAqoLLlywIMDJAgQ+0CFSgT -WDaQOTNpA6htDpxAGfVo05k5DNiRV+4ByAklKF5ooEHt3xAx4E54e3ECCCY4amAIoQXwDcP9aiAg -8EOCyNizbxVgQeAFrYcFKP8Y6DZyAYgn9i42QAFE9L8rfAeYuh6DQAbv/UogIZQF8IH0nUUDcBKg -NMF/LjiAnW4AmnUYgxesEFkCA6i1AQQDYKbhewnAsBtDG2poAAc/cBTCAxCQFmJl16H0gUAnZACC -BSOMQKMFCOCIwIwIYOBgQgZ8CCQJ/wUQQg0NJKnkkkrywMCPCEWgXUMNMoQWgVMOBEIHD3TpJZcP -dAAmmBuAEJVcFyjAQgEfUFdkABKJJJIIFFygFgEODKDnnnz26eefgAYq6KCE6nkDdSdNqeiiKZEl -kA04cJCfU6RB9N2kTiWggZ0ciaCeX6oZCd5iFQbQA2iRNSaQgthF8AKrrQr/CViQAaAAa2QsWIfS -iiJqEJesCfFq2QARDCRCiwuJJqxlEIwn1IFFBgikfLUVyNB5wCW6kEoMVODtt95SYEFya0mLkAA5 -kIDAuuy2m6ObAr1nAAYZuNtuA85xhN96A6RAE5R9qSRQcYdVOlAByAImwANVRrbCQFJGJoAHA7Xw -qcIVABswxQOZAAGmVAkwwp0MGMWTj7tqLEIMCrTs8sstzzBXCDQcADPMHxiAEra/QccQg+YCYACR -b+YVw3sBeJBiZafx+iywVwKHAYaoVW311fk9wFp2DnAadNS1RbzgBWIvBgEKAxEAJdh56YydBhsF -IECGCdRttwCi2a13Zg5MUOAvRwh8fK4D4/03gNtvieZABEkV7fjjRZtAwOSUV2755SVcrjnmmxOQ -eeecb77AQBcsx+jpkWmQQtmotx4wBsK5LvtbA8inA+uz555Q4QEBADs= - ---0__=4EBB0A90DFA660078f9e8a93df938690918c4EBB0A90DFA66007 -Content-type: image/gif; - name="16816884.gif" -Content-Disposition: inline; filename="16816884.gif" -Content-ID: <2__=4EBB0A90DFA660078f9e8a93df@sfs-intra.net> -Content-transfer-encoding: base64 - -R0lGODlhNgEiAOQAAP///wCAAACIAJiIAACImACguOj4+Pj40HDI6PjgmND4+Pj46ACIcLigALjw -+OjIcAC40NC4APjw0NDw+HCIAJigAJjg+LjI0LjI6NDIuOjIuOj40PjwuAAAAAAAAAAAACwAAAAA -NgEiAEAI/wABCBxIsKDBgwgTKlzIsKHDhxAjSpxIsaLFixgzClzQQIDHjx4LGFAYoGBJACdRCgxw -suXKlzBZwhyYkqDLmTNb3qS58mbKmipt9hyq8idPo0GBykx6tGlMpQd3QkWpM2fMq0GT7tQo8YFH -BFzDih1LtqzZs2gRDgDJtq0ABg4SJvBIwCTLpUxxYhWqd2revzyzStVb1KpgwkgT50X6d/Bex34h -G2YceXJgn5cDp93MubPnz6BDP5zL1oLo06hTq15d0avbryT5Hp6N+bFJvo4v57Y8WzZlzb+xKq3d -W/HtzL150xauHOjFtWAFSqjwunrbujbvMmYd1aBz7rJB+/9diFfs970R11r3CHchaQHYNfsuL/Mn -/fI0a94Fnp/y/p7byfcfgFv1x59yVAUXXIIH0kdVdv5tN+BRCurWWH6ATRQBBOB16OGHIKJ1gHoh -jUReeA2d55B+aano3XFcFeiiRSxKNCNCN6YmwQQAjAgSAQoAsGNCU2kHGV5GGobjUxMSqCRvSaKY -m0slVUkgcZNp95JksWnVpHHLQdjfUgGKSOJ6QIao5ppsonbmRwVs8OZ6P7Zp5514hjXnW3E15GOd -4Ul1n36DRkWoUYXmZCWATtGGZGbDIToYlYxuKSlRlRalE4uJ/jfgok1q2hSVmzJ1X1YD7VldmgiR -Fh9hGSb/hx6Mzb14IaqI3QqmfJYRB+aUuc66q22y+lbrYsjhCoCqIjnk2kev5mmetNQqG2Oo1War -7bbc/ckqt+CGK65BC1zgrQIZmEiklhHlSNKnZhXYHYoYyRgvvA+5S2uIHLXVbJfAPfookxTa+hh+ -mVb5XX2KOlfkgxArKLCDneqGaKANG2pqcRJfClq/1f07b7KSVYgYvmWSDKOv+wJbGKjIVbYcl3YN -HOCvyW7ZIK+dvQdSewDPGqa8N+MG67E7W9uXkpTCfJzMDutqMLJLEpshlk9uBrJ1HOLIroHH4qvs -1/Yt7PTYnoLtnYNMC2gzp4cGOnDNERpKJoT2NTi3vGRp1hAkQa5FN9ABGIxr+OHVBo744oyntta/ -W9P5WrSNV245Rup1rdCfaNLKN5v6Xj7y0ft2FvpBqrol+EHvRVsjzbA/nSWxPh1pLM4Q663z7nc/ -5XvEs1/Nsq67AW9877UL51zqr61eEAcUwFe6l0h+Wv2XKzNts8W9CxU72mlfNbzUWYZ/NffDl40f -7sZ9TxDzbIl8UAR0Tc9l98WnrzL5sRaHINK44x/7cna8mO0PV8jbn/5yl6r1yK9VgBLdiSR4mtNR -ZHk/65ND6HcdCnrwgyAMoQhDExAAOw== - ---0__=4EBB0A90DFA660078f9e8a93df938690918c4EBB0A90DFA66007 -Content-type: image/gif; - name="graycol.gif" -Content-Disposition: inline; filename="graycol.gif" -Content-ID: <3__=4EBB0A90DFA660078f9e8a93df@sfs-intra.net> -Content-transfer-encoding: base64 - -R0lGODlhEAAQAKECAMzMzAAAAP///wAAACH5BAEAAAIALAAAAAAQABAAAAIXlI+py+0PopwxUbpu -ZRfKZ2zgSJbmSRYAIf4fT3B0aW1pemVkIGJ5IFVsZWFkIFNtYXJ0U2F2ZXIhAAA7 - ---0__=4EBB0A90DFA660078f9e8a93df938690918c4EBB0A90DFA66007-- - - diff --git a/docs/speeches/2012-12-11_lisa.odp b/docs/speeches/2012-12-11_lisa.odp deleted file mode 100644 index 45c78955..00000000 Binary files a/docs/speeches/2012-12-11_lisa.odp and /dev/null differ diff --git a/docs/speeches/2013-01-23_panter.notes b/docs/speeches/2013-01-23_panter.notes deleted file mode 100644 index d223c7bc..00000000 --- a/docs/speeches/2013-01-23_panter.notes +++ /dev/null @@ -1,10 +0,0 @@ -sexy & sexy: ein glückliches Paar - -inhalt vom vortrag - -ziele von sexy und cdist - - systemadministration hochgradig zu automatisieren - effizientes (tägliches) arbeiten - - diff --git a/docs/speeches/2013-01-23_panter.odp b/docs/speeches/2013-01-23_panter.odp deleted file mode 100644 index 7fa0e4c7..00000000 Binary files a/docs/speeches/2013-01-23_panter.odp and /dev/null differ diff --git a/docs/speeches/2013-03-25_ad_novum.odp b/docs/speeches/2013-03-25_ad_novum.odp deleted file mode 100644 index 305f0a5e..00000000 Binary files a/docs/speeches/2013-03-25_ad_novum.odp and /dev/null differ diff --git a/docs/speeches/2013-10-05_ossawards.odp b/docs/speeches/2013-10-05_ossawards.odp deleted file mode 100644 index d0e4511c..00000000 Binary files a/docs/speeches/2013-10-05_ossawards.odp and /dev/null differ diff --git a/docs/speeches/2013-10-05_ossawards/ossawards-2013-1sys.png b/docs/speeches/2013-10-05_ossawards/ossawards-2013-1sys.png deleted file mode 100644 index d5b9586a..00000000 Binary files a/docs/speeches/2013-10-05_ossawards/ossawards-2013-1sys.png and /dev/null differ diff --git a/docs/speeches/2013-10-05_ossawards/ossawards-2013-1sys1comp.png b/docs/speeches/2013-10-05_ossawards/ossawards-2013-1sys1comp.png deleted file mode 100644 index f61d232c..00000000 Binary files a/docs/speeches/2013-10-05_ossawards/ossawards-2013-1sys1comp.png and /dev/null differ diff --git a/docs/speeches/2013-10-05_ossawards/ossawards-2013-1sys4comp.png b/docs/speeches/2013-10-05_ossawards/ossawards-2013-1sys4comp.png deleted file mode 100644 index 5b37e094..00000000 Binary files a/docs/speeches/2013-10-05_ossawards/ossawards-2013-1sys4comp.png and /dev/null differ diff --git a/docs/speeches/2013-10-05_ossawards/ossawards-2013-4comp.png b/docs/speeches/2013-10-05_ossawards/ossawards-2013-4comp.png deleted file mode 100644 index 392eeeb8..00000000 Binary files a/docs/speeches/2013-10-05_ossawards/ossawards-2013-4comp.png and /dev/null differ diff --git a/docs/speeches/2013-10-05_ossawards/ossawards-2013-4sys.png b/docs/speeches/2013-10-05_ossawards/ossawards-2013-4sys.png deleted file mode 100644 index 5da1785a..00000000 Binary files a/docs/speeches/2013-10-05_ossawards/ossawards-2013-4sys.png and /dev/null differ diff --git a/docs/speeches/2013-10-05_ossawards/ossawards-2013-sys-cdist.png b/docs/speeches/2013-10-05_ossawards/ossawards-2013-sys-cdist.png deleted file mode 100644 index 5fa66641..00000000 Binary files a/docs/speeches/2013-10-05_ossawards/ossawards-2013-sys-cdist.png and /dev/null differ diff --git a/docs/speeches/2013-10-05_ossawards/ossawards-2013-sys-chairman.png b/docs/speeches/2013-10-05_ossawards/ossawards-2013-sys-chairman.png deleted file mode 100644 index 01071950..00000000 Binary files a/docs/speeches/2013-10-05_ossawards/ossawards-2013-sys-chairman.png and /dev/null differ diff --git a/docs/speeches/2013-10-05_ossawards/ossawards-2013.xoj b/docs/speeches/2013-10-05_ossawards/ossawards-2013.xoj deleted file mode 100644 index ce55c8b1..00000000 Binary files a/docs/speeches/2013-10-05_ossawards/ossawards-2013.xoj and /dev/null differ diff --git a/docs/speeches/2013-11-22_eth_linux_erfa.odp b/docs/speeches/2013-11-22_eth_linux_erfa.odp deleted file mode 100644 index 71d4719b..00000000 Binary files a/docs/speeches/2013-11-22_eth_linux_erfa.odp and /dev/null differ diff --git a/docs/speeches/2013-11-22_eth_linux_erfa.pdf b/docs/speeches/2013-11-22_eth_linux_erfa.pdf deleted file mode 100644 index 3c2430af..00000000 Binary files a/docs/speeches/2013-11-22_eth_linux_erfa.pdf and /dev/null differ diff --git a/docs/speeches/2014-05-08_linuxtag_berlin.odp b/docs/speeches/2014-05-08_linuxtag_berlin.odp deleted file mode 100644 index 38063332..00000000 Binary files a/docs/speeches/2014-05-08_linuxtag_berlin.odp and /dev/null differ diff --git a/docs/speeches/2014-05-08_linuxtag_berlin.pdf b/docs/speeches/2014-05-08_linuxtag_berlin.pdf deleted file mode 100644 index 88fbeb6e..00000000 Binary files a/docs/speeches/2014-05-08_linuxtag_berlin.pdf and /dev/null differ diff --git a/docs/speeches/2014-05-19_cdi.st-zkb_linux_erfa.odp b/docs/speeches/2014-05-19_cdi.st-zkb_linux_erfa.odp deleted file mode 100644 index a09db845..00000000 Binary files a/docs/speeches/2014-05-19_cdi.st-zkb_linux_erfa.odp and /dev/null differ diff --git a/docs/speeches/2014-05-19_cdi.st-zkb_linux_erfa.pdf b/docs/speeches/2014-05-19_cdi.st-zkb_linux_erfa.pdf deleted file mode 100644 index 9c169a84..00000000 Binary files a/docs/speeches/2014-05-19_cdi.st-zkb_linux_erfa.pdf and /dev/null differ diff --git a/docs/speeches/2014-06-10_openclouddays.odp b/docs/speeches/2014-06-10_openclouddays.odp deleted file mode 100644 index e85451c8..00000000 Binary files a/docs/speeches/2014-06-10_openclouddays.odp and /dev/null differ diff --git a/docs/speeches/2014-06-10_openclouddays_teaser.odp b/docs/speeches/2014-06-10_openclouddays_teaser.odp deleted file mode 100644 index 16ec8e95..00000000 Binary files a/docs/speeches/2014-06-10_openclouddays_teaser.odp and /dev/null differ diff --git a/docs/speeches/2014-06-10_openclouddays_teaser.pdf b/docs/speeches/2014-06-10_openclouddays_teaser.pdf deleted file mode 100644 index c5a052b8..00000000 Binary files a/docs/speeches/2014-06-10_openclouddays_teaser.pdf and /dev/null differ diff --git a/docs/speeches/2014-06-19_ucms14_cdi.st.odp b/docs/speeches/2014-06-19_ucms14_cdi.st.odp deleted file mode 100644 index 9338abe4..00000000 Binary files a/docs/speeches/2014-06-19_ucms14_cdi.st.odp and /dev/null differ diff --git a/docs/speeches/2014-06-19_ucms14_cdist_cinv_bof.odp b/docs/speeches/2014-06-19_ucms14_cdist_cinv_bof.odp deleted file mode 100644 index 21f59ee8..00000000 Binary files a/docs/speeches/2014-06-19_ucms14_cdist_cinv_bof.odp and /dev/null differ diff --git a/docs/speeches/2014-11-07_sfs_linux_erfa_cdist4.odp b/docs/speeches/2014-11-07_sfs_linux_erfa_cdist4.odp deleted file mode 100644 index 29ada1b0..00000000 Binary files a/docs/speeches/2014-11-07_sfs_linux_erfa_cdist4.odp and /dev/null differ diff --git a/docs/speeches/2014-11-07_sfs_linux_erfa_cdist4.pdf b/docs/speeches/2014-11-07_sfs_linux_erfa_cdist4.pdf deleted file mode 100644 index 718d3997..00000000 Binary files a/docs/speeches/2014-11-07_sfs_linux_erfa_cdist4.pdf and /dev/null differ diff --git a/docs/speeches/2014-11-07_sfs_linux_erfa_cdist_web_prototype.odp b/docs/speeches/2014-11-07_sfs_linux_erfa_cdist_web_prototype.odp deleted file mode 100644 index 47c858d4..00000000 Binary files a/docs/speeches/2014-11-07_sfs_linux_erfa_cdist_web_prototype.odp and /dev/null differ diff --git a/docs/speeches/2014-11-07_sfs_linux_erfa_cdist_web_prototype.pdf b/docs/speeches/2014-11-07_sfs_linux_erfa_cdist_web_prototype.pdf deleted file mode 100644 index ae0a3bef..00000000 Binary files a/docs/speeches/2014-11-07_sfs_linux_erfa_cdist_web_prototype.pdf and /dev/null differ diff --git a/docs/speeches/2015-10-21-opennebulaconf-cdist.odp b/docs/speeches/2015-10-21-opennebulaconf-cdist.odp deleted file mode 100644 index f76ba9c3..00000000 Binary files a/docs/speeches/2015-10-21-opennebulaconf-cdist.odp and /dev/null differ diff --git a/docs/src/Makefile b/docs/src/Makefile deleted file mode 100644 index 2ecf7a32..00000000 --- a/docs/src/Makefile +++ /dev/null @@ -1,237 +0,0 @@ -# Makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -PAPER = -BUILDDIR = ../dist -# for cache, etc. -_BUILDDIR = _build - -# User-friendly check for sphinx-build -ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) - $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don\'t have Sphinx installed, grab it from http://sphinx-doc.org/) -endif - -# Internal variables. -PAPEROPT_a4 = -D latex_paper_size=a4 -PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d $(_BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . -# the i18n builder cannot share the environment and doctrees with the others -I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . - -.PHONY: help -help: - @echo "Please use \`make ' where is one of" - @echo " html to make standalone HTML files" - @echo " dirhtml to make HTML files named index.html in directories" - @echo " singlehtml to make a single large HTML file" - @echo " pickle to make pickle files" - @echo " json to make JSON files" - @echo " htmlhelp to make HTML files and a HTML help project" - @echo " qthelp to make HTML files and a qthelp project" - @echo " applehelp to make an Apple Help Book" - @echo " devhelp to make HTML files and a Devhelp project" - @echo " epub to make an epub" - @echo " epub3 to make an epub3" - @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " latexpdf to make LaTeX files and run them through pdflatex" - @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" - @echo " text to make text files" - @echo " man to make manual pages" - @echo " texinfo to make Texinfo files" - @echo " info to make Texinfo files and run them through makeinfo" - @echo " gettext to make PO message catalogs" - @echo " changes to make an overview of all changed/added/deprecated items" - @echo " xml to make Docutils-native XML files" - @echo " pseudoxml to make pseudoxml-XML files for display purposes" - @echo " linkcheck to check all external links for integrity" - @echo " doctest to run all doctests embedded in the documentation (if enabled)" - @echo " coverage to run coverage check of the documentation (if enabled)" - @echo " dummy to check syntax errors of document sources" - -.PHONY: clean -clean: - rm -rf $(BUILDDIR)/* - rm -rf $(_BUILDDIR)/* - -.PHONY: html -html: - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." - -.PHONY: dirhtml -dirhtml: - $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." - -.PHONY: singlehtml -singlehtml: - $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml - @echo - @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." - -.PHONY: pickle -pickle: - $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle - @echo - @echo "Build finished; now you can process the pickle files." - -.PHONY: json -json: - $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json - @echo - @echo "Build finished; now you can process the JSON files." - -.PHONY: htmlhelp -htmlhelp: - $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp - @echo - @echo "Build finished; now you can run HTML Help Workshop with the" \ - ".hhp project file in $(BUILDDIR)/htmlhelp." - -.PHONY: qthelp -qthelp: - $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp - @echo - @echo "Build finished; now you can run "qcollectiongenerator" with the" \ - ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/cdist-docs.qhcp" - @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/cdist-docs.qhc" - -.PHONY: applehelp -applehelp: - $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp - @echo - @echo "Build finished. The help book is in $(BUILDDIR)/applehelp." - @echo "N.B. You won't be able to view it unless you put it in" \ - "~/Library/Documentation/Help or install it in your application" \ - "bundle." - -.PHONY: devhelp -devhelp: - $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp - @echo - @echo "Build finished." - @echo "To view the help file:" - @echo "# mkdir -p $$HOME/.local/share/devhelp/cdist-docs" - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/cdist-docs" - @echo "# devhelp" - -.PHONY: epub -epub: - $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub - @echo - @echo "Build finished. The epub file is in $(BUILDDIR)/epub." - -.PHONY: epub3 -epub3: - $(SPHINXBUILD) -b epub3 $(ALLSPHINXOPTS) $(BUILDDIR)/epub3 - @echo - @echo "Build finished. The epub3 file is in $(BUILDDIR)/epub3." - -.PHONY: latex -latex: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo - @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." - @echo "Run \`make' in that directory to run these through (pdf)latex" \ - "(use \`make latexpdf' here to do that automatically)." - -.PHONY: latexpdf -latexpdf: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through pdflatex..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -.PHONY: latexpdfja -latexpdfja: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through platex and dvipdfmx..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -.PHONY: text -text: - $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text - @echo - @echo "Build finished. The text files are in $(BUILDDIR)/text." - -.PHONY: man -man: - $(SPHINXBUILD) -b cman $(ALLSPHINXOPTS) $(BUILDDIR)/man - mkdir -p $(BUILDDIR)/man/man1 - mkdir -p $(BUILDDIR)/man/man7 - mv -f $(BUILDDIR)/man/*.1 $(BUILDDIR)/man/man1/ - mv -f $(BUILDDIR)/man/*.7 $(BUILDDIR)/man/man7/ - @echo - @echo "Build finished. The manual pages are in $(BUILDDIR)/man." - -.PHONY: texinfo -texinfo: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo - @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." - @echo "Run \`make' in that directory to run these through makeinfo" \ - "(use \`make info' here to do that automatically)." - -.PHONY: info -info: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo "Running Texinfo files through makeinfo..." - make -C $(BUILDDIR)/texinfo info - @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." - -.PHONY: gettext -gettext: - $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale - @echo - @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." - -.PHONY: changes -changes: - $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes - @echo - @echo "The overview file is in $(BUILDDIR)/changes." - -.PHONY: linkcheck -linkcheck: - $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck - @echo - @echo "Link check complete; look for any errors in the above output " \ - "or in $(BUILDDIR)/linkcheck/output.txt." - -.PHONY: doctest -doctest: - $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest - @echo "Testing of doctests in the sources finished, look at the " \ - "results in $(BUILDDIR)/doctest/output.txt." - -.PHONY: coverage -coverage: - $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage - @echo "Testing of coverage in the sources finished, look at the " \ - "results in $(BUILDDIR)/coverage/python.txt." - -.PHONY: xml -xml: - $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml - @echo - @echo "Build finished. The XML files are in $(BUILDDIR)/xml." - -.PHONY: pseudoxml -pseudoxml: - $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml - @echo - @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." - -.PHONY: dummy -dummy: - $(SPHINXBUILD) -b dummy $(ALLSPHINXOPTS) $(BUILDDIR)/dummy - @echo - @echo "Build finished. Dummy builder generates no files." diff --git a/docs/src/_static/cdist-logo.jpeg b/docs/src/_static/cdist-logo.jpeg deleted file mode 100644 index 9bfa2529..00000000 Binary files a/docs/src/_static/cdist-logo.jpeg and /dev/null differ diff --git a/docs/src/_static/cdist-logo.png b/docs/src/_static/cdist-logo.png deleted file mode 100644 index 13c27927..00000000 Binary files a/docs/src/_static/cdist-logo.png and /dev/null differ diff --git a/docs/src/_static/pgp-key-EFD2AE4EC36B6901.asc b/docs/src/_static/pgp-key-EFD2AE4EC36B6901.asc deleted file mode 100644 index 1762d7c1..00000000 --- a/docs/src/_static/pgp-key-EFD2AE4EC36B6901.asc +++ /dev/null @@ -1,52 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v2 - -mQINBFeCnRQBEACoybnhBEubglOHJrZQ8PKcdeQaGZRoTc3cDs84lr6a9HiLeoBO -f8x9fpN4LJbaJOyFJLcvVHHcljvooCLqL5t8/pj7Lyvq1AYuMAeS2Wy19amy3tE5 -aYYdN85idE/m81B+nD76URL4UjXm0T9ITNLbSE3cZTh/25fsFLub+CHauuP0zxJJ -4SlWnIvvcx1hg9n0la9M1DwcNSdI9A7bZLHIM3Ixuq8HTXcuuozXvJOxTgKZ6Yfs -UmTW7mMykbcxcNZx9bADj8kJOEf9FlJzalkW3XVGbBBYgwDrqoRGl+gtt5up71cE -N0NSL6+6mNJBW3ek9kI88z2qUlVe5UXZQxe5sgjrcnE2sPJkAjCiYUXhVzjV5Oo1 -CZ8m1egZLM4IWwAVg8lTizSozYWm9Rs5BcHRVSbQenXoJffTYJY//UE7sAkAfKCf -vsHCdc1H1yK2OwC418nj/T2Zu8Yt0CWiQT3Sogtqz6R7HgVCmSqEdQl3+VL2hQkk -4s0lSOCtBpe0R700phJ67QsnCB8cGMqfUbYZ9cEppJwPA3X3tZd5BJ2OYFU/qhrM -SJ9konAWxnFkViBz0MCKhVjMh6DsH40xdQQsrXsF2aSwEv3MFw/sj+xt1KIuRE5i -IDrZpbaWVjshoJVH6l4eK01DfxRHRJdj8AyH/xJTQQRal2J4CNWjtl+NzwARAQAB -tDB1bmdsZWljaCBHbWJIICh1bmdsZWljaCBGT1NTKSA8Zm9zc0B1bmdsZWljaC5j -aD6JAjcEEwEIACEFAleCnRQCGwMFCwkIBwIGFQgJCgsCBBYCAwECHgECF4AACgkQ -79KuTsNraQGQ6w//dLuEsGzhqQ4FdYwpTOOfcWB6+i42PGb2TgXzwbx5kgzKv6oi -nGuMlXKfamaqbCQuPRyHxR34VRgJslDcvhIXDhB7ELdi5ib8vpA2bX082Es9cKUB -TSGPtp8y7n9aN9ebu/HWLQu88YdAHEcB8BhSuMmcxGvRM1H2a59lW5WizQ7KUPLt -5a8UeELmf/Xz0k4YLP39ApXHxfis0kbGYBni6f7WsyVw2SBEqiG6Z9XktRcSo0e/ -RlZb8FlEQgkZtafmFh2qLS710sll8bcD4Xqktzy4ztUgp6ImtpUY8CwdO9H8VCZK -xCwEIX3W25qAXiV8aFSJ9T4M15dkZivq1vvAEmE0G1zEi8AwI3NGjMXDh61A1yH3 -auHdSOPzdlICqZDBDlX70tmzL3MBOBy32DkVMwe5JHlj9RBjrpp/B3wch1La2NND -4tFEzYMYlkDxCjJKpNqGDZO+ZqHA7dOx3sx6XPlGtSyWnFfFPu2bBvrDhyORmMbO -20pLotDXIzJ8qNCsZ6XAiJ1PDeHintxbRwJxERScv3EcvcE/lcxrlS/TX9LbBJPE -0y/JMpXLx+9WdG5KpDCxpuZHVyKkcXP0TAPq/IG+VPo9wTGg6cy///Se2PKBbuMm -X90VVM/C5PYmDjJ+IxZckBm6oXLJSZd0rETrf0G4HQCznnA8oiQbZu1ac/O5Ag0E -V4KdFAEQALoVDmDKujONT1yDT+AFUc2a/IBBU7V5Ut86+ZdiXltKVpQA3Dc17bdt -GS5YqMVnIaKZ7MqRhfo0XeVzyTBzjGLr+2EZdWb51I7JNto/HVZgUOvon9BiMoTK -KUOD8gFlhblCcKd/aVOJXPDzKYfu2jgBmgtcHecbyXRbjlha6l0/jsFJj0VJySQv -pj2AftKtb7mltz5Wfm/FkUfpEYGl2NSucW3bYNe0j6BmQXqRqLupeoSdmWrPT+oa -RXxKfM0Ug43WnNYgXsAwU383pdfmYIzxsV7RRIXZZswNKuMj4XyDp1hvF4++6Nqb -ySsCGWRWYG1TK0yCQyzRYvaaY15W9ZX8q91Qx9R6RksXs8bjDmHKo55z4V3Dy5KG -dwanyatmEwkbcKjFECK84V8zNJDspsLS1BGiUF69qWdU/wREMs4kp0gUC+3Fbguf -u/v4yc87SO9QvIIv2lWp3nRpQC5661+SK4dB2SVYL88Yd+LFoe883qI5GQIFLad+ -Q5Y/c305r44VOlACV/EsP01LoHHfSsTeneoBUW8ndoKyE3yJ5LKYUV9caROG4/Wh -hGWulkZTXSUXv8q6rUoCIkJiTPPnozwjtErlGyNGcnG1WR55sRV8SFr/SflnUDh9 -tAo+I1xegS+B9W+I89jv3ujkpDVNoST8nb44EZrAq/R0WST48zDHABEBAAGJAh8E -GAEIAAkFAleCnRQCGwwACgkQ79KuTsNraQH7Iw//YclkUN193xbaOho/y4Dj4vk1 -/Gl4bRgek5CkeMll2uxvsvaVEhL1fbBOR501kmYKzCynkESWft8FG7LNxLi7t3Y9 -XrnvvIqPVGAwD8x1+fj+LWCAOZAcFQ3nPSXRY+aZ545G5Mu24EHKsaBEFiyGlDSY -6+XLJchQEpUwVn3MIk9RKCyYi9pAdofgvHuDbB8fFz2YGyjmBn+WbZCmvTm62AIP -WzaNBx507l9LBObY2teBTFLFOnUmNW0QLNpV8lGlWv/rVGfzqD3VVavRNGcXLkI9 -spv4r5ci9tQWwW52Z8fAFMo4yWeeWnS0uk4vKtq3ANwFqFtxLuA8WBy9FYQ/5BR0 -RdbI0a/iVN2rJcZxGqUbz22U+4N7g89EmHA40LFsWmIl5duAtXZ3XIlMFzCuXwYf -u9fpLUs6uIdRuVVg/qVJva608hn/7/fEqetbwoHmmSBVUSOQYdMZZ5SyR8zDUbBh -acGOOPRSN7tJG8ycoPSQKQci4fXEpqkBfojalqNKGgJUj+5IWApZWvZV0Z6fFLO7 -Q2vd1jXYb4lKv04pfxqfOuOlSy9w6ElNewF4V7jSdGqfitw2lQNXlC1EaoajkiZJ -Evcb9b5HexuJPI3cxyJGZyUYyqk2FF0ztGigbhK986iyKILJB+OqiLbAs3KIgezD -vsomtv+pm41l0JK+Xps= -=/2wY ------END PGP PUBLIC KEY BLOCK----- diff --git a/docs/src/cdist-best-practice.rst b/docs/src/cdist-best-practice.rst deleted file mode 100644 index a91f2cc0..00000000 --- a/docs/src/cdist-best-practice.rst +++ /dev/null @@ -1,363 +0,0 @@ -Best practice -============= -Practices used in real environments - -Passwordless connections ------------------------- -It is recommended to run cdist with public key authentication. -This requires a private/public key pair and the entry -"PermitRootLogin without-password" in the sshd server. -See sshd_config(5) and ssh-keygen(1). - - -Speeding up ssh connections ---------------------------- -When connecting to a new host, the initial delay with ssh connections -is pretty big. As cdist makes many connections to each host successive -connections can be sped up by "sharing of multiple sessions over a single -network connection" (quote from ssh_config(5)). This is also called "connection -multiplexing". - -Cdist implements this since v4.0.0 by executing ssh with the appropriate -options (`-o ControlMaster=auto -o ControlPath=/tmp//s -o -ControlPersist=2h`). - -Note that the sshd_config on the server can configure the maximum number of -parallel multiplexed connections this with `MaxSessions N` (N defaults to 10 -for OpenSSH v7.4). - - -Speeding up shell execution ----------------------------- -On the source host, ensure that /bin/sh is *not* bash: bash is quite slow for -script execution. Instead, you could use dash after installing it:: - - ln -sf /bin/dash /bin/sh - - -Multi master or environment setups ----------------------------------- -If you plan to distribute cdist among servers or use different -environments, you can do so easily with the included version -control git. For instance if you plan to use the typical three -environments production, integration and development, you can -realise this with git branches:: - - # Go to cdist checkout - cd /path/to/cdist - - # Create branches - git branch development - git branch integration - git branch production - - # Make use of a branch, for instance production - git checkout production - -Similar if you want to have cdist checked out at multiple machines, -you can clone it multiple times:: - - machine-a % git clone git://your-git-server/cdist - machine-b % git clone git://your-git-server/cdist - - -Separating work by groups -------------------------- -If you are working with different groups on one cdist-configuration, -you can delegate to other manifests and have the groups edit only -their manifests. You can use the following snippet in -**conf/manifests/init**:: - - # Include other groups - sh -e "$__manifest/systems" - - sh -e "$__manifest/cbrg" - - -Maintaining multiple configurations ------------------------------------ -When you need to manage multiple sites with cdist, like company_a, company_b -and private for instance, you can easily use git for this purpose. -Including a possible common base that is reused across the different sites:: - - # create branches - git branch company_a company_b common private - - # make stuff for company a - git checkout company_a - # work, commit, etc. - - # make stuff for company b - git checkout company_b - # work, commit, etc. - - # make stuff relevant for all sites - git checkout common - # work, commit, etc. - - # change to private and include latest common stuff - git checkout private - git merge common - - -The following **.git/config** is taken from a real world scenario:: - - # Track upstream, merge from time to time - [remote "upstream"] - url = git://git.schottelius.org/cdist - fetch = +refs/heads/*:refs/remotes/upstream/* - - # Same as upstream, but works when being offline - [remote "local"] - fetch = +refs/heads/*:refs/remotes/local/* - url = /home/users/nico/p/cdist - - # Remote containing various ETH internal branches - [remote "eth"] - url = sans.ethz.ch:/home/services/sans/git/cdist-eth - fetch = +refs/heads/*:refs/remotes/eth/* - - # Public remote that contains my private changes to cdist upstream - [remote "nico"] - url = git.schottelius.org:/home/services/git/cdist-nico - fetch = +refs/heads/*:refs/remotes/nico/* - - # The "nico" branch will be synced with the remote nico, branch master - [branch "nico"] - remote = nico - merge = refs/heads/master - - # ETH stable contains rock solid configurations used in various places - [branch "eth-stable"] - remote = eth - merge = refs/heads/stable - -Have a look at git-remote(1) to adjust the remote configuration, which allows - - -Multiple developers with different trust ----------------------------------------- -If you are working in an environment that requires different people to -work on the same configuration, but having different privileges, you can -implement this scenario with a gateway host and sudo: - -- Create a dedicated user (for instance **cdist**) -- Setup the ssh-pubkey for this user that has the right to configure all hosts -- Create a wrapper to update the cdist configuration in ~cdist/cdist -- Allow every developer to execute this script via sudo as the user cdist -- Allow run of cdist as user cdist on specific hosts on a per user/group basis. - - - f.i. nico ALL=(ALL) NOPASSWD: /home/cdist/bin/cdist config hostabc - -For more details consult sudoers(5) - - -Templating ----------- -* create directory files/ in your type (convention) -* create the template as an executable file like files/basic.conf.sh, it will output text using shell variables for the values - -.. code-block:: sh - - #!/bin/sh - # in the template, use cat << eof (here document) to output the text - # and use standard shell variables in the template - # output everything in the template script to stdout - cat << EOF - server { - listen 80; - server_name $SERVERNAME; - root $ROOT; - - access_log /var/log/nginx/$SERVERNAME_access.log - error_log /var/log/nginx/$SERVERNAME_error.log - } - EOF - -* in the manifest, export the relevant variables and add the following lines to your manifest: - -.. code-block:: console - - # export variables needed for the template - export SERVERNAME='test" - export ROOT='/var/www/test' - # render the template - mkdir -p "$__object/files" - "$__type/files/basic.conf.sh" > "$__object/files/basic.conf" - # send the rendered template - __file /etc/nginx/sites-available/test.conf \ - --state present - --source "$__object/files/basic.conf" - - -Testing a new type ------------------- -If you want to test a new type on a node, you can tell cdist to only use an -object of this type: Use the '--initial-manifest' parameter -with - (stdin) as argument and feed object into stdin -of cdist: - -.. code-block:: sh - - # Singleton type without parameter - echo __ungleich_munin_server | cdist --initial-manifest - munin.panter.ch - - # Singleton type with parameter - echo __ungleich_munin_node --allow 1.2.3.4 | \ - cdist --initial-manifest - rails-19.panter.ch - - # Normal type - echo __file /tmp/stdintest --mode 0644 | \ - cdist --initial-manifest - cdist-dev-01.ungleich.ch - - -Other content in cdist repository ---------------------------------- -Usually the cdist repository contains all configuration -items. Sometimes you may have additional resources that -you would like to store in your central configuration -repository (like password files from KeepassX, -Libreoffice diagrams, etc.). - -It is recommended to use a subfolder named "non-cdist" -in the repository for such content: It allows you to -easily distinguish what is used by cdist and what is not -and also to store all important files in one -repository. - - -Perils of CDIST_ORDER_DEPENDENCY --------------------------------- -With CDIST_ORDER_DEPENDENCY all types are executed in the order in which they -are created in the manifest. The current created object automatically depends -on the previously created object. - -It essentially helps you to build up blocks of code that build upon each other -(like first creating the directory xyz than the file below the directory). - -This can be helpful, but it can also be the source of *evil*. - - -CDIST_ORDER_DEPENDENCY easily causes unobvious dependency cycles -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Let's see an example. Suppose you have special init manifest where among other -things you are assuring that remote host has packages `sudo` and `curl` -installed. - -**init1** - -.. code-block:: sh - - CDIST_ORDER_DEPENDENCY=1 - export CDIST_ORDER_DEPENDENCY - - for p in sudo curl - do - __package "${p}" - done - -Then you have some other special init manifest where among other things you are -assuring `sudo` package is installed. - -**init2** - -.. code-block:: sh - - CDIST_ORDER_DEPENDENCY=1 - export CDIST_ORDER_DEPENDENCY - - __package sudo - -Then you have third init manifest where you combine those two init manifests, -by including them: - -**init** - -.. code-block:: sh - - sh -e "$__manifest/init1" - sh -e "$__manifest/init2" - -The resulting init manifest is then equal to: - -.. code-block:: sh - - CDIST_ORDER_DEPENDENCY=1 - export CDIST_ORDER_DEPENDENCY - - for p in sudo curl - do - __package "${p}" - done - - CDIST_ORDER_DEPENDENCY=1 - export CDIST_ORDER_DEPENDENCY - - __package sudo - -In the end you get the following dependencies: - -* `__package/curl` depends on `__package/sudo` -* `__package/sudo` depends on `__package/curl` - -And here you have a circular dependency! - -In the real world manifest can be quite complex, dependencies can become -complicated and circual dependencies are not so obvious. Resolving it can -become cumbersome. - -**Practical solution?** - -Instead of managing complex init manifests you can write custom types. -Each custom type can do one thing, it has well defined dependencies that will -not leak into init manifest. In custom type you can also add special explorers -and gencode. - -Then, in init manifest you combine your complex types. It is: - -* cleaner -* easier to follow -* easier to maintain -* easier to debug. - - -CDIST_ORDER_DEPENDENCY kills parallelization -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Suppose you have defined CDIST_ORDER_DEPENDENCY and then, among other things, -you specify creation of three, by nature independent, files. - -**init** - -.. code-block:: sh - - CDIST_ORDER_DEPENDENCY=1 - export CDIST_ORDER_DEPENDENCY - - ... - __file /tmp/file1 - __file /tmp/file2 - __file /tmp/file3 - ... - -Due to defined CDIST_ORDER_DEPENDENCY cdist will execute them in specified order. -It is better to use CDIST_ORDER_DEPENDENCY in well defined blocks: - -**init** - -.. code-block:: sh - - CDIST_ORDER_DEPENDENCY=1 - export CDIST_ORDER_DEPENDENCY - ... - unset CDIST_ORDER_DEPENDENCY - - __file /tmp/file1 - __file /tmp/file2 - __file /tmp/file3 - - CDIST_ORDER_DEPENDENCY=1 - export CDIST_ORDER_DEPENDENCY - ... - unset CDIST_ORDER_DEPENDENCY diff --git a/docs/src/cdist-bootstrap.rst b/docs/src/cdist-bootstrap.rst deleted file mode 100644 index c9972a99..00000000 --- a/docs/src/cdist-bootstrap.rst +++ /dev/null @@ -1,118 +0,0 @@ -Bootstrap -========= -This document describes the usual steps recommended for a new -cdist setup. It is recommended that you have read and understood -`cdist quickstart `_ before digging into this. - - -Location ---------- -First of all, you should think about where to store your configuration -database and who will be accessing or changing it. Secondly you have to -think about where to configure your hosts from, which may be a different -location. - -For starters, having cdist (which includes the configuration database) on -your notebook should be fine. -Additionally an external copy of the git repository the configuration -relies on is recommended, for use as backup as well as to allow easy collaboration -with others. - -For more sophisticated setups developing cdist configurations with multiple -people, have a look at `cdist best practice `_. - - -Setup working directory and branch ----------------------------------- -I assume you have a fresh copy of the cdist tree in ~/cdist, cloned from -one of the official urls (see `cdist quickstart `_ if you don't). -Entering the command "git branch" should show you "* master", which indicates -you are on the **master** branch. - -The master branch reflects the latest development of cdist. As this is the -development branch, it may or may not work. There are also version branches -available, which are kept in a stable state. Let's use **git branch -r** -to list all branches:: - - cdist% git branch -r - origin/1.0 - origin/1.1 - origin/1.2 - origin/1.3 - origin/1.4 - origin/1.5 - origin/1.6 - origin/1.7 - origin/2.0 - origin/HEAD -> origin/master - origin/archive_shell_function_approach - origin/master - -So **2.0** is the latest version branch in this example. -All versions (2.0.x) within one version branch (2.0) are compatible to each -other and won't break your configuration when updating. - -It's up to you to decide which branch you want to base your own work on: -master contains more recent changes, newer types, but may also break. -The version branches are stable, but may lack the latest features. -Your decision can be changed later on, but may result in merge conflicts, -which you will need to solve. - -Let's assume you want latest stuff and select the master branch as base for -your own work. Now it's time to create your branch, which contains your -local changes. I usually name it by the company/area I am working for: -ethz-systems, localch, customerX, ... But this is pretty much up to you. - -In this tutorial I use the branch **mycompany**:: - - cdist% git checkout -b mycompany origin/master - Branch mycompany set up to track remote branch master from origin. - Switched to a new branch 'mycompany' - cdist-user% git branch - master - * mycompany - -From now on, you can use git as usual to commit your changes in your own branch. - - -Publishing the configuration ----------------------------- -Usually a development machine like a notebook should be considered -temporary only. For this reason and to enable shareability, the configuration -should be published to another device as early as possible. The following -example shows how to publish the configuration to another host that is -reachable via ssh and has git installed:: - - # Create bare git repository on the host named "loch" - cdist% ssh loch "GIT_DIR=/home/nutzer/cdist git init" - Initialized empty Git repository in /home/nutzer/cdist/ - - # Add remote git repo to git config - cdist% git remote add loch loch:/home/nutzer/cdist - - # Configure the mycompany branch to push to loch - cdist% git config branch.mycompany.remote loch - - # Configure mycompany branch to push into remote master branch - cdist% git config branch.mycompany.merge refs/heads/master - - # Push mycompany branch to remote branch master initially - cdist% git push loch mycompany:refs/heads/master - -Now you have setup the git repository to synchronise the **mycompany** -branch with the **master** branch on the host **loch**. Thus you can commit -as usual in your branch and push out changes by entering **git push**. - - -Updating from origin --------------------- -Whenever you want to update your cdist installation, you can use git to do so:: - - # Update git repository with latest changes from origin - cdist% git fetch origin - - # Update current branch with master branch from origin - cdist% git merge origin/master - - # Alternative: Update current branch with 2.0 branch from origin - cdist% git merge origin/2.0 diff --git a/docs/src/cdist-cache.rst b/docs/src/cdist-cache.rst deleted file mode 100644 index 0e5361ee..00000000 --- a/docs/src/cdist-cache.rst +++ /dev/null @@ -1,98 +0,0 @@ -Local cache overview -==================== - -Description ------------ -While executing, cdist stores data to local cache. Currently this feature is -one way only. That means that cdist does not use stored data for future runs. -Anyway, those data can be used for debugging cdist, debugging types and -debugging after host configuration fails. - -Local cache is saved under $HOME/.cdist/cache directory, one directory entry -for each host. Subdirectory path is specified by -:strong:`-C/--cache-path-pattern` option, :strong:`cache_path_pattern` -configuration option or by using :strong:`CDIST_CACHE_PATH_PATTERN` -environment variable. - -For more info on cache path pattern see :strong:`CACHE PATH PATTERN FORMAT` -section in cdist man page. - - -Cache overview --------------- -As noted above each configured host has got its subdirectory in local cache. -Entries in host's cache directory are as follows. - -bin - directory with cdist type emulators - -conf - dynamically determined cdist conf directory, union of all specified - conf directories - -explorer - directory containing global explorer named files containing explorer output - after running on target host - -messages - file containing messages - -object - directory containing subdirectory for each cdist object - -object_marker - object marker for this particular cdist run - -stderr - directory containing init manifest and remote stderr stream output - -stdout - directory containing init manifest and remote stdout stream output - -target_host - file containing target host of this cdist run, as specified when running - cdist - -typeorder - file containing types in order of execution. - - -Object cache overview -~~~~~~~~~~~~~~~~~~~~~ -Each object under :strong:`object` directory has its own structurue. - -code-local - code generated from gencode-local, present only if something is - generated - -code-remote - code generated from gencode-remote, present only if something is - generated - -explorer - directory containing type explorer named files containing explorer output - after running on target host - -files - directory with object files created during type execution - -parameter - directory containing type parameter named files containing parameter - values - -source - this type's source (init manifest) - -state - this type execution state ('done' when finished) - -stderr - directory containing type's manifest, gencode-* and code-* stderr stream - outputs - -stdin - this type stdin content - -stdout - directory containing type's manifest, gencode-* and code-* stdout stream - outputs. diff --git a/docs/src/cdist-configuration.rst b/docs/src/cdist-configuration.rst deleted file mode 100644 index 4c9b4d33..00000000 --- a/docs/src/cdist-configuration.rst +++ /dev/null @@ -1,103 +0,0 @@ -Configuration -============= - -Description ------------ -cdist obtains configuration data from the following sources in the following -order: - - #. command-line options - #. configuration file specified at command-line using -g command line option - #. configuration file specified in CDIST_CONFIG_FILE environment variable - #. environment variables - #. user's configuration file (first one found of ~/.cdist.cfg, $XDG_CONFIG_HOME/cdist/cdist.cfg, in specified order) - #. in-distribution configuration file (cdist/conf/cdist.cfg) - #. system-wide configuration file (/etc/cdist.cfg) - -if one exists. - -Configuration source with lower ordering number from above has a higher -precedence. Configuration option value read from source with higher -precedence will overwrite option value, if exists, read from source with -lower precedence. That means that command-line option wins them all. - -Users can decide on the local conifguration file location. It can be either -~/.cdist.cfg or $XDG_CONFIG_HOME/cdist/cdist.cfg. Note that, if both exist, -then ~/.cdist.cfg is used. - -For a per-project configuration, particular environment variables or better, -CDIST_CONFIG_FILE environment variable or -g CONFIG_FILE command line option, -can be used. - -Config file format ------------------- -cdist configuration file is in the INI file format. Currently it supports -only [GLOBAL] section. -The possible keywords and their meanings are as follows: - -:strong:`archiving` - Use specified archiving. Valid values include: - 'none', 'tar', 'tgz', 'tbz2' and 'txz'. - -:strong:`beta` - Enable beta functionality. It recognizes boolean values from - 'yes'/'no', 'on'/'off', 'true'/'false' and '1'/'0'. - -:strong:`cache_path_pattern` - Specify cache path pattern. - -:strong:`conf_dir` - List of configuration directories separated with the character conventionally - used by the operating system to separate search path components (as in PATH), - such as ':' for POSIX or ';' for Windows. - If also specified at command line then values from command line are - appended to this value. - -:strong:`init_manifest` - Specify default initial manifest. - -:strong:`inventory_dir` - Specify inventory directory. - -:strong:`jobs` - Specify number of jobs for parallel processing. If -1 then the default, - number of CPU's in the system is used. If 0 then parallel processing in - jobs is disabled. If set to positive number then specified maximum - number of processes will be used. - -:strong:`local_shell` - Shell command used for local execution. - -:strong:`out_path` - Directory to save cdist output in. - -:strong:`parallel` - Process hosts in parallel. If -1 then the default, number of CPU's in - the system is used. If 0 then parallel processing of hosts is disabled. - If set to positive number then specified maximum number of processes - will be used. - -:strong:`remote_copy` - Command to use for remote copy (should behave like scp). - -:strong:`remote_exec` - Command to use for remote execution (should behave like ssh). - -:strong:`remote_out_path` - Directory to save cdist output in on the target host. - -:strong:`remote_shell` - Shell command at remote host used for remote execution. - -:strong:`save_output_streams` - Enable/disable saving output streams (enabled by default). - It recognizes boolean values from 'yes'/'no', 'on'/'off', 'true'/'false' - and '1'/'0'. - -:strong:`timestamp` - Timestamp log messages with the current local date and time - in the format: YYYYMMDDHHMMSS.us. - -:strong:`verbosity` - Set verbosity level. Valid values are: - 'ERROR', 'WARNING', 'INFO', 'VERBOSE', 'DEBUG', 'TRACE' and 'OFF'. diff --git a/docs/src/cdist-explorer.rst b/docs/src/cdist-explorer.rst deleted file mode 100644 index a3c4f490..00000000 --- a/docs/src/cdist-explorer.rst +++ /dev/null @@ -1,54 +0,0 @@ -Explorer -======== - -Description ------------ -Explorers are small shell scripts, which will be executed on the target -host. The aim of each explorer is to give hints to types on how to act on the -target system. An explorer outputs the result to stdout, which is usually -a one liner, but may be empty or multi line especially in the case of -type explorers. - -There are general explorers, which are run in an early stage, and -type explorers. Both work almost exactly the same way, with the difference -that the values of the general explorers are stored in a general location and -the type specific below the object. - -Explorers can reuse other explorers on the target system by calling - -:: - - $__explorer/ (general and type explorer) - -or - -:: - - $__type_explorer/ (type explorer). - -In case of significant errors, the explorer may exit non-zero and return an -error message on stderr, which will cause cdist to abort. - -You can also use stderr for debugging purposes while developing a new -explorer. - -Examples --------- -A very simple explorer may look like this:: - - hostname - -Which is in practise the **hostname** explorer. - -A type explorer, which could check for the status of a package may look like this: - -.. code-block:: sh - - if [ -f "$__object/parameter/name" ]; then - name="$(cat "$__object/parameter/name")" - else - name="$__object_id" - fi - - # Expect dpkg failing, if package is not known / installed - dpkg -s "$name" 2>/dev/null || exit 0 diff --git a/docs/src/cdist-features.rst b/docs/src/cdist-features.rst deleted file mode 100644 index be56fa22..00000000 --- a/docs/src/cdist-features.rst +++ /dev/null @@ -1,48 +0,0 @@ -Features -======== - -But cdist ticks differently, here is the feature set that makes it unique: - -Simplicity - There is only one type to extend cdist called **type** - -Design - + Type and core cleanly separated - + Sticks completely to the KISS (keep it simple and stupid) paradigm - + Meaningful error messages - do not lose time debugging error messages - + Consistency in behaviour, naming and documentation - + No surprise factor: Only do what is obviously clear, no magic - + Define target state, do not focus on methods or scripts - + Push architecture: Instantly apply your changes - -Small core - cdist's core is very small - less code, less bugs - -Fast development - Focus on straightforwardness of type creation is a main development objective - Batteries included: A lot of requirements can be solved using standard types - -Modern Programming Language - cdist is written in Python - -Requirements, Scalability - No central server needed, cdist operates in push mode and can be run from any computer - -Requirements, Scalability, Upgrade - cdist only needs to be updated on the master, not on the target hosts - -Requirements, Security - Uses well-know `SSH `_ as transport protocol - -Requirements, Simplicity - Requires only shell and SSH server on the target - -UNIX - Reuse of existing tools like cat, find, mv, ... - -UNIX, familiar environment, documentation - Is available as manpages and HTML - -UNIX, simplicity, familiar environment - cdist is configured in POSIX shell - diff --git a/docs/src/cdist-hacker.rst b/docs/src/cdist-hacker.rst deleted file mode 100644 index e4252e19..00000000 --- a/docs/src/cdist-hacker.rst +++ /dev/null @@ -1,145 +0,0 @@ -Hacking -======= - -Welcome -------- -Welcome dear hacker! I invite you to a tour of pointers to -get into the usable configuration management system, cdist. - -The first thing to know is probably that cdist is brought to -you by people who care about how code looks like and who think -twice before merging or implementing a feature: Less features -with good usability are far better than the opposite. - - -Reporting bugs --------------- -If you believe you've found a bug and verified that it is -in the latest version, drop a mail to the cdist mailing list, -subject prefixed with "[BUG] " or create an issue on code.ungleich.ch. - - -Coding conventions (everywhere) -------------------------------- -If something should be improved or needs to be fixed, add the word FIXME -nearby, so grepping for FIXME gives all positions that need to be fixed. - -Indentation is 4 spaces (welcome to the python world). - - -How to submit stuff for inclusion into upstream cdist ------------------------------------------------------ -If you did some cool changes to cdist, which you think might be of benefit to other -cdist users, you're welcome to propose inclusion into upstream. - -There are some requirements to ensure your changes don't break other peoples -work nor kill the authors brain: - -- All files should contain the usual header (Author, Copying, etc.) -- Code submission must be done via git -- Do not add cdist/conf/manifest/init - This file should only be touched in your - private branch! -- Code to be included should be branched of the upstream "master" branch - - - Exception: Bugfixes to a version branch - -- On a merge request, always name the branch I should pull from -- Always ensure **all** manpages build. Use **./build man** to test. -- If you developed more than **one** feature, consider submitting them in - separate branches. This way one feature can already be included, even if - the other needs to be improved. - -As soon as your work meets these requirements, write a mail -for inclusion to the mailinglist **cdist-configuration-management at googlegroups.com** -or open a merge request at https://code.ungleich.ch/ungleich-public/cdist. - - -How to submit a new type ------------------------- -For detailed information about types, see `cdist type `_. - -Submitting a type works as described above, with the additional requirement -that a corresponding manpage named man.rst in ReSTructured text format with -the manpage-name "cdist-type__NAME" is included in the type directory -AND the manpage builds (`make man`). - -Warning: Submitting "exec" or "run" types that simply echo their parameter in -**gencode** will not be accepted, because they are of no use. Every type can output -code and thus such a type introduces redundant functionality that is given by -core cdist already. - - -Example git workflow ---------------------- -The following workflow works fine for most developers - -.. code-block:: sh - - # get latest upstream master branch - git clone https://code.ungleich.ch/ungleich-public/cdist.git - - # update if already existing - cd cdist; git fetch -v; git merge origin/master - - # create a new branch for your feature/bugfix - cd cdist # if you haven't done before - git checkout -b documentation_cleanup - - # *hack* - *hack* - - # clone the cdist repository on code.ungleich.ch if you haven't done so - - # configure your repo to know about your clone (only once) - git remote add ungleich git@code.ungleich.ch:YOURUSERNAME/cdist.git - - # push the new branch to ungleich gitlab - git push ungleich documentation_cleanup - - # (or everything) - git push --mirror ungleich - - # create a merge request at ungleich gitlab (use a browser) - # *fixthingsbecausequalityassurancefoundissuesinourpatch* - *hack* - - # push code to ungleich gitlab again - git push ... # like above - - # add comment that everything should be green now (use a browser) - - # go back to master branch - git checkout master - - # update master branch that includes your changes now - git fetch -v origin - git diff master..origin/master - git merge origin/master - -If at any point you want to go back to the original master branch, you can -use **git stash** to stash your changes away:: - -.. code-block:: sh - - # assume you are on documentation_cleanup - git stash - - # change to master and update to most recent upstream version - git checkout master - git fetch -v origin - git merge origin/master - -Similarly when you want to develop another new feature, you go back -to the master branch and create another branch based on it:: - -.. code-block:: sh - - # change to master and update to most recent upstream version - git checkout master - git fetch -v origin - git merge origin/master - - git checkout -b another_feature - -(you can repeat the code above for as many features as you want to develop -in parallel) diff --git a/docs/src/cdist-install.rst b/docs/src/cdist-install.rst deleted file mode 100644 index a9b7d6b5..00000000 --- a/docs/src/cdist-install.rst +++ /dev/null @@ -1,159 +0,0 @@ -How to install cdist -==================== - -Requirements -------------- - -Source Host -~~~~~~~~~~~ - -This is the machine from which you will configure target hosts. - - * /bin/sh: A posix like shell (for instance bash, dash, zsh) - * Python >= 3.2 - * SSH client - * sphinx (for building html docs and/or the man pages) - -Target Hosts -~~~~~~~~~~~~ - - * /bin/sh: A posix like shell (for instance bash, dash, zsh) - * SSH server - -Install cdist -------------- - -You can install cdist either from git or as a python package. - -From git -~~~~~~~~ - -Cloning cdist from git gives you the advantage of having -a version control in place for development of your own stuff -immediately. - -To install cdist, execute the following commands: - -.. code-block:: sh - - git clone https://code.ungleich.ch/ungleich-public/cdist.git - cd cdist - export PATH=$PATH:$(pwd -P)/bin - -From version 4.2.0 cdist tags and releases are signed. -You can get GPG public key used for signing `here <_static/pgp-key-EFD2AE4EC36B6901.asc>`_. - -You can also get cdist from `github mirror `_. - -To install cdist with distutils from cloned repository, first you have to -create version.py: - -.. code-block:: sh - - ./bin/build-helper version - -Then you install it with: - -.. code-block:: sh - - make install - -or with: - -.. code-block:: sh - - make install-user - -to install it into user *site-packages* directory. -Or directly with distutils: - -.. code-block:: sh - - python setup.py install - -Note that `bin/build-helper` script is intended for cdist maintainers. - - -Available versions in git -^^^^^^^^^^^^^^^^^^^^^^^^^ - - * The active development takes place in the **master** branch - * The released versions can be found in the tags - -Other branches may be available for features or bugfixes, but they -may vanish at any point. To select a specific branch use - -.. code-block:: sh - - # Generic code - git checkout -b origin/ - -So for instance if you want to use and stay with version 4.1, you can use - -.. code-block:: sh - - git checkout -b 4.1 origin/4.1 - -Building and using documentation (man and html) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -If you want to build and use the documentation, run: - -.. code-block:: sh - - make docs - -Documentation comes in two formats, man pages and full HTML -documentation. Documentation is built into distribution's -docs/dist directory. man pages are in docs/dist/man and -HTML documentation in docs/dist/html. - -If you want to use man pages, run: - -.. code-block:: sh - - export MANPATH=$MANPATH:$(pwd -P)/docs/dist/man - -Or you can move man pages from docs/dist/man directory to some -other directory and add it to MANPATH. - -Full HTML documentation can be accessed at docs/dist/html/index.html. - -You can also build only man pages or only html documentation, for -only man pages run: - -.. code-block:: sh - - make man - -for only html documentation run: - -.. code-block:: sh - - make html - -You can also build man pages for types in your ~/.cdist directory: - -.. code-block:: sh - - make dotman - -Built man pages are now in docs/dist/man directory. If you have -some other custom .cdist directory, e.g. /opt/cdist then use: - -.. code-block:: sh - - make DOT_CDIST_PATH=/opt/cdist dotman - -Note that `dotman`-target has to be built before a `make docs`-run, otherwise -the custom man-pages are not picked up. - -Python package -~~~~~~~~~~~~~~ - -Cdist is available as a python package at -`PyPi `_. You can install it using - -.. code-block:: sh - - pip install cdist diff --git a/docs/src/cdist-integration.rst b/docs/src/cdist-integration.rst deleted file mode 100644 index 13880cd3..00000000 --- a/docs/src/cdist-integration.rst +++ /dev/null @@ -1,47 +0,0 @@ -cdist integration / using cdist as library -========================================== - -Description ------------ - -cdist can be integrate with other applications by importing cdist and other -cdist modules and setting all by hand. There are also helper functions which -aim to ease this integration. Just import **cdist.integration** and use its -functions: - -* :strong:`cdist.integration.configure_hosts_simple` for configuration -* :strong:`cdist.integration.install_hosts_simple` for installation. - -Functions require `host` and `manifest` parameters. -`host` can be specified as a string representing host or as iterable -of hosts. `manifest` is a path to initial manifest. For other cdist -options default values will be used. `verbose` is a desired verbosity -level which defaults to VERBOSE_INFO. `cdist_path` parameter specifies -path to cdist executable, if it is `None` then functions will try to -find it first from local lib directory and then in PATH. - -In case of cdist error :strong:`cdist.Error` exception is raised. - -:strong:`WARNING`: cdist integration helper functions are not yet stable! - -Examples --------- - -.. code-block:: sh - - # configure host from python interactive shell - >>> import cdist.integration - >>> cdist.integration.configure_hosts_simple('185.203.114.185', - ... '~/.cdist/manifest/init') - - # configure host from python interactive shell, specifying verbosity level - >>> import cdist.integration - >>> cdist.integration.configure_hosts_simple( - ... '185.203.114.185', '~/.cdist/manifest/init', - ... verbose=cdist.argparse.VERBOSE_TRACE) - - # configure specified dns hosts from python interactive shell - >>> import cdist.integration - >>> hosts = ('dns1.ungleich.ch', 'dns2.ungleich.ch', 'dns3.ungleich.ch', ) - >>> cdist.integration.configure_hosts_simple(hosts, - ... '~/.cdist/manifest/init') diff --git a/docs/src/cdist-inventory.rst b/docs/src/cdist-inventory.rst deleted file mode 100644 index 106fcdb6..00000000 --- a/docs/src/cdist-inventory.rst +++ /dev/null @@ -1,211 +0,0 @@ -Inventory -========= - -Introduction ------------- - -cdist comes with simple built-in tag based inventory. It is a simple inventory -with list of hosts and a host has a list of tags. -Inventory functionality is still in **beta** so it can be used only if beta -command line flag is specified (-b, --beta) or setting CDIST_BETA env var. - -Description ------------ - -The idea is to have simple tagging inventory. There is a list of hosts and for -each host there are tags. Inventory database is a set of files under inventory -database base directory. Filename equals hostname. Each file contains tags for -hostname with each tag on its own line. - -Using inventory you can now configure hosts by selecting them by tags. - -Tags have no values, as tags are just tags. Tag name-value would in this -context mean that host has two tags and it is selected by specifying that both -tags are present. - -This inventory is **KISS** cdist built-in inventory database. You can maintain it -using cdist inventory interface or using standard UNIX tools. - -cdist inventory interface -------------------------- - -With cdist inventory interface you can list host(s) and tag(s), add host(s), -add tag(s), delete host(s) and delete tag(s). - -Configuring hosts using inventory ---------------------------------- - -config command now has new options, **-t**, **-a** and **-A**. - -**-A** means that all hosts in tag db is selected. - -**-a** means that selected hosts must contain ALL specified tags. - -**-t** means that host specifies tag - all hosts that have specified tags are -selected. - -Examples --------- - -.. code-block:: sh - - # List inventory content - $ cdist inventory list -b - - # List inventory for specified host localhost - $ cdist inventory list -b localhost - - # List inventory for specified tag loadbalancer - $ cdist inventory list -b -t loadbalancer - - # Add hosts to inventory - $ cdist inventory add-host -b web1 web2 web3 - - # Delete hosts from file old-hosts from inventory - $ cdist inventory del-host -b -f old-hosts - - # Add tags to specified hosts - $ cdist inventory add-tag -b -t europe,croatia,web,static web1 web2 - - # Add tag to all hosts in inventory - $ cdist inventory add-tag -b -t vm - - # Delete all tags from specified host - $ cdist inventory del-tag -b -a localhost - - # Delete tags read from stdin from hosts specified by file hosts - $ cdist inventory del-tag -b -T - -f hosts - - # Configure hosts from inventory with any of specified tags - $ cdist config -b -t web dynamic - - # Configure hosts from inventory with all specified tags - $ cdist config -b -t -a web dynamic - - # Configure all hosts from inventory db - $ cdist config -b -A - -Example of manipulating database --------------------------------- - -.. code-block:: sh - - $ python3 scripts/cdist inventory list -b - $ python3 scripts/cdist inventory add-host -b localhost - $ python3 scripts/cdist inventory add-host -b test.mycloud.net - $ python3 scripts/cdist inventory list -b - localhost - test.mycloud.net - $ python3 scripts/cdist inventory add-host -b web1.mycloud.net web2.mycloud.net shell1.mycloud.net shell2.mycloud.net - $ python3 scripts/cdist inventory list -b - localhost - test.mycloud.net - web1.mycloud.net - web2.mycloud.net - shell1.mycloud.net - shell2.mycloud.net - $ python3 scripts/cdist inventory add-tag -b -t web web1.mycloud.net web2.mycloud.net - $ python3 scripts/cdist inventory add-tag -b -t shell shell1.mycloud.net shell2.mycloud.net - $ python3 scripts/cdist inventory add-tag -b -t cloud - $ python3 scripts/cdist inventory list -b - localhost cloud - test.mycloud.net cloud - web1.mycloud.net cloud,web - web2.mycloud.net cloud,web - shell1.mycloud.net cloud,shell - shell2.mycloud.net cloud,shell - $ python3 scripts/cdist inventory add-tag -b -t test,web,shell test.mycloud.net - $ python3 scripts/cdist inventory list -b - localhost cloud - test.mycloud.net cloud,shell,test,web - web1.mycloud.net cloud,web - web2.mycloud.net cloud,web - shell1.mycloud.net cloud,shell - shell2.mycloud.net cloud,shell - $ python3 scripts/cdist inventory del-tag -b -t shell test.mycloud.net - $ python3 scripts/cdist inventory list -b - localhost cloud - test.mycloud.net cloud,test,web - web1.mycloud.net cloud,web - web2.mycloud.net cloud,web - shell1.mycloud.net cloud,shell - shell2.mycloud.net cloud,shell - $ python3 scripts/cdist inventory add-tag -b -t all - $ python3 scripts/cdist inventory add-tag -b -t mistake - $ python3 scripts/cdist inventory list -b - localhost all,cloud,mistake - test.mycloud.net all,cloud,mistake,test,web - web1.mycloud.net all,cloud,mistake,web - web2.mycloud.net all,cloud,mistake,web - shell1.mycloud.net all,cloud,mistake,shell - shell2.mycloud.net all,cloud,mistake,shell - $ python3 scripts/cdist inventory del-tag -b -t mistake - $ python3 scripts/cdist inventory list -b - localhost all,cloud - test.mycloud.net all,cloud,test,web - web1.mycloud.net all,cloud,web - web2.mycloud.net all,cloud,web - shell1.mycloud.net all,cloud,shell - shell2.mycloud.net all,cloud,shell - $ python3 scripts/cdist inventory del-host -b localhost - $ python3 scripts/cdist inventory list -b - test.mycloud.net all,cloud,test,web - web1.mycloud.net all,cloud,web - web2.mycloud.net all,cloud,web - shell1.mycloud.net all,cloud,shell - shell2.mycloud.net all,cloud,shell - $ python3 scripts/cdist inventory list -b -t web - test.mycloud.net all,cloud,test,web - web1.mycloud.net all,cloud,web - web2.mycloud.net all,cloud,web - $ python3 scripts/cdist inventory list -b -t -a web test - test.mycloud.net all,cloud,test,web - $ python3 scripts/cdist inventory list -b -t -a web all - test.mycloud.net all,cloud,test,web - web1.mycloud.net all,cloud,web - web2.mycloud.net all,cloud,web - $ python3 scripts/cdist inventory list -b -t web all - test.mycloud.net all,cloud,test,web - web1.mycloud.net all,cloud,web - web2.mycloud.net all,cloud,web - shell1.mycloud.net all,cloud,shell - shell2.mycloud.net all,cloud,shell - $ cd cdist/inventory - $ ls -1 - shell1.mycloud.net - shell2.mycloud.net - test.mycloud.net - web1.mycloud.net - web2.mycloud.net - $ ls -l - total 20 - -rw-r--r-- 1 darko darko 16 Jun 24 12:43 shell1.mycloud.net - -rw-r--r-- 1 darko darko 16 Jun 24 12:43 shell2.mycloud.net - -rw-r--r-- 1 darko darko 19 Jun 24 12:43 test.mycloud.net - -rw-r--r-- 1 darko darko 14 Jun 24 12:43 web1.mycloud.net - -rw-r--r-- 1 darko darko 14 Jun 24 12:43 web2.mycloud.net - $ cat test.mycloud.net - test - all - web - cloud - $ cat web2.mycloud.net - all - web - cloud - -For more info about inventory commands and options see `cdist `_\ (1). - -Using external inventory ------------------------- - -cdist can be used with any external inventory where external inventory is -some storage or database from which you can get a list of hosts to configure. -cdist can then be fed with this list of hosts through stdin or file using -**-f** option. For example, if your host list is stored in sqlite3 database -hosts.db and you want to select hosts which purpose is **django** then you -can use it with cdist like: - -.. code-block:: sh - - $ sqlite3 hosts.db "select hostname from hosts where purpose = 'django';" | cdist config diff --git a/docs/src/cdist-manifest.rst b/docs/src/cdist-manifest.rst deleted file mode 100644 index 4dd3e74b..00000000 --- a/docs/src/cdist-manifest.rst +++ /dev/null @@ -1,257 +0,0 @@ -Manifest -======== - -Description ------------ -Manifests are used to define which objects to create. -Objects are instances of **types**, like in object oriented programming languages. -An object is represented by the combination of -**type + slash + object name**: **\__file/etc/cdist-configured** is an -object of the type **__file** with the name **etc/cdist-configured**. - -All available types can be found in the **cdist/conf/type/** directory, -use **ls cdist/conf/type** to get the list of available types. If you have -setup the MANPATH correctly, you can use **man cdist-reference** to access -the reference with pointers to the manpages. - - -Types in manifests are used like normal command line tools. Let's have a look -at an example:: - - # Create object of type __package with the parameter state = absent - __package apache2 --state absent - - # Same with the __directory type - __directory /tmp/cdist --state present - -These two lines create objects, which will later be used to realise the -configuration on the target host. - -Manifests are executed locally as a shell script using **/bin/sh -e**. -The resulting objects are stored in an internal database. - -The same object can be redefined in multiple different manifests as long as -the parameters are exactly the same. - -In general, manifests are used to define which types are used depending -on given conditions. - - -Initial and type manifests --------------------------- -Cdist knows about two types of manifests: The initial manifest and type -manifests. The initial manifest is used to define, which configurations -to apply to which hosts. The type manifests are used to create objects -from types. More about manifests in types can be found in `cdist type `_. - - -Define state in the initial manifest ------------------------------------- -The **initial manifest** is the entry point for cdist to find out, which -**objects** to configure on the selected host. -Cdist expects the initial manifest at **cdist/conf/manifest/init**. - -Within this initial manifest you define which objects should be -created on which host. To distinguish between hosts, you can use the -environment variable **__target_host** and/or **__target_hostname** and/or -**__target_fqdn**. Let's have a look at a simple example:: - - __cdistmarker - - case "$__target_host" in - localhost) - __directory /home/services/kvm-vm --parents yes - ;; - esac - -This manifest says: Independent of the host, always use the type -**__cdistmarker**, which creates the file **/etc/cdist-configured**, -with the timestamp as content. -The directory **/home/services/kvm-vm**, including all parent directories, -is only created on the host **localhost**. - -As you can see, there is no magic involved, the manifest is simple shell code that -utilises cdist types. Every available type can be executed like a normal -command. - - -Splitting up the initial manifest ---------------------------------- -If you want to split up your initial manifest, you can create other shell -scripts in **cdist/conf/manifest/** and include them in **cdist/conf/manifest/init**. -Cdist provides the environment variable **__manifest** to reference -the directory containing the initial manifest (see `cdist reference `_). - -The following example would include every file with a **.sh** suffix:: - - # Include *.sh - for manifest in $__manifest/*.sh; do - # And source scripts into our shell environment - . "$manifest" - done - - -Dependencies ------------- -If you want to describe that something requires something else, just -setup the variable "require" to contain the requirements. Multiple -requirements can be added white space separated. - -:: - - 1 # No dependency - 2 __file /etc/cdist-configured - 3 - 4 # Require above object - 5 require="__file/etc/cdist-configured" __link /tmp/cdist-testfile \ - 6 --source /etc/cdist-configured --type symbolic - 7 - 8 # Require two objects - 9 require="__file/etc/cdist-configured __link/tmp/cdist-testfile" \ - 10 __file /tmp/cdist-another-testfile - - -Above the "require" variable is only set for the command that is -immediately following it. Dependencies should always be declared that way. - -On line 4 you can see that the instantiation of a type "\__link" object needs -the object "__file/etc/cdist-configured" to be present, before it can proceed. - -This also means that the "\__link" command must make sure, that either -"\__file/etc/cdist-configured" already is present, or, if it's not, it needs -to be created. The task of cdist is to make sure, that the dependency will be -resolved appropriately and thus "\__file/etc/cdist-configured" be created -if necessary before "__link" proceeds (or to abort execution with an error). - -If you really need to make all types depend on a common dependency, you can -export the "require" variable as well. But then, if you need to add extra -dependencies to a specific type, you have to make sure that you append these -to the globally already defined one. - -:: - - # First of all, update the package index - __package_update_index - # Upgrade all the installed packages afterwards - require="__package_update_index" __package_upgrade_all - # Create a common dependency for all the next types so that they get to - # be executed only after the package upgrade has finished - export require="__package_upgrade_all" - - # Ensure that lighttpd is installed after we have upgraded all the packages - __package lighttpd --state present - # Ensure that munin is installed after lighttpd is present and after all - # the packages are upgraded - require="$require __package/lighttpd" __package munin --state present - - -All objects that are created in a type manifest are automatically required -from the type that is calling them. This is called "autorequirement" in -cdist jargon. - -You can find a more in depth description of the flow execution of manifests -in `cdist execution stages `_ and of how types work in `cdist type `_. - - -Create dependencies from execution order ------------------------------------------ -You can tell cdist to execute all types in the order in which they are created -in the manifest by setting up the variable CDIST_ORDER_DEPENDENCY. -When cdist sees that this variable is setup, the current created object -automatically depends on the previously created object. - -It essentially helps you to build up blocks of code that build upon each other -(like first creating the directory xyz than the file below the directory). - -Read also about `perils of CDIST_ORDER_DEPENDENCY `_. - - -Overrides ---------- -In some special cases, you would like to create an already defined object -with different parameters. In normal situations this leads to an error in cdist. -If you wish, you can setup the environment variable CDIST_OVERRIDE -(any value or even empty is ok) to tell cdist, that this object override is -wanted and should be accepted. -ATTENTION: Only use this feature if you are 100% sure in which order -cdist encounters the affected objects, otherwise this results -in an undefined situation. - -If CDIST_OVERRIDE and CDIST_ORDER_DEPENDENCY are set for an object, -CDIST_ORDER_DEPENDENCY will be ignored, because adding a dependency in case of -overrides would result in circular dependencies, which is an error. - - -Examples --------- -The initial manifest may for instance contain the following code: - -.. code-block:: sh - - # Always create this file, so other sysadmins know cdist is used. - __file /etc/cdist-configured - - case "$__target_host" in - my.server.name) - __directory /root/bin/ - __file /etc/issue.net --source "$__manifest/issue.net - ;; - esac - -The manifest of the type "nologin" may look like this: - -.. code-block:: sh - - __file /etc/nologin --source "$__type/files/default.nologin" - -This example makes use of dependencies: - -.. code-block:: sh - - # Ensure that lighttpd is installed - __package lighttpd --state present - # Ensure that munin makes use of lighttpd instead of the default webserver - # package as decided by the package manager - require="__package/lighttpd" __package munin --state present - -How to override objects: - -.. code-block:: sh - - # for example in the initial manifest - - # create user account foobar with some hash for password - __user foobar --password 'some_fancy_hash' --home /home/foobarexample - - # ... many statements and includes in the manifest later ... - # somewhere in a conditionally sourced manifest - # (e.g. for example only sourced if a special application is on the target host) - - # this leads to an error ... - __user foobar --password 'some_other_hash' - - # this tells cdist, that you know that this is an override and should be accepted - CDIST_OVERRIDE=yes __user foobar --password 'some_other_hash' - # it's only an override, means the parameter --home is not touched - # and stays at the original value of /home/foobarexample - -Dependencies defined by execution order work as following: - -.. code-block:: sh - - # Tells cdist to execute all types in the order in which they are created ... - export CDIST_ORDER_DEPENDENCY=on - __sample_type 1 - require="__some_type_somewhere/id" __sample_type 2 - __example_type 23 - # Now this types are executed in the creation order until the variable is unset - unset CDIST_ORDER_DEPENDENCY - # all now following types cdist makes the order .. - __not_in_order_type 42 - - # how it works : - # this lines above are translated to: - __sample_type 1 - require="__some_type_somewhere/id __sample_type/1" __sample_type 2 - require="__sample_type/2" __example_type 23 - __not_in_order_type 42 diff --git a/docs/src/cdist-messaging.rst b/docs/src/cdist-messaging.rst deleted file mode 100644 index ea35c404..00000000 --- a/docs/src/cdist-messaging.rst +++ /dev/null @@ -1,94 +0,0 @@ -Messaging -========= - -Description ------------ -cdist has a simple but powerful way of allowing communication between -the initial manifest and types as well as types and types. - -Whenever execution is passed from cdist to one of the -scripts described below, cdist generate 2 new temporary files -and exports the environment variables **__messages_in** and -**__messages_out** to point to them. - -Before handing over the control, the content of the global message -file is copied into the file referenced by **$__messages_in**. - -After cdist gained control back, the content of the file referenced -by **$__messages_out** is appended to the global message file. - -This way overwriting any of the two files by accident does not -interfere with other types. - -The order of execution is not defined unless you create dependencies -between the different objects (see `cdist manifest `_) and thus you -can only react reliably on messages by objects that you depend on. - - -Availability ------------- -Messaging is possible between all **local** scripts: - -- initial manifest -- type/manifest -- type/gencode-local -- type/gencode-remote - - -Examples --------- -When you want to emit a message use: - -.. code-block:: sh - - echo "something" >> "$__messages_out" - -When you want to react on a message use: - -.. code-block:: sh - - if grep -q "^__your_type/object/id:something" "$__messages_in"; then - echo "I do something else" - fi - -Some real life examples: - -.. code-block:: sh - - # Reacting on changes from block for keepalive - if grep -q "^__block/keepalive-vrrp" "$__messages_in"; then - echo /etc/init.d/keepalived restart - fi - - # Reacting on changes of configuration files - if grep -q "^__file/etc/one" $__messages_in; then - echo 'for init in /etc/init.d/opennebula*; do $init restart; done' - fi - -Restart sshd on changes - -.. code-block:: sh - - os="$(cat "$__global/explorer/os")" - - case "$os" in - centos|redhat|suse) - restart="/etc/init.d/sshd restart" - ;; - debian|ubuntu) - restart="/etc/init.d/ssh restart" - ;; - *) - cat << eof >&2 - Unsupported os $os. - If you would like to have this type running on $os, - you can either develop the changes and send a pull - request or ask for a quote at www.ungleich.ch - eof - exit 1 - ;; - esac - - if grep -q "^__key_value/PermitRootLogin" "$__messages_in"; then - echo $restart - fi diff --git a/docs/src/cdist-os.rst b/docs/src/cdist-os.rst deleted file mode 100644 index a8e31226..00000000 --- a/docs/src/cdist-os.rst +++ /dev/null @@ -1,19 +0,0 @@ -Supported operating systems -=========================== - -cdist was tested or is know to run on at least - -* `Alpine Linux `_ -* `Archlinux `_ -* `CentOS `_ -* `Debian `_ -* `Devuan `_ -* `Fedora `_ -* `FreeBSD `_ -* `Gentoo `_ -* `Mac OS X `_ -* `NetBSD `_ -* `OpenBSD `_ -* `Redhat `_ -* `Ubuntu `_ -* `XenServer `_ diff --git a/docs/src/cdist-parallelization.rst b/docs/src/cdist-parallelization.rst deleted file mode 100644 index d458a128..00000000 --- a/docs/src/cdist-parallelization.rst +++ /dev/null @@ -1,73 +0,0 @@ -Parallelization -=============== - -Description ------------ -cdist has two modes of parallel operation. - -One of them is to operate on each host in separate process. This is enabled -with :strong:`-p/--parallel` option. - -The other way is to operate in parallel within one host where you specify -the number of jobs. This is enabled with :strong:`-j/--jobs` option where you -can specify the number of parallel jobs. By default, -:strong:`multiprocessing.cpu_count()` is used. For this mode global explorers, -object preparation and object run are supported. - -You can, of course, use those two options together. This means that each host -will be processed by its own process. Within each process cdist will operate -using specified number of parallel jobs. - -For more info on those options see :strong:`cdist`\ (1). - - -Examples --------- - -.. code-block:: sh - - # Configure hosts read from file hosts.file in parallel - $ cdist config -p -f hosts.file - - # Configure hosts read from file hosts.file sequentially but using default - # number of parallel jobs - $ cdist config -j -f hosts.file - - # Configure hosts read from file hosts.file in parallel using 16 - # parallel jobs - $ cdist config -j 16 -p -f hosts.file - - -Caveats -------- -When operating in parallel, either by operating in parallel for each host -(-p/--parallel) or by parallel jobs within a host (-j/--jobs), and depending -on target SSH server and its configuration you may encounter connection drops. -This is controlled with sshd :strong:MaxStartups configuration options. -You may also encounter session open refusal. This happens with ssh multiplexing -when you reach maximum number of open sessions permitted per network -connection. In this case ssh will disable multiplexing. -This limit is controlled with sshd :strong:MaxSessions configuration -options. For more details refer to :strong:`sshd_config`\ (5). - -For example, if you reach :strong:`MaxSessions` sessions you may get the -following output: - -.. code-block:: sh - - $ cdist config -b -j 11 -v 78.47.116.244 - INFO: cdist: version 4.2.2-55-g640b7f9 - INFO: 78.47.116.244: Running global explorers - INFO: 78.47.116.244: Remote transfer in 11 parallel jobs - channel 22: open failed: administratively prohibited: open failed - mux_client_request_session: session request failed: Session open refused by peer - ControlSocket /tmp/tmpuah6fw_t/d886d4b7e4425a102a54bfaff4d2288b/ssh-control-path already exists, disabling multiplexing - INFO: 78.47.116.244: Running global explorers in 11 parallel jobs - channel 22: open failed: administratively prohibited: open failed - mux_client_request_session: session request failed: Session open refused by peer - ControlSocket /tmp/tmpuah6fw_t/d886d4b7e4425a102a54bfaff4d2288b/ssh-control-path already exists, disabling multiplexing - INFO: 78.47.116.244: Running initial manifest /tmp/tmpuah6fw_t/d886d4b7e4425a102a54bfaff4d2288b/data/conf/manifest/init - INFO: 78.47.116.244: Running manifest and explorers for __file/root/host.file - INFO: 78.47.116.244: Generating code for __file/root/host.file - INFO: 78.47.116.244: Finished successful run in 18.655028820037842 seconds - INFO: cdist: Total processing time for 1 host(s): 19.159148693084717 diff --git a/docs/src/cdist-quickstart.rst b/docs/src/cdist-quickstart.rst deleted file mode 100644 index 99af869f..00000000 --- a/docs/src/cdist-quickstart.rst +++ /dev/null @@ -1,77 +0,0 @@ -Quickstart -========== - -This tutorial is aimed at people learning cdist and shows -typical approaches as well as gives an easy start into -the world of configuration management. - -For those who just want to configure a system with the -cdist configuration management and do not need (or want) -to understand everything. - -This tutorial assumes you are configuring **localhost**, because -it is always available. Just replace **localhost** with your target -host for real life usage. - -Cdist uses **ssh** for communication and transportation -and usually logs into the **target host** as the -**root** user. So you need to configure the **ssh server** -of the target host to allow root logins: Edit -the file **/etc/ssh/sshd_config** and add one of the following -lines:: - - # Allow login only via public key - PermitRootLogin without-password - - # Allow login via password and public key - PermitRootLogin yes - -As cdist uses ssh intensively, it is recommended to setup authentication -with public keys:: - - # Generate pubkey pair as a normal user - ssh-keygen - - # Copy pubkey over to target host - ssh-copy-id root@localhost - -Have a look at ssh-agent(1) and ssh-add(1) on how to cache the password for -your public key. Usually it looks like this:: - - # Start agent and export variables - eval `ssh-agent` - - # Add keys (requires password for every identity file) - ssh-add - -At this point you should be able to **ssh root@localhost** without -re-entering the password. If something failed until here, ensure that -all steps went successfully and you have read and understood the -documentation. - -As soon as you are able to login without password to localhost, -we can use cdist to configure it. You can copy and paste the following -code into your shell to get started and configure localhost:: - - # Get cdist - git clone git@code.ungleich.ch:ungleich-public/cdist.git - - # Create manifest (maps configuration to host(s) - cd cdist - echo '__file /etc/cdist-configured' > cdist/conf/manifest/init - - # Configure localhost in verbose mode - ./bin/cdist config -v localhost - - # Find out that cdist created /etc/cdist-configured - ls -l /etc/cdist-configured - -Note: cdist/conf is configuration directory shipped with cdist distribution. -If exists, ~/.cdist, is also automatically used as cdist configuration -directory. So in the above example you could create ~/.cdist directory, -then ~/.cdist/manifest sub-directory and create init manifest -~/.cdist/manifest/init. - -That's it, you've successfully used cdist to configure your first host! -Continue reading the next sections, to understand what you did and how -to create a more sophisticated configuration. diff --git a/docs/src/cdist-real-world.rst b/docs/src/cdist-real-world.rst deleted file mode 100644 index 8ccb0fc9..00000000 --- a/docs/src/cdist-real-world.rst +++ /dev/null @@ -1,573 +0,0 @@ -Dive into real world cdist -========================== - -Introduction ------------- - -This walkthrough shows real world cdist configuration example. - -Sample target host is named **test.ungleich.ch**. -Just replace **test.ungleich.ch** with your target hostname. - -Our goal is to configure python application hosting. For writing sample -application we will use `Bottle `_ WSGI micro web-framework. -It will use PostgreSQL database and it will list items from **items** table. -It will be served by uWSGI server. We will also use the Nginx web server -as a reverse proxy and we want HTTPS. -For HTTPS we will use Let's Encrypt certificate. - -For setting up hosting we want to use cdist so we will write a new type -for that. This type will: - -- install required packages -- create OS user, user home directory and application home directory -- create PostgreSQL database -- configure uWSGI -- configure Let's Encrypt certificate -- configure nginx. - -Our type will not create the actual python application. Its intention is only -to configure hosing for specified user and project. It is up to the user to -create his/her applications. - -So let's start. - -Creating type layout --------------------- - -We will create a new custom type. Let's call it **__sample_bottle_hosting**. - -Go to **~/.cdist/type** directory (create it if it does not exist) and create -new type layout:: - - cd ~/.cdist/type - mkdir __sample_bottle_hosting - cd __sample_bottle_hosting - touch manifest gencode-remote - mkdir parameter - touch parameter/required - -Creating __sample_bottle_hosting type parameters ------------------------------------------------- - -Our type will be configurable through the means of parameters. Let's define -the following parameters: - -projectname - name for the project, needed for uWSGI ini file - -user - user name - -domain - target host domain, needed for Let's Encrypt certificate. - -We define parameters to make our type reusable for different projects, user and domain. - -Define required parameters:: - - printf "projectname\n" >> parameter/required - printf "user\n" >> parameter/required - printf "domain\n" >> parameter/required - -For details on type parameters see `Defining parameters `_. - -Creating __sample_bottle_hosting type manifest ----------------------------------------------- - -Next step is to define manifest (~/.cdist/type/__sample_bottle_hosting/manifest). -We also want our type to currently support only Devuan. So we will start by -checking target host OS. We will use `os `_ -global explorer:: - - os=$(cat "$__global/explorer/os") - - case "$os" in - devuan) - : - ;; - *) - echo "OS $os currently not supported" >&2 - exit 1 - ;; - esac - -If target host OS is not Devuan then we print error message to stderr -and exit. For other OS-es support we should check and change package names -we should install, because packages differ in different OS-es and in different -OS distributions like GNU/Linux distributions. There can also be a different -configuration locations (e.g. nginx config directory could be in /usr/local tree). -If we detected unsupported OS we should error out. cdist will stop configuration -process and output error message. - -Creating user and user directories -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Then we create user and his/her home directory and application home directory. -We will use existing cdist types `__user `_ and `__directory `_:: - - user="$(cat "$__object/parameter/user")" - home="/home/$user" - apphome="$home/app" - - # create user - __user "$user" --home "$home" --shell /bin/bash - # create user home dir - require="__user/$user" __directory "$home" \ - --owner "$user" --group "$user" --mode 0755 - # create app home dir - require="__user/$user __directory/$home" __directory "$apphome" \ - --state present --owner "$user" --group "$user" --mode 0755 - -First we define *user*, *home* and *apphome* variables. User is defined by type's -**user** parameter. Here we use **require** which is cdist's way to define dependencies. -User home directory should be created **after** user is created. And application -home directory is created **after** both user and user home directory are created. -For details on **require** see `Dependencies `_. - -Installing packages -~~~~~~~~~~~~~~~~~~~ - -Install required packages using existing `__package `_ type. -Before installing package we want to update apt package index using -`__apt_update_index `_:: - - # define packages that need to be installed - packages_to_install="nginx uwsgi-plugin-python3 python3-dev python3-pip postgresql postgresql-contrib libpq-dev python3-venv uwsgi python3-psycopg2" - - # update package index - __apt_update_index - # install packages - for package in $packages_to_install - do require="__apt_update_index" __package $package --state=present - done - -Here we use shell for loop. It executes **require="__apt_update_index" __package** -for each member in a list we define in **packages_to_install** variable. -This is much nicer then having as many **require="__apt_update_index" __package** -lines as there are packages we want to install. - -For python packages we use `__package_pip `_:: - - # install pip3 packages - for package in bottle bottle-pgsql; do - __package_pip --pip pip3 $package - done - -Creating PostgreSQL database -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Create PostgreSQL database using `__postgres_database `_ -and `__postgres_role `_ for creating database user:: - - #PostgreSQL db & user - postgres_server=postgresql - - # create PostgreSQL db user - require="__package/postgresql" __postgres_role $user --login --createdb - # create PostgreSQL db - require="__postgres_role/$user __package/postgresql" __postgres_database $user \ - --owner $user - -Configuring uWSGI -~~~~~~~~~~~~~~~~~ - -Configure uWSGI using `__file `_ type:: - - # configure uWSGI - projectname="$(cat "$__object/parameter/projectname")" - require="__package/uwsgi" __file /etc/uwsgi/apps-enabled/$user.ini \ - --owner root --group root --mode 0644 \ - --state present \ - --source - << EOF - [uwsgi] - socket = $apphome/uwsgi.sock - chdir = $apphome - wsgi-file = $projectname/wsgi.py - touch-reload = $projectname/wsgi.py - processes = 4 - threads = 2 - chmod-socket = 666 - daemonize=true - vacuum = true - uid = $user - gid = $user - EOF - -We require package uWSGI present in order to create **/etc/uwsgi/apps-enabled/$user.ini** file. -Installation of uWSGI also creates configuration layout: **/etc/uwsgi/apps-enabled**. -If this directory does not exist then **__file** type would error. -We also use stdin as file content source. For details see `Input from stdin `_. -For feading stdin we use here-document (**<<** operator). It allows redirection of subsequent -lines read by the shell to the input of a command until a line containing only the delimiter -and a newline, with no blank characters in between (EOF in our case). - -Configuring nginx for Let's Encrypt and HTTPS redirection -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Next configure nginx for Let's Encrypt and for HTTP -> HTTPS redirection. For this -purpose we will create new type **__sample_nginx_http_letsencrypt_and_ssl_redirect** -and use it here:: - - domain="$(cat "$__object/parameter/domain")" - webroot="/var/www/html" - __sample_nginx_http_letsencrypt_and_ssl_redirect "$domain" --webroot "$webroot" - -Configuring certificate creation -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -After HTTP nginx configuration we will create Let's Encrypt certificate using -`__letsencrypt_cert `_ type. -For Let's Encrypt cert configuration ensure that there is a DNS entry for your -domain. We assure that cert creation is applied after nginx HTTP is configured -for Let's Encrypt to work:: - - # create SSL cert - require="__package/nginx __sample_nginx_http_letsencrypt_and_ssl_redirect/$domain" \ - __letsencrypt_cert --admin-email admin@test.ungleich.ch \ - --webroot "$webroot" \ - --automatic-renewal \ - --renew-hook "service nginx reload" \ - --domain "$domain" \ - "$domain" - -Configuring nginx HTTPS server with uWSGI upstream -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Then we can configure nginx HTTPS server that will use created Let's Encrypt certificate:: - - # configure nginx - require="__package/nginx __letsencrypt_cert/$domain" \ - __file "/etc/nginx/sites-enabled/https-$domain" \ - --source - --mode 0644 << EOF - upstream _bottle { - server unix:$apphome/uwsgi.sock; - } - - server { - listen 443; - listen [::]:443; - - server_name $domain; - - access_log /var/log/nginx/access.log; - - ssl on; - ssl_certificate /etc/letsencrypt/live/$domain/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/$domain/privkey.pem; - - client_max_body_size 256m; - - location / { - try_files \$uri @uwsgi; - } - - location @uwsgi { - include uwsgi_params; - uwsgi_pass _bottle; - } - } - EOF - -Now our manifest is finished. - -Complete __sample_bottle_hosting type manifest listing -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is complete __sample_bottle_hosting type manifest listing, -located in ~/.cdist/type/__sample_bottle_hosting/manifest:: - - #!/bin/sh - - os=$(cat "$__global/explorer/os") - - case "$os" in - devuan) - : - ;; - *) - echo "OS $os currently not supported" >&2 - exit 1 - ;; - esac - - projectname="$(cat "$__object/parameter/projectname")" - user="$(cat "$__object/parameter/user")" - home="/home/$user" - apphome="$home/app" - domain="$(cat "$__object/parameter/domain")" - - # create user - __user "$user" --home "$home" --shell /bin/bash - # create user home dir - require="__user/$user" __directory "$home" \ - --owner "$user" --group "$user" --mode 0755 - # create app home dir - require="__user/$user __directory/$home" __directory "$apphome" \ - --state present --owner "$user" --group "$user" --mode 0755 - - # define packages that need to be installed - packages_to_install="nginx uwsgi-plugin-python3 python3-dev python3-pip postgresql postgresql-contrib libpq-dev python3-venv uwsgi python3-psycopg2" - - # update package index - __apt_update_index - # install packages - for package in $packages_to_install - do require="__apt_update_index" __package $package --state=present - done - # install pip3 packages - for package in bottle bottle-pgsql; do - __package_pip --pip pip3 $package - done - - #PostgreSQL db & user - postgres_server=postgresql - - # create PostgreSQL db user - require="__package/postgresql" __postgres_role $user --login --createdb - # create PostgreSQL db - require="__postgres_role/$user __package/postgresql" __postgres_database $user \ - --owner $user - # configure uWSGI - require="__package/uwsgi" __file /etc/uwsgi/apps-enabled/$user.ini \ - --owner root --group root --mode 0644 \ - --state present \ - --source - << EOF - [uwsgi] - socket = $apphome/uwsgi.sock - chdir = $apphome - wsgi-file = $projectname/wsgi.py - touch-reload = $projectname/wsgi.py - processes = 4 - threads = 2 - chmod-socket = 666 - daemonize=true - vacuum = true - uid = $user - gid = $user - EOF - - # setup nginx HTTP for Let's Encrypt and SSL redirect - domain="$(cat "$__object/parameter/domain")" - webroot="/var/www/html" - __sample_nginx_http_letsencrypt_and_ssl_redirect "$domain" --webroot "$webroot" - - # create SSL cert - require="__package/nginx __sample_nginx_http_letsencrypt_and_ssl_redirect/$domain" \ - __letsencrypt_cert --admin-email admin@test.ungleich.ch \ - --webroot "$webroot" \ - --automatic-renewal \ - --renew-hook "service nginx reload" \ - --domain "$domain" \ - "$domain" - - # configure nginx - require="__package/nginx __letsencrypt_cert/$domain" \ - __file "/etc/nginx/sites-enabled/https-$domain" \ - --source - --mode 0644 << EOF - upstream _bottle { - server unix:$apphome/uwsgi.sock; - } - - server { - listen 443; - listen [::]:443; - - server_name $domain; - - access_log /var/log/nginx/access.log; - - ssl on; - ssl_certificate /etc/letsencrypt/live/$domain/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/$domain/privkey.pem; - - client_max_body_size 256m; - - location / { - try_files \$uri @uwsgi; - } - - location @uwsgi { - include uwsgi_params; - uwsgi_pass _bottle; - } - } - EOF - -Creating __sample_bottle_hosting type gencode-remote ----------------------------------------------------- - -Now define **gencode-remote** script: ~/.cdist/type/__sample_bottle_hosting/gencode-remote. -After manifest is applied it should restart uWSGI and nginx services so that our -configuration is active. Our gencode-remote looks like the following:: - - echo "service uwsgi restart" - echo "service nginx restart" - -Our **__sample_bottle_hosting** type is now finished. - -Creating __sample_nginx_http_letsencrypt_and_ssl_redirect type --------------------------------------------------------------- - -Let's now create **__sample_nginx_http_letsencrypt_and_ssl_redirect** type:: - - cd ~/.cdist/type - mkdir __sample_nginx_http_letsencrypt_and_ssl_redirect - cd __sample_nginx_http_letsencrypt_and_ssl_redirect - mkdir parameter - echo webroot > parameter/required - touch manifest - touch gencode-remote - -Edit manifest:: - - domain="$__object_id" - webroot="$(cat "$__object/parameter/webroot")" - # make sure we have nginx package - __package nginx - # setup Let's Encrypt HTTP acme challenge, redirect HTTP to HTTPS - require="__package/nginx" __file "/etc/nginx/sites-enabled/http-$domain" \ - --source - --mode 0644 << EOF - server { - listen *:80; - listen [::]:80; - - server_name $domain; - - # Let's Encrypt - location /.well-known/acme-challenge/ { - root $webroot; - } - - # Everything else -> SSL - location / { - return 301 https://\$host\$request_uri; - } - } - - EOF - -Edit gencode-remote:: - - echo "service nginx reload" - -Creating init manifest ----------------------- - -Next create init manifest:: - - cd ~/.cdist/manifest - printf "__sample_bottle_hosting --projectname sample --user app --domain \$__target_host sample\n" > sample - -Using this init manifest our target host will be configured using our **__sample_bottle_hosting** -type with projectname *sample*, user *app* and domain equal to **__target_host**. -Here the last positional argument *sample* is type's object id. For details on -**__target_host** and **__object_id** see -`Environment variables (for reading) `_ -reference. - -Configuring host ----------------- - -Finally configure test.ungleich.ch:: - - cdist config -v -i ~/.cdist/manifest/sample test.ungleich.ch - -After cdist configuration is successfully finished our host is ready. - -Creating python bottle application ----------------------------------- - -We now need to create Bottle application. As you remember from the beginning -of this walkthrough our type does not create the actual python application, -its intention is only to configure hosing for specified user and project. -It is up to the user to create his/her applications. - -Become app user:: - - su -l app - -Preparing database -~~~~~~~~~~~~~~~~~~ - -We need to prepare database for our application. Create table and -insert some items:: - - psql -c "create table items (item varchar(255));" - - psql -c "insert into items(item) values('spam');" - psql -c "insert into items(item) values('eggs');" - psql -c "insert into items(item) values('sausage');" - -Creating application -~~~~~~~~~~~~~~~~~~~~ - -Next create sample app:: - - cd /home/app/app - mkdir sample - cd sample - -Create app.py with the following content:: - - #!/usr/bin/env python3 - - import bottle - import bottle_pgsql - - app = application = bottle.Bottle() - plugin = bottle_pgsql.Plugin('dbname=app user=app password=') - app.install(plugin) - - @app.route('/') - def show_index(db): - db.execute('select * from items') - items = db.fetchall() or [] - rv = '

Items:

    ' - for item in items: - rv += '
  • ' + str(item['item']) + '
  • ' - rv += '
' - return rv - - if __name__ == '__main__': - bottle.run(app=app, host='0.0.0.0', port=8080) - -Create wsgi.py with the following content:: - - import os - - os.chdir(os.path.dirname(__file__)) - - import app - application = app.app - -We have configured uWSGI with **touch-reload = $projectname/wsgi.py** so after -we have changed our **wsgi.py** file uWSGI reloads the application. - -Our application selects and lists items from **items** table. - -Openning application -~~~~~~~~~~~~~~~~~~~~ - -Finally try the application:: - - http://test.ungleich.ch/ - -It should redirect to HTTPS and return: - -.. container:: highlight - - .. raw:: html - -

Items:

- -
    -
  • spam
  • -
  • eggs
  • -
  • sausage
  • -
- -What's next? ------------- - -Continue reading next sections ;) diff --git a/docs/src/cdist-reference.rst.sh b/docs/src/cdist-reference.rst.sh deleted file mode 100755 index f4a37816..00000000 --- a/docs/src/cdist-reference.rst.sh +++ /dev/null @@ -1,346 +0,0 @@ -#!/bin/sh -# -# 2010-2014 Nico Schottelius (nico-cdist at schottelius.org) -# 2014 Daniel Heule (hda at sfs.biz) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Generate manpage that lists available types -# - -__cdist_pwd="$(pwd -P)" -__cdist_mydir="${0%/*}"; -__cdist_abs_mydir="$(cd "$__cdist_mydir" && pwd -P)" -__cdist_myname=${0##*/}; -__cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" - -filename="${__cdist_myname%.sh}" -dest="$__cdist_abs_mydir/$filename" - -cd "$__cdist_abs_mydir" - -exec > "$dest" -cat << eof -Reference -========= -Variable, path and type reference for cdist - -Explorers ---------- -The following global explorers are available: - -eof -( - cd ../../cdist/conf/explorer - for explorer in $(ls * | LC_ALL=C sort); do - echo "- $explorer" - done -) - -cat << eof - -Paths ------ -\$HOME/.cdist - The standard cdist configuration directory relative to your home directory. - This is usually the place you want to store your site specific configuration. - -cdist/conf/ - The distribution configuration directory. - This contains types and explorers to be used. - -cdist/inventory/ - The distribution inventory directory. - This path is relative to cdist installation directory. - -confdir - Cdist will use all available configuration directories and create - a temporary confdir containing links to the real configuration directories. - This way it is possible to merge configuration directories. - By default it consists of everything in \$HOME/.cdist and cdist/conf/. - For more details see cdist(1). - -confdir/files/ - Cdist does not care about this directory besides providing access to it. - It is thought to be a general file storage area. - -confdir/manifest/init - This is the central entry point. - It is an executable (+x bit set) shell script that can use - values from the explorers to decide which configuration to create - for the specified target host. - Its intent is to used to define mapping from configurations to hosts. - -confdir/manifest/* - All other files in this directory are not directly used by cdist, but you - can separate configuration mappings, if you have a lot of code in the - conf/manifest/init file. This may also be helpful to have different admins - maintain different groups of hosts. - -confdir/explorer/ - Contains explorers to be run on the target hosts, see \`cdist explorer \`_. - -confdir/type/ - Contains all available types, which are used to provide - some kind of functionality. See \`cdist type \`_. - -confdir/type// - Home of the type . - This directory is referenced by the variable __type (see below). - -confdir/type//man.rst - Manpage in reStructuredText format (required for inclusion into upstream). - -confdir/type//manifest - Used to generate additional objects from a type. - -confdir/type//gencode-local - Used to generate code to be executed on the source host. - -confdir/type//gencode-remote - Used to generate code to be executed on the target host. - -confdir/type//parameter/required - Parameters required by type, \n separated list. - -confdir/type//parameter/optional - Parameters optionally accepted by type, \n separated list. - -confdir/type//parameter/default/* - Default values for optional parameters. - Assuming an optional parameter name of 'foo', it's default value would - be read from the file confdir/type//parameter/default/foo. - -confdir/type//parameter/boolean - Boolean parameters accepted by type, \n separated list. - -confdir/type//explorer - Location of the type specific explorers. - This directory is referenced by the variable __type_explorer (see below). - See \`cdist explorer \`_. - -confdir/type//files - This directory is reserved for user data and will not be used - by cdist at any time. It can be used for storing supplementary - files (like scripts to act as a template or configuration files). - -out/ - This directory contains output of cdist and is usually located - in a temporary directory and thus will be removed after the run. - This directory is referenced by the variable __global (see below). - -out/explorer - Output of general explorers. - -out/object - Objects created for the host. - -out/object/ - Contains all object specific information. - This directory is referenced by the variable __object (see below). - -out/object//explorers - Output of type specific explorers, per object. - -Types ------ -The following types are available: - -eof - -# If there is no such file then ls prints error to stderr, -# so redirect stderr to /dev/null. -for type in $(ls man7/cdist-type__*.rst 2>/dev/null | LC_ALL=C sort); do - no_dir="${type#man7/}"; - no_type="${no_dir#cdist-type}"; - name="${no_type%.rst}"; - manref="${no_dir%.rst}" - man="${manref}(7)" - - echo "- $name" "(\`${man} \`_)" -done - -cat << eof - - -Objects -------- -For object to object communication and tests, the following paths are -usable within a object directory: - -files - This directory is reserved for user data and will not be used - by cdist at any time. It can be used freely by the type - (for instance to store template results). -changed - This empty file exists in an object directory, if the object has - code to be executed (either remote or local). -stdin - This file exists and contains data, if data was provided on stdin - when the type was called. - - -Environment variables (for reading) ------------------------------------ -The following environment variables are exported by cdist: - -__cdist_log_level, __cdist_log_level_name - cdist log level value and cdist log level name. One of: - - +----------------+-----------------+ - | Log level name | Log level value | - +================+=================+ - | OFF | 60 | - +----------------+-----------------+ - | ERROR | 40 | - +----------------+-----------------+ - | WARNING | 30 | - +----------------+-----------------+ - | INFO | 20 | - +----------------+-----------------+ - | VERBOSE | 15 | - +----------------+-----------------+ - | DEBUG | 10 | - +----------------+-----------------+ - | TRACE | 5 | - +----------------+-----------------+ - - Available for: initial manifest, explorer, type manifest, type explorer, - type gencode. -__cdist_dry_run - Is set only when doing dry run (``-n`` flag). - Available for: initial manifest, explorer, type manifest, type explorer, - type gencode. -__explorer - Directory that contains all global explorers. - Available for: initial manifest, explorer, type explorer, shell. -__files - Directory that contains content from the "files" subdirectories - from the configuration directories. - Available for: initial manifest, type manifest, type gencode, shell. -__manifest - Directory that contains the initial manifest. - Available for: initial manifest, type manifest, shell. -__global - Directory that contains generic output like explorer. - Available for: initial manifest, type manifest, type gencode, shell. -__messages_in - File to read messages from. - Available for: initial manifest, type manifest, type gencode. -__messages_out - File to write messages. - Available for: initial manifest, type manifest, type gencode. -__object - Directory that contains the current object. - Available for: type manifest, type explorer, type gencode and code scripts. -__object_id - The type unique object id. - Available for: type manifest, type explorer, type gencode and code scripts. - Note: The leading and the trailing "/" will always be stripped (caused by - the filesystem database and ensured by the core). - Note: Double slashes ("//") will not be fixed and result in an error. -__object_name - The full qualified name of the current object. - Available for: type manifest, type explorer, type gencode. -__target_host - The host we are deploying to. This is primary variable. It's content is - literally the one user passed in. - Available for: explorer, initial manifest, type explorer, type manifest, type gencode, shell. -__target_hostname - The hostname of host we are deploying to. This variable is derived from - **__target_host** (using **socket.getaddrinfo(__target_host)** and then - **socket.gethostbyaddr()**). - Available for: explorer, initial manifest, type explorer, type manifest, type gencode, shell. -__target_fqdn - The fully qualified domain name of the host we are deploying to. - This variable is derived from **__target_host** - (using **socket.getfqdn()**). - Available for: explorer, initial manifest, type explorer, type manifest, type gencode, shell. -__target_host_tags - Comma separated list of target host tags. - Available for: explorer, initial manifest, type explorer, type manifest, type gencode, shell. -__type - Path to the current type. - Available for: type manifest, type gencode. -__type_explorer - Directory that contains the type explorers. - Available for: type explorer. - -Environment variables (for writing) ------------------------------------ -The following environment variables influence the behaviour of cdist: - -require - Setup dependencies between objects (see \`cdist manifest \`_). - -__cdist_log_level - cdist log level value. One of: - - +----------------+-----------------+ - | Log level | Log level value | - +================+=================+ - | OFF | 60 | - +----------------+-----------------+ - | ERROR | 40 | - +----------------+-----------------+ - | WARNING | 30 | - +----------------+-----------------+ - | INFO | 20 | - +----------------+-----------------+ - | VERBOSE | 15 | - +----------------+-----------------+ - | DEBUG | 10 | - +----------------+-----------------+ - | TRACE | 5 | - +----------------+-----------------+ - - If set cdist will set this log level in - accordance with configuration rules. If cdist invokation is used - in types then nested cdist will honor this specified log level if - not specified otherwise while invoking it. - -CDIST_PATH - Colon delimited list of config directories. - -CDIST_LOCAL_SHELL - Use this shell locally instead of /bin/sh to execute scripts. - -CDIST_REMOTE_SHELL - Use this shell remotely instead of /bin/sh to execute scripts. - -CDIST_OVERRIDE - Allow overwriting type parameters (see \`cdist manifest \`_). - -CDIST_ORDER_DEPENDENCY - Create dependencies based on the execution order (see \`cdist manifest \`_). - Read also about \`perils of CDIST_ORDER_DEPENDENCY \`_. - -CDIST_REMOTE_EXEC - Use this command for remote execution (should behave like ssh). - -CDIST_REMOTE_COPY - Use this command for remote copy (should behave like scp). - -CDIST_INVENTORY_DIR - Use this directory as inventory directory. - -CDIST_BETA - Enable beta functionalities. - -CDIST_CACHE_PATH_PATTERN - Custom cache path pattern. -eof diff --git a/docs/src/cdist-remote-exec-copy.rst b/docs/src/cdist-remote-exec-copy.rst deleted file mode 100644 index bb818310..00000000 --- a/docs/src/cdist-remote-exec-copy.rst +++ /dev/null @@ -1,28 +0,0 @@ -Remote exec and copy commands -============================= - -Cdist interacts with the target host in two ways: - -- it executes code (__remote_exec) -- and it copies files (__remote_copy) - -By default this is accomplished with ssh and scp respectively. -The default implementations used by cdist are:: - - __remote_exec: ssh -o User=root - __remote_copy: scp -o User=root - -The user can override these defaults by providing custom implementations and -passing them to cdist with the --remote-exec and/or --remote-copy arguments. - -For __remote_exec, the custom implementation must behave as if it where ssh. -For __remote_copy, it must behave like scp. -Please notice, custom implementations should work like ssh/scp so __remote_copy -must support IPv6 addresses enclosed in square brackets. For __remote_exec you -must take into account that for some options (like -L) IPv6 addresses can be -specified by enclosed in square brackets (see :strong:`ssh`\ (1) and -:strong:`scp`\ (1)). - -With this simple interface the user can take total control of how cdist -interacts with the target when required, while the default implementation -remains as simple as possible. diff --git a/docs/src/cdist-saving-output-streams.rst b/docs/src/cdist-saving-output-streams.rst deleted file mode 100644 index da66f754..00000000 --- a/docs/src/cdist-saving-output-streams.rst +++ /dev/null @@ -1,88 +0,0 @@ -Saving output streams -===================== - -Description ------------ -Since version 4.8.0 cdist, by default, saves output streams to local cache. -Saving output streams is implemented because important information was lost -during a config run, hidden in all other output. -Now all created output is bound to the context where it was produced. - -Saving output streams include stdout and stderr of init manifest, remote -commands and for each object stdout and stderr of manifest, gencode-\* and code-\*. -Output stream files are created only if some output is produced. For more info -on these cache files see `Local cache overview `_. - -Also, in case of an error, cdist can now exit and show all information it has -about the error. - -For example: - -.. code-block:: sh - - $ ./bin/cdist config -v -i ~/.cdist/manifest/init-output-streams $(cat ~/ungleich/data/opennebula-debian9-test ) - INFO: 185.203.112.42: Starting configuration run - INFO: 185.203.112.42: Processing __myline/test - ERROR: 185.203.112.42: Command failed: '/bin/sh -e /tmp/tmpow6cwemh/75ee6a79e32da093da23fe4a13dd104b/data/object/__myline/test/.cdist-kisrqlpw/code-local' - return code: 1 - ---- BEGIN stdout ---- - ---- END stdout ---- - - Error processing object '__myline/test' - ======================================== - name: __myline/test - path: /tmp/tmpow6cwemh/75ee6a79e32da093da23fe4a13dd104b/data/object/__myline/test/.cdist-kisrqlpw - source: /home/darko/.cdist/manifest/init-output-streams - type: /tmp/tmpow6cwemh/75ee6a79e32da093da23fe4a13dd104b/data/conf/type/__myline - - ---- BEGIN manifest:stderr ---- - myline manifest stderr - - ---- END manifest:stderr ---- - - ---- BEGIN gencode-remote:stderr ---- - test gencode-remote error - - ---- END gencode-remote:stderr ---- - - ---- BEGIN code-local:stderr ---- - error - - ---- END code-local:stderr ---- - - ERROR: cdist: Failed to configure the following hosts: 185.203.112.42 - -Upon successful run execution state is saved to local cache and temporary -directory is removed. -In case of an error temporary directory is not removed and can be further -discovered. - -There is also an option :strong:`-S/--disable-saving-output-streams` for -disabling saving output streams. In this case error reporting can look -like this: - -.. code-block:: sh - - $ ./bin/cdist config -v -S -i ~/.cdist/manifest/init-output-streams $(cat ~/ungleich/data/opennebula-debian9-test ) - INFO: 185.203.112.42: Starting configuration run - test stdout output streams - test stderr output streams - myline manifest stdout - myline manifest stderr - test gencode-remote error - INFO: 185.203.112.42: Processing __myline/test - error - ERROR: 185.203.112.42: Command failed: '/bin/sh -e /tmp/tmpzomy0wis/75ee6a79e32da093da23fe4a13dd104b/data/object/__myline/test/.cdist-n566pqut/code-local' - return code: 1 - ---- BEGIN stdout ---- - ---- END stdout ---- - - Error processing object '__myline/test' - ======================================== - name: __myline/test - path: /tmp/tmpzomy0wis/75ee6a79e32da093da23fe4a13dd104b/data/object/__myline/test/.cdist-n566pqut - source: /home/darko/.cdist/manifest/init-output-streams - type: /tmp/tmpzomy0wis/75ee6a79e32da093da23fe4a13dd104b/data/conf/type/__myline - - - ERROR: cdist: Failed to configure the following hosts: 185.203.112.42 diff --git a/docs/src/cdist-stages.rst b/docs/src/cdist-stages.rst deleted file mode 100644 index 751ba9c7..00000000 --- a/docs/src/cdist-stages.rst +++ /dev/null @@ -1,70 +0,0 @@ -Execution stages -================ - -Description ------------ -When cdist is started, it passes through different stages. - - -Stage 1: target information retrieval -------------------------------------- -In this stage information is collected about the target host using so called -explorers. Every existing explorer is run on the target and the output of all -explorers are copied back into the local cache. The results can be used by -manifests and types. - - -Stage 2: run the initial manifest ---------------------------------- -The initial manifest, which should be used for mappings of hosts to types, -is executed. This stage creates objects in a cconfig database that contains -the objects as defined in the manifest for the specific host. In this stage, -no conflicts may occur, i.e. no object of the same type with the same id may -be created, if it has different parameters. - - -Stage 3: object information retrieval -------------------------------------- -Every object is checked whether its type has explorers and if so, these are -executed on the target host. The results are transferred back -and can be used in the following stages to decide what changes need to be made -on the target to implement the desired state. - - -Stage 4: run the object manifest --------------------------------- -Every object is checked whether its type has a executable manifest. The -manifest script may generate and change the created objects. In other words, -one type can reuse other types. - -For instance the object __apache/www.example.org is of type __apache, which may -contain a manifest script, which creates new objects of type __file. - -The newly created objects are merged back into the existing tree. No conflicts -may occur during the merge. A conflict would mean that two different objects -try to create the same object, which indicates a broken configuration. - - -Stage 5: code generation ------------------------- -In this stage for every created object its type is checked for executable -gencode scripts. The gencode scripts generate the code to be executed on the -target on stdout. If the gencode executables fail, they must print diagnostic -messages on stderr and exit non-zero. - - -Stage 6: code execution ------------------------ -For every object the resulting code from the previous stage is transferred to -the target host and executed there to apply the configuration changes. - - -Stage 7: cache --------------- -The cache stores the information from the current run for later use. - - -Summary -------- -If, and only if, all the stages complete without errors, the configuration -will be applied to the target. diff --git a/docs/src/cdist-support.rst b/docs/src/cdist-support.rst deleted file mode 100644 index 19afde2f..00000000 --- a/docs/src/cdist-support.rst +++ /dev/null @@ -1,26 +0,0 @@ -Support -------- - -Chat -~~~~ -Chat with us: `ungleich chat `_. - -Mailing list -~~~~~~~~~~~~ - -Bug reports, questions, patches, etc. should be send to the -`cdist mailing list `_. - -Linkedin -~~~~~~~~ - -If you have an account -at `Linked in `_, -you can join the -`cdist group `_. - -Commercial support -~~~~~~~~~~~~~~~~~~ - -You can request commercial support for cdist from -`ungleich `_. diff --git a/docs/src/cdist-troubleshooting.rst b/docs/src/cdist-troubleshooting.rst deleted file mode 100644 index e639aafd..00000000 --- a/docs/src/cdist-troubleshooting.rst +++ /dev/null @@ -1,64 +0,0 @@ -Troubleshooting -=============== - -Error in manifest is not considered an error by cdist ------------------------------------------------------ -Situation: You are executing other scripts from a manifest. -This script fails, but cdist does not recognise the error. -An example script would be something like this: - -.. code-block:: sh - - % cat ~/.cdist/manifest/init - "$__manifest/special" - % cat ~/.cdist/manifest/special - #!/bin/sh - echo "Here is an unclean exiting script" - somecommandthatdoesnotexist - echo "I continue here although previous command failed" - -We can clearly see that **somecommandthatdoesnotexist** -will fail in ~/.cdist/manifest/special. But as the custom -script is not called with the -e flag (exit on failure) of shell, -it does not lead to an error. And thus cdist sees the exit 0 -code of the last echo line instead of the failing command. - -All scripts executed by cdist carry the -e flag. -To prevent the above from happening, there are three solutions available, -two of which can be used in the calling script: - -.. code-block:: sh - - # Execute as before, but abort on failure - sh -e "$__manifest/special" - - # Source the script in our namespace, runs in a set -e environment: - . "$__manifest/special" - -The third solution is to include a shebang header in every script -you write to use the -e flag: - -.. code-block:: sh - - % cat ~/.cdist/manifest/special - #!/bin/sh -e - ... - -Using debug dump helper script ------------------------------- -Since cdist stores data to local cache that can be used for debugging there -is a helper script that dumps data from local cache, -`cdist-dump `_. - -For more info see: - -.. code-block:: sh - - cdist-dump -h - -Or from cdist git cloned directory: - -.. code-block:: sh - - ./scripts/cdist-dump -h - diff --git a/docs/src/cdist-type.rst b/docs/src/cdist-type.rst deleted file mode 100644 index 582c0938..00000000 --- a/docs/src/cdist-type.rst +++ /dev/null @@ -1,524 +0,0 @@ -cdist type -========== - -Description ------------ -Types are the main component of cdist and define functionality. If you -use cdist, you'll write a type for every functionality you would like -to use. - -Synopsis --------- - -.. code-block:: sh - - __TYPE ID --parameter value [--parameter value ...] - __TYPE --parameter value [--parameter value ...] (for singletons) - - -How to use a type ------------------ - -You can use types from the initial manifest or the type manifest like a -normal shell command: - -.. code-block:: sh - - # Creates empty file /etc/cdist-configured - __file /etc/cdist-configured --type file - - # Ensure tree is installed - __package tree --state installed - -A list of supported types can be found in the `cdist reference `_ manpage. - - -Singleton types ---------------- -If a type is flagged as a singleton, it may be used only -once per host. This is useful for types which can be used only once on a -system. Singleton types do not take an object name as argument. - - -Example: - -.. code-block:: sh - - # __issue type manages /etc/issue - __issue - - # Probably your own type - singletons may use parameters - __myfancysingleton --colour green - - -Config types ------------- -By default types are used with config command. These are types that are not -flagged by any known command flag. If a type is marked then it will be skipped -with config command. - - -Install types -------------- -If a type is flagged with 'install' flag then it is used only with install command. -With other commands, i.e. config, these types are skipped if used. - - -Nonparallel types ------------------ -If a type is flagged with 'nonparallel' flag then its objects cannot be run in parallel -when using -j option. Example of such a type is __package_dpkg type where dpkg itself -prevents to be run in more than one instance. - - -Deprecated types ------------------ -If a type is flagged with 'deprecated' marker then it is considered deprecated. -When it is used cdist writes warning line. If 'deprecated' marker has content -then this content is printed as a deprecation messages, e.g.: - -.. code-block:: sh - - $ ls -l deprecated - -rw-r--r-- 1 darko darko 71 May 20 18:30 deprecated - $ cat deprecated - This type is deprecated. It will be removed in the next minor release. - $ echo '__foo foo' | ./bin/cdist config -i - 185.203.112.26 - WARNING: 185.203.112.26: Type __foo is deprecated: This type is deprecated. It will be removed in the next minor release. - -If 'deprecated' marker has no content then general message is printed, e.g.: - -.. code-block:: sh - - $ ls -l deprecated - -rw-r--r-- 1 darko darko 0 May 20 18:36 deprecated - $ echo '__bar foo' | ./bin/cdist config -i - 185.203.112.26 - WARNING: 185.203.112.26: Type __bar is deprecated. - - -How to write a new type ------------------------ -A type consists of - -- parameter (optional) -- manifest (optional) -- singleton (optional) -- explorer (optional) -- gencode (optional) -- nonparallel (optional) - -Types are stored below cdist/conf/type/. Their name should always be prefixed with -two underscores (__) to prevent collisions with other executables in $PATH. - -To implement a new type, create the directory **cdist/conf/type/__NAME**. - -Type manifest and gencode can be written in any language. They just need to be -executable and have a proper shebang. If they are not executable then cdist assumes -they are written in shell so they are executed using '/bin/sh -e' or 'CDIST_LOCAL_SHELL'. - -For executable shell code it is suggested that shebang is '#!/bin/sh -e'. - -For creating type skeleton you can use helper script -`cdist-new-type `_. - - -Defining parameters -------------------- -Every type consists of required, optional and boolean parameters, which must -each be declared in a newline separated file in **parameter/required**, -**parameter/required_multiple**, **parameter/optional**, -**parameter/optional_multiple** and **parameter/boolean**. -Parameters which are allowed multiple times should be listed in -required_multiple or optional_multiple respectively. All other parameters -follow the standard unix behaviour "the last given wins". -If either is missing, the type will have no required, no optional, no boolean -or no parameters at all. - -Default values for optional parameters can be predefined in -**parameter/default/**. - -Example: - -.. code-block:: sh - - echo servername >> cdist/conf/type/__nginx_vhost/parameter/required - echo logdirectory >> cdist/conf/type/__nginx_vhost/parameter/optional - echo loglevel >> cdist/conf/type/__nginx_vhost/parameter/optional - mkdir cdist/conf/type/__nginx_vhost/parameter/default - echo warning > cdist/conf/type/__nginx_vhost/parameter/default/loglevel - echo server_alias >> cdist/conf/type/__nginx_vhost/parameter/optional_multiple - echo use_ssl >> cdist/conf/type/__nginx_vhost/parameter/boolean - - -Using parameters ----------------- -The parameters given to a type can be accessed and used in all type scripts -(e.g manifest, gencode, explorer). Note that boolean parameters are -represented by file existence. File exists -> True, -file does not exist -> False - -Example: (e.g. in cdist/conf/type/__nginx_vhost/manifest) - -.. code-block:: sh - - # required parameter - servername="$(cat "$__object/parameter/servername")" - - # optional parameter - if [ -f "$__object/parameter/logdirectory" ]; then - logdirectory="$(cat "$__object/parameter/logdirectory")" - fi - - # optional parameter with predefined default - loglevel="$(cat "$__object/parameter/loglevel")" - - # boolean parameter - if [ -f "$__object/parameter/use_ssl" ]; then - # file exists -> True - # do some fancy ssl stuff - fi - - # parameter with multiple values - if [ -f "$__object/parameter/server_alias" ]; then - for alias in $(cat "$__object/parameter/server_alias"); do - echo $alias > /some/where/useful - done - fi - - -Deprecated parameters ---------------------- -To deprecate type parameters one can declare a file for each deprecated -parameter under **parameter/deprecated** directory. - -When such parameter is used cdist writes warning line with deprecation message. -If such file has content then this content is printed as deprecation message. -If there is no content then generic parameter deprecation message is printed. - -Example: - -.. code-block:: sh - - $ ls parameter/deprecated/ - eggs spam - $ cat parameter/deprecated/eggs - eggs parameter is deprecated, please use multiple egg parameter. - $ cat parameter/deprecated/spam - $ echo '__foo foo --foo foo --eggs eggs' | ./bin/cdist config -i - 185.203.112.26 - WARNING: 185.203.112.26: eggs parameter of type __foo is deprecated: eggs parameter is deprecated, please use multiple egg parameter. - $ echo '__foo foo --foo foo --eggs eggs --spam spam' | ./bin/cdist config -i - 185.203.112.26 - WARNING: 185.203.112.26: spam parameter of type __foo is deprecated. - WARNING: 185.203.112.26: eggs parameter of type __foo is deprecated: eggs parameter is deprecated, please use multiple egg parameter. - - -Input from stdin ----------------- -Every type can access what has been written on stdin when it has been called. -The result is saved into the **stdin** file in the object directory. - -Example use of a type: (e.g. in cdist/conf/type/__archlinux_hostname) - -.. code-block:: sh - - __file /etc/rc.conf --source - << eof - ... - HOSTNAME="$__target_host" - ... - eof - -If you have not seen this syntax (<< eof) before, it may help you to read -about "here documents". - -In the __file type, stdin is used as source for the file, if - is used for source: - -.. code-block:: sh - - if [ -f "$__object/parameter/source" ]; then - source="$(cat "$__object/parameter/source")" - if [ "$source" = "-" ]; then - source="$__object/stdin" - fi - .... - - -Stdin inside a loop -~~~~~~~~~~~~~~~~~~~ -Since cdist saves type's stdin content in the object as **$__object/stdin**, -so it can be accessed in manifest and gencode-* scripts, this can lead to -unexpected behavior. For example, suppose you have some type with the following -in its manifest: - -.. code-block:: sh - - if [ -f "$__object/parameter/foo" ] - then - while read -r l - do - __file "$l" - echo "$l" >&2 - done < "$__object/parameter/foo" - fi - -and init manifest: - -.. code-block:: sh - - __foo foo --foo a --foo b --foo c - -You expect that manifest stderr content is: - -.. code-block:: sh - - a - b - c - -and that files *a*, *b* and *c* are created. But all you get in manifest stderr -is: - -.. code-block:: sh - - a - -and only *a* file is created. - -When redirecting parameter *foo* file content to while's stdin that means that all -commands in while body have this same stdin. So when *__file* type gets executed, -cdist saves its stdin which means it gets the remaining content of parameter *foo* -file, i.e.: - -.. code-block:: sh - - b - c - -The solution is to make sure that your types inside such loops get their stdin -from somewhere else, e.g. for the above problem *__file* type can get empty -stdin from */dev/null*: - -.. code-block:: sh - - if [ -f "$__object/parameter/foo" ] - then - while read -r l - do - __file "$l" < /dev/null - echo "$l" >&2 - done < "$__object/parameter/foo" - fi - - -Writing the manifest --------------------- -In the manifest of a type you can use other types, so your type extends -their functionality. A good example is the __package type, which in -a shortened version looks like this: - -.. code-block:: sh - - os="$(cat "$__global/explorer/os")" - case "$os" in - archlinux) type="pacman" ;; - debian|ubuntu) type="apt" ;; - gentoo) type="emerge" ;; - *) - echo "Don't know how to manage packages on: $os" >&2 - exit 1 - ;; - esac - - __package_$type "$@" - -As you can see, the type can reference different environment variables, -which are documented in `cdist reference `_. - -Always ensure the manifest is executable, otherwise cdist will not be able -to execute it. For more information about manifests see `cdist manifest `_. - - -Singleton - one instance only ------------------------------ -If you want to ensure that a type can only be used once per target, you can -mark it as a singleton: Just create the (empty) file "singleton" in your type -directory: - -.. code-block:: sh - - touch cdist/conf/type/__NAME/singleton - -This will also change the way your type must be called: - -.. code-block:: sh - - __YOURTYPE --parameter value - -As you can see, the object ID is omitted, because it does not make any sense, -if your type can be used only once. - - -Install - type with install command ------------------------------------ -If you want a type to be used with install command, you must mark it as -install: create the (empty) file "install" in your type directory: - -.. code-block:: sh - - touch cdist/conf/type/__install_NAME/install - -With other commands, i.e. config, it will be skipped if used. - - -Nonparallel - only one instance can be run at a time ----------------------------------------------------- -If objects of a type must not or cannot be run in parallel when using -j -option, you must mark it as nonparallel: create the (empty) file "nonparallel" -in your type directory: - -.. code-block:: sh - - touch cdist/conf/type/__NAME/nonparallel - -For example, package types are nonparallel types. - - -The type explorers ------------------- -If a type needs to explore specific details, it can provide type specific -explorers, which will be executed on the target for every created object. - -The explorers are stored under the "explorer" directory below the type. -It could for instance contain code to check the md5sum of a file on the -client, like this (shortened version from the type __file): - -.. code-block:: sh - - if [ -f "$__object/parameter/destination" ]; then - destination="$(cat "$__object/parameter/destination")" - else - destination="/$__object_id" - fi - - if [ -e "$destination" ]; then - md5sum < "$destination" - fi - - -Writing the gencode script --------------------------- -There are two gencode scripts: **gencode-local** and **gencode-remote**. -The output of gencode-local is executed locally, whereas -the output of gencode-remote is executed on the target. -The gencode scripts can make use of the parameters, the global explorers -and the type specific explorers. - -If the gencode scripts encounters an error, it should print diagnostic -messages to stderr and exit non-zero. If you need to debug the gencode -script, you can write to stderr: - -.. code-block:: sh - - # Debug output to stderr - echo "My fancy debug line" >&2 - - # Output to be saved by cdist for execution on the target - echo "touch /etc/cdist-configured" - -Notice: if you use __remote_copy or __remote_exec directly in your scripts -then for IPv6 address with __remote_copy execution you should enclose IPv6 -address in square brackets. The same applies to __remote_exec if it behaves -the same as ssh for some options where colon is a delimiter, as for -L ssh -option (see :strong:`ssh`\ (1) and :strong:`scp`\ (1)). - - -Variable access from the generated scripts ------------------------------------------- -In the generated scripts, you have access to the following cdist variables - -- __object -- __object_id - -but only for read operations, means there is no back copy of this -files after the script execution. - -So when you generate a script with the following content, it will work: - -.. code-block:: sh - - if [ -f "$__object/parameter/name" ]; then - name="$(cat "$__object/parameter/name")" - else - name="$__object_id" - fi - - -Environment variable usage idiom --------------------------------- -In type scripts you can support environment variables with default values if -environment variable is unset or null by using **${parameter:-[word]}** -parameter expansion. - -Example using mktemp in a portable way that supports TMPDIR environment variable. - -.. code-block:: sh - - tempfile=$(mktemp "${TMPDIR:-/tmp}/cdist.XXXXXXXXXX") - - -Log level in types ------------------- -cdist log level can be accessed from __cdist_log_level variable.One of: - - +----------------+-----------------+ - | Log level | Log level value | - +================+=================+ - | OFF | 60 | - +----------------+-----------------+ - | ERROR | 40 | - +----------------+-----------------+ - | WARNING | 30 | - +----------------+-----------------+ - | INFO | 20 | - +----------------+-----------------+ - | VERBOSE | 15 | - +----------------+-----------------+ - | DEBUG | 10 | - +----------------+-----------------+ - | TRACE | 5 | - +----------------+-----------------+ - - -It is available for initial manifest, explorer, type manifest, -type explorer, type gencode. - - -Detecting dry run ------------------ - -If ``$__cdist_dry_run`` environment variable is set, then it's dry run. - -It is available for initial manifest, explorer, type manifest, -type explorer, type gencode. - - -Hints for typewriters ----------------------- -It must be assumed that the target is pretty dumb and thus does not have high -level tools like ruby installed. If a type requires specific tools to be present -on the target, there must be another type that provides this tool and the first -type should create an object of the specific type. - -If your type wants to save temporary data, that may be used by other types -later on (for instance \__file), you can save them in the subdirectory -"files" below $__object (but you must create it yourself). -cdist will not touch this directory. - -If your type contains static files, it's also recommended to place them in -a folder named "files" within the type (again, because cdist guarantees to -never ever touch this folder). - - -How to include a type into upstream cdist ------------------------------------------ -If you think your type may be useful for others, ensure it works with the -current master branch of cdist and have a look at `cdist hacking `_ on -how to submit it. diff --git a/docs/src/cdist-types.rst b/docs/src/cdist-types.rst deleted file mode 100644 index d5104667..00000000 --- a/docs/src/cdist-types.rst +++ /dev/null @@ -1,8 +0,0 @@ -cdist types -=========== - -.. toctree:: - :titlesonly: - :glob: - - man7/* diff --git a/docs/src/cdist-upgrade.rst b/docs/src/cdist-upgrade.rst deleted file mode 100644 index e57ed63c..00000000 --- a/docs/src/cdist-upgrade.rst +++ /dev/null @@ -1,188 +0,0 @@ -How to upgrade cdist -==================== - -Update the git installation ---------------------------- - -To upgrade cdist in the current branch use - -.. code-block:: sh - - git pull - - # Also update the manpages - ./build man - export MANPATH=$MANPATH:$(pwd -P)/doc/man - -If you stay on a version branche (i.e. 1.0, 1.1., ...), nothing should break. -The master branch on the other hand is the development branch and may not be -working, break your setup or eat the tree in your garden. - -Safely upgrading to new versions -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -To upgrade to **any** further cdist version, you can take the -following procedure to do a safe upgrade: - -.. code-block:: sh - - # Create new branch to try out the update - git checkout -b upgrade_cdist - - # Get latest cdist version in git database - git fetch -v - - # see what will happen on merge - replace - # master with the branch you plan to merge - git diff upgrade_cdist..origin/master - - # Merge the new version - git merge origin/master - -Now you can ensure all custom types work with the new version. -Assume that you need to go back to an older version during -the migration/update, you can do so as follows: - -.. code-block:: sh - - # commit changes - git commit -m ... - - # go back to original branch - git checkout master - -After that, you can go back and continue the upgrade: - -.. code-block:: sh - - # git checkout upgrade_cdist - - -Update the python package -------------------------- - -To upgrade to the lastet version do - -.. code-block:: sh - - pip install --upgrade cdist - -General update instructions ---------------------------- - -Updating from 3.0 to 3.1 -~~~~~~~~~~~~~~~~~~~~~~~~ - -The type **\_\_ssh_authorized_keys** now also manages existing keys, -not only the ones added by cdist. - -Updating from 2.3 to 3.0 -~~~~~~~~~~~~~~~~~~~~~~~~ - -The **changed** attribute of objects has been removed. -Use `messaging `_ instead. - -Updating from 2.2 to 2.3 -~~~~~~~~~~~~~~~~~~~~~~~~ - -No incompatibilities. - -Updating from 2.1 to 2.2 -~~~~~~~~~~~~~~~~~~~~~~~~ - -Starting with 2.2, the syntax for requiring a singleton type changed: -Old format: - -.. code-block:: sh - - require="__singleton_type/singleton" ... - -New format: - -.. code-block:: sh - - require="__singleton_type" ... - -Internally the "singleton" object id was dropped to make life more easy. -You can probably fix your configuration by running the following code -snippet (currently untested, please report back if it works for you): - -.. code-block:: sh - - find ~/.cdist/* -type f -exec sed -i 's,/singleton,,' {} \; - -Updating from 2.0 to 2.1 -~~~~~~~~~~~~~~~~~~~~~~~~ - -Have a look at the update guide for [[2.0 to 2.1|2.0-to-2.1]]. - - * Type **\_\_package* and \_\_process** use --state **present** or **absent**. - The states **removed/installed** and **stopped/running** have been removed. - Support for the new states is already present in 2.0. - * Type **\_\_directory**: Parameter --parents and --recursive are now boolean - The old "yes/no" values need to be removed. - * Type **\_\_rvm_ruby**: Parameter --default is now boolean - The old "yes/no" values need to be removed. - * Type **\_\_rvm_gemset**: Parameter --default is now boolean - The old "yes/no" values need to be removed. - * Type **\_\_addifnosuchline** and **\_\_removeline** have been replaced by **\_\_line** - * The **conf** directory is now located at **cdist/conf**. - You need to migrate your types, explorers and manifests - manually to the new location. - * Replace the variable **\_\_self** by **\_\_object_name** - Support for the variable **\_\_object_name** is already present in 2.0. - * The types **\_\_autofs**, **\_\_autofs_map** and **\_\_autofs_reload** have been removed - (no maintainer, no users) - * Type **\_\_user**: Parameter --groups removed (use the new \_\_user_groups type) - * Type **\_\_ssh_authorized_key** has been replaced by more flexible type - **\_\_ssh_authorized_keys** - -Updating from 1.7 to 2.0 -~~~~~~~~~~~~~~~~~~~~~~~~ - -* Ensure python (>= 3.2) is installed on the source host -* Use "cdist config host" instead of "cdist-deploy-to host" -* Use "cdist config -p host1 host2" instead of "cdist-mass-deploy" -* Use "cdist banner" for fun -* Use **\_\_object_name** instead of **\_\_self** in manifests - -Updating from 1.6 to 1.7 -~~~~~~~~~~~~~~~~~~~~~~~~ - -* If you used the global explorer **hardware_type**, you need to change - your code to use **machine** instead. - -Updating from 1.5 to 1.6 -~~~~~~~~~~~~~~~~~~~~~~~~ - -* If you used **\_\_package_apt --preseed**, you need to use the new - type **\_\_debconf_set_selections** instead. -* The **\_\_package** types accepted either --state deinstalled or - --state uninstaaled. Starting with 1.6, it was made consistently - to --state removed. - -Updating from 1.3 to 1.5 -~~~~~~~~~~~~~~~~~~~~~~~~ - -No incompatibilities. - -Updating from 1.2 to 1.3 -~~~~~~~~~~~~~~~~~~~~~~~~ - -Rename **gencode** of every type to **gencode-remote**. - -Updating from 1.1 to 1.2 -~~~~~~~~~~~~~~~~~~~~~~~~ - -No incompatibilities. - -Updating from 1.0 to 1.1 -~~~~~~~~~~~~~~~~~~~~~~~~ - -In 1.1 the type **\_\_file** was split into **\_\_directory**, **\_\_file** and -**\_\_link**. The parameter **--type** was removed from **\_\_file**. Thus you -need to replace **\_\_file** calls in your manifests: - - * Remove --type from all \_\_file calls - * If type was symlink, use \_\_link and --type symbolic - * If type was directory, use \_\_directory diff --git a/docs/src/cdist-why.rst b/docs/src/cdist-why.rst deleted file mode 100644 index 1123a1de..00000000 --- a/docs/src/cdist-why.rst +++ /dev/null @@ -1,72 +0,0 @@ -Why should I use cdist? -======================= - -There are several motivations to use cdist, these -are probably the most popular ones. - -Known language --------------- - -Cdist is being configured in -`shell script `_. -Shell script is used by UNIX system engineers for decades. -So when cdist is introduced, your staff does not need to learn a new -`DSL `_ -or programming language. - -Powerful language ------------------ - -Not only is shell scripting widely known by system engineers, -but it is also a very powerful language. Here are some features -which make daily work easy: - - * Configuration can react dynamicly on explored values - * High level string manipulation (using sed, awk, grep) - * Conditional support (**if, case**) - * Loop support (**for, while**) - * Support for dependencies between cdist types - -More than shell scripting -------------------------- - -If you compare regular shell scripting with cdist, there is one major -difference: When using cdist types, -the results are -`idempotent `_. -In practise that means it does not matter in which order you -call cdist types, the result is always the same. - -Zero dependency configuration management ----------------------------------------- - -Cdist requires very little on a target system. Even better, -in almost all cases all dependencies are usually fulfilled. -Cdist does not require an agent or high level programming -languages on the target host: it will run on any host that -has a **ssh server running** and a posix compatible shell -(**/bin/sh**). Compared to other configuration management systems, -it does not require to open up an additional port. - -Push based distribution ------------------------ - -Cdist uses the push based model for configuration. In this -scenario, one (or more) computers connect to the target hosts -and apply the configuration. That way the source host has -very little requirements: Cdist can even run on a sysadmin -notebook that is loosely connected to the network and has -limited amount of resources. - -Furthermore, from a security point of view, only one machine -needs access to the target hosts. No target hosts will ever -need to connect back to the source host, which contains the -full configuration. - -Highly scalable ---------------- - -If at some point you manage more hosts than can be handled from -a single source host, you can simply add more resources: Either -add more cores to one host or add hosts. -Cdist will utilise the given resources in parallel. diff --git a/docs/src/conf.py b/docs/src/conf.py deleted file mode 100644 index 78f9842c..00000000 --- a/docs/src/conf.py +++ /dev/null @@ -1,314 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# -# cdist-docs documentation build configuration file, created by -# sphinx-quickstart on Fri May 6 21:45:28 2016. -# -# This file is execfile()d with the current directory set to its -# containing dir. -# -# Note that not all possible configuration values are present in this -# autogenerated file. -# -# All configuration values have a default; values that are commented out -# serve to show the default. - -import sys -import os -import sphinx_rtd_theme - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -# sys.path.insert(0, os.path.abspath('.')) -sys.path.insert(0, os.path.abspath(os.path.join( - os.path.dirname(os.path.realpath(__file__)), "..", ".."))) - -# Import cdist after sys.path fixup above. - -import cdist.version # nopep8 - ignore error that import is not at top - -# -- General configuration ------------------------------------------------ - -# If your documentation needs a minimal Sphinx version, state it here. -# needs_sphinx = '1.0' - -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. -extensions = [ - 'cdist.sphinxext.manpage', - 'sphinx.ext.extlinks', -] - -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] - -# The suffix(es) of source filenames. -# You can specify multiple suffix as a list of string: -source_suffix = ['.rst'] - -# The encoding of source files. -# source_encoding = 'utf-8-sig' - -# The master toctree document. -master_doc = 'index' - -# General information about the project. -project = 'cdist' -copyright = 'ungleich GmbH 2019' -# author = 'Darko Poljak' - -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# -# The short X.Y version. -version = cdist.version.VERSION -# The full version, including alpha/beta/rc tags. -release = version - -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -# -# This is also used if you do content translation via gettext catalogs. -# Usually you set "language" from the command line for these cases. -language = None - -# There are two options for replacing |today|: either, you set today to some -# non-false value, then it is used: -# today = '' -# Else, today_fmt is used as the format for a strftime call. -# today_fmt = '%B %d, %Y' - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -# This patterns also effect to html_static_path and html_extra_path -exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] - -# The reST default role (used for this markup: `text`) to use for all -# documents. -# default_role = None - -# If true, '()' will be appended to :func: etc. cross-reference text. -# add_function_parentheses = True - -# If true, the current module name will be prepended to all description -# unit titles (such as .. function::). -# add_module_names = True - -# If true, sectionauthor and moduleauthor directives will be shown in the -# output. They are ignored by default. -# show_authors = False - -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' - -# A list of ignored prefixes for module index sorting. -# modindex_common_prefix = [] - -# If true, keep warnings as "system message" paragraphs in the built documents. -# keep_warnings = False - -# If true, `todo` and `todoList` produce output, else they produce nothing. -todo_include_todos = False - - -# -- Options for HTML output ---------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -html_theme = 'sphinx_rtd_theme' -html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] - -# Theme options are theme-specific and customize the look and feel of a theme -# further. For a list of options available for each theme, see the -# documentation. -# html_theme_options = {} - -# Add any paths that contain custom themes here, relative to this directory. -# html_theme_path = [] - -# The name for this set of Sphinx documents. -# " v documentation" by default. -# html_title = 'cdist-docs v0.0.1' - -# A shorter title for the navigation bar. Default is the same as html_title. -# html_short_title = None - -# The name of an image file (relative to this directory) to place at the top -# of the sidebar. -html_logo = '_static/cdist-logo.jpeg' - -# The name of an image file (relative to this directory) to use as a favicon of -# the docs. This file should be a Windows icon file (.ico) -# being 16x16 or 32x32 -# pixels large. -# html_favicon = None - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -# html_static_path = ['_static'] -html_static_path = ['_static'] - -# Add any extra paths that contain custom files (such as robots.txt or -# .htaccess) here, relative to this directory. These files are copied -# directly to the root of the documentation. -# html_extra_path = [] - -# If not None, a 'Last updated on:' timestamp is inserted at every page -# bottom, using the given strftime format. -# The empty string is equivalent to '%b %d, %Y'. -# html_last_updated_fmt = None - -# Custom sidebar templates, maps document names to template names. -# html_sidebars = {} - -# Additional templates that should be rendered to pages, maps page names to -# template names. -# html_additional_pages = {} - -# If false, no module index is generated. -# html_domain_indices = True - -# If false, no index is generated. -# html_use_index = True - -# If true, the index is split into individual pages for each letter. -# html_split_index = False - -# If true, links to the reST sources are added to the pages. -# html_show_sourcelink = True - -# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. -# html_show_sphinx = True - -# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. -# html_show_copyright = True - -# If true, an OpenSearch description file will be output, and all pages will -# contain a tag referring to it. The value of this option must be the -# base URL from which the finished HTML is served. -# html_use_opensearch = '' - -# This is the file name suffix for HTML files (e.g. ".xhtml"). -# html_file_suffix = None -# html_file_suffix = "" - -# Language to be used for generating the HTML full-text search index. -# Sphinx supports the following languages: -# 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja' -# 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr', 'zh' -# html_search_language = 'en' - -# A dictionary with options for the search language support, empty by default. -# 'ja' uses this config value. -# 'zh' user can custom change `jieba` dictionary path. -# html_search_options = {'type': 'default'} - -# The name of a javascript file (relative to the configuration directory) that -# implements a search results scorer. If empty, the default will be used. -# html_search_scorer = 'scorer.js' - -# Output file base name for HTML help builder. -htmlhelp_basename = 'cdistdoc' - -# -- Options for LaTeX output --------------------------------------------- - -# latex_elements = { -# The paper size ('letterpaper' or 'a4paper'). -# 'papersize': 'letterpaper', - -# The font size ('10pt', '11pt' or '12pt'). -# 'pointsize': '10pt', - -# Additional stuff for the LaTeX preamble. -# 'preamble': '', - -# Latex figure (float) alignment -# 'figure_align': 'htbp', -# } - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, -# author, documentclass [howto, manual, or own class]). -latex_documents = [ - (master_doc, 'cdist.tex', 'cdist Documentation', - 'Darko Poljak', 'manual'), -] - -# The name of an image file (relative to this directory) to place at the top of -# the title page. -# latex_logo = None - -# For "manual" documents, if this is true, then toplevel headings are parts, -# not chapters. -# latex_use_parts = False - -# If true, show page references after internal links. -# latex_show_pagerefs = False - -# If true, show URL addresses after external links. -# latex_show_urls = False - -# Documents to append as an appendix to all manuals. -# latex_appendices = [] - -# If false, no module index is generated. -# latex_domain_indices = True - - -# -- Options for manual page output --------------------------------------- - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -root_mandir = os.path.dirname(os.path.realpath(__file__)) -mandirs = [] -for mansubdir in ('man1', 'man7'): - mandirs.append((os.path.join(root_mandir, mansubdir), mansubdir[-1])) -man_pages = [] -for mandir, section in mandirs: - for root, dirs, files in os.walk(mandir): - for fname in files: - froot, fext = os.path.splitext(fname) - if fext == '.rst': - man_page = (os.path.join('man' + str(section), froot), - froot, '', [], section) - man_pages.append(man_page) - -# man_pages = [ -# ('cdist-type', 'cdist-type', 'cdist-type documentation', -# [author], 1), -# ('man7/cdist-type__file', 'cdist-type__file', -# '', [], 1), -# ('cdist-type__directory', 'cdist-type__directory', -# 'cdist-type__directory documentation', [author], 1), -# ] - -# If true, show URL addresses after external links. -# man_show_urls = False - - -# -- Options for Texinfo output ------------------------------------------- - -# Grouping the document tree into Texinfo files. List of tuples -# (source start file, target name, title, author, -# dir menu entry, description, category) -texinfo_documents = [ - (master_doc, 'cdist', 'cdist Documentation', - '', 'cdist', 'Configuration management system.', - 'Miscellaneous'), -] - -# Documents to append as an appendix to all manuals. -# texinfo_appendices = [] - -# If false, no module index is generated. -# texinfo_domain_indices = True - -# How to display URL addresses: 'footnote', 'no', or 'inline'. -# texinfo_show_urls = 'footnote' - -# If true, do not generate a @detailmenu in the "Top" node's menu. -# texinfo_no_detailmenu = False diff --git a/docs/src/docutils.conf b/docs/src/docutils.conf deleted file mode 100644 index 168f9e2b..00000000 --- a/docs/src/docutils.conf +++ /dev/null @@ -1,2 +0,0 @@ -[parsers] -smart_quotes: false diff --git a/docs/src/index.rst b/docs/src/index.rst deleted file mode 100644 index 6cbd938a..00000000 --- a/docs/src/index.rst +++ /dev/null @@ -1,43 +0,0 @@ -cdist - usable configuration management -======================================= - -cdist is a usable configuration management system. -It adheres to the KISS principle and -is being used in small up to enterprise grade environments. - - -.. toctree:: - :maxdepth: 3 - :glob: - :numbered: - :hidden: - - cdist-why - cdist-features - cdist-os - cdist-install - cdist-upgrade - cdist-support - cdist-quickstart - cdist-real-world - man1/cdist - man1/cdist-dump - man1/cdist-new-type - cdist-bootstrap - cdist-configuration - cdist-manifest - cdist-type - cdist-types - cdist-explorer - cdist-messaging - cdist-parallelization - cdist-inventory - cdist-integration - cdist-reference - cdist-best-practice - cdist-stages - cdist-cache - cdist-saving-output-streams - cdist-remote-exec-copy - cdist-hacker - cdist-troubleshooting diff --git a/docs/src/man1/cdist-dump.rst b/docs/src/man1/cdist-dump.rst deleted file mode 100644 index 907cd192..00000000 --- a/docs/src/man1/cdist-dump.rst +++ /dev/null @@ -1,110 +0,0 @@ -cdist-dump(1) -============= - -NAME ----- -cdist-dump - Dump data from local cdist cache - - -SYNOPSIS --------- - -:: - - cdist-dump [options] [host...] - - - -DESCRIPTION ------------ -cdist-dump is a helper script that dumps data from local cdist cache for -specified hosts. If host is not specified then all data from cache directory -is dumped. Default cache directory is '~/.cdist/cache'. - -cdist-dump can be used for debugging existing types, host configuration and -new types. - - -OPTIONS -------- -**-a** - dump all - -**-C CACHE-DIR** - use specified CACHE-DIR (default: ~/.cdist/cache) - -**-c** - dump code-* - -**-d DELIMITER** - delimiter used for filename and line number prefix (default: ':') - -**-E** - dump global explorers - -**-e** - dump type explorers - -**-F** - disable filename prefix (enabled by default) - -**-f** - enable filename prefix (default) - -**-g** - dump gencode-* - -**-h** - show this help screen and exit - -**-L** - disable line number prefix (default) - -**-l** - enable line number prefix (disabled by default) - -**-m** - dump messages - -**-o** - dump executions' stdout - -**-p** - dump parameters - -**-r** - dump executions' stderr - -**-V** - show version and exit - -**-v** - increase verbosity - - -EXAMPLES --------- - -.. code-block:: sh - - # Dump all - % cdist-dump -a - - # Dump only code-* output - % cdist-dump -c - - -SEE ALSO --------- -:strong:`cdist`\ (1) - - -AUTHORS -------- -Darko Poljak - - -COPYING -------- -Copyright \(C) 2019 Darko Poljak. Free use of this software is -granted under the terms of the GNU General Public License v3 or later (GPLv3+). diff --git a/docs/src/man1/cdist-new-type.rst b/docs/src/man1/cdist-new-type.rst deleted file mode 100644 index f1a8b992..00000000 --- a/docs/src/man1/cdist-new-type.rst +++ /dev/null @@ -1,74 +0,0 @@ -cdist-new-type(1) -================= - -NAME ----- -cdist-new-type - Create new type skeleton - - -SYNOPSIS --------- - -:: - - cdist-new-type TYPE-NAME AUTHOR-NAME AUTHOR-EMAIL [TYPE-BASE-PATH] - - - -DESCRIPTION ------------ -cdist-new-type is a helper script that creates new type skeleton. -It is then up to the type author to finish the type. - -It creates skeletons for the following files: - -* man.rst -* manifest -* gencode-remote. - -Upon creation it prints the path to the newly created type directory. - - -ARGUMENTS ---------- -**TYPE-NAME** - Name of the new type. - -**AUTHOR-NAME** - Type author's full name. - -**AUTHOR-NAME** - Type author's email. - -**TYPE-BASE-PATH** - Path to the base directory of the type. If not set it defaults - to '$PWD/type'. - - -EXAMPLES --------- - -.. code-block:: sh - - # Create new type __foo in ~/.cdist directory. - $ cd ~/.cdist - $ cdist-new-type '__foo' 'Foo Bar' 'foo.bar at foobar.org' - /home/foo/.cdist/type/__foo - - -SEE ALSO --------- -:strong:`cdist`\ (1) - - -AUTHORS -------- - -| Steven Armstrong -| Darko Poljak - - -COPYING -------- -Copyright \(C) 2019 Steven Armstrong, Darko Poljak. Free use of this software is -granted under the terms of the GNU General Public License v3 or later (GPLv3+). diff --git a/docs/src/man1/cdist.rst b/docs/src/man1/cdist.rst deleted file mode 100644 index 30832f2f..00000000 --- a/docs/src/man1/cdist.rst +++ /dev/null @@ -1,740 +0,0 @@ -cdist(1) -======== - -NAME ----- -cdist - Usable Configuration Management - - -SYNOPSIS --------- - -:: - - cdist [-h] [-V] {banner,config,install,inventory,shell} ... - - cdist banner [-h] [-l LOGLEVEL] [-q] [-v] - - cdist config [-h] [-l LOGLEVEL] [-q] [-v] [-b] [-g CONFIG_FILE] [-4] - [-6] [-C CACHE_PATH_PATTERN] [-c CONF_DIR] [-i MANIFEST] - [-j [JOBS]] [-n] [-o OUT_PATH] [-P] - [-R [{tar,tgz,tbz2,txz}]] [-r REMOTE_OUT_PATH] - [--remote-copy REMOTE_COPY] [--remote-exec REMOTE_EXEC] - [-S] [-I INVENTORY_DIR] [-A] [-a] [-f HOSTFILE] - [-p [HOST_MAX]] [-s] [-t] - [host [host ...]] - - cdist install [-h] [-l LOGLEVEL] [-q] [-v] [-b] [-g CONFIG_FILE] [-4] - [-6] [-C CACHE_PATH_PATTERN] [-c CONF_DIR] [-i MANIFEST] - [-j [JOBS]] [-n] [-o OUT_PATH] [-P] - [-R [{tar,tgz,tbz2,txz}]] [-r REMOTE_OUT_PATH] - [--remote-copy REMOTE_COPY] [--remote-exec REMOTE_EXEC] - [-S] [-I INVENTORY_DIR] [-A] [-a] [-f HOSTFILE] - [-p [HOST_MAX]] [-s] [-t] - [host [host ...]] - - cdist inventory [-h] {add-host,add-tag,del-host,del-tag,list} ... - - cdist inventory add-host [-h] [-l LOGLEVEL] [-q] [-v] [-b] - [-g CONFIG_FILE] [-I INVENTORY_DIR] - [-f HOSTFILE] - [host [host ...]] - - cdist inventory add-tag [-h] [-l LOGLEVEL] [-q] [-v] [-b] - [-g CONFIG_FILE] [-I INVENTORY_DIR] - [-f HOSTFILE] [-T TAGFILE] [-t TAGLIST] - [host [host ...]] - - cdist inventory del-host [-h] [-l LOGLEVEL] [-q] [-v] [-b] - [-g CONFIG_FILE] [-I INVENTORY_DIR] [-a] - [-f HOSTFILE] - [host [host ...]] - - cdist inventory del-tag [-h] [-l LOGLEVEL] [-q] [-v] [-b] - [-g CONFIG_FILE] [-I INVENTORY_DIR] [-a] - [-f HOSTFILE] [-T TAGFILE] [-t TAGLIST] - [host [host ...]] - - cdist inventory list [-h] [-l LOGLEVEL] [-q] [-v] [-b] [-g CONFIG_FILE] - [-I INVENTORY_DIR] [-a] [-f HOSTFILE] [-H] [-t] - [host [host ...]] - - cdist shell [-h] [-l LOGLEVEL] [-q] [-v] [-s SHELL] - - -DESCRIPTION ------------ -cdist is the frontend executable to the cdist configuration management. -It supports different subcommands as explained below. - -It is written in Python so it requires :strong:`python`\ (1) to be installed. -It requires a minimal Python version 3.2. - -GENERAL -------- -All commands accept the following options: - -**-h, --help** - Show the help screen. - -**-l LOGLEVEL, --log-level LOGLEVEL** - Set the specified verbosity level. The levels, in - order from the lowest to the highest, are: ERROR (-1), - WARNING (0), INFO (1), VERBOSE (2), DEBUG (3) TRACE (4 - or higher). If used along with -v then -v increases - last set value and -l overwrites last set value. - -**-q, --quiet** - Quiet mode: disables logging, including WARNING and ERROR. - -**-v, --verbose** - Increase the verbosity level. Every instance of -v - increments the verbosity level by one. Its default - value is 0 which includes ERROR and WARNING levels. - The levels, in order from the lowest to the highest, - are: ERROR (-1), WARNING (0), INFO (1), VERBOSE (2), - DEBUG (3) TRACE (4 or higher). If used along with -l - then -l overwrites last set value and -v increases - last set value. - -**-V, --version** - Show version and exit. - - -BANNER ------- -Displays the cdist banner. Useful for printing -cdist posters - a must have for every office. - - -CONFIG/INSTALL --------------- -Configure/install one or more hosts. -Install command is currently in beta. - -**-4, --force-ipv4** - Force to use IPv4 addresses only. No influence for - custom remote commands. - -**-6, --force-ipv6** - Force to use IPv6 addresses only. No influence for - custom remote commands. - -**-A, --all-tagged** - Use all hosts present in tags db. Currently in beta. - -**-a, --all** - List hosts that have all specified tags, if -t/--tag - is specified. - -**-b, --beta** - Enable beta functionality. - -**-C CACHE_PATH_PATTERN, --cache-path-pattern CACHE_PATH_PATTERN** - Specify custom cache path pattern. If it is not set then - default hostdir is used. For more info on format see - :strong:`CACHE PATH PATTERN FORMAT` below. - -**-c CONF_DIR, --conf-dir CONF_DIR** - Add a configuration directory. Can be specified multiple times. - If configuration directories contain conflicting types, explorers or - manifests, then the last one found is used. - -**-f HOSTFILE, --file HOSTFILE** - Read specified file for a list of additional hosts to operate on - or if '-' is given, read stdin (one host per line). - If no host or host file is specified then, by default, - read hosts from stdin. For the file format see - :strong:`HOSTFILE FORMAT` below. - -**-g CONFIG_FILE, --config-file CONFIG_FILE** - Use specified custom configuration file. - -**-I INVENTORY_DIR, --inventory INVENTORY_DIR** - Use specified custom inventory directory. Inventory - directory is set up by the following rules: if cdist - configuration resolves this value then specified - directory is used, if HOME env var is set then - ~/.cdit/inventory is used, otherwise distribution - inventory directory is used. - -**-i MANIFEST, --initial-manifest MANIFEST** - Path to a cdist manifest or - to read from stdin. - -**-j [JOBS], --jobs [JOBS]** - Operate in parallel in specified maximum number of - jobs. Global explorers, object prepare and object run - are supported. Without argument CPU count is used by - default. - -**-n, --dry-run** - Do not execute code. - -**-o OUT_PATH, --out-dir OUT_PATH** - Directory to save cdist output in. - -**-P, --timestamp** - Timestamp log messages with the current local date and time - in the format: YYYYMMDDHHMMSS.us. - -**-p [HOST_MAX], --parallel [HOST_MAX]** - Operate on multiple hosts in parallel for specified - maximum hosts at a time. Without argument CPU count is - used by default. - -**-R [{tar,tgz,tbz2,txz}], --use-archiving [{tar,tgz,tbz2,txz}]** - Operate by using archiving with compression where - appropriate. Supported values are: tar - tar archive, - tgz - gzip tar archive (the default), tbz2 - bzip2 tar - archive and txz - lzma tar archive. Currently in beta. - -**-r REMOTE_OUT_PATH, --remote-out-dir REMOTE_OUT_PATH** - Directory to save cdist output in on the target host. - -**-S, --disable-saving-output-streams** - Disable saving output streams. - -**-s, --sequential** - Operate on multiple hosts sequentially (default). - -**--remote-copy REMOTE_COPY** - Command to use for remote copy (should behave like scp). - -**--remote-exec REMOTE_EXEC** - Command to use for remote execution (should behave like ssh). - -**-t, --tag** - Host is specified by tag, not hostname/address; list - all hosts that contain any of specified tags. - Currently in beta. - -HOSTFILE FORMAT -~~~~~~~~~~~~~~~ -The HOSTFILE contains one host per line. -A comment is started with '#' and continues to the end of the line. -Any leading and trailing whitespace on a line is ignored. -Empty lines are ignored/skipped. - - -The Hostfile lines are processed as follows. First, all comments are -removed. Then all leading and trailing whitespace characters are stripped. -If such a line results in empty line it is ignored/skipped. Otherwise, -host string is used. - -CACHE PATH PATTERN FORMAT -~~~~~~~~~~~~~~~~~~~~~~~~~ -Cache path pattern specifies path for a cache directory subdirectory. -In the path, '%N' will be substituted by the target host, '%h' will -be substituted by the calculated host directory, '%P' will be substituted -by the current process id. All format codes that -:strong:`python` :strong:`datetime.strftime()` function supports, except -'%h', are supported. These date/time directives format cdist config/install -start time. - -If empty pattern is specified then default calculated host directory -is used. - -Calculated host directory is a hash of a host cdist operates on. - -Resulting path is used to specify cache path subdirectory under which -current host cache data are saved. - - -INVENTORY ---------- -Manage inventory database. -Currently in beta with all sub-commands. - - -INVENTORY ADD-HOST ------------------- -Add host(s) to inventory database. - -**host** - Host(s) to add. - -**-b, --beta** - Enable beta functionality. - -**-f HOSTFILE, --file HOSTFILE** - Read additional hosts to add from specified file or - from stdin if '-' (each host on separate line). If no - host or host file is specified then, by default, read - from stdin. Hostfile format is the same as config hostfile format. - -**-g CONFIG_FILE, --config-file CONFIG_FILE** - Use specified custom configuration file. - -**-I INVENTORY_DIR, --inventory INVENTORY_DIR** - Use specified custom inventory directory. Inventory - directory is set up by the following rules: if cdist - configuration resolves this value then specified - directory is used, if HOME env var is set then - ~/.cdit/inventory is used, otherwise distribution - inventory directory is used. - - -INVENTORY ADD-TAG ------------------ -Add tag(s) to inventory database. - -**host** - List of host(s) for which tags are added. - -**-b, --beta** - Enable beta functionality. - -**-f HOSTFILE, --file HOSTFILE** - Read additional hosts to add tags from specified file - or from stdin if '-' (each host on separate line). If - no host or host file is specified then, by default, - read from stdin. If no tags/tagfile nor hosts/hostfile - are specified then tags are read from stdin and are - added to all hosts. Hostfile format is the same as config hostfile format. - -**-g CONFIG_FILE, --config-file CONFIG_FILE** - Use specified custom configuration file. - -**-I INVENTORY_DIR, --inventory INVENTORY_DIR** - Use specified custom inventory directory. Inventory - directory is set up by the following rules: if cdist - configuration resolves this value then specified - directory is used, if HOME env var is set then - ~/.cdit/inventory is used, otherwise distribution - inventory directory is used. - -**-T TAGFILE, --tag-file TAGFILE** - Read additional tags to add from specified file or - from stdin if '-' (each tag on separate line). If no - tag or tag file is specified then, by default, read - from stdin. If no tags/tagfile nor hosts/hostfile are - specified then tags are read from stdin and are added - to all hosts. Tagfile format is the same as config hostfile format. - -**-t TAGLIST, --taglist TAGLIST** - Tag list to be added for specified host(s), comma - separated values. - - -INVENTORY DEL-HOST ------------------- -Delete host(s) from inventory database. - -**host** - Host(s) to delete. - -**-a, --all** - Delete all hosts. - -**-b, --beta** - Enable beta functionality. - -**-f HOSTFILE, --file HOSTFILE** - Read additional hosts to delete from specified file or - from stdin if '-' (each host on separate line). If no - host or host file is specified then, by default, read - from stdin. Hostfile format is the same as config hostfile format. - -**-g CONFIG_FILE, --config-file CONFIG_FILE** - Use specified custom configuration file. - -**-I INVENTORY_DIR, --inventory INVENTORY_DIR** - Use specified custom inventory directory. Inventory - directory is set up by the following rules: if cdist - configuration resolves this value then specified - directory is used, if HOME env var is set then - ~/.cdit/inventory is used, otherwise distribution - inventory directory is used. - - -INVENTORY DEL-TAG ------------------ -Delete tag(s) from inventory database. - -**host** - List of host(s) for which tags are deleted. - -**-a, --all** - Delete all tags for specified host(s). - -**-b, --beta** - Enable beta functionality. - -**-f HOSTFILE, --file HOSTFILE** - Read additional hosts to delete tags for from - specified file or from stdin if '-' (each host on - separate line). If no host or host file is specified - then, by default, read from stdin. If no tags/tagfile - nor hosts/hostfile are specified then tags are read - from stdin and are deleted from all hosts. Hostfile - format is the same as config hostfile format. - -**-g CONFIG_FILE, --config-file CONFIG_FILE** - Use specified custom configuration file. - -**-I INVENTORY_DIR, --inventory INVENTORY_DIR** - Use specified custom inventory directory. Inventory - directory is set up by the following rules: if cdist - configuration resolves this value then specified - directory is used, if HOME env var is set then - ~/.cdit/inventory is used, otherwise distribution - inventory directory is used. - -**-T TAGFILE, --tag-file TAGFILE** - Read additional tags from specified file or from stdin - if '-' (each tag on separate line). If no tag or tag - file is specified then, by default, read from stdin. - If no tags/tagfile nor hosts/hostfile are specified - then tags are read from stdin and are added to all - hosts. Tagfile format is the same as config hostfile format. - -**-t TAGLIST, --taglist TAGLIST** - Tag list to be deleted for specified host(s), comma - separated values. - - -INVENTORY LIST --------------- -List inventory database. - -**host** - Host(s) to list. - -**-a, --all** - List hosts that have all specified tags, if -t/--tag - is specified. - -**-b, --beta** - Enable beta functionality. - -**-f HOSTFILE, --file HOSTFILE** - Read additional hosts to list from specified file or - from stdin if '-' (each host on separate line). If no - host or host file is specified then, by default, list - all. Hostfile format is the same as config hostfile format. - -**-g CONFIG_FILE, --config-file CONFIG_FILE** - Use specified custom configuration file. - -**-H, --host-only** - Suppress tags listing. - -**-I INVENTORY_DIR, --inventory INVENTORY_DIR** - Use specified custom inventory directory. Inventory - directory is set up by the following rules: if cdist - configuration resolves this value then specified - directory is used, if HOME env var is set then - ~/.cdit/inventory is used, otherwise distribution - inventory directory is used. - -**-t, --tag** - Host is specified by tag, not hostname/address; list - all hosts that contain any of specified tags. - - -SHELL ------ -This command allows you to spawn a shell that enables access -to the types as commands. It can be thought as an -"interactive manifest" environment. See below for example -usage. Its primary use is for debugging type parameters. - -**-s SHELL, --shell SHELL** - Select shell to use, defaults to current shell. Used shell should - be POSIX compatible shell. - - -CONFIGURATION -------------- -cdist obtains configuration data from the following sources in the following -order (from higher to lower precedence): - - #. command-line options - #. configuration file specified at command-line - #. configuration file specified in CDIST_CONFIG_FILE environment variable - #. environment variables - #. user's configuration file (first one found of ~/.cdist.cfg, $XDG_CONFIG_HOME/cdist/cdist.cfg, in specified order) - #. system-wide configuration file (/etc/cdist.cfg). - -CONFIGURATION FILE FORMAT -~~~~~~~~~~~~~~~~~~~~~~~~~ -cdist configuration file is in the INI file format. Currently it supports -only [GLOBAL] section. -The possible keywords and their meanings are as follows: - -:strong:`archiving` - Use specified archiving. Valid values include: - 'none', 'tar', 'tgz', 'tbz2' and 'txz'. - -:strong:`beta` - Enable beta functionality. It recognizes boolean values from - 'yes'/'no', 'on'/'off', 'true'/'false' and '1'/'0'. - -:strong:`cache_path_pattern` - Specify cache path pattern. - -:strong:`conf_dir` - List of configuration directories separated with the character conventionally - used by the operating system to separate search path components (as in PATH), - such as ':' for POSIX or ';' for Windows. - If also specified at command line then values from command line are - appended to this value. - -:strong:`init_manifest` - Specify default initial manifest. - -:strong:`inventory_dir` - Specify inventory directory. - -:strong:`jobs` - Specify number of jobs for parallel processing. If -1 then the default, - number of CPU's in the system is used. If 0 then parallel processing in - jobs is disabled. If set to positive number then specified maximum - number of processes will be used. - -:strong:`local_shell` - Shell command used for local execution. - -:strong:`out_path` - Directory to save cdist output in. - -:strong:`parallel` - Process hosts in parallel. If -1 then the default, number of CPU's in - the system is used. If 0 then parallel processing of hosts is disabled. - If set to positive number then specified maximum number of processes - will be used. - -:strong:`remote_copy` - Command to use for remote copy (should behave like scp). - -:strong:`remote_exec` - Command to use for remote execution (should behave like ssh). - -:strong:`remote_out_path` - Directory to save cdist output in on the target host. - -:strong:`remote_shell` - Shell command at remote host used for remote execution. - -:strong:`save_output_streams` - Enable/disable saving output streams (enabled by default). - It recognizes boolean values from 'yes'/'no', 'on'/'off', 'true'/'false' - and '1'/'0'. - -:strong:`timestamp` - Timestamp log messages with the current local date and time - in the format: YYYYMMDDHHMMSS.us. - -:strong:`verbosity` - Set verbosity level. Valid values are: - 'ERROR', 'WARNING', 'INFO', 'VERBOSE', 'DEBUG', 'TRACE' and 'OFF'. - - -FILES ------ -~/.cdist - Your personal cdist config directory. If exists it will be - automatically used. -~/.cdist/cache - Local cache directory. -~/.cdist/inventory - The home inventory directory. If ~/.cdist exists it will be used as - default inventory directory. -cdist/conf - The distribution configuration directory. It contains official types and - explorers. This path is relative to cdist installation directory. -cdist/inventory - The distribution inventory directory. - This path is relative to cdist installation directory. -/etc/cdist.cfg - Global cdist configuration file, if exists. -~/.cdist.cfg or $XDG_CONFIG_HOME/cdist/cdist.cfg - Local cdist configuration file, if exists. - -NOTES ------ -cdist detects if host is specified by IPv6 address. If so then remote_copy -command is executed with host address enclosed in square brackets -(see :strong:`scp`\ (1)). - -EXAMPLES --------- - -.. code-block:: sh - - # Configure ikq05.ethz.ch with debug enabled - % cdist config -vvv ikq05.ethz.ch - - # Configure hosts in parallel and use a different configuration directory - % cdist config -c ~/p/cdist-nutzung \ - -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch - - # Use custom remote exec / copy commands - % cdist config --remote-exec /path/to/my/remote/exec \ - --remote-copy /path/to/my/remote/copy \ - -p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch - - # Configure hosts read from file loadbalancers - % cdist config -f loadbalancers - - # Configure hosts read from file web.hosts using 16 parallel jobs - # (beta functionality) - % cdist config -b -j 16 -f web.hosts - - # Display banner - cdist banner - - # Show help - % cdist --help - - # Show Version - % cdist --version - - # Enter a shell that has access to emulated types - % cdist shell - % __git - usage: __git --source SOURCE [--state STATE] [--branch BRANCH] - [--group GROUP] [--owner OWNER] [--mode MODE] object_id - - # Install ikq05.ethz.ch with debug enabled - % cdist install -vvv ikq05.ethz.ch - - # List inventory content - % cdist inventory list -b - - # List inventory for specified host localhost - % cdist inventory list -b localhost - - # List inventory for specified tag loadbalancer - % cdist inventory list -b -t loadbalancer - - # Add hosts to inventory - % cdist inventory add-host -b web1 web2 web3 - - # Delete hosts from file old-hosts from inventory - % cdist inventory del-host -b -f old-hosts - - # Add tags to specified hosts - % cdist inventory add-tag -b -t europe,croatia,web,static web1 web2 - - # Add tag to all hosts in inventory - % cdist inventory add-tag -b -t vm - - # Delete all tags from specified host - % cdist inventory del-tag -b -a localhost - - # Delete tags read from stdin from hosts specified by file hosts - % cdist inventory del-tag -b -T - -f hosts - - # Configure hosts from inventory with any of specified tags - % cdist config -b -t web dynamic - - # Configure hosts from inventory with all specified tags - % cdist config -b -t -a web dynamic - - # Configure all hosts from inventory db - $ cdist config -b -A - - -ENVIRONMENT ------------ -TMPDIR, TEMP, TMP - Setup the base directory for the temporary directory. - See http://docs.python.org/py3k/library/tempfile.html for - more information. This is rather useful, if the standard - directory used does not allow executables. - -CDIST_PATH - Colon delimited list of config directories. - -CDIST_LOCAL_SHELL - Selects shell for local script execution, defaults to /bin/sh. - -CDIST_REMOTE_SHELL - Selects shell for remote script execution, defaults to /bin/sh. - -CDIST_OVERRIDE - Allow overwriting type parameters. - -CDIST_ORDER_DEPENDENCY - Create dependencies based on the execution order. - -CDIST_REMOTE_EXEC - Use this command for remote execution (should behave like ssh). - -CDIST_REMOTE_COPY - Use this command for remote copy (should behave like scp). - -CDIST_INVENTORY_DIR - Use this directory as inventory directory. - -CDIST_BETA - Enable beta functionality. - -CDIST_CACHE_PATH_PATTERN - Custom cache path pattern. - -CDIST_CONFIG_FILE - Custom configuration file. - - -EXIT STATUS ------------ -The following exit values shall be returned: - -0 Successful completion. - -1 One or more host configurations failed. - - -AUTHORS -------- -Originally written by Nico Schottelius -and Steven Armstrong . - - -CAVEATS -------- -When operating in parallel, either by operating in parallel for each host -(-p/--parallel) or by parallel jobs within a host (-j/--jobs), and depending -on target SSH server and its configuration you may encounter connection drops. -This is controlled with sshd :strong:`MaxStartups` configuration options. -You may also encounter session open refusal. This happens with ssh multiplexing -when you reach maximum number of open sessions permitted per network -connection. In this case ssh will disable multiplexing. -This limit is controlled with sshd :strong:`MaxSessions` configuration -options. For more details refer to :strong:`sshd_config`\ (5). - -When requirements for the same object are defined in different manifests (see -example below), for example, in init manifest and in some other type manifest -and those requirements differ then dependency resolver cannot detect -dependencies correctly. This happens because cdist cannot prepare all objects first -and run all objects afterwards. Some object can depend on the result of type -explorer(s) and explorers are executed during object run. cdist will detect -such case and display a warning message. An example of such a case: - -.. code-block:: sh - - init manifest: - __a a - require="__e/e" __b b - require="__f/f" __c c - __e e - __f f - require="__c/c" __d d - __g g - __h h - - type __g manifest: - require="__c/c __d/d" __a a - - Warning message: - WARNING: cdisttesthost: Object __a/a already exists with requirements: - /usr/home/darko/ungleich/cdist/cdist/test/config/fixtures/manifest/init-deps-resolver /tmp/tmp.cdist.test.ozagkg54/local/759547ff4356de6e3d9e08522b0d0807/data/conf/type/__g/manifest: set() - /tmp/tmp.cdist.test.ozagkg54/local/759547ff4356de6e3d9e08522b0d0807/data/conf/type/__g/manifest: {'__c/c', '__d/d'} - Dependency resolver could not handle dependencies as expected. - -COPYING -------- -Copyright \(C) 2011-2017 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License v3 or later (GPLv3+). diff --git a/docs/src/man7/.gitignore b/docs/src/man7/.gitignore deleted file mode 100644 index e69de29b..00000000 diff --git a/hacking/.gitignore b/hacking/.gitignore deleted file mode 100644 index 375edb27..00000000 --- a/hacking/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -iso/ -*.iso -preos/ diff --git a/hacking/README b/hacking/README deleted file mode 100644 index 937564d5..00000000 --- a/hacking/README +++ /dev/null @@ -1,33 +0,0 @@ -- next step - - rootfs fix - - get working to login - - have sshd enabled - - kernel -> initramfs? - http://jootamam.net/howto-initramfs-image.htm - - busybox!! - -- everything into initramfs? - -- permission problem on various files below /etc - -- Target: - - get working iso - - have it configured and gathered by cdist? - - -- boot process via ...? - - systemd? - -- packaging via ... - - packages? - - binlist - - bootstrap of os - -> root permissions! - -- boot device - -- uefi support - [9:15] wurzel:hacking% pacman -Ql syslinux | grep ldlin - syslinux /usr/lib/syslinux/bios/ldlinux.c32 - syslinux /usr/lib/syslinux/efi32/ldlinux.e32 - syslinux /usr/lib/syslinux/efi64/ldlinux.e64 diff --git a/hacking/v1-debootstrap-pacstrap/arch_bootstrap.sh b/hacking/v1-debootstrap-pacstrap/arch_bootstrap.sh deleted file mode 100644 index 0472bf3c..00000000 --- a/hacking/v1-debootstrap-pacstrap/arch_bootstrap.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -fakeroot pacman -r $(pwd -P)/preos -Syu --noconfirm --cachedir $(pwd -P)/preos/var/cache/pacman base - diff --git a/hacking/v1-debootstrap-pacstrap/debian_bootstrap.sh b/hacking/v1-debootstrap-pacstrap/debian_bootstrap.sh deleted file mode 100644 index 75628116..00000000 --- a/hacking/v1-debootstrap-pacstrap/debian_bootstrap.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -fakeroot debootstrap jessie ./preos-debootstrap/ diff --git a/hacking/v2-initramfs-from-os/add_kernel_isolinux.sh b/hacking/v2-initramfs-from-os/add_kernel_isolinux.sh deleted file mode 100755 index ec7b610c..00000000 --- a/hacking/v2-initramfs-from-os/add_kernel_isolinux.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh - -# FIXME: Write cdist type / explorer that finds -# package for a file, distro independent - -if [ "$#" -ne 1 ]; then - echo "$0 dir-out" - exit 1 -fi - -dir=$1; shift -boot=$dir/boot - -mkdir -p "$boot" -cp /boot/vmlinuz-linux \ - /boot/initramfs-linux-fallback.img \ - /usr/lib/syslinux/bios/isolinux.bin \ - "$boot" - -cp /usr/lib/syslinux/bios/ldlinux.c32 \ - "$dir" - -cat > "$dir/isolinux.cfg" << eof -default preos -label preos -title cdist PreOS -linux /boot/vmlinuz-linux -initrd /boot/initramfs-linux-fallback.img -eof diff --git a/hacking/v2-initramfs-from-os/all.sh b/hacking/v2-initramfs-from-os/all.sh deleted file mode 100755 index fe3d6d11..00000000 --- a/hacking/v2-initramfs-from-os/all.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -set -e - -dir=./iso -iso=preos.iso - -./filelist_from_package.sh | ./filelist_to_dir.sh "$dir" -echo "MISSING: copy libraries" >&2 -./add_kernel_isolinux.sh "$dir" -./create_iso.sh "$dir" "$iso" diff --git a/hacking/v2-initramfs-from-os/bin_to_pkg.sh b/hacking/v2-initramfs-from-os/bin_to_pkg.sh deleted file mode 100755 index 111b1fa9..00000000 --- a/hacking/v2-initramfs-from-os/bin_to_pkg.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -abspath=$(command -v "$1") -pacman -Qoq "$abspath" diff --git a/hacking/v2-initramfs-from-os/copy_files_for_iso.sh b/hacking/v2-initramfs-from-os/copy_files_for_iso.sh deleted file mode 100755 index 0318c072..00000000 --- a/hacking/v2-initramfs-from-os/copy_files_for_iso.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -set -ex - -testdir=./iso-root-dir - -# Create base -rm -rf "$testdir" -mkdir "$testdir" - -# Copy binaries - -# Copy kernel -mkdir -p "$testdir/boot" -cp /boot/vmlinuz-linux "$testdir/boot/kernel" -cp /boot/initramfs-linux-fallback.img "$testdir/boot/initramfs" - -# Create iso -genisoimage -v -V "cdist preos v0.1" \ - -cache-inodes -J -l \ - -r -no-emul-boot \ - -boot-load-size 4 -b isolinux.bin -c boot.cat -o cdist-preos.iso iso - diff --git a/hacking/v2-initramfs-from-os/file_list_of_packages.sh b/hacking/v2-initramfs-from-os/file_list_of_packages.sh deleted file mode 100644 index 608fdfbc..00000000 --- a/hacking/v2-initramfs-from-os/file_list_of_packages.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -pacman -Qlq "$@" diff --git a/hacking/v2-initramfs-from-os/filelist_from_package.sh b/hacking/v2-initramfs-from-os/filelist_from_package.sh deleted file mode 100755 index 5652ba66..00000000 --- a/hacking/v2-initramfs-from-os/filelist_from_package.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh - -# Generate filelist excluding stuff that takes only space -( - for pkg in systemd openssh \ - bash bzip2 coreutils cryptsetup device-mapper dhcpcd \ - diffutils e2fsprogs file filesystem findutils gawk \ - gettext glibc grep gzip inetutils iproute2 \ - iputils jfsutils less licenses linux logrotate lvm2 \ - man-db man-pages mdadm nano pacman pciutils \ - pcmciautils procps-ng psmisc reiserfsprogs \ - s-nail sed shadow sysfsutils systemd-sysvcompat tar \ - usbutils util-linux vi which xfsprogs \ - ; do - pacman -Qlq $pkg | grep -v \ - -e /usr/share/man/ \ - -e /usr/share/doc/ \ - -e /usr/include - - done -) | sort | uniq diff --git a/hacking/v2-initramfs-from-os/filelist_to_dir.sh b/hacking/v2-initramfs-from-os/filelist_to_dir.sh deleted file mode 100755 index 3ce19b9f..00000000 --- a/hacking/v2-initramfs-from-os/filelist_to_dir.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -if [ "$#" -ne 1 ]; then - echo "$0 outdir" - exit 1 -fi - -outdir=$1; shift - -mkdir -p "$outdir" - -while read file; do - if [ -d "$file" ]; then - mkdir -p "$outdir$file" - else - cp --preserve=mode,links "$file" "$outdir$file" - fi -done diff --git a/hacking/v2-initramfs-from-os/packages_arch b/hacking/v2-initramfs-from-os/packages_arch deleted file mode 100644 index ed879512..00000000 --- a/hacking/v2-initramfs-from-os/packages_arch +++ /dev/null @@ -1,29 +0,0 @@ -base syslinux - -[10:06] wurzel:hacking% sudo !! -sudo pacman -S base -[sudo] password for nico: -:: linux is in IgnorePkg/IgnoreGroup. Install anyway? [Y/n] y -:: There are 50 members in group base: -:: Repository core - 1) bash 2) bzip2 3) coreutils 4) cryptsetup 5) device-mapper 6) dhcpcd 7) diffutils 8) e2fsprogs 9) file - 10) filesystem 11) findutils 12) gawk 13) gcc-libs 14) gettext 15) glibc 16) grep 17) gzip 18) inetutils - 19) iproute2 20) iputils 21) jfsutils 22) less 23) licenses 24) linux 25) logrotate 26) lvm2 27) man-db - 28) man-pages 29) mdadm 30) nano 31) netctl 32) pacman 33) pciutils 34) pcmciautils 35) perl 36) procps-ng - 37) psmisc 38) reiserfsprogs 39) s-nail 40) sed 41) shadow 42) sysfsutils 43) systemd-sysvcompat 44) tar - 45) texinfo 46) usbutils 47) util-linux 48) vi 49) which 50) xfsprogs - -Enter a selection (default=all): - -:18,23s/ [0-9]*)//g - - bash bzip2 coreutils cryptsetup device-mapper dhcpcd diffutils e2fsprogs file - filesystem findutils gawk gcc-libs gettext glibc grep gzip inetutils - iproute2 iputils jfsutils less licenses linux logrotate lvm2 man-db - man-pages mdadm nano netctl pacman pciutils pcmciautils perl procps-ng - psmisc reiserfsprogs s-nail sed shadow sysfsutils systemd-sysvcompat tar - texinfo usbutils util-linux vi which xfsprogs - -6J - -bash bzip2 coreutils cryptsetup device-mapper dhcpcd diffutils e2fsprogs file filesystem findutils gawk gcc-libs gettext glibc grep gzip inetutils iproute2 iputils jfsutils less licenses linux logrotate lvm2 man-db man-pages mdadm nano netctl pacman pciutils pcmciautils perl procps-ng psmisc reiserfsprogs s-nail sed shadow sysfsutils systemd-sysvcompat tar texinfo usbutils util-linux vi which xfsprogs diff --git a/hacking/v3-busybox/add_kernel_isolinux.sh b/hacking/v3-busybox/add_kernel_isolinux.sh deleted file mode 100755 index ac5d495b..00000000 --- a/hacking/v3-busybox/add_kernel_isolinux.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh - -# FIXME: distro specific kernel location - -if [ "$#" -ne 1 ]; then - echo "$0 dir-out" - exit 1 -fi - -dir=$1; shift -boot=$dir/boot - -mkdir -p "$boot" -cp /boot/vmlinuz-linux "$boot/linux" -cp /usr/lib/syslinux/bios/isolinux.bin "$boot" -cp /usr/lib/syslinux/bios/ldlinux.c32 "$dir" - -cat > "$dir/isolinux.cfg" << eof -default preos -label preos -title cdist PreOS -linux /boot/linux -initrd /boot/initramfs -eof diff --git a/hacking/v3-busybox/all.sh b/hacking/v3-busybox/all.sh deleted file mode 100755 index 65a3706b..00000000 --- a/hacking/v3-busybox/all.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -rm -rf preos -mkdir -p preos/boot - -./create_initramfs.sh > preos/boot/initramfs -./add_kernel_isolinux.sh preos -./copy_bin_with_libs.sh preos -./create_iso.sh preos preos.iso diff --git a/hacking/v3-busybox/copy_bin_with_libs.sh b/hacking/v3-busybox/copy_bin_with_libs.sh deleted file mode 100755 index ee2b532e..00000000 --- a/hacking/v3-busybox/copy_bin_with_libs.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/sh -# Nico Schottelius -# Fri May 1 17:31:50 CEST 2015 - - -PATH=/bin:/sbin:/usr/bin:/usr/sbin - -if [ "$#" -ne 1 ]; then - echo "$0 dir-out" - exit 1 -fi - - -out_dir=$1 - -#bin_list="udevadm bash fdisk mount syslinux umount rm mv" -bin_list="udevadm fdisk" - -libs=$(mktemp /tmp/cdist-preos-libs.XXXXXXXXXXXXX) - -mkdir -p "$out_dir/bin" "$out_dir/lib" - -( - for bin in $bin_list; do - src=$(which "$bin") - cp "$src" "$out_dir/bin" - - ldd "$src" | sed -e 's/=>//' -e 's/(.*//' | awk '{ if(NF == 2) { print $2 } else { print $1 } }' - done -) | sort | uniq > "$libs" - - -while read lib; do - if echo $lib | grep '^/'; then - # echo "Copying fqdn lib $lib ..." - cp "$lib" "$out_dir/lib" - else - echo "How to copy $lib ?" - fi -done < "$libs" - - -rm -f "$libs" - -exit 0 - - -bin=$1 - -# Not used alternatives -# new_list=$(objdump -p /usr/bin/ls | awk '$1 ~ /NEEDED/ { print $2 }') -# ldconfig -p | grep 'libBrokenLocale.so.1$' | sed 's/.* => //' - - -for new_item in $new_list; do - - -done - -ldconfig -p | diff --git a/hacking/v3-busybox/create_initramfs.sh b/hacking/v3-busybox/create_initramfs.sh deleted file mode 100755 index f87a7ef6..00000000 --- a/hacking/v3-busybox/create_initramfs.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh -set -ex - - -initramfs_dir=$(mktemp -d /tmp/cdist-preos.XXXXXXX) -# initramfs_dir=$1 - -for dir in bin sbin etc proc sys newroot usr/bin usr/sbin; do - mkdir -p ${initramfs_dir}/$dir -done -touch ${initramfs_dir}/etc/mdev.conf - -cp init "${initramfs_dir}/init" -cp $(which busybox) "${initramfs_dir}/bin" - -for link in sh mount; do - ln -fs busybox "${initramfs_dir}/bin/$link" -done - -cd "${initramfs_dir}" -find . | cpio -H newc -o | gzip - -rm -rf "${initramfs_dir}" - -exit 0 - -# TODO: -# - Kernel modules -# - ssh -# - various mkfs -# - libs - diff --git a/hacking/v3-busybox/create_iso.sh b/hacking/v3-busybox/create_iso.sh deleted file mode 100755 index c6b39be6..00000000 --- a/hacking/v3-busybox/create_iso.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh - -# FIXME: include os explorer to name preos - -if [ "$#" -ne 2 ]; then - echo "$0 dir-in iso-out" - exit 1 -fi - -indir=$1; shift -iso=$1; shift - -version=0.4 - -out=preos-${version}.iso - - # -cache-inodes \ -genisoimage -r -J -l \ - -V "cdist PreOS $version" \ - -b boot/isolinux.bin -no-emul-boot -c boot.cat -boot-load-size 4 -boot-info-table \ - -o "$iso" "$indir" diff --git a/hacking/v3-busybox/init b/hacking/v3-busybox/init deleted file mode 100755 index a961526f..00000000 --- a/hacking/v3-busybox/init +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/sh - -#Create all the symlinks to /bin/busybox -/bin/busybox --install -s - -#Mount things needed by this script -mount -t proc proc /proc -mount -t sysfs sysfs /sys - -#Disable kernel messages from popping onto the screen -echo 0 > /proc/sys/kernel/printk - - -#Create device nodes -mknod /dev/null c 1 3 -mknod /dev/tty c 5 0 -mdev -s - -#Function for parsing command line options with "=" in them -# get_opt("init=/sbin/init") will return "/sbin/init" -get_opt() { - echo "$@" | cut -d "=" -f 2 -} - -#Defaults -init="/sbin/init" -root="/dev/hda1" - -#Process command line options -for i in $(cat /proc/cmdline); do - case $i in - root\=*) - root=$(get_opt $i) - ;; - init\=*) - init=$(get_opt $i) - ;; - esac -done - - -exec sh - -# Skipping the rest - -#Mount the root device -mount "${root}" /newroot - -#Check if $init exists and is executable -if [[ -x "/newroot/${init}" ]] ; then - #Unmount all other mounts so that the ram used by - #the initramfs can be cleared after switch_root - umount /sys /proc - - #Switch to the new root and execute init - exec switch_root /newroot "${init}" -fi - -#This will only be run if the exec above failed -echo "Failed to switch_root, dropping to a shell" -exec sh diff --git a/hacking/v3-busybox/qemu-test.sh b/hacking/v3-busybox/qemu-test.sh deleted file mode 100755 index 02afc2e6..00000000 --- a/hacking/v3-busybox/qemu-test.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -if [ "$#" -ne 1 ]; then - echo "$0 iso" - exit 1 -fi - -iso=$1; shift - -qemu-system-x86_64 -m 512 -boot order=cd \ - -drive file=$iso,media=cdrom - diff --git a/other/archived_types/.README.unmaintained b/other/archived_types/.README.unmaintained deleted file mode 100644 index 513f3b78..00000000 --- a/other/archived_types/.README.unmaintained +++ /dev/null @@ -1 +0,0 @@ -This type is not maintained anymore and has thus been removed from cdist. diff --git a/other/archived_types/README b/other/archived_types/README deleted file mode 100644 index 32cd1f3d..00000000 --- a/other/archived_types/README +++ /dev/null @@ -1,3 +0,0 @@ -This directory contains types that used to be included with -cdist, but are not in use anymore. Have a look at the README -file in each type, to find out why it was removed. diff --git a/other/archived_types/__autofs/README b/other/archived_types/__autofs/README deleted file mode 120000 index 7495e43b..00000000 --- a/other/archived_types/__autofs/README +++ /dev/null @@ -1 +0,0 @@ -../.README.unmaintained \ No newline at end of file diff --git a/other/archived_types/__autofs/man.rst b/other/archived_types/__autofs/man.rst deleted file mode 100644 index 4f02720e..00000000 --- a/other/archived_types/__autofs/man.rst +++ /dev/null @@ -1,39 +0,0 @@ -cdist-type__autofs(7) -===================== -Install and start autofs - -Steven Armstrong - - -DESCRIPTION ------------ -This space intentionally left blank. - - -REQUIRED PARAMETERS -------------------- -None. - - -OPTIONAL PARAMETERS -------------------- -None. - - -EXAMPLES --------- - -.. code-block:: sh - - __autofs - - -SEE ALSO --------- -- `cdist-type(7) `_ - - -COPYING -------- -Copyright \(C) 2012 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/other/archived_types/__autofs/manifest b/other/archived_types/__autofs/manifest deleted file mode 100755 index ed6e87ee..00000000 --- a/other/archived_types/__autofs/manifest +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh -# -# 2012 Steven Armstrong (steven-cdist at armstrong.cc) -# 2012 Nico Schottelius (nico-cdist at schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - - -os=$(cat "$__global/explorer/os") - -case "$os" in - ubuntu|debian|archlinux|devuan) - __package autofs --state present - __start_on_boot autofs --state present - ;; - *) - echo "Unsupported OS: $os" >&2 - exit 1 - ;; -esac diff --git a/other/archived_types/__autofs/singleton b/other/archived_types/__autofs/singleton deleted file mode 100644 index e69de29b..00000000 diff --git a/other/archived_types/__autofs_map/README b/other/archived_types/__autofs_map/README deleted file mode 120000 index 7495e43b..00000000 --- a/other/archived_types/__autofs_map/README +++ /dev/null @@ -1 +0,0 @@ -../.README.unmaintained \ No newline at end of file diff --git a/other/archived_types/__autofs_map/explorer/entry b/other/archived_types/__autofs_map/explorer/entry deleted file mode 100755 index 7aa26518..00000000 --- a/other/archived_types/__autofs_map/explorer/entry +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh -# -# 2011 - 2012 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -candidates="/etc/auto.master /etc/autofs/auto.master" -find_auto_master() { - # get the path of the auto.master file - for candidate in $candidates; do - if [ -f "$candidate" ]; then - echo "$candidate" - return - fi - done -} - -auto_master="$(find_auto_master)" - -# no auto.master, nothing we could do -[ -f "$auto_master" ] || exit 0 - -# NOTE: keep variables in sync in manifest/explorer/gencode-* -prefix="#cdist:$__object_name" -suffix="#/cdist:$__object_name" -awk -v prefix="$prefix" -v suffix="$suffix" '{ - if (index($0,prefix)) { - triggered=1 - } - if (triggered) { - if (index($0,suffix)) { - triggered=0 - } - print - } -}' "$auto_master" diff --git a/other/archived_types/__autofs_map/gencode-remote b/other/archived_types/__autofs_map/gencode-remote deleted file mode 100755 index fa6acffb..00000000 --- a/other/archived_types/__autofs_map/gencode-remote +++ /dev/null @@ -1,93 +0,0 @@ -#!/bin/sh -# -# 2011 - 2012 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -entry="$__object/files/entry" -state_should="$(cat "$__object/parameter/state" 2>/dev/null || echo present)" -if [ ! -s "$__object/explorer/entry" ]; then - state_is='absent' -else - state_is=$(diff -q "$entry" "$__object/explorer/entry" >/dev/null \ - && echo present \ - || echo changed - ) -fi - -if [ "$state_should" = "$state_is" ]; then - # Nothing to do, move along - exit 0 -fi - -cat << DONE -candidates="/etc/auto.master /etc/autofs/auto.master" -find_auto_master() { - # get the path of the auto.master file - for candidate in \$candidates; do - if [ -f "\$candidate" ]; then - echo "\$candidate" - return - fi - done -} - -auto_master="\$(find_auto_master)" - -if [ ! -f "\$auto_master" ]; then - echo "Could not determine auto.master location, tried: \$candidates" >&2 - exit 1 -fi -DONE - -remove_entry() { - # NOTE: keep variables in sync in manifest/explorer/gencode-* - prefix="#cdist:$__object_name" - suffix="#/cdist:$__object_name" - cat << DONE -awk -v prefix="$prefix" -v suffix="$suffix" ' -{ - if (index(\$0,prefix)) { - triggered=1 - } - if (triggered) { - if (index(\$0,suffix)) { - triggered=0 - } - } else { - print - } -}' "\$auto_master" > "\$auto_master"+ -mv -f "\$auto_master"+ "\$auto_master" -DONE -} - -case "$state_should" in - present) - if [ "$state_is" = "changed" ]; then - remove_entry - fi - cat << DONE -cat >> "\$auto_master" << EOC -$(cat "$entry") -EOC -DONE - ;; - absent) - remove_entry - ;; -esac diff --git a/other/archived_types/__autofs_map/manifest b/other/archived_types/__autofs_map/manifest deleted file mode 100755 index 58dc0f98..00000000 --- a/other/archived_types/__autofs_map/manifest +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/sh -# -# 2011 - 2012 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -name="/$__object_id" -map="$(cat "$__object/parameter/map")" -type="$(cat "$__object/parameter/type" 2>/dev/null || echo "file")" -options="$(cat "$__object/parameter/options" 2>/dev/null || true)" - -# NOTE: keep variables in sync in manifest/explorer/gencode-* -prefix="#cdist:$__object_name" -suffix="#/cdist:$__object_name" - -mkdir "$__object/files" - -# Generate entry for inclusion in auto.master -entry="$__object/files/entry" -echo "$prefix" > "$entry" -if [ -f "$__object/parameter/comment" ]; then - echo "# $(cat "$__object/parameter/comment")" >> "$entry" -fi -echo "$name $type:$map $options" >> $entry -echo "$suffix" >> "$entry" - -# Reload autofs after changes if the user wishes this -if [ ! -f "$__object/parameter/noreload" ]; then - state_should="$(cat "$__object/parameter/state" 2>/dev/null || echo present)" - if [ ! -s "$__object/explorer/entry" ]; then - state_is='absent' - else - state_is=$(diff -q "$entry" "$__object/explorer/entry" >/dev/null \ - && echo present \ - || echo changed - ) - fi - if [ "$state_is" != "$state_should" ]; then - require="$__object_name" __autofs_reload - fi -fi diff --git a/other/archived_types/__autofs_map/parameter/boolean b/other/archived_types/__autofs_map/parameter/boolean deleted file mode 100644 index 862edc87..00000000 --- a/other/archived_types/__autofs_map/parameter/boolean +++ /dev/null @@ -1 +0,0 @@ -noreload diff --git a/other/archived_types/__autofs_reload/README b/other/archived_types/__autofs_reload/README deleted file mode 120000 index 7495e43b..00000000 --- a/other/archived_types/__autofs_reload/README +++ /dev/null @@ -1 +0,0 @@ -../.README.unmaintained \ No newline at end of file diff --git a/other/archived_types/__autofs_reload/gencode-remote b/other/archived_types/__autofs_reload/gencode-remote deleted file mode 100755 index 913d3f24..00000000 --- a/other/archived_types/__autofs_reload/gencode-remote +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh -# -# 2012 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - - -os=$(cat "$__global/explorer/os") - -not_supported() { - echo "Your operating system ($os) is currently not supported by this type (${__type##*/})." >&2 - echo "Please contribute an implementation for it if you can." >&2 - exit 1 -} - -case "$os" in - ubuntu|debian|archlinux|devuan) - echo "pkill -HUP automount" - ;; - *) - not_supported - ;; -esac diff --git a/other/archived_types/__autofs_reload/man.rst b/other/archived_types/__autofs_reload/man.rst deleted file mode 100644 index 101e9965..00000000 --- a/other/archived_types/__autofs_reload/man.rst +++ /dev/null @@ -1,39 +0,0 @@ -cdist-type__autofs_reload(7) -============================ -Tell automounter to reload config file - -Steven Armstrong - - -DESCRIPTION ------------ -This space intentionally left blank. - - -REQUIRED PARAMETERS -------------------- -None. - - -OPTIONAL PARAMETERS -------------------- -None. - - -EXAMPLES --------- - -.. code-block:: sh - - __autofs_reload - - -SEE ALSO --------- -- `cdist-type(7) `_ - - -COPYING -------- -Copyright \(C) 2012 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/other/archived_types/__autofs_reload/singleton b/other/archived_types/__autofs_reload/singleton deleted file mode 100644 index e69de29b..00000000 diff --git a/other/examples/remote/README b/other/examples/remote/README deleted file mode 100644 index 288fc293..00000000 --- a/other/examples/remote/README +++ /dev/null @@ -1,2 +0,0 @@ -Some examples of using alternative __remote_copy and __remote_exec prefixes. -This allows you to change how cdist interacts with the target host (or directory, or whatever :-) diff --git a/other/examples/remote/chroot/copy b/other/examples/remote/chroot/copy deleted file mode 100755 index 8f8cb680..00000000 --- a/other/examples/remote/chroot/copy +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh -# -# 2011 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# __remote_copy script to run cdist against a local chroot instead of via ssh -# to a remote target host. -# -# Usage: -# cdist config --remote-copy "/path/to/this/script /path/to/your/chroot" target-id -# - -log() { - #echo "$@" | logger -t "cdist-chroot-copy" - : -} - -chroot="$1"; shift -target_host="$__target_host" - -# replace target_host with chroot location -code="$(echo "$@" | sed "s|$target_host:|$chroot|g")" - -log "target_host: $target_host" -log "chroot: $chroot" -log "$@" -log "$code" - -# copy files into chroot -cp $code - -log "-----" diff --git a/other/examples/remote/chroot/exec b/other/examples/remote/chroot/exec deleted file mode 100755 index 4637f918..00000000 --- a/other/examples/remote/chroot/exec +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/sh -# -# 2011 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# __remote_exec script to run cdist against a local chroot instead of via ssh -# on a remote target host. -# -# Usage: -# cdist config --remote-exec "/path/to/this/script /path/to/your/chroot" target-id -# - -log() { - #echo "$@" | logger -t "cdist-chroot-exec" - : -} - -chroot="$1"; shift -target_host="$1"; shift - -script=$(mktemp "${chroot}/tmp/chroot-${0##*/}.XXXXXXXXXX") -trap cleanup INT TERM EXIT -cleanup() { - [ $__cdist_debug ] || rm "$script" -} - -log "target_host: $target_host" -log "script: $script" -log "@: $@" -echo "#!/bin/sh -l" > "$script" -echo "$@" >> "$script" -chmod +x "$script" - -relative_script="${script#$chroot}" -log "relative_script: $relative_script" - -# run in chroot -chroot "$chroot" "$relative_script" - -log "-----" diff --git a/other/examples/remote/local/README b/other/examples/remote/local/README deleted file mode 100644 index cfd350f9..00000000 --- a/other/examples/remote/local/README +++ /dev/null @@ -1,3 +0,0 @@ -This effectively turns remote calling into local calling. - -Probably most useful for the unittesting. diff --git a/other/examples/remote/local/copy b/other/examples/remote/local/copy deleted file mode 100755 index 0cec3643..00000000 --- a/other/examples/remote/local/copy +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -# -# 2012 Nico Schottelius (nico-cdist schottelius.org) -# 2013 Steven Armstrong (steven-cdist armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -code="$(echo "$@" | sed "s|\([[:space:]]\)$__target_host:|\1|g")" -cp --dereference $code diff --git a/other/examples/remote/local/exec b/other/examples/remote/local/exec deleted file mode 100755 index 838513a9..00000000 --- a/other/examples/remote/local/exec +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -# -# 2012 Nico Schottelius (nico-cdist schottelius.org) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -target_host=$1; shift -echo "$@" | /bin/sh diff --git a/other/examples/remote/rsync/copy b/other/examples/remote/rsync/copy deleted file mode 100755 index 76217caf..00000000 --- a/other/examples/remote/rsync/copy +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh -# -# 2012 Matt Coddington (mcoddington at gmail.com) -# 2012 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Use rsync over ssh to copy files. This particular invocation of -# rsync makes a backup of the file before overwriting it. For example, -# if cdist overwrites /etc/passwd then you'll end up with the old copy -# at /etc/passwd~cdist. -# -# Usage: -# cdist config --remote-copy /path/to/this/script target_host -# - -# For rsync to do the right thing, the source has to end with "/" if it is -# a directory. The below preprocessor loop takes care of that. - -# second last argument is the source -source_index=$(($#-1)) -index=0 -for arg in $@; do - if [ $index -eq 0 ]; then - # reset $@ - set -- - fi - index=$((index+=1)) - if [ $index -eq $source_index -a -d "$arg" ]; then - arg="${arg%/}/" - fi - set -- "$@" "$arg" -done - -rsync --backup --suffix=~cdist -e 'ssh -o User=root' $@ diff --git a/other/examples/remote/schroot-uri b/other/examples/remote/schroot-uri deleted file mode 100755 index 5b50a195..00000000 --- a/other/examples/remote/schroot-uri +++ /dev/null @@ -1,141 +0,0 @@ -#!/bin/sh -e -# -# 2012 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# __remote_{exec,copy} script to run cdist against a schroot target uri -# -# Usage: -# cdist config \ -# --remote-exec "/path/to/this/script exec" \ -# --remote-copy "/path/to/this/script copy" \ -# target_uri -# -# # target_uri examples: -# schroot:///chroot-name -# schroot://foo.ethz.ch/chroot-name -# schroot://user-name@foo.ethz.ch/chroot-name -# -# # and how to match them in .../manifest/init -# case "$target_host" in -# schroot://*) -# # any schroot -# ;; -# schroot://foo.ethz.ch/*) -# # any schroot on specific host -# ;; -# schroot://foo.ethz.ch/chroot-name) -# # specific schroot on specific host -# ;; -# schroot:///chroot-name) -# # specific schroot on localhost -# ;; -# esac - -my_name="${0##*/}" -mode="$1"; shift - -log() { - # uncomment me for debugging - #echo "$@" | logger -t "cdist-$my_name-$mode" - : -} - -die() { - echo "$@" >&2 - exit 1 -} - - -uri="$__target_host" - -scheme="${uri%%:*}"; rest="${uri#$scheme:}"; rest="${rest#//}" -authority="${rest%%/*}"; rest="${rest#$authority}" -path="${rest%\?*}"; rest="${rest#$path}" -schroot_name="${path#/}" - -[ "$scheme" = "schroot" ] || die "Failed to parse scheme from __target_host ($__target_host). Expected 'schroot', got '$scheme'" -[ -n "$schroot_name" ] || die "Failed to parse schroot name from __target_host: $__target_host" - -case "$authority" in - '') - # authority is empty, neither user nor host given - user="" - host="" - ;; - *@*) - # authority contains @, take user from authority - user="${authority%@*}" - host="${authority#*@}" - ;; - *) - # no user in authority, default to root - user="root" - host="$authority" - ;; -esac - -log "mode: $mode" -log "@: $@" -log "uri: $uri" -log "scheme: $scheme" -log "authority: $authority" -log "user: $user" -log "host: $host" -log "path: $path" -log "schroot_name: $schroot_name" - -exec_prefix="" -copy_prefix="" -if [ -n "$host" ]; then - # we are working on a remote host - exec_prefix="ssh -o User=$user -q $host" - copy_prefix="scp -o User=$user -q" - copy_destination_prefix="$host:" -else - # working on local machine - copy_prefix="cp" - copy_destination_prefix="" -fi -log "exec_prefix: $exec_prefix" -log "copy_prefix: $copy_prefix" -log "copy_destination_prefix: $copy_destination_prefix" - -case "$mode" in - exec) - # In exec mode the first argument is the __target_host which we already got from env. Get rid of it. - shift - code="$exec_prefix schroot -c $schroot_name -- sh -c '$@'" - ;; - copy) - # get directory for given chroot_name - schroot_directory="$($exec_prefix schroot -c $schroot_name --config | awk -F = '/directory=/ {print $2}')" - [ -n "$schroot_directory" ] || die "Failed to retreive schroot directory for schroot: $schroot_name" - log "schroot_directory: $schroot_directory" - # prefix destination with chroot - code="$copy_prefix $(echo "$@" | sed "s|$uri:|${copy_destination_prefix}${schroot_directory}|g")" - ;; - *) die "Unknown mode: $mode";; -esac - -log "code: $code" - -# Run the code -$code - -log "-----" diff --git a/other/examples/remote/schroot/copy b/other/examples/remote/schroot/copy deleted file mode 100755 index d995055e..00000000 --- a/other/examples/remote/schroot/copy +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh -# -# 2011 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# __remote_copy script to run cdist against a chroot on the target host over ssh. -# -# Usage: -# cdist config --remote-copy "/path/to/this/script schroot-chroot-name" target_host -# - -log() { - #echo "$@" | logger -t "cdist-schroot-copy" - : -} - -chroot_name="$1"; shift -target_host="$__target_host" - -# get directory for given chroot_name -chroot="$(ssh -o User=root -q $target_host schroot -c $chroot_name --config | awk -F = '/directory=/ {print $2}')" - -# prefix destination with chroot -code="$(echo "$@" | sed "s|$target_host:|$target_host:$chroot|g")" - -log "target_host: $target_host" -log "chroot_name: $chroot_name" -log "chroot: $chroot" -log "@: $@" -log "code: $code" - -# copy files into remote chroot -scp -o User=root -q $code - -log "-----" diff --git a/other/examples/remote/sudo/copy b/other/examples/remote/sudo/copy deleted file mode 100755 index 577f270e..00000000 --- a/other/examples/remote/sudo/copy +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh -# -# 2012 Matt Coddington (mcoddington at gmail.com) -# 2012 Steven Armstrong (steven-cdist at armstrong.cc) -# 2013 Chase Allen James (nx-cdist at nu-ex.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Use rsync over ssh to copy files. Uses the "--rsync-path" option -# to run the remote rsync instance with sudo. -# -# This command assumes your ssh configuration is already set up -# in ~/.ssh/config. -# -# Usage: -# cdist config --remote-copy /path/to/this/script target_host -# - -# For rsync to do the right thing, the source has to end with "/" if it is -# a directory. The below preprocessor loop takes care of that. - -# second last argument is the source -source_index=$(($#-1)) -index=0 -for arg in $@; do - if [ $index -eq 0 ]; then - # reset $@ - set -- - fi - index=$((index+=1)) - if [ $index -eq $source_index -a -d "$arg" ]; then - arg="${arg%/}/" - fi - set -- "$@" "$arg" -done - -rsync --copy-links --rsync-path="sudo rsync" -e 'ssh' "$@" diff --git a/other/examples/remote/sudo/exec b/other/examples/remote/sudo/exec deleted file mode 100755 index 90eae2da..00000000 --- a/other/examples/remote/sudo/exec +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -# -# 2013 Chase Allen James (nx-cdist at nu-ex.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# Prefixes all remote commands with sudo. -# -# This command assumes your ssh configuration is already set up -# in ~/.ssh/config. -# -# Usage: -# cdist config --remote-exec "/path/to/this/script" target_host -# - -host="$1"; shift -ssh -q "$host" sudo sh -c \""$@"\" diff --git a/other/examples/types/README b/other/examples/types/README deleted file mode 100644 index f6ea90d6..00000000 --- a/other/examples/types/README +++ /dev/null @@ -1,3 +0,0 @@ -This directory contains examples types as being used in real world. - -If you'd like to see your type here, just submit it for inclusion. diff --git a/other/examples/types/__ethz_dinfk_ldap/README b/other/examples/types/__ethz_dinfk_ldap/README deleted file mode 100644 index 18c1574b..00000000 --- a/other/examples/types/__ethz_dinfk_ldap/README +++ /dev/null @@ -1,2 +0,0 @@ -This type is used in production in the ETH and utilises a template to generate -the config file. diff --git a/other/examples/types/__ethz_dinfk_ldap/files/nslcd.conf.template b/other/examples/types/__ethz_dinfk_ldap/files/nslcd.conf.template deleted file mode 100755 index d5b41c24..00000000 --- a/other/examples/types/__ethz_dinfk_ldap/files/nslcd.conf.template +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh -cat << DONE -# -# D-INFK SANS MANAGED FILE -# ======================== -# -# Do not change this file. Changes will be overwritten. -# - -# /etc/nslcd.conf -# nslcd configuration file. See nslcd.conf(5) -# for details. - -# The user and group nslcd should run as. -uid nslcd -gid nslcd - -# The location at which the LDAP server(s) should be reachable. -uri ldaps://ldaps01.ethz.ch -uri ldaps://ldaps02.ethz.ch -uri ldaps://ldaps03.ethz.ch - - -# The search base -base ou=${ou},ou=inf,ou=auth,o=ethz,c=ch -base passwd ou=users,ou=${ou},ou=inf,ou=auth,o=ethz,c=ch -base group ou=Group,ou=inf,ou=auth,o=ethz,c=ch -base netgroup ou=netgroup,ou=inf,ou=auth,o=ethz,c=ch - -binddn cn=REPLACE,ou=ME,ou=WITH,ou=YOUR,o=DETAILS,c=ch -bindpw VERYSECRETPASSWORD - -# The LDAP protocol version to use. -#ldap_version 3 - -# The DN to bind with for normal lookups. -#binddn cn=annonymous,dc=example,dc=net -#bindpw secret - -# SSL options -ssl on -tls_reqcert never - -# The search scope. -#scope sub -DONE diff --git a/other/examples/types/__ethz_dinfk_ldap/files/nsswitch.conf b/other/examples/types/__ethz_dinfk_ldap/files/nsswitch.conf deleted file mode 100644 index f4185a86..00000000 --- a/other/examples/types/__ethz_dinfk_ldap/files/nsswitch.conf +++ /dev/null @@ -1,22 +0,0 @@ -# -# D-INFK SANS MANAGED FILE -# ======================== -# -# Do not change this file. Changes will be overwritten. -# -# /etc/nsswitch.conf -# - -passwd: files ldap -group: files ldap -shadow: files ldap - -hosts: files dns -networks: files - -services: db files -protocols: db files -rpc: db files -ethers: db files - -netgroup: files ldap diff --git a/other/examples/types/__ethz_dinfk_ldap/manifest b/other/examples/types/__ethz_dinfk_ldap/manifest deleted file mode 100755 index c31d765d..00000000 --- a/other/examples/types/__ethz_dinfk_ldap/manifest +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh -# -# 2011 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# -# Configure nss_ldap for a machine at DINFK. -# - -ou="$(cat "$__object/parameter/ou")" - -ldap_config="/etc/nslcd.conf" -ldap_package="libnss-ldapd" - -# Install required packages -__package "$ldap_package" --state installed - -# Generate nss-ldap config file from template -mkdir "$__object/files" -. "$__type/files/nslcd.conf.template" > "$__object/files/nslcd.conf" -__file "$ldap_config" --source "$__object/files/nslcd.conf" - -# Configure nsswitch to use ldap -require="__package/$ldap_package __file/$ldap_config" \ - __file /etc/nsswitch.conf --source "$__type/files/nsswitch.conf" diff --git a/other/examples/types/__ethz_dinfk_ldap/parameter/required b/other/examples/types/__ethz_dinfk_ldap/parameter/required deleted file mode 100644 index d96c19d8..00000000 --- a/other/examples/types/__ethz_dinfk_ldap/parameter/required +++ /dev/null @@ -1 +0,0 @@ -ou diff --git a/other/examples/types/__ethz_dinfk_ldap/singleton b/other/examples/types/__ethz_dinfk_ldap/singleton deleted file mode 100644 index e69de29b..00000000 diff --git a/other/examples/types/__nico_acpi_supend_on_lid_close/README b/other/examples/types/__nico_acpi_supend_on_lid_close/README deleted file mode 100644 index b1924140..00000000 --- a/other/examples/types/__nico_acpi_supend_on_lid_close/README +++ /dev/null @@ -1,3 +0,0 @@ -This type is used on notebooks to ensure they suspend when the lid is closed. - -It is tested on Archlinux. diff --git a/other/examples/types/__nico_acpi_supend_on_lid_close/files/lid.sh b/other/examples/types/__nico_acpi_supend_on_lid_close/files/lid.sh deleted file mode 100755 index 929fbffb..00000000 --- a/other/examples/types/__nico_acpi_supend_on_lid_close/files/lid.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -# Nico Schottelius, 20111016 -# Just suspend, my wife does not like to enter a password - -/usr/sbin/pm-suspend diff --git a/other/examples/types/__nico_acpi_supend_on_lid_close/files/lid_event b/other/examples/types/__nico_acpi_supend_on_lid_close/files/lid_event deleted file mode 100644 index 294f6d78..00000000 --- a/other/examples/types/__nico_acpi_supend_on_lid_close/files/lid_event +++ /dev/null @@ -1,2 +0,0 @@ -event=button/lid.* -action=/etc/acpi/actions/lid.sh "%e" diff --git a/other/examples/types/__nico_acpi_supend_on_lid_close/singleton b/other/examples/types/__nico_acpi_supend_on_lid_close/singleton deleted file mode 100644 index e69de29b..00000000 diff --git a/other/examples/types/__nico_sudo/README b/other/examples/types/__nico_sudo/README deleted file mode 100644 index 5e4cf0d3..00000000 --- a/other/examples/types/__nico_sudo/README +++ /dev/null @@ -1,2 +0,0 @@ -Configure sudoers file to be included. Different types may do so, -this one simply uses the "nico" file to store the configuration. diff --git a/other/examples/types/__nico_sudo/parameter/optional b/other/examples/types/__nico_sudo/parameter/optional deleted file mode 100644 index e69de29b..00000000 diff --git a/other/examples/types/__nico_sudo/parameter/required b/other/examples/types/__nico_sudo/parameter/required deleted file mode 100644 index e69de29b..00000000 diff --git a/other/examples/types/__nico_sudo/singleton b/other/examples/types/__nico_sudo/singleton deleted file mode 100644 index e69de29b..00000000 diff --git a/other/types_submitted_for_inclusion/.readmes/README.inclusion.dependent b/other/types_submitted_for_inclusion/.readmes/README.inclusion.dependent deleted file mode 100644 index b62c1a15..00000000 --- a/other/types_submitted_for_inclusion/.readmes/README.inclusion.dependent +++ /dev/null @@ -1,15 +0,0 @@ -Description: - - Type that depends on other types to be included. - -Problem: - - Does not make much sense on its own. - -Solutions: - - - Make dependent types includable. - - or - - - Modify for yourself and use it diff --git a/other/types_submitted_for_inclusion/.readmes/README.inclusion.specific b/other/types_submitted_for_inclusion/.readmes/README.inclusion.specific deleted file mode 100644 index 3afdb7b4..00000000 --- a/other/types_submitted_for_inclusion/.readmes/README.inclusion.specific +++ /dev/null @@ -1,19 +0,0 @@ -Description: - - Type that will probably only work in a very specific environnment - (like a specific distribution only). - or has custom code that may not satisfy the "usual" or generic use case. - -Problem: - - If included into core/ directory, many users would be disappointed, - because it does not work for them out of the box. - -Solutions: - - - Make visible for others (done: by integrating into other/types_submitted_for_inclusion) - - Improve: make usable for at least 80% of the standard cases - - or - - - Modify for yourself and use it diff --git a/other/types_submitted_for_inclusion/README b/other/types_submitted_for_inclusion/README deleted file mode 100644 index b2b4972d..00000000 --- a/other/types_submitted_for_inclusion/README +++ /dev/null @@ -1,6 +0,0 @@ -The types in this directory were submitted / thought to be -included into cdist, but for some reason did not make it into -conf/type/. - -The reason for the type not being included into conf/type/ -is documented in README.inclusion. diff --git a/other/types_submitted_for_inclusion/__init_script/README.inclusion b/other/types_submitted_for_inclusion/__init_script/README.inclusion deleted file mode 100644 index f2621f12..00000000 --- a/other/types_submitted_for_inclusion/__init_script/README.inclusion +++ /dev/null @@ -1,4 +0,0 @@ -Moved out of conf/type/ to think about whether this type makes sense or not. - -Cdist describes the state and using an init_script may be useful, but -should only be used conditionally. diff --git a/other/types_submitted_for_inclusion/__init_script/gencode-remote b/other/types_submitted_for_inclusion/__init_script/gencode-remote deleted file mode 100644 index d212feb7..00000000 --- a/other/types_submitted_for_inclusion/__init_script/gencode-remote +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh -# -# 2010-2011 Daniel Roth (dani-cdist@d-roth.li) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -if [ -f "$__object/parameter/script" ]; then - script=$(cat "$__object/parameter/script") -else - script="/$__object_id" -fi - -if [ -f "$__object/parameter/base_dir" ]; then - base_dir=$(cat "$__object/parameter/base_dir") -else - os="$(cat "$__global/explorer/os")" - case "$os" in - archlinux|netbsd|macosx|freebsd|openbsd) base_dir="/etc/rc.d" ;; - *) base_dir="/etc/init.d" - esac -fi - -mode=$(cat "$__object/parameter/mode") - -echo "${base_dir}/${script} ${mode}" diff --git a/other/types_submitted_for_inclusion/__init_script/man.rst b/other/types_submitted_for_inclusion/__init_script/man.rst deleted file mode 100644 index 9d9220d4..00000000 --- a/other/types_submitted_for_inclusion/__init_script/man.rst +++ /dev/null @@ -1,49 +0,0 @@ -cdist-type__init_script(7) -========================== -Use the init scripts - -Daniel Roth - - -DESCRIPTION ------------ -This type can be used to control your init scripts. - - -REQUIRED PARAMETERS -------------------- -mode - Specifies what shall be done with the init script (usually one of 'start'|'stop'|'restart'|'reload' or 'force-reload') - - -OPTIONAL PARAMETERS -------------------- -script - If supplied, use this as the init-script. - Otherwise the object_id is used. - -base_dir - If supplied, this type uses this directory instead of '/etc/init.d'. The parameter will not need an ending slash. - - -EXAMPLES --------- - -.. code-block:: sh - - # Reloads the configuration for lighttpd - __init_script lighttpd --mode force-reload - - # Reloads the configuration for lighttpd - __init_script lighty --script lighttpd --mode force-reload - - -SEE ALSO --------- -- `cdist-type(7) `_ - - -COPYING -------- -Copyright \(C) 2011 Daniel Roth. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/other/types_submitted_for_inclusion/__init_script/parameter/optional b/other/types_submitted_for_inclusion/__init_script/parameter/optional deleted file mode 100644 index 5551a8f2..00000000 --- a/other/types_submitted_for_inclusion/__init_script/parameter/optional +++ /dev/null @@ -1,2 +0,0 @@ -script -base_dir diff --git a/other/types_submitted_for_inclusion/__init_script/parameter/required b/other/types_submitted_for_inclusion/__init_script/parameter/required deleted file mode 100644 index 17ab372f..00000000 --- a/other/types_submitted_for_inclusion/__init_script/parameter/required +++ /dev/null @@ -1 +0,0 @@ -mode diff --git a/other/types_submitted_for_inclusion/__mysql_server/README.inclusion b/other/types_submitted_for_inclusion/__mysql_server/README.inclusion deleted file mode 120000 index 573e1f5f..00000000 --- a/other/types_submitted_for_inclusion/__mysql_server/README.inclusion +++ /dev/null @@ -1 +0,0 @@ -../.readmes/README.inclusion.specific \ No newline at end of file diff --git a/other/types_submitted_for_inclusion/__mysql_server/files/my.cnf b/other/types_submitted_for_inclusion/__mysql_server/files/my.cnf deleted file mode 100644 index bd651c46..00000000 --- a/other/types_submitted_for_inclusion/__mysql_server/files/my.cnf +++ /dev/null @@ -1 +0,0 @@ -[client] diff --git a/other/types_submitted_for_inclusion/__mysql_server/gencode-remote b/other/types_submitted_for_inclusion/__mysql_server/gencode-remote deleted file mode 100755 index 4c160671..00000000 --- a/other/types_submitted_for_inclusion/__mysql_server/gencode-remote +++ /dev/null @@ -1,93 +0,0 @@ -#!/bin/sh -# -# 2012 Benedikt Koeppel (code@benediktkoeppel.ch) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -if [ -f "$__object/parameter/no_my_cnf" ]; then - no_my_cnf="$(cat "$__object/parameter/no_my_cnf")" -else - no_my_cnf="false" -fi - -if [ -f "$__object/parameter/password" ]; then - rootpassword="$(cat "$__object/parameter/password")" -else - rootpassword="" -fi - - -if [ "$rootpassword" != "" ]; then - # to the database without requiring a passwort input - # set root password - echo "mysqladmin -u root password $rootpassword" - - # if we don't want to overwrite the .my.cnf, then take a backup now - if [ "$no_my_cnf" == "true" ]; then - mv /root/.my.cnf /root/.my.cnf.cdist.bkp - fi - - # store the root password in /root/.my.cnf so that processes can connect - cat <<-EOFF - cat <<-EOF > /root/.my.cnf - [client] - password=$rootpassword -EOF -EOFF - - - - # remove anonymous users - cat <<-EOFF - mysql -u root <<-EOF - DELETE FROM mysql.user WHERE User=''; -EOF -EOFF - - # remove remote-access for root - cat <<-EOFF - mysql -u root <<-EOF - DELETE FROM mysql.user WHERE User='root' AND Host!='localhost'; -EOF -EOFF - - # remove test database - cat <<-EOFF - mysql -u root <<-EOF - DROP DATABASE IF EXISTS test; -EOF -EOFF - cat <<-EOFF - mysql -u root <<-EOF - DELETE FROM mysql.db WHERE Db='test' OR Db='test\_%' -EOF -EOFF - - # flush privileges - cat <<-EOFF - mysql -u root <<-EOF - FLUSH PRIVILEGES; -EOF -EOFF - - # if we don't want to overwrite the .my.cnf, then restore the backup now - if [ "$no_my_cnf" == "true" ]; then - mv /root/.my.cnf.cdist.bkp /root/.my.cnf - fi - -fi diff --git a/other/types_submitted_for_inclusion/__mysql_server/man.rst b/other/types_submitted_for_inclusion/__mysql_server/man.rst deleted file mode 100644 index c561117c..00000000 --- a/other/types_submitted_for_inclusion/__mysql_server/man.rst +++ /dev/null @@ -1,57 +0,0 @@ -cdist-type__mysql_server(7) -=========================== -Manage a MySQL server - -Benedikt Koeppel - - -DESCRIPTION ------------ -This cdist type allows you to install a MySQL database server. The -__mysql_server type also takes care of a few basic security tweaks that are -normally done by running the mysql_secure_installation script that is provided -with MySQL. - - -REQUIRED PARAMETERS -------------------- -password - The root password to set. - - -OPTIONAL PARAMETERS -------------------- -no_my_cnf - The /root/.my.cnf file is used to temporary store the root password when doing - the mysql_secure_installation. If you want to have your own .my.cnf file, then - specify --no_my_cnf "true". - Cdist will then place your original /root/.my.cnf back once cdist has run. - - -EXAMPLES --------- - -.. code-block:: sh - - # to install a MySQL server - __mysql_server - - # to install a MySQL server, remove remote access, remove test databases - # similar to mysql_secure_installation, specify the root password - __mysql_server --password "Uu9jooKe" - # this will also write a /root/.my.cnf file - - # if you don't want cdist to write a /root/.my.cnf file permanently, specify - # the --no_my_cnf option - __mysql_server --password "Uu9jooKe" --no_my_cnf - - -SEE ALSO --------- -- `cdist-type(7) `_ - - -COPYING -------- -Copyright \(C) 2012 Benedikt Koeppel. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/other/types_submitted_for_inclusion/__mysql_server/manifest b/other/types_submitted_for_inclusion/__mysql_server/manifest deleted file mode 100755 index ce331998..00000000 --- a/other/types_submitted_for_inclusion/__mysql_server/manifest +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh -# -# 2012 Benedikt Koeppel (code@benediktkoeppel.ch) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -# install mysql-server -__package mysql-server --state installed - -if [ -f "$__object/parameter/no_my_cnf" ]; then - no_my_cnf="$(cat "$__object/parameter/no_my_cnf")" -else - no_my_cnf="false" -fi - -if [ -f "$__object/parameter/password" ]; then - rootpassword="$(cat "$__object/parameter/password")" -else - rootpassword="" -fi - -if [ "$no_my_cnf" != "true" -a "$rootpassword" != "" ]; then - # store the root password in /root/.my.cnf so that processes can connect - # to the database without requiring a passwort input - __file "/root/.my.cnf" --group root --owner root --mode 600 -fi diff --git a/other/types_submitted_for_inclusion/__mysql_server/parameter/optional b/other/types_submitted_for_inclusion/__mysql_server/parameter/optional deleted file mode 100644 index 4c40596c..00000000 --- a/other/types_submitted_for_inclusion/__mysql_server/parameter/optional +++ /dev/null @@ -1,2 +0,0 @@ -no_my_cnf -password diff --git a/other/types_submitted_for_inclusion/__mysql_server/parameter/required b/other/types_submitted_for_inclusion/__mysql_server/parameter/required deleted file mode 100644 index e69de29b..00000000 diff --git a/other/types_submitted_for_inclusion/__mysql_server/singleton b/other/types_submitted_for_inclusion/__mysql_server/singleton deleted file mode 100644 index e69de29b..00000000 diff --git a/other/types_submitted_for_inclusion/__nfs_client/README.inclusion b/other/types_submitted_for_inclusion/__nfs_client/README.inclusion deleted file mode 120000 index 573e1f5f..00000000 --- a/other/types_submitted_for_inclusion/__nfs_client/README.inclusion +++ /dev/null @@ -1 +0,0 @@ -../.readmes/README.inclusion.specific \ No newline at end of file diff --git a/other/types_submitted_for_inclusion/__nfs_client/man.rst b/other/types_submitted_for_inclusion/__nfs_client/man.rst deleted file mode 100644 index 3c582958..00000000 --- a/other/types_submitted_for_inclusion/__nfs_client/man.rst +++ /dev/null @@ -1,39 +0,0 @@ -cdist-type__nfs_client(7) -========================= -nfs client - -Steven Armstrong - - -DESCRIPTION ------------ -Install, start, do whatever is necessary to have a working nfs client. - - -REQUIRED PARAMETERS -------------------- -None. - - -OPTIONAL PARAMETERS -------------------- -None. - - -EXAMPLES --------- - -.. code-block:: sh - - __nfs_client - - -SEE ALSO --------- -- `cdist-type(7) `_ - - -COPYING -------- -Copyright \(C) 2011 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/other/types_submitted_for_inclusion/__nfs_client/manifest b/other/types_submitted_for_inclusion/__nfs_client/manifest deleted file mode 100755 index 1059141f..00000000 --- a/other/types_submitted_for_inclusion/__nfs_client/manifest +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh -# -# 2011 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -__package nfs-common --state installed - -require="__package/nfs-common" \ - __process portmap --state running --start "/etc/init.d/portmap start" - -require="__package/nfs-common" \ - __process statd --state running \ - --start "/etc/init.d/statd start" \ - --name "rpc.statd.*" diff --git a/other/types_submitted_for_inclusion/__nfs_client/singleton b/other/types_submitted_for_inclusion/__nfs_client/singleton deleted file mode 100644 index e69de29b..00000000 diff --git a/other/types_submitted_for_inclusion/__nfs_export/README.inclusion b/other/types_submitted_for_inclusion/__nfs_export/README.inclusion deleted file mode 120000 index 52517640..00000000 --- a/other/types_submitted_for_inclusion/__nfs_export/README.inclusion +++ /dev/null @@ -1 +0,0 @@ -../.readmes/README.inclusion.dependent \ No newline at end of file diff --git a/other/types_submitted_for_inclusion/__nfs_export/explorer/entry b/other/types_submitted_for_inclusion/__nfs_export/explorer/entry deleted file mode 100755 index 3922fbce..00000000 --- a/other/types_submitted_for_inclusion/__nfs_export/explorer/entry +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh -# -# 2011 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -export="$(cat "$__object/parameter/export" 2>/dev/null || echo "/$__object_id")" - -name="$(echo "${export#/}" | sed 's;/;-;g')" -if [ -f "/etc/exports.d/$name" ]; then - cat "/etc/exports.d/$name" -else - prefix="#cdist:__nfs_export${export}" - suffix="#/cdist:__nfs_export${export}" - awk -v prefix="$prefix" -v suffix="$suffix" '{ - if (index($0,prefix)) { - triggered=1 - } - if (triggered) { - if (index($0,suffix)) { - triggered=0 - } - print - } -}' /etc/exports -fi - diff --git a/other/types_submitted_for_inclusion/__nfs_export/gencode-remote b/other/types_submitted_for_inclusion/__nfs_export/gencode-remote deleted file mode 100755 index 60b1c9a7..00000000 --- a/other/types_submitted_for_inclusion/__nfs_export/gencode-remote +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/sh -# -# 2011 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -exports_d="$(cat "$__object/explorer/exports.d")" -state_should="$(cat "$__object/parameter/state")" -state_is=$(diff -q "$__object/parameter/entry" "$__object/explorer/entry" \ - && echo present \ - || echo absent -) - -if [ "$state_is" != "$state_should" ]; then - if [ "$exports_d" != "present" ]; then - case "$state_should" in - present) - cat << DONE -cat >> /etc/exports << EOC -$(cat "$__object/parameter/entry") -EOC -DONE - ;; - absent) - # defined in type manifest - prefix="$(cat "$__object/parameter/prefix")" - suffix="$(cat "$__object/parameter/suffix")" - cat << DONE -cat /etc/exports -awk -v prefix="$prefix" -v suffix="$suffix" ' -{ - if (index(\$0,prefix)) { - triggered=1 - } - if (triggered) { - if (index(\$0,suffix)) { - triggered=0 - } - } else { - print - } -}' /etc/exports > /etc/exports+ -mv -f /etc/exports+ /etc/exports -DONE - ;; - esac - fi - # re-export if we changed something - echo "exportfs -rf" -fi diff --git a/other/types_submitted_for_inclusion/__nfs_export/man.rst b/other/types_submitted_for_inclusion/__nfs_export/man.rst deleted file mode 100644 index 4dd164ec..00000000 --- a/other/types_submitted_for_inclusion/__nfs_export/man.rst +++ /dev/null @@ -1,52 +0,0 @@ -cdist-type__nfs_export(7) -========================= -Manage nfs exports - -Steven Armstrong - - -DESCRIPTION ------------ -This cdist type allows you to manage entries in /etc/exports.d. -For older distributions (currently ubuntu lucid) that don't support -/etc/exports.d the entries are merged into the /etc/exports file. - - -REQUIRED PARAMETERS -------------------- -client - space delimited list of client ip/networks for use in /etc/exports. See exports(5) - - -OPTIONAL PARAMETERS -------------------- -options - export options for use in /etc/exports. See exports(5) - -export - the directory to export. Defaults to object_id - -state - Either present or absent. Defaults to present. - - -EXAMPLES --------- - -.. code-block:: sh - - __nfs_export /local/chroot/lucid-amd64 \ - --client "192.168.0.1/24 10.0.0.1/16" \ - --options "ro,async,no_all_squash,no_root_squash,subtree_check" - - -SEE ALSO --------- -- `cdist-type(7) `_ -- exports(5) - - -COPYING -------- -Copyright \(C) 2011 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/other/types_submitted_for_inclusion/__nfs_export/manifest b/other/types_submitted_for_inclusion/__nfs_export/manifest deleted file mode 100755 index d7cbd4df..00000000 --- a/other/types_submitted_for_inclusion/__nfs_export/manifest +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh -# -# 2011 Steven Armstrong (steven-cdist at armstrong.cc) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -# required -client="$(cat "$__object/parameter/client")" - -# optional -export="$(cat "$__object/parameter/export" 2>/dev/null \ - || echo "/$__object_id" | tee "$__object/parameter/export")" -options="$(cat "$__object/parameter/options" 2>/dev/null || true)" -state="$(cat "$__object/parameter/state" 2>/dev/null \ - || echo "present" | tee "$__object/parameter/state")" - -entry="$export" -[ -n "$options" ] && entry="$entry -${options}" -entry="$entry $client" - -# NOTE: if changed, also change in explorers -prefix="#cdist:__nfs_export${export}" -suffix="#/cdist:__nfs_export${export}" -echo "$prefix" | tee "$__object/parameter/prefix" > "$__object/parameter/entry" -echo "$entry" >> "$__object/parameter/entry" -echo "$suffix" | tee "$__object/parameter/suffix" >> "$__object/parameter/entry" - -exports_d="$(cat "$__object/explorer/exports.d")" -if [ "$exports_d" = "present" ]; then - name="$(echo "$export" | sed 's;/;-;g')" - __file "/etc/exports.d/$name" \ - --source "$__object/parameter/entry" \ - --owner root --group root --mode 644 -# --state "$state" -fi diff --git a/other/types_submitted_for_inclusion/__nfs_export/parameter/optional b/other/types_submitted_for_inclusion/__nfs_export/parameter/optional deleted file mode 100644 index f6cd84ea..00000000 --- a/other/types_submitted_for_inclusion/__nfs_export/parameter/optional +++ /dev/null @@ -1,3 +0,0 @@ -options -export -state diff --git a/other/types_submitted_for_inclusion/__nfs_export/parameter/required b/other/types_submitted_for_inclusion/__nfs_export/parameter/required deleted file mode 100644 index b051c6c5..00000000 --- a/other/types_submitted_for_inclusion/__nfs_export/parameter/required +++ /dev/null @@ -1 +0,0 @@ -client diff --git a/other/types_submitted_for_inclusion/__nfs_server/README.inclusion b/other/types_submitted_for_inclusion/__nfs_server/README.inclusion deleted file mode 120000 index 573e1f5f..00000000 --- a/other/types_submitted_for_inclusion/__nfs_server/README.inclusion +++ /dev/null @@ -1 +0,0 @@ -../.readmes/README.inclusion.specific \ No newline at end of file diff --git a/other/types_submitted_for_inclusion/__nfs_server/man.rst b/other/types_submitted_for_inclusion/__nfs_server/man.rst deleted file mode 100644 index 1f9aad76..00000000 --- a/other/types_submitted_for_inclusion/__nfs_server/man.rst +++ /dev/null @@ -1,39 +0,0 @@ -cdist-type__nfs_server(7) -========================= -nfs server - -Steven Armstrong - - -DESCRIPTION ------------ -Install, start, do whatever is necessary to have a working nfs server. - - -REQUIRED PARAMETERS -------------------- -None. - - -OPTIONAL PARAMETERS -------------------- -None. - - -EXAMPLES --------- - -.. code-block:: sh - - __nfs_server - - -SEE ALSO --------- -- `cdist-type(7) `_ - - -COPYING -------- -Copyright \(C) 2011 Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/other/types_submitted_for_inclusion/__nfs_server/singleton b/other/types_submitted_for_inclusion/__nfs_server/singleton deleted file mode 100644 index e69de29b..00000000 diff --git a/other/types_submitted_for_inclusion/__rsyncer/README.inclusion b/other/types_submitted_for_inclusion/__rsyncer/README.inclusion deleted file mode 100644 index eff48995..00000000 --- a/other/types_submitted_for_inclusion/__rsyncer/README.inclusion +++ /dev/null @@ -1,22 +0,0 @@ -Description: - - Type that supports transfer of huge data, which is a general problem in - configuration management systems. - - Good solution using standardised rsync approach. - -Problem: - - Uses root@$__target_host:$destination notation for transfer. - This breaks the concept of being able to replace __remote_exec and - __remote_copy and then doing chroot or different stuff. - - This breaks for instance, if __remote_copy = cp and the destination is - a local chroot. - -Solutions: - - - Have cdist provide support for rsync syntax? - - Integrate __rsyncer more in line with philosohpy of other components - - Think about the general way of __rsyncer and what cdist would need - to provide for general solution. diff --git a/other/types_submitted_for_inclusion/__rsyncer/gencode-local b/other/types_submitted_for_inclusion/__rsyncer/gencode-local deleted file mode 100755 index 9635707b..00000000 --- a/other/types_submitted_for_inclusion/__rsyncer/gencode-local +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh -# -# Copyright (C) 2011 Daniel Maher (phrawzty+cdist at gmail.com) -# -# This file is part of cdist (https://github.com/telmich/cdist/). -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# - -source="$(cat "$__object/parameter/source")" - -if [ -f "$__object/parameter/destination" ]; then - destination="$(cat "$__object/parameter/destination")" -else - destination="/$__object_id" -fi - -# The system binary is probably ok, but if not... -if [ -f "$__object/parameter/rsyncbin" ]; then - rsyncbin="$(cat "$__object/parameter/rsyncbin")" -else - rsyncbin=`which rsync` -fi - -args='-a' - -# If the --delete argument should be passed to rsync. -if [ -f "$__object/parameter/delete" ]; then - args="$args --delete" -fi - -# FIXME: -# - using root@ may break - find a good way to avoid this -# - align with __remote_{exec,copy} variables? - -# Run rsync (locally). -echo "$rsyncbin $args $source root@$__target_host:$destination" diff --git a/other/types_submitted_for_inclusion/__rsyncer/man.rst b/other/types_submitted_for_inclusion/__rsyncer/man.rst deleted file mode 100644 index a09bfea5..00000000 --- a/other/types_submitted_for_inclusion/__rsyncer/man.rst +++ /dev/null @@ -1,59 +0,0 @@ -cdist-type__rsyncer(7) -====================== -Use rsync to copy files. - -Daniel Maher - - -DESCRIPTION ------------ -This type is used to trigger rsync to copy files from the machine running cdist -(source) to the target machine in question (destination). The likely usage is -the rapid deployment of full directory trees, the cohorency of which can be -guarunteed with the optional --delete argument, which will remove any files -from the destination which are not present on the source. - - -REQUIRED PARAMETERS -------------------- -source - The full path of the source from which to copy. This is passed directly - to rsync. - - -OPTIONAL PARAMETERS -------------------- -destination - The full path of the destination. This is passed directly to rsync. - Default: object_id - -delete - If true, remove files from destination which are not in source. This is - effectively the --delete argument of rsync. - Default: false - -rsyncbin - Specify the full path to the rsync binary. - Default: `which rsync` - -EXAMPLES --------- - -.. code-block:: sh - - # Basic example - __rsyncer '/home/foo' --source '/opt/dist/foo' - - # Fancier example - __rsyncer FOO --source '/opt/dist/foo' --destination '/home/foo/' --delete true - - -SEE ALSO --------- -- `cdist-type(7) `_ - - -COPYING -------- -Copyright \(C) 2011 Daniel Maher. Free use of this software is granted under -the terms of the GNU General Public License version 3 (GPLv3). diff --git a/other/types_submitted_for_inclusion/__rsyncer/parameter/optional b/other/types_submitted_for_inclusion/__rsyncer/parameter/optional deleted file mode 100644 index 3bcb4dc7..00000000 --- a/other/types_submitted_for_inclusion/__rsyncer/parameter/optional +++ /dev/null @@ -1,3 +0,0 @@ -destination -delete -rsyncbin diff --git a/other/types_submitted_for_inclusion/__rsyncer/parameter/required b/other/types_submitted_for_inclusion/__rsyncer/parameter/required deleted file mode 100644 index 5a18cd2f..00000000 --- a/other/types_submitted_for_inclusion/__rsyncer/parameter/required +++ /dev/null @@ -1 +0,0 @@ -source diff --git a/other/types_submitted_for_inclusion/__run_command/README.inclusion b/other/types_submitted_for_inclusion/__run_command/README.inclusion deleted file mode 100644 index f7c95da7..00000000 --- a/other/types_submitted_for_inclusion/__run_command/README.inclusion +++ /dev/null @@ -1,6 +0,0 @@ -This type is not much of use, as any type can issue code to be executed. -Thus you can implement the code directly in the calling type. - Or if you need to reuse it, create a type on its own. - -Because this seems to be a common misunderstanding when people come from "non managed areas", - where script iexecution is the main focus, I documented this in cdist-hacker to clearify. diff --git a/other/types_submitted_for_inclusion/__run_command/gencode-remote b/other/types_submitted_for_inclusion/__run_command/gencode-remote deleted file mode 100755 index 7ffd9a7b..00000000 --- a/other/types_submitted_for_inclusion/__run_command/gencode-remote +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh -# -# 2012 Benedikt Koeppel (code at benediktkoeppel.ch) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -if [ -f "$__object/parameter/command" ]; then - cat "$__object/parameter/command" -else - echo "$name" -fi diff --git a/other/types_submitted_for_inclusion/__run_command/man.rst b/other/types_submitted_for_inclusion/__run_command/man.rst deleted file mode 100644 index f4426043..00000000 --- a/other/types_submitted_for_inclusion/__run_command/man.rst +++ /dev/null @@ -1,66 +0,0 @@ -cdist-type__run_command(7) -========================== -Run a command - -Benedikt Koeppel - - -DESCRIPTION ------------ -This cdist type allows you to run a specific command once at installation time. - - -REQUIRED PARAMETERS -------------------- - - -OPTIONAL PARAMETERS -------------------- -command - Command (with arguments) to run. - - If no command is give, then the object_id is executed. - - - -EXAMPLES --------- - -.. code-block:: sh - - # Run a command - __run_command "/etc/init.d/mysql restart" - # runs `/etc/init.d/mysql restart` (the "object_id") - - # Run the same command: - __run_command restart-mysql --command "/etc/init.d/mysql restart" - # runs `/etc/init.d/mysql restart` (the --command argument) - # additionally, it can easily be referenced (for example in a require="..." - #as __run_command/restart-mysql - - # Run a script: - __run_command install-pear --command "$(cat <<-EOF - /usr/bin/pear install --force Auth - /usr/bin/pear install --force HTML_Template_IT-1.2.1 - /usr/bin/pear install --force MDB2 - /usr/bin/pear install --force MDB2#mysql - /usr/bin/pear config-set preferred_state beta; - /usr/bin/pear install --force --alldeps Spreadsheet_Excel_Writer; - /usr/bin/pear config-set preferred_state stable - /usr/bin/pear install --force HTTP_Request - /usr/bin/pear install --force Mail - /usr/bin/pear install --force Auth_HTTP - /usr/bin/pear install --force XML_RPC - EOF - )" - - -SEE ALSO --------- -- `cdist-type(7) `_ - - -COPYING -------- -Copyright \(C) 2012 Benedikt Koeppel. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/other/types_submitted_for_inclusion/__run_command/parameter/optional b/other/types_submitted_for_inclusion/__run_command/parameter/optional deleted file mode 100644 index aa56d324..00000000 --- a/other/types_submitted_for_inclusion/__run_command/parameter/optional +++ /dev/null @@ -1 +0,0 @@ -command diff --git a/other/types_submitted_for_inclusion/__run_command/parameter/required b/other/types_submitted_for_inclusion/__run_command/parameter/required deleted file mode 100644 index e69de29b..00000000 diff --git a/scripts/cdist b/scripts/cdist deleted file mode 100755 index 3110e657..00000000 --- a/scripts/cdist +++ /dev/null @@ -1,87 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# -# 2010-2016 Nico Schottelius (nico-cdist at schottelius.org) -# 2016 Darko Poljak (darko.poljak at gmail.com) -# -# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -# - -import logging -import sys -import cdist -import cdist.argparse -import cdist.banner -import cdist.config -import cdist.install -import cdist.shell -import cdist.inventory - - -def commandline(): - """Parse command line""" - - parser, cfg = cdist.argparse.parse_and_configure(sys.argv[1:]) - args = cfg.get_args() - - # Work around python 3.3 bug: - # http://bugs.python.org/issue16308 - # http://bugs.python.org/issue9253 - - # FIXME: catching AttributeError also hides - # real problems.. try a different way - - # FIXME: we always print main help, not - # the help of the actual parser being used! - try: - getattr(args, "func") - except AttributeError: - parser['main'].print_help() - sys.exit(0) - - args.func(args) - - -if __name__ == "__main__": - cdistpythonversion = '3.2' - if sys.version < cdistpythonversion: - print('Python >= {} is required on the source host.'.format( - cdistpythonversion), file=sys.stderr) - sys.exit(1) - - exit_code = 0 - - try: - import re - import os - - if re.match("__", os.path.basename(sys.argv[0])): - import cdist.emulator - emulator = cdist.emulator.Emulator(sys.argv) - emulator.run() - else: - commandline() - - except KeyboardInterrupt: - exit_code = 2 - - except cdist.Error as e: - log = logging.getLogger("cdist") - log.error(e) - exit_code = 1 - - sys.exit(exit_code) diff --git a/scripts/cdist-dump b/scripts/cdist-dump deleted file mode 100755 index 83b09eb8..00000000 --- a/scripts/cdist-dump +++ /dev/null @@ -1,325 +0,0 @@ -#!/bin/sh - -VERSION="0.0.1" -RELEASE="" - -set -u -# set -x - -hosts= -cache_dir=~/.cdist/cache - -do_all=1 -do_global_explorer= -do_type_explorer= -do_script_stdout= -do_script_stderr= -do_gencode= -do_code= -do_messages= -do_parameter= -delimiter=':' -ln= -filename_prefix=1 -verbose=0 - -myname=${0##*/} - -print_version() -{ - printf "%s %s %s\n" "${myname}" "${VERSION}" "${RELEASE}" -} - -usage() -{ - cat << eof -${myname}: [options] [host...] -eof - - print_version - - cat << eof - -Dump data from cache directories. - -host - Dump data for specified hosts. If not specified then all data - from cache directory is dumped. - -Options - -a dump all - -C CACHE-DIR use specified CACHE-DIR (default: ~/.cdist/cache) - -c dump code-* - -d DELIMITER delimiter used for filename and line number prefix (default: ':') - -E dump global explorers - -e dump type explorers - -F disable filename prefix (enabled by default) - -f enable filename prefix (default) - -g dump gencode-* - -h show this help screen and exit - -L disable line number prefix (default) - -l enable line number prefix (disabled by default) - -m dump messages - -o dump executions' stdout - -p dump parameters - -r dump executions' stderr - -V show version and exit - -v increase verbosity -eof -} - -exit_err() -{ - printf "%s\n" "$1" - exit 1 -} - -# parse options -while [ "$#" -ge 1 ] -do - case "$1" in - -a) - do_all=1 - ;; - -C) - if [ "$#" -ge 2 ] - then - case "$2" in - -*) - exit_err "Missing cache directory" - ;; - *) - cache_dir="$2" - shift - ;; - esac - else - exit_err "Missing cache directory" - fi - ;; - -c) - do_code=1 - do_all= - ;; - -d) - if [ "$#" -ge 2 ] - then - case "$2" in - -*) - exit_err "Missing delimiter" - ;; - *) - delimiter="$2" - shift - ;; - esac - else - exit_err "Missing delimiter" - fi - ;; - -E) - do_global_explorer=1 - do_all= - ;; - -e) - do_type_explorer=1 - do_all= - ;; - -F) - filename_prefix= - ;; - -f) - filename_prefix=1 - ;; - -g) - do_gencode=1 - do_all= - ;; - -h) - usage - exit 0 - ;; - -L) - ln= - ;; - -l) - ln=1 - ;; - -m) - do_messages=1 - do_all= - ;; - -o) - do_script_stdout=1 - do_all= - ;; - -p) - do_parameter=1 - do_all= - ;; - -r) - do_script_stderr=1 - do_all= - ;; - -V) - print_version - exit 0 - ;; - -v) - verbose=$((verbose + 1)) - ;; - *) - hosts="${hosts} $1" - break - ;; - esac - shift -done - -if [ "${ln}" = "1" ] -then - ln="NR \"${delimiter}\"" -fi - -if [ "${filename_prefix}" = "1" ] -then - filename_prefix="{}${delimiter}" -fi - -if [ "${do_all}" = "1" ] -then - do_global_explorer=1 - do_type_explorer=1 - do_script_stdout=1 - do_script_stderr=1 - do_gencode=1 - do_code=1 - do_messages=1 - do_parameter=1 -fi - -set -- -size +0 -set -- "$@" \( -or= - -print_verbose() -{ - if [ "${verbose}" -ge "$1" ] - then - printf "%s\n" "$2" - fi -} - -hor_line() -{ - if [ $# -gt 0 ] - then - c="$1" - else - c='=' - fi - printf "%78s\n" "" | tr ' ' "${c}" -} - -if [ "${do_global_explorer}" ] -then - print_verbose 2 "Dumping global explorers" - set -- "$@" ${or} \( \ - -path "*/explorer/*" -a \ - ! -path "*/conf/*" -a \ - ! -path "*/object/*/explorer/*" \ - \) - or="-o" -fi - -if [ "${do_type_explorer}" ] -then - print_verbose 2 "Dumping type explorers" - set -- "$@" ${or} -path "*/object/*/explorer/*" - or="-o" -fi - -if [ "${do_script_stdout}" ] -then - print_verbose 2 "Dumping execution's stdout" - set -- "$@" ${or} -path "*/stdout/*" - or="-o" -fi - -if [ "${do_script_stderr}" ] -then - print_verbose 2 "Dumping execution's stderr" - set -- "$@" ${or} -path "*/stderr/*" - or="-o" -fi - -if [ "${do_gencode}" ] -then - print_verbose 2 "Dumping gencode-*" - set -- "$@" ${or} \( -name "gencode-*" -a ! -path "*/stdout/*" -a ! -path "*/stderr/*" \) - or="-o" -fi - -if [ "${do_code}" ] -then - print_verbose 2 "Dumping code-*" - set -- "$@" ${or} \( -name "code-*" -a ! -path "*/stdout/*" -a ! -path "*/stderr/*" \) - or="-o" -fi - -if [ "${do_messages}" ] -then - print_verbose 2 "Dumping messages" - set -- "$@" ${or} -name "messages" - or="-o" -fi - -if [ "${do_parameter}" ] -then - print_verbose 2 "Dumping parameters" - set -- "$@" ${or} -path "*/parameter/*" - or="-o" -fi - -set -- "$@" \) -set -- '.' "$@" -exec awk -v prefix="${filename_prefix}" "{print prefix ${ln} \$0}" {} \; - -# printf "+ %s\n" "$*" - -print_verbose 2 "Using cache dir: ${cache_dir}" - -OLD_PWD=$(pwd) -cd "${cache_dir}" || exit - -# If no host is specified then search all. -[ -z "${hosts}" ] && hosts="-" - -for host in ${hosts} -do - [ "${host}" = "-" ] && host= - # find host cache directory - host_dir=$(find . -name target_host -exec grep -l "${host}" {} +) - print_verbose 3 "found host directory files:" - print_verbose 3 "${host_dir}" - - OLD_IFS="${IFS}" - IFS=" - " - - for d in ${host_dir} - do - dir=$(dirname "${d}") - - print_verbose 0 "target host: $(cat "${dir}/target_host"), host directory: ${dir}" - hor_line '=' - - PREV_PWD=$(pwd) - cd "${dir}" || exit - # set -x - find "$@" - # set +x - cd "${PREV_PWD}" || exit - done - IFS="${OLD_IFS}" -done -cd "${OLD_PWD}" || exit diff --git a/scripts/cdist-new-type b/scripts/cdist-new-type deleted file mode 100755 index 79dcfd90..00000000 --- a/scripts/cdist-new-type +++ /dev/null @@ -1,159 +0,0 @@ -#!/bin/sh - -basename="${0##*/}" - -if [ $# -lt 3 ] -then - printf "usage: %s TYPE-NAME AUTHOR-NAME AUTHOR-EMAIL [TYPE-BASE-PATH] - TYPE-NAME Name of the type. - AUTHOR-NAME Type author's full name. - AUTHOR-EMAIL Type author's email. - TYPE-BASE-PATH Path to the base directory of the type. If not set it defaults - to '\$PWD/type'.\n" "${basename}" - exit 1 -fi - -type_name="$1" -shift -author_name="$1" -shift -author_email="$1" -shift - -if [ $# -ge 1 ] -then - type_base_path="$1" - shift -else - #type_base_path=~/.cdist/type - type_base_path="$PWD/type" -fi - -error() { - printf "%s\n" "$*" >&2 -} - -die() { - error "$@" - exit 1 -} - -cd "$type_base_path" || die "Could not change to type directory: $type_base_path. -You have to specify type base path or run me from within a cdist conf directory, -e.g. ~/.cdist." - -year=$(date +%Y) -copyright="# $year $author_name ($author_email)" - -license="# This file is part of cdist. -# -# cdist is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# cdist is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with cdist. If not, see . -# -" - -set -e - -mkdir "$type_name" -cd "$type_name" - -### man page -header="cdist-type${type_name}(7)" -header_length="${#header}" -cat >> man.rst << DONE -$header -$(while [ "${header_length}" -gt 0 ]; do printf "="; header_length=$((header_length - 1)); done; printf "\n";) - -NAME ----- -cdist-type${type_name} - TODO - - -DESCRIPTION ------------ -This space intentionally left blank. - - -REQUIRED PARAMETERS -------------------- -None. - - -OPTIONAL PARAMETERS -------------------- -None. - - -BOOLEAN PARAMETERS ------------------- -None. - - -EXAMPLES --------- - -.. code-block:: sh - - # TODO - ${type_name} - - -SEE ALSO --------- -:strong:\`TODO\`\\ (7) - - -AUTHORS -------- -$author_name <$author_email> - - -COPYING -------- -Copyright \(C) $year $author_name. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. -DONE - -### manifest -cat >> manifest << DONE -#!/bin/sh -e -# -${copyright} -# -${license} - -os=\$(cat "\$__global/explorer/os") - -case "\$os" in - *) - printf "Your operating system (%s) is currently not supported by this type (%s)\n" "\$os" "\${__type##*/}" >&2 - printf "Please contribute an implementation for it if you can.\n" >&2 - exit 1 - ;; -esac -DONE -chmod +x manifest - -# gencode-remote -cat >> gencode-remote << DONE -#!/bin/sh -e -# -${copyright} -# -${license} -DONE -chmod +x gencode-remote - -printf "%s/%s\n" "$type_base_path" "$type_name" diff --git a/setup.py b/setup.py deleted file mode 100644 index ae651125..00000000 --- a/setup.py +++ /dev/null @@ -1,70 +0,0 @@ -from distutils.core import setup -import cdist -import os -import re - - -def data_finder(data_dir): - entries = [] - for name in os.listdir(data_dir): - - # Skip .gitignore files - if name == ".gitignore": - continue - - # Skip vim swp files - swpfile = re.search(r'^\..*\.swp$', name) - if swpfile: - continue - - entry = os.path.join(data_dir, name) - if os.path.isdir(entry): - entries.extend(data_finder(entry)) - else: - entries.append(entry) - - return entries - - -cur = os.getcwd() -os.chdir("cdist") -package_data = data_finder("conf") -os.chdir(cur) - - -setup( - name="cdist", - packages=["cdist", "cdist.core", "cdist.exec", "cdist.util", ], - package_data={'cdist': package_data}, - scripts=["scripts/cdist", "scripts/cdist-dump", "scripts/cdist-new-type"], - version=cdist.version.VERSION, - description="A Usable Configuration Management System", - author="Nico Schottelius", - author_email="nico-cdist-pypi@schottelius.org", - url="https://www.cdi.st/", - classifiers=[ - "Development Status :: 6 - Mature", - "Environment :: Console", - "Intended Audience :: System Administrators", - "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", - "Operating System :: MacOS :: MacOS X", - "Operating System :: POSIX", - "Operating System :: POSIX :: BSD", - "Operating System :: POSIX :: Linux", - "Operating System :: Unix", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Topic :: System :: Boot", - "Topic :: System :: Installation/Setup", - "Topic :: System :: Operating System", - "Topic :: System :: Software Distribution", - "Topic :: Utilities" - ], - long_description=''' - cdist is a usable configuration management system. - It adheres to the KISS principle and is being used in small up to - enterprise grade environments. - cdist is an alternative to other configuration management systems like - cfengine, bcfg2, chef and puppet. - ''' -) diff --git a/test/README b/test/README new file mode 100644 index 00000000..ce5cde4d --- /dev/null +++ b/test/README @@ -0,0 +1,4 @@ +This directory should contain unit tests. + +I have not yet searched (or found) a good way to implement this for cdist, +feel free to take the hat. diff --git a/cdist/test/fixtures/remote/exec b/test/fail_if_explorer_fails.sh similarity index 84% rename from cdist/test/fixtures/remote/exec rename to test/fail_if_explorer_fails.sh index 838513a9..3acfdbeb 100755 --- a/cdist/test/fixtures/remote/exec +++ b/test/fail_if_explorer_fails.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# 2012 Nico Schottelius (nico-cdist schottelius.org) +# 2011 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -19,5 +19,7 @@ # # -target_host=$1; shift -echo "$@" | /bin/sh +. cdist-config + +mkdir -p /tmp/cdist/... +__cdist_explorer_run global