tags/configNico Schotteliushttps://www.nico.schottelius.org//tags/config/Nico Schotteliusikiwiki2019-04-22T19:14:37ZCdist 4.11.1 releasedhttps://www.nico.schottelius.org//blog/cdist-4.11.1-released/2019-04-22T19:14:37Z2019-04-22T19:14:37Z
<p>Here's a short overview about the changes found in version 4.11.1:</p>
<pre><code>* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 4.11.0 releasedhttps://www.nico.schottelius.org//blog/cdist-4.11.0-released/2019-04-20T15:16:55Z2019-04-20T15:16:55Z
<p>Here's a short overview about the changes found in version 4.11.0:</p>
<pre><code>* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 4.10.11 releasedhttps://www.nico.schottelius.org//blog/cdist-4.10.11-released/2019-04-13T17:57:39Z2019-04-13T17:57:39Z
<p>Here's a short overview about the changes found in version 4.10.11:</p>
<pre><code>* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 4.10.10 releasedhttps://www.nico.schottelius.org//blog/cdist-4.10.10-released/2019-04-11T12:49:55Z2019-04-11T12:49:55Z
<p>Here's a short overview about the changes found in version 4.10.10:</p>
<pre><code>* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 4.10.9 releasedhttps://www.nico.schottelius.org//blog/cdist-4.10.9-released/2019-04-09T20:49:38Z2019-04-09T20:49:38Z
<p>Here's a short overview about the changes found in version 4.10.9:</p>
<pre><code>* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 4.10.8 releasedhttps://www.nico.schottelius.org//blog/cdist-4.10.8-released/2019-04-06T08:55:05Z2019-04-06T08:55:05Z
<p>Here's a short overview about the changes found in version 4.10.8:</p>
<pre><code>* Type __clean_path: Fix list explorer exit code if path not directory or does not exist (Ander Punnar)
* New type: __check_messages (Ander Punnar)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 4.10.7 releasedhttps://www.nico.schottelius.org//blog/cdist-4.10.7-released/2019-03-30T18:14:04Z2019-03-30T18:14:04Z
<p>Here's a short overview about the changes found in version 4.10.7:</p>
<pre><code>* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 4.10.6 releasedhttps://www.nico.schottelius.org//blog/cdist-4.10.6-released/2019-02-15T19:48:09Z2019-02-15T19:48:09Z
<p>Here's a short overview about the changes found in version 4.10.6:</p>
<pre><code>* Type __prometheus_alertmanager: Add startup flag (Dominique Roux)
* Types __zypper_repo, __zypper_service: Re-add the use of echo in explorers (Daniel Heule)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 4.10.5 releasedhttps://www.nico.schottelius.org//blog/cdist-4.10.5-released/2018-12-21T21:26:35Z2018-12-21T21:26:35Z
<p>Here's a short overview about the changes found in version 4.10.5:</p>
<pre><code>* 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 <OxR463>)
* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 4.10.4 releasedhttps://www.nico.schottelius.org//blog/cdist-4.10.4-released/2018-11-03T18:26:23Z2018-11-03T18:26:23Z
<p>Here's a short overview about the changes found in version 4.10.4:</p>
<pre><code>* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 4.10.3 releasedhttps://www.nico.schottelius.org//blog/cdist-4.10.3-released/2018-09-23T10:07:12Z2018-09-23T10:07:12Z
<p>Here's a short overview about the changes found in version 4.10.3:</p>
<pre><code>* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 4.10.2 releasedhttps://www.nico.schottelius.org//blog/cdist-4.10.2-released/2018-09-06T05:13:12Z2018-09-06T05:13:12Z
<p>Here's a short overview about the changes found in version 4.10.2:</p>
<pre><code>* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 4.10.1 releasedhttps://www.nico.schottelius.org//blog/cdist-4.10.1-released/2018-06-21T06:39:10Z2018-06-21T06:39:10Z
<p>Here's a short overview about the changes found in version 4.10.1:</p>
<pre><code>* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 4.10.0 releasedhttps://www.nico.schottelius.org//blog/cdist-4.10.0-released/2018-06-17T09:03:59Z2018-06-17T09:03:59Z
<p>Here's a short overview about the changes found in version 4.10.0:</p>
<pre><code>* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 4.9.1 releasedhttps://www.nico.schottelius.org//blog/cdist-4.9.1-released/2018-05-30T17:48:45Z2018-05-30T17:48:45Z
<p>Here's a short overview about the changes found in version 4.9.1:</p>
<pre><code>* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 4.9.0 releasedhttps://www.nico.schottelius.org//blog/cdist-4.9.0-released/2018-05-17T14:17:38Z2018-05-17T14:17:38Z
<p>Here's a short overview about the changes found in version 4.9.0:</p>
<pre><code>* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 4.8.4 releasedhttps://www.nico.schottelius.org//blog/cdist-4.8.4-released/2018-04-20T12:35:11Z2018-04-20T12:35:11Z
<p>Here's a short overview about the changes found in version 4.8.4:</p>
<pre><code>* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 4.8.3 releasedhttps://www.nico.schottelius.org//blog/cdist-4.8.3-released/2018-03-16T18:21:41Z2018-03-16T18:21:41Z
<p>Here's a short overview about the changes found in version 4.8.3:</p>
<pre><code>* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 4.8.2 releasedhttps://www.nico.schottelius.org//blog/cdist-4.8.2-released/2018-03-10T22:54:12Z2018-03-10T22:54:12Z
<p>Here's a short overview about the changes found in version 4.8.2:</p>
<pre><code>* Core: Fix quiet argument access for bare cdist command (Darko Poljak)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 4.8.1 releasedhttps://www.nico.schottelius.org//blog/cdist-4.8.1-released/2018-03-09T16:30:38Z2018-03-09T16:30:38Z
<p>Here's a short overview about the changes found in version 4.8.1:</p>
<pre><code>* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 4.8.0 releasedhttps://www.nico.schottelius.org//blog/cdist-4.8.0-released/2018-02-14T19:14:38Z2018-02-14T19:14:38Z
<p>Here's a short overview about the changes found in version 4.8.0:</p>
<pre><code>* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 4.7.3 releasedhttps://www.nico.schottelius.org//blog/cdist-4.7.3-released/2017-11-10T20:23:11Z2017-11-10T20:23:11Z
<p>Here's a short overview about the changes found in version 4.7.3:</p>
<pre><code>* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 4.7.2 releasedhttps://www.nico.schottelius.org//blog/cdist-4.7.2-released/2017-10-22T14:21:26Z2017-10-22T14:21:26Z
<p>Here's a short overview about the changes found in version 4.7.2:</p>
<pre><code>* 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á)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 4.7.1 releasedhttps://www.nico.schottelius.org//blog/cdist-4.7.1-released/2017-10-01T09:16:00Z2017-10-01T09:16:00Z
<p>Here's a short overview about the changes found in version 4.7.1:</p>
<pre><code>* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 4.7.0 releasedhttps://www.nico.schottelius.org//blog/cdist-4.7.0-released/2017-09-22T19:26:31Z2017-09-22T19:26:31Z
<p>Here's a short overview about the changes found in version 4.7.0:</p>
<pre><code>* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 4.6.1 releasedhttps://www.nico.schottelius.org//blog/cdist-4.6.1-released/2017-08-30T20:44:28Z2017-08-30T20:44:28Z
<p>Here's a short overview about the changes found in version 4.6.1:</p>
<pre><code>* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 4.6.0 releasedhttps://www.nico.schottelius.org//blog/cdist-4.6.0-released/2017-08-25T09:06:07Z2017-08-25T09:06:07Z
<p>Here's a short overview about the changes found in version 4.6.0:</p>
<pre><code>* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 4.5.0 releasedhttps://www.nico.schottelius.org//blog/cdist-4.5.0-released/2017-07-20T18:51:56Z2017-07-20T18:51:56Z
<p>Here's a short overview about the changes found in version 4.5.0:</p>
<pre><code>* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 4.4.4 releasedhttps://www.nico.schottelius.org//blog/cdist-4.4.4-released/2017-06-16T10:52:22Z2017-06-16T10:52:22Z
<p>Here's a short overview about the changes found in version 4.4.4:</p>
<pre><code>* 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á)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 4.4.3 releasedhttps://www.nico.schottelius.org//blog/cdist-4.4.3-released/2017-06-13T20:18:44Z2017-06-13T20:18:44Z
<p>Here's a short overview about the changes found in version 4.4.3:</p>
<pre><code>* 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á)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 4.4.2 releasedhttps://www.nico.schottelius.org//blog/cdist-4.4.2-released/2017-03-08T18:37:50Z2017-03-08T18:37:50Z
<p>Here's a short overview about the changes found in version 4.4.2:</p>
<pre><code>* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 4.4.1 releasedhttps://www.nico.schottelius.org//blog/cdist-4.4.1-released/2016-12-17T08:47:36Z2016-12-17T08:47:36Z
<p>Here's a short overview about the changes found in version 4.4.1:</p>
<pre><code>* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 4.4.0 releasedhttps://www.nico.schottelius.org//blog/cdist-4.4.0-released/2016-12-03T08:54:17Z2016-12-03T08:54:17Z
<p>Here's a short overview about the changes found in version 4.4.0:</p>
<pre><code>* 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: fix target_host vars (Darko Poljak)
* All: Merge install feature from 4.0-pre-not-stable (Darko Poljak)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 4.3.2 releasedhttps://www.nico.schottelius.org//blog/cdist-4.3.2-released/2016-10-13T16:53:05Z2016-10-13T16:53:05Z
<p>Here's a short overview about the changes found in version 4.3.2:</p>
<pre><code>* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 4.3.1 releasedhttps://www.nico.schottelius.org//blog/cdist-4.3.1-released/2016-08-22T16:51:24Z2016-08-22T16:51:24Z
<p>Here's a short overview about the changes found in version 4.3.1:</p>
<pre><code>* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 4.3.0 releasedhttps://www.nico.schottelius.org//blog/cdist-4.3.0-released/2016-08-19T19:27:51Z2016-08-19T19:27:51Z
<p>Here's a short overview about the changes found in version 4.3.0:</p>
<pre><code>* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 4.2.2 releasedhttps://www.nico.schottelius.org//blog/cdist-4.2.2-released/2016-07-26T05:52:17Z2016-07-26T05:52:17Z
<p>Here's a short overview about the changes found in version 4.2.2:</p>
<pre><code>* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 4.2.1 releasedhttps://www.nico.schottelius.org//blog/cdist-4.2.1-released/2016-07-18T18:36:40Z2016-07-18T18:36:40Z
<p>Here's a short overview about the changes found in version 4.2.1:</p>
<pre><code>* Build: Fix signed release (Darko Poljak)
* Build: Fix building docs (Darko Poljak)
* Documentation: Fix man pages (Dmitry Bogatov)
* Documentation: Fix spellings (Dmitry Bogatov)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 4.2.0 releasedhttps://www.nico.schottelius.org//blog/cdist-4.2.0-released/2016-07-16T06:41:17Z2016-07-16T06:41:17Z
<p>Here's a short overview about the changes found in version 4.2.0:</p>
<pre><code>* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 4.1.0 releasedhttps://www.nico.schottelius.org//blog/cdist-4.1.0-released/2016-05-27T05:28:12Z2016-05-27T05:28:12Z
<p>Here's a short overview about the changes found in version 4.1.0:</p>
<pre><code>* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 4.0.0 releasedhttps://www.nico.schottelius.org//blog/cdist-4.0.0-released/2016-05-04T10:29:47Z2016-05-04T10:29:47Z
<p>Here's a short overview about the changes found in version 4.0.0:</p>
<pre><code>* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 3.1.13 releasedhttps://www.nico.schottelius.org//blog/cdist-3.1.13-released/2016-02-25T13:34:32Z2015-05-16T15:54:59Z
<p>Here's a short overview about the changes found in version 3.1.13:</p>
<pre><code>* 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 comparision operator (Nico Schottelius)
* Type __user_groups: Support old Linux versions (Daniel Heule)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 3.1.12 releasedhttps://www.nico.schottelius.org//blog/cdist-3.1.12-released/2016-02-25T13:34:32Z2015-03-19T09:23:50Z
<p>Here's a short overview about the changes found in version 3.1.12:</p>
<pre><code>* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 3.1.11 releasedhttps://www.nico.schottelius.org//blog/cdist-3.1.11-released/2016-02-25T13:34:32Z2015-02-27T13:47:11Z
<p>Here's a short overview about the changes found in version 3.1.11:</p>
<pre><code>* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 3.1.10 releasedhttps://www.nico.schottelius.org//blog/cdist-3.1.10-released/2016-02-25T13:34:32Z2015-02-10T22:01:54Z
<p>Here's a short overview about the changes found in version 3.1.10:</p>
<pre><code>* 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
* Type __locale: Add support for Ubuntu
* Type __group: Rewrite (Steven Armstrong)
* Documentation: Fix typo in maintainer file (Stephan Kulla)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Neuer E-Post-Verteiler zum Thema Puppet an der ETHhttps://www.nico.schottelius.org//neuigkeiten/puppet-e-post-verteiler/2016-02-25T13:34:32Z2015-02-03T14:47:44Z
<p>Da an der ETH einige Gruppen
<a href="http://reductivelabs.com/products/puppet/">puppet</a> zur automatischen
Konfiguration ihrer Rechner nutzen, habe ich
bei der <a href="http://www.isg.inf.ethz.ch/">ISG D-INFK</a> eine
<a href="https://lists.inf.ethz.ch/mailman/listinfo/puppet">neuen E-Post-Verteiler zum Thema Puppet</a>
einrichten lassen.</p>
<p>Falls Du an der ETH arbeitest und an der Puppet-Entwicklung und
Zusammenarbeit zu diesem Thema interessiert bist, schreib Dich
doch auf dem E-Post-Verteiler ein und lass uns von Deinen Erfahrungen
oder Ideen wissen!</p>
<ul>
<li><a href="https://lists.inf.ethz.ch/mailman/listinfo/puppet">E-Post-Verteiler zum Thema Puppet an der ETH</a></li>
</ul>
Subject: Cdist 2.0.1 released ...https://www.nico.schottelius.org//blog/cdist-2.0.1-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>... which mainly includes bugfixes to the bugs seen in the last
days.</p>
<p>But it also adds the beginning feature of object dependent
code execution:</p>
<p>Imagine you want to restart apache, but only if <strong>apache_vhost
generated code, you can do so now, by checking all
</strong>apache_vhost objects for the "changed" flag and if and only if
the flag is existing, generate the restart command.</p>
<p>You can access all objects through the __global variable.</p>
<p>This feature is in its early stage and I'd be pretty happy to
get some feedback, if it useful for you and if you've some
other enhancements to propose.</p>
<p>As usual, the best proposals are the ones with included merge
request to a git source :-p</p>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 2.0.10 releasedhttps://www.nico.schottelius.org//blog/cdist-2.0.10-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Here's a short overview about the changes found in this release:</p>
<pre><code> * Cleanup __group: No getent gshadow in old Redhat, use groupmod -g
(Matt Coddington)
* Bugfix __package_yum: Missing cat
* 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
* 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
* Various smaller bugfixes (Chris Lamb)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 2.0.11 releasedhttps://www.nico.schottelius.org//blog/cdist-2.0.11-security-bugfix-release/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>This is a security bugfix release:
Cdist has so far used whatever umask has been setup on the local and remote
system. This may have lead to
<strong>/var/lib/cdist</strong> being accessable by others,
including data from explorers.</p>
<p>This release fixes this bug and setups a <strong>umask of 077</strong> within cdist.
That means if you are using the <strong>__file</strong> type without the <strong>--mode</strong>
parameter, your files may now have "more secure permissions" than you
would like.</p>
<p>It is recommended to update as soon as possible.
For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 2.0.12 releasedhttps://www.nico.schottelius.org//blog/cdist-2.0.12-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Here's a short overview about the changes found in this release:</p>
<pre><code> * Core: Correctly raise error on Python < 3.2 (Steven Armtrong)
* Core: Add support for --remote-exec and --remote-copy parameters
* Documentation: Debian Squeeze hints (Sébastien Gross)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 2.0.13 releasedhttps://www.nico.schottelius.org//blog/cdist-2.0.13-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Here's a short overview about the changes found in this release:</p>
<pre><code> * Bugfix __ssh_authorized_key: Ensure it sets proper group (contradict)
* Bugfix __addifnosuchline: Fixed quotes/interpolation bug ("a b" became "a b")
* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 2.0.14 releasedhttps://www.nico.schottelius.org//blog/cdist-2.0.14-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Here's a short overview about the changes found in this release:</p>
<pre><code>* 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
* Feature __user: Added support for BSDs (Sébastien Gross)
* Feature __group: Added support for FreeBSD (Jake Guffey)
* New Type: __package_zypper
* Feature Types: Initial Support for SuSE Linux
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 2.0.5 releasedhttps://www.nico.schottelius.org//blog/cdist-2.0.5-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Here's a short overview about the changes found in this release:</p>
<pre><code>* Bugfix __key_value: Use correct delimiters
(Steven Armstrong, Daniel Maher)
* Cleanup: Explicitly require Python >= 3.2 (do not fail implicitly)
* Documentation: (Re)write of the tutorial
* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 2.0.6 releasedhttps://www.nico.schottelius.org//blog/cdist-2.0.6-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Here's a short overview about the changes found in this release:</p>
<pre><code> * 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 2.0.7 releasedhttps://www.nico.schottelius.org//blog/cdist-2.0.7-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Here's a short overview about the changes found in this release:</p>
<pre><code> * 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
* Bugfix/Cleanup: Correctly allow Object ID to start and end with /, but
not contain //.
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 2.0.8 releasedhttps://www.nico.schottelius.org//blog/cdist-2.0.8-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Here's a short overview about the changes found in this release:</p>
<pre><code> * Bugfix core: Remove another nasty traceback when sending SIGINT (aka Ctrl-C)
* Cleanup: Better hint to source of error
* Cleanup: Do not output failing script, but path to script only
* Cleanup: Remove support for __debug variable in manifests (Type != Core
debugging)
* Cleanup: Change __package_* to support absent/present (default state
name now). The values removed/installed will be removed in cdist 2.1.
* Cleanup: Change __process to support absent/present (default state
name now). The values running/stopped will be removed in cdist 2.1.
* Feature Core: Support boolean parameters (Steven Armstrong)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 2.0.9 releasedhttps://www.nico.schottelius.org//blog/cdist-2.0.9-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Here's a short overview about the changes found in this release:</p>
<pre><code> * 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
* Documentation: Describe how to do templating (Aurélien Bondis)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 2.1.0 releasedhttps://www.nico.schottelius.org//blog/cdist-2.1.0-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Here's a short overview about the changes found in this release:</p>
<pre><code>* Core: Ensure global explorers are executable
* Core: Ensure type explorers are executable (Steven Armstrong)
* New Type: __git
* New Type: __ssh_authorized_keys (Steven Armstrong)
* New Type: __user_groups (Steven Armstrong)
* Type __rvm_gemset: Change parameter "default" to be boolean
* 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.
* Type __package_pip: Bugfix: Installeded the package, not pyro
* Remove Type __ssh_authorized_key: Superseeded by __ssh_authorized_keys
* Support for CDIST_PATH (Steven Armstrong)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 2.1.0pre7 releasedhttps://www.nico.schottelius.org//blog/cdist-2.1.0pre7-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Here's a short overview about the changes found in this release:</p>
<pre><code>* Core: All unit tests restored back to working
* Core: Print error message on missing initial manifest
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 2.1.0pre8 releasedhttps://www.nico.schottelius.org//blog/cdist-2.1.0pre8-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Here's a short overview about the changes found in this release:</p>
<pre><code>* Type cleanup: __apt_ppa, __apt_ppa_update_index, __file,
__ssh_authorized_key, __timezone, all install types (Steven Armstrong)
* Types: Remove all parameter changing code
* Type __rvm_ruby: Change parameter "default" to be boolean
* Documentation: Web documentation clean up
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 2.1.1 releasedhttps://www.nico.schottelius.org//blog/cdist-2.1.1-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Here's a short overview about the changes found in this release:</p>
<pre><code>* Core: Use dynamic dependency resolver to allow indirect self dependencies
* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 2.1.2 releasedhttps://www.nico.schottelius.org//blog/cdist-2.1.2-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Here's a short overview about the changes found in version 2.1.2:</p>
<pre><code>* Build: Change clean-dist target to "distclean"
* Core: Make global explorers available to initial manifest (Arkaitz Jimenez)
* Core: Change execution order to run object as one unit
* New Remote Example: Add support for sudo operations (Chase James)
* Type __apt_ppa: Fix comparison operator (Tyler Akins)
* Type __start_on_boot: Archlinux changed to use systemd - adapt type
* 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
* Type __cron: Simplyfied and syntax change
* New Type: __update_alternatives
* New Type: __cdist
* Improved documentation (Tomáš Pospíšek)
* Moved a lot of build logic into Makefile for dependency resolution
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 2.2.0 releasedhttps://www.nico.schottelius.org//blog/cdist-2.2.0-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Here's a short overview about the changes found in version 2.2.0:</p>
<pre><code>* Build: Cleanup the Makefile
* Type __package_opkg: Use shortcut version
* Core: Remove old pseudo object id "singleton" (Steven Armstrong)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 2.3.0 releasedhttps://www.nico.schottelius.org//blog/cdist-2.3.0-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Here's a short overview about the changes found in version 2.3.0:</p>
<pre><code>* Core: Added support for cdist shell
* Documentation: Improved some manpages
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 2.3.1 releasedhttps://www.nico.schottelius.org//blog/cdist-2.3.1-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Here's a short overview about the changes found in version 2.3.1:</p>
<pre><code>* Core: Support relative paths for configuration directories
* Core: Code cleanup (removed context class, added log class)
* Documentation: Add more best practises
* Documentation: Add troubleshooting chapter
* Type __key_value:Fix quoting problem (Steven Armstrong)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 2.3.2 releasedhttps://www.nico.schottelius.org//blog/cdist-2.3.2-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Here's a short overview about the changes found in version 2.3.2:</p>
<pre><code>* Build: Ensure tests don't change attributes of non-test files
* Core: Fix typo in argument parser
* Core: Code cleanup: Remove old install code (Steven Armstrong)
* Core: Improve error message when using non-existing type in requirement
* New Type: __iptables_rule
* New Type: __iptables_apply
* Type __cdist: Also create home directory
* Type __cdist: Add support for --shell parameter
* Type __motd: Regenerate motd on Debian and Ubuntu
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 2.3.3 releasedhttps://www.nico.schottelius.org//blog/cdist-2.3.3-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Here's a short overview about the changes found in version 2.3.3:</p>
<pre><code>* Core: Add support for default values of optional parameters (Steven Armstrong)
* Type __start_on_boot: Bugfix for systemd (Steven Armstrong)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 2.3.4 releasedhttps://www.nico.schottelius.org//blog/cdist-2.3.4-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Here's a short overview about the changes found in version 2.3.4:</p>
<pre><code>* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 2.3.5 releasedhttps://www.nico.schottelius.org//blog/cdist-2.3.5-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Here's a short overview about the changes found in version 2.3.5:</p>
<pre><code>* 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
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 2.3.6 releasedhttps://www.nico.schottelius.org//blog/cdist-2.3.6-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Here's a short overview about the changes found in version 2.3.6:</p>
<pre><code>* New Type: __locale
* Type __line: Ensure special characters are not interpreted
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 2.3.7 releasedhttps://www.nico.schottelius.org//blog/cdist-2.3.7-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Here's a short overview about the changes found in version 2.3.7:</p>
<pre><code>* 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 __package_zypper: Fix explorer and parameter issue (Daniel Heule)
* Core: Fix backtrace when cache cannot be deleted
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 3.0.0 releasedhttps://www.nico.schottelius.org//blog/cdist-3.0.0-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>The major new feature we introduced into this
release is the
<a href="https://www.nico.schottelius.org/software/cdist/man/3.0.0/man7/cdist-messaging.html">messaging support</a> - enjoy it!</p>
<p>Here's a short overview about the changes found in version 3.0.0:</p>
<pre><code>* Core: Added messaging support
* Core: Removed unused "changed" attribute of objects
* 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
* Type __iptables_rule: Use default parameter
* 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
* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 3.0.1 releasedhttps://www.nico.schottelius.org//blog/cdist-3.0.1-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Here's a short overview about the changes found in version 3.0.1:</p>
<pre><code>* Core: Copy only files, not directories (Steven Armstrong)
* Core: Allow hostnames to start with /
* Type __line: Remove unecessary backslash escape
* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 3.0.2 releasedhttps://www.nico.schottelius.org//blog/cdist-3.0.2-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Here's a short overview about the changes found in version 3.0.2:</p>
<pre><code>* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 3.0.3 releasedhttps://www.nico.schottelius.org//blog/cdist-3.0.3-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Here's a short overview about the changes found in version 3.0.3:</p>
<pre><code>* Core: Enhance error message when requirement is missing object id
* Core: Add environment variable to select shell for executing scripts (Daniel Heule)
* Explorer hostname: Return host name by using uname -n
* 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
* Type __qemu_img: Use default paremeters (Daniel Heule)
* Type __zypper_repo: Use default paremeters (Daniel Heule)
* Type __zypper_service: Use default paremeters (Daniel Heule)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 3.0.4 releasedhttps://www.nico.schottelius.org//blog/cdist-3.0.4-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Here's a short overview about the changes found in version 3.0.4:</p>
<pre><code>* Core: Ignore install types in config mode
* Documentation: Update reference (files path in object space)
* Documentation: Update best practise: Replaces templates/ with files/
* Type __apt_ppa: Install required software (Steven Armstrong)
* Type __debconf_set_selections: Support --file - to read from stdin
* Type __jail: Fix jaildir parameter handling (Jake Guffey)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 3.0.5 releasedhttps://www.nico.schottelius.org//blog/cdist-3.0.5-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Here's a short overview about the changes found in version 3.0.5:</p>
<pre><code>* Core: Introduce override concept (Daniel Heule)
* Type __process: Make --state absent work (Steven Armstrong)
* Documentation: Update documentation for environment variables
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 3.0.6 releasedhttps://www.nico.schottelius.org//blog/cdist-3.0.6-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Here's a short overview about the changes found in version 3.0.6:</p>
<pre><code>* 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
* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 3.0.7 releasedhttps://www.nico.schottelius.org//blog/cdist-3.0.7-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Here's a short overview about the changes found in version 3.0.7:</p>
<pre><code>* Core: Allow dependencies to be created based execution order (Daniel Heule)
* Core: Add tests for override (Daniel Heule)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 3.0.8 releasedhttps://www.nico.schottelius.org//blog/cdist-3.0.8-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Here's a short overview about the changes found in version 3.0.8:</p>
<pre><code>* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 3.0.9 releasedhttps://www.nico.schottelius.org//blog/cdist-3.0.9-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Here's a short overview about the changes found in version 3.0.9:</p>
<pre><code>* 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
* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 3.1.0 releasedhttps://www.nico.schottelius.org//blog/cdist-3.1.0-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Here's a short overview about the changes found in version 3.1.0:</p>
<pre><code>* New Type: __rbenv
* Type __file: Enhance OpenBSD Support (og)
* Type __git: Pass onwer/group/mode values to __directory
* Type __iptable_rule: Fix example documentation (Antoine Catton)
* Type __key_value: Add messaging support
* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 3.1.1 releasedhttps://www.nico.schottelius.org//blog/cdist-3.1.1-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Here's a short overview about the changes found in version 3.1.1:</p>
<pre><code>* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 3.1.2 releasedhttps://www.nico.schottelius.org//blog/cdist-3.1.2-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Here's a short overview about the changes found in version 3.1.2:</p>
<pre><code>* Documentation: Add missing environment variables to reference
* Type __qemu_img: size is optional, if state is not present
* Type __key_value: Rewrite using awk (Daniel Heule)
* New Type: __dog_vdi
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 3.1.3 releasedhttps://www.nico.schottelius.org//blog/cdist-3.1.3-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Here's a short overview about the changes found in version 3.1.3:</p>
<pre><code>* New Type: __yum_repo (Steven Armstrong)
* Type __hostname: Add support for CentOS
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 3.1.4 releasedhttps://www.nico.schottelius.org//blog/cdist-3.1.4-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Here's a short overview about the changes found in version 3.1.4:</p>
<pre><code>* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 3.1.5 releasedhttps://www.nico.schottelius.org//blog/cdist-3.1.5-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Here's a short overview about the changes found in version 3.1.5:</p>
<pre><code>* Type __zypper_repo: Automatically import gpg keys (Daniel Heule)
* Type __zypper_service: Automatically import gpg keys (Daniel Heule)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 3.1.6 releasedhttps://www.nico.schottelius.org//blog/cdist-3.1.6-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Here's a short overview about the changes found in version 3.1.6:</p>
<pre><code>* New Type: __ssh_dot_ssh
* Type __package_yum: Support retrieving package via URL
* Type __hostname: Support SuSE and have CentOS use sysconfig value
* Type __locale: Support SuSE
* Type __locale: Support Archlinux
* Type __timezone: Support SuSE
* Type __file: Support MacOS X (Manuel Hutter)
* Type __iptables_apply: Add "reset" to init.d script of iptables
* Type __ssh_authorized_key: Use new type __ssh_dot_ssh
* Type __zypper_repo: Bugfix for pattern matching (Daniel Heule)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 3.1.7 releasedhttps://www.nico.schottelius.org//blog/cdist-3.1.7-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Here's a short overview about the changes found in version 3.1.7:</p>
<pre><code>* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 3.1.8 releasedhttps://www.nico.schottelius.org//blog/cdist-3.1.8-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Here's a short overview about the changes found in version 3.1.8:</p>
<pre><code>* New Type: __package_update_index (Ricardo Catalinas Jiménez)
* New Type: __package_upgrade_all (Ricardo Catalinas Jiménez)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 3.1.9 releasedhttps://www.nico.schottelius.org//blog/cdist-3.1.9-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Here's a short overview about the changes found in version 3.1.9:</p>
<pre><code>* 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)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 4.0.0pre1 releasedhttps://www.nico.schottelius.org//blog/cdist-4.0.0pre1-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Here's a short overview about the changes found in version 4.0.0pre1:</p>
<pre><code>* Core: Integrate initial install support
* Core: Integrate initial preos support
</code></pre>
<h2>Note for this release:</h2>
<p>4.0-pre-not-stable is an experimental branch containing features for the
next big thing: cdist 4.</p>
<p>As you can see above, we have worked on cdist to allow not only
configuration of machines, but also installation of machines.</p>
<p>These features are poorly documented, the install
types are not cleaned up and there are many more ugly things.</p>
<p>Still, we wanted to give eager people access to our codebase,
to play around with it.</p>
<p>A minimal introduction for those keen on trying it out:</p>
<ul>
<li>host boots preos (you generate this by using "cdist preos")</li>
<li>host gets installed using "cdist install"</li>
<li>types that begin with <strong>__install</strong>_are by convention used for installing sytems</li>
<li>install types contain the (empty) file "install"</li>
</ul>
<p>More to come soon - planned release for cdist 4 is mid 2014.</p>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 4.0.0pre2 releasedhttps://www.nico.schottelius.org//blog/cdist-4.0.0pre2-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Here's a short overview about the changes found in version 4.0.0pre2:</p>
<pre><code>* Core: Remove archives from generated preos (Steven Armstrong)
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist 4.0.0pre3 releasedhttps://www.nico.schottelius.org//blog/cdist-4.0.0pre3-released/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Here's a short overview about the changes found in version 4.0.0pre3:</p>
<pre><code>* Update to include changes from cdist 3.1.5
</code></pre>
<p>For more information visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Cdist: How to apply a single objecthttps://www.nico.schottelius.org//blog/cdist-hint-apply-single-object/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Sometime it would be nice if you could only apply a single
object on a remote host, like this:</p>
<pre><code>__file /need/this/now --state present --source $(pwd -P)/myfile --mode 0755
</code></pre>
<p>Using the initial manifest option (-i) and stdin makes this easy:</p>
<pre><code>echo "__file /need/this/now --state present --source $(pwd -P)/myfile --mode 0755" | cdist config -v -i - targethost
</code></pre>
<p>For more information about cdist visit the <a href="https://www.nico.schottelius.org//software/cdist/">cdist homepage</a>.</p>
Performance of cdist 2.0.0-rc4https://www.nico.schottelius.org//blog/cdist-performance-2.0.0-rc4/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>As you may have notice, <a href="https://www.nico.schottelius.org//software/cdist/">cdist</a> 2.0.0
has been rewritten in Python due to performance issues with
fork(). This article shows the first performance results of
the new implementation</p>
<h2>Background</h2>
<p>All configurations were done using the productive
configuration of the Systems Group in the ETH Zurich.
All hosts were configured from a cable modem connection
on my Lenovo X201, with 2 cores, 4 threads
(Intel(R) Core(TM) i5 CPU M 520 @ 2.40GHz) and 4 GiB
RAM. The configuration contains 189 objects, of which
142 are of type <strong>__package</strong>.
The duration was taken from cdist output and the measurements
were taken by deploying to one, two, ..., thirty one hosts in
parallel:</p>
<pre><code>(
set --;
for host in 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 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;
do
set -- "$@" $host;
cdist -c ~/p/cdist-nutzung -p "$@";
done
) 2>&1 | tee ~/benchmark-home
</code></pre>
<h2>The results</h2>
<p>Deploying to one host took 72 seconds, to three hosts 77 seconds,
to 6 hosts 108 seconds and to 31 hosts 282 seconds, as can be seen
in the following graph:</p>
<p><a href="https://www.nico.schottelius.org//blog/cdist-performance-2.0.0-rc4/cdist-2.0.0-rc4-graph.png"><img src="https://www.nico.schottelius.org//blog/cdist-performance-2.0.0-rc4/600x450-cdist-2.0.0-rc4-graph.png" width="600" height="450" alt="Cdist graph" class="img" /></a></p>
<p>In a sequential run, it would have taken 2232 seconds to deploy
to 31 hosts. At higher parallel configurations (>10), it can be seen
that cdist becomes CPU bound.</p>
<p>Although deploying to 31 hosts takes much longer than 1 host, it is
still much faster than the linear case.</p>
<h2>Conclusion</h2>
<ul>
<li>72 seconds is still pretty long for one run, but can easily be improved
by comparing the configuration against the cache and only run the new
parts (or nothing if rerunning)</li>
<li>Cdist can deploy to more than 30 hosts on 2 cores/4 threads within 5 minutes</li>
<li>As cdist runs massively parallel, it can utilise all existing CPUs</li>
<li>And even more important: cdist can scale out, if you add more CPUs (or machines),
it can simply use them to deploy to more machines in parallel</li>
</ul>
cdist: Why we require Python 3.2 on the source hosthttps://www.nico.schottelius.org//blog/cdist-python-3.2-requirement/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<h2>Introduction</h2>
<p>As <a href="https://www.nico.schottelius.org//software/cdist/">cdist</a> is getting more popular, more people are using
cdist and some questions arrive more often from newbies than others.
One of them is why we require having Python 3.2 on the source host.
If you are also wondering about the motivation, or you're screaming because
you only have Python 2.x or Python 3.1 available in your distribution, this
article is for you.</p>
<pre><code>Note: Cdist does *not* require Python on the target hosts!
Note: Cdist requires only ssh and a posix shell on the targets.
</code></pre>
<h2>History of cdist</h2>
<p>Because you may be one of the people who are screaming, I'm giving you
an overview about the whole development history of cdist, which will
make things more clear for you.</p>
<p>At the end of 2010 <a href="http://www.usenix.org/event/lisa10/tech/slides/snyder_bof2.pdf">I was claiming that most current configuration management
(<strong><em>CM</em></strong>) tools are not only overly complex designed, but also that their
implementations are way too
complex</a>.
This is definitely a strong statement, which I
also used to provoke people to thing about the current situation of CM.</p>
<p>The logical consequence of my statement was to try out, whether it's
actually possible to write a CM tool completly in a very simple manner.
For instance in posix shell script. This led to the first commit to the
newly born cdist repository:</p>
<pre><code>commit 28a9807fe5e6bfa95015fe72456d63cbb2a5821f
Date: Thu Sep 16 02:20:35 2010 +0200
</code></pre>
<p>After a lot of discussions, design ideas, pictures on the whiteboard,
trying out different implementations, weighting up advantages of
each one, the first official release of cdist was put into public,
cdist 1.0.0:</p>
<pre><code>tag 1.0.0
Date: Mon Mar 7 18:21:18 2011 +0100
</code></pre>
<p>Cdist 1.0.0 is completly implemented in posix shell and had almost all
features of the current cdist implementation. With one major drawback:
Performance. When running cdist 1.0.0 in parallel mode, the source host
easily became the bottleneck. A typical run of cdist 1.0.0 caused around
3500 - 5000 forks. Running in parallel mode with about 10-15 target hosts,
most time of a cdist run was spent in kernel space to handle the forks.</p>
<p>The logical sequence again was to search for the reason for the huge amount
of forks, which was easily detected: Every routine was a shell script on its
own, that required a new launch of the shell. Now, for some operations,
like working on the dependency tree, a lot of sub-routines were called, leading
to the huge number of forks.</p>
<p>We tried to minimise the number of forks by migrating from shell scripts to
shell functions, which was a big pain, when we realised that posix shell
does not have <strong>local</strong> variable support anymore. Posix states that you should
use shell scripts instead of shell functions, if you need distinct environments.
Which is exactly were we came from...</p>
<p>Thus we decided to switch to a different programming language for cdist's core,
but only for the core. For us it is very important to minimise the dependencies
on the target hosts: We do not want to install Ruby, Python, Java, libfoo or
anything that is not usually available on a freshly installed base system.
Cdist should be able to take over, as soon as the system is setup in a very
basic state.</p>
<p>The choice felt on Python, because it felt very mature and easy to use.
Additionally, Python 3 already provides a lot of functionality in its
base installation: Everything we were used to do in shell, could easily be
rewritten in plain Python 3. After <strong>exactly</strong> one year after
the initial commit, <strong><em>cdist 2.0.0</em></strong>, a complete rewrite in Python 3
was finished and released:</p>
<pre><code>tag 2.0.0
Date: Fri Sep 16 12:11:28 2011 +0200
</code></pre>
<h2>Now, why Python 3.2?</h2>
<p>During the development of cdist 2.0, we had a lot of discussions
about clean design, pythonic ways of doing stuff (versus using the
shell approach in python) and which functions to use. In the beginning,
we were discussing about whether to settle for Python 2 or Python 3.
As we did not have any dependencies or old code that relies on Python 2,
the choice for the current stable tree, Python 3, was easy to make.</p>
<p>Python 3.2, in contrast to Python 3.1, includes the very good usable
<a href="http://docs.python.org/py3k/library/argparse.html">argparse module</a>,
as well as an enhanced variant of the
<a href="http://docs.python.org/py3k/library/os.html#os.makedirs">os.makedirs</a>
method that supports the <strong><em>exist_ok</em></strong> parameter.</p>
<p>The argparse module is also available for Python 3.1, but not the
enhanced <strong>os.makedirs</strong> method. So we had to decide: Should we
integrate a simple workaround to support the previous Python 3 release,
Python 3.1, or shall we upset users with old Python installations?</p>
<p>To answer this question, we had a look at the current situation of
Python in various distributions.</p>
<h2>Python support in Linux/BSD</h2>
<p>A very quick research showed the following results:</p>
<table>
<thead>
<tr>
<th>Distro</th>
<th> Version</th>
<th> Python version</th>
<th> Python 3?</th>
<th> Usable as cdist source host?</th>
</tr>
</thead>
<tbody>
<tr>
<td>Archlinux</td>
<td> rolling release</td>
<td> 3.2.2</td>
<td> yes</td>
<td> yes</td>
</tr>
<tr>
<td>CentOS</td>
<td> 6</td>
<td> 2.6.6</td>
<td> no</td>
<td> no</td>
</tr>
<tr>
<td>Debian</td>
<td> squeeze</td>
<td> 3.1.3</td>
<td> yes</td>
<td> no</td>
</tr>
<tr>
<td>Debian</td>
<td> wheezy</td>
<td> 3.2.2</td>
<td> yes</td>
<td> yes</td>
</tr>
<tr>
<td>Fedora</td>
<td> 14</td>
<td> 3.1.2</td>
<td> yes</td>
<td> no</td>
</tr>
<tr>
<td>Fedora</td>
<td> 15-17</td>
<td> 3.2 - 3.2.2</td>
<td> yes</td>
<td> yes</td>
</tr>
<tr>
<td>FreeBSD</td>
<td> Ports</td>
<td> 3.2.2</td>
<td> yes</td>
<td> yes</td>
</tr>
<tr>
<td>Gentoo</td>
<td> rolling release</td>
<td> 3.2.2</td>
<td> yes</td>
<td> yes</td>
</tr>
<tr>
<td>NetBSD</td>
<td> Ports</td>
<td> 3.1.4</td>
<td> yes</td>
<td> no</td>
</tr>
<tr>
<td>OpenBSD:</td>
<td> -current</td>
<td> 2.7.1</td>
<td> no</td>
<td> no</td>
</tr>
<tr>
<td>OpenBSD:</td>
<td> Ports</td>
<td> 3.2.2</td>
<td> yes</td>
<td> yes</td>
</tr>
<tr>
<td>OpenSuse</td>
<td> 11.4</td>
<td> 3.1.3</td>
<td> yes</td>
<td> no</td>
</tr>
<tr>
<td>OpenSuse</td>
<td> 12.1</td>
<td> 3.2.1</td>
<td> yes</td>
<td> yes</td>
</tr>
<tr>
<td>Redhat</td>
<td> 6</td>
<td> 2.6.6</td>
<td> no</td>
<td> no</td>
</tr>
<tr>
<td>Slackware</td>
<td> 13.37</td>
<td> 2.6.6</td>
<td> no</td>
<td> no</td>
</tr>
<tr>
<td>Ubuntu</td>
<td> maverick (10.10)</td>
<td> 3.1.3</td>
<td> yes</td>
<td> no</td>
</tr>
<tr>
<td>Ubuntu</td>
<td> natty (11.04) - precise (12.04)</td>
<td> 3.2 - 3.2.2</td>
<td> yes</td>
<td> yes</td>
</tr>
</tbody>
</table>
<p>So we have the following situations:</p>
<ul>
<li>There are a lot of distros with Python 3.2 available (Archlinux,
Debian >= Wheezy, Fedora >= 15, FreeBSD, Gentoo, OpenBSD, OpenSuse,
Ubuntu >= 11.04)</li>
<li>There are distros which do not have Python 3 at all (Centos, Redhat, Slackware)</li>
<li>Python 3 is definitely needed, so requiring 3.1 or 3.2
does not make a difference</li>
<li>There are only two cases, which would make it interesting to support
Python 3.1: Debian Squeeze (currently stable) and NetBSD.</li>
<li>As I've been a long time Debian user, I understand this may be a bit
annoying, because it's unclear, when wheezy will become stable.
On the other hand, you can easily install python 3.2 from source to
anywhere, like you'd do in the situation, when you wouldn't have
python 3 at all.</li>
<li>Another point speaking against 3.1 support for Debian is the fact that
distributions should support the user and not developers should support
distributions that ship old software (there's nothing against supporting
old <strong>and</strong> new versions, though). That's by the way one of the reasons
why I moved away from Debian...</li>
<li>I am short on experience regarding NetBSD, but installing via source
shouldn't be an issue either.</li>
</ul>
<p>To summarise: Support for Python 3.1 only makes sense for Debian Squeeze
and NetBSD at the moment. This requirement will soon [tm] be superseeded
and can easily be worked around by selecting one of many distributions
with more recent software packages. And that's the reason, why we settled
for Python 3.2.</p>
<h2>Btw, who is we?</h2>
<p>You mave have noticed that I am often referring to <strong>we</strong> in this article.
The second main developer for cdist is
<a href="https://github.com/asteven">Steven Armstrong</a>, a sysadmin at
ETH Zurich and good friend of mine.
The discussions and development time we spent together was very valuable
for me as well for the whole cdist project and thus I wanted to use this
article to say</p>
<pre><code>Thank you, Steven.
</code></pre>
<p>[Disclaimer: I do not work for ETH Zurich anymore, but for <a href="http://www.local.ch">local.ch</a>]</p>
Cdist: The scripts vs. functions and local variables problemhttps://www.nico.schottelius.org//blog/cdist-shell-scripts-functions-local-variables/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>Today I've found a very nasty problem during development of
<a href="https://www.nico.schottelius.org//software/cdist/">cdist</a> 1.8.0,
related to shell functions and the non-local variables.</p>
<h2>Background</h2>
<p>cdist, up to version 1.7.x, is implemented in shell scripts. As it turned out,
most of the time during a cdist call is spent within the kernel, which seems
to be related to some thousands of forks we do for each run (you can use
oprofile to verify this yourself). To speedup cdist, the idea was to rewrite
cdist to use functions for internal functionality, instead of the shell
scripts.</p>
<h2>The implementation</h2>
<p>So the idea was very simple:</p>
<ul>
<li>Take all existing shell scripts</li>
<li>Add a function header</li>
<li>Move shell script from bin/ to core/</li>
<li>Source all functions from core/</li>
</ul>
<p>But the first problem that came up is that the <strong>local</strong> keyword had been removed
from the POSIX standard. Thus I began to eliminate global variables by
either prefixing them with the function name or by removing them completly.</p>
<h2>The problem</h2>
<p>After a some time I realised that the __cdist_object_run() function calls itself
recursively. This leads to subsequent overwritten variables, which in turn leads
to unwanted behaviour.</p>
<h2>The question</h2>
<p>I'm aware that the <strong>local</strong> keyword is still supported by some shells, but I am
wondering, whether you have a good idea, on how to speedup cdist (having fast
fork()s would be great!) without violating the POSIX standard?</p>
Cdist: How to copy a folder recursivelyhttps://www.nico.schottelius.org//blog/cdist-transfer-files-recursively/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<h2>Introduction</h2>
<p>This article describes one solution to transfer a folder
and all of its contents recursively with <a href="https://www.nico.schottelius.org//software/cdist/">cdist</a>
to target hosts. I am motivated to do so, because I want to have one
central place to configure the tftproot that I may use on a variety
of KVM hosts.</p>
<p>Traditionally, it is not an easy job to handle recursive transfer correctly
and efficiently in a configuration management system. Using a sophisticated
tool like <a href="http://rsync.samba.org/">rsync</a> or
<a href="http://www.cis.upenn.edu/~bcpierce/unison/">unison</a> makes life
usually way easier.</p>
<p>If you just have a minor number of files, like I have in this case,
doing a recursive copy with cdist may be the easist way.</p>
<h2>Copying the files recursively</h2>
<p>Cdist knows about the types <strong>__file</strong> and <strong>__directory</strong> for
file transfer and directory management.
The type <strong>__nico_tftp_root</strong>,
which can be found in the
<a href="http://git.schottelius.org/?p=cdist-nico">cdist-nico git repository</a>
(below <strong>cdist/conf/type</strong>) recursively copies all files it contains to
the folder <strong>/home/service/tftp</strong>. Only when a file is changed, it
is transferred again (the <strong>__file</strong> type takes care of this).</p>
<h2>The manifest</h2>
<p>In cdist, a manifest of a type defines, which other types to use.
A manifest file is essentially shell code that can call other
cdist types.</p>
<p>To accomplish the task, first of all the base directory is created
on the remote site:</p>
<pre><code>basedir=/home/services/tftp
__directory "$basedir" --mode 0755
</code></pre>
<p>Afterwards, I change into the source directory
and find all files. Cdist exports the
variable "__type" to access the folder in which the type is stored.</p>
<pre><code>cd "$__type/files"
for file in $(find . | sed 's;./;;' | grep -v '^\.$' ); do
</code></pre>
<p>The grep command is needed, to skip the current directory, that is returned
by find.</p>
<p>Now, for every file I determine the remote file name. Furthermore
dependencies to the required directories are setup:
You can <strong>require</strong> another type to be run before a type, by setting
up the <strong>require</strong> environment variable (this will be changed in cdist
2.1. and replaced in 2.2, but there is still some time until this happens).</p>
<p>The remote name is constructed by this line:</p>
<pre><code> name="$basedir/$file"
</code></pre>
<p>And the requirement is setup using this line:</p>
<pre><code> # Require the previous directory in the path
export require="__directory/${name%/*}"
</code></pre>
<p>The shell (!) knows about string manipulation: ${variablename%/*} replaces
the shortest matching suffix that equals "/*". And thus the previous
statement removes the last part of the path (also known as dirname).</p>
<p>If the file found by find is a file, we call the __file type,
if the file is actually a directory, the __directory type is called:</p>
<pre><code> if [ -d "$file" ]; then
__directory "$name" --mode 0755
else
__file "$basedir/$file" --source "$__type/files/$file" \
--mode 0644
fi
done
</code></pre>
<p>And that's it - a full recursive copy with just a bunch of lines.</p>
<h2>Further Reading</h2>
<ul>
<li><a href="https://www.nico.schottelius.org//software/cdist/">cdist</a></li>
<li><a href="http://git.schottelius.org/?p=cdist-nico">cdist-nico git repository</a></li>
<li><a href="http://git.schottelius.org/?p=cdist-nico;a=blob;f=cdist/conf/type/__nico_tftp_root/manifest;h=b312210d878b30e5871751d62cea14172f63c756;hb=HEAD">manifest of __nico_tftp_root</a></li>
</ul>
Configuration fileshttps://www.nico.schottelius.org//configs/2016-02-25T13:34:24Z2015-02-03T14:47:26Z
<p>This page contains (hopefully) helpful configuration files.</p>
<p>All configuration files are in use by me and thus are tested.</p>
<div class="feedlink">
<a class="feedbutton" type="application/rss+xml" rel="alternate" title="Nico Schottelius (RSS feed)" href="https://www.nico.schottelius.org//configs/index.rss">RSS</a>
<a class="feedbutton" type="application/atom+xml" rel="alternate" title="Nico Schottelius (Atom feed)" href="https://www.nico.schottelius.org//configs/index.atom">Atom</a>
</div>
<div class="archivepage">
<a href="https://www.nico.schottelius.org//configs/dot-Xresources">dot-Xresources</a><br />
<span class="archivepagedate">
Posted <span class="date">Tue Feb 3 15:47:26 2015</span>
</span>
</div>
<div class="archivepage">
<a href="https://www.nico.schottelius.org//configs/dot-gitconfig">dot-gitconfig</a><br />
<span class="archivepagedate">
Posted <span class="date">Tue Feb 3 15:47:26 2015</span>
</span>
</div>
<div class="archivepage">
<a href="https://www.nico.schottelius.org//configs/dot-ncmpc-slash-config">dot-ncmpc-slash-config</a><br />
<span class="archivepagedate">
Posted <span class="date">Tue Feb 3 15:47:26 2015</span>
</span>
</div>
<div class="archivepage">
<a href="https://www.nico.schottelius.org//configs/dot-xinitrc">dot-xinitrc</a><br />
<span class="archivepagedate">
Posted <span class="date">Tue Feb 3 15:47:26 2015</span>
</span>
</div>
<div class="archivepage">
<a href="https://www.nico.schottelius.org//configs/lighttpd-zope-http-and-https">lighttpd-zope-http-and-https</a><br />
<span class="archivepagedate">
Posted <span class="date">Tue Feb 3 15:47:26 2015</span>
</span>
</div>
<div class="archivepage">
<a href="https://www.nico.schottelius.org//configs/postfix-main.cf">postfix-main.cf</a><br />
<span class="archivepagedate">
Posted <span class="date">Tue Feb 3 15:47:26 2015</span>
</span>
</div>
Added new short commands to .gitconfig (lo, lco, lpc, lpco, m, pl)https://www.nico.schottelius.org//blog/dot-gitconfig-with-git-lo-lco-lpo-lpco-m-pl/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>As some of you are using my
<a href="https://www.nico.schottelius.org//configs/dot-gitconfig">git configuration</a>, there's an updated
version now, that includes a short version of <strong>--pretty=oneline</strong>
option for <strong>git log</strong>, which is very useful if you want to get
a quick impression on what is going on. Thus the new short commands
are (just an o added at the end):</p>
<pre><code>git lo
git lco
git lpo
git lpco
</code></pre>
<p>Furthermore I added the following new short commands:</p>
<pre><code>git m (merge)
git pl (pull)
</code></pre>
<p>Have fun, other lazy people like me!</p>
Find e-mail adresses of people in git log outputhttps://www.nico.schottelius.org//blog/find-emails-in-git-log-for-notification/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<h2>Motivation</h2>
<p>Some days ago I've replaced <strong>cronwrapper</strong>, a script to monitor output of
cron scripts with the replacement <strong>cwrap</strong> in local.ch's puppet configuration.</p>
<p>If the script prints on stdout, <strong>cwrap</strong> does not raise an error by default,
which <strong>cronwrapper</strong> did.</p>
<p>To notify every user of the change, I want to send an email to every
ex-<strong>cronwrapper</strong> user.</p>
<h2>Solution</h2>
<p>The configuration is stored in a subversion repo, which I locally sync using
<strong>git svn</strong>. Thus I can use <strong>git log -p</strong> to see all changes.</p>
<p>A typical line of interest looks like this:</p>
<pre><code>- command => '/usr/local/bin/cronwrapper.sh EMAIL@EXAMPLE.COM "[mob][low][dev03-sth][front] description" /usr/bin/php /some/script',
</code></pre>
<p>Thanks to git, grep, sed, awk, there is a pretty simple solution
(not the most beautiful) to this problem. First of all, get all patches:</p>
<pre><code>git log -p
</code></pre>
<p>Then find all removal entries of cronwrapper:</p>
<pre><code>grep ^- | grep cronwrapper
</code></pre>
<p>But only those containing an e-mail address:</p>
<pre><code>grep '@'
</code></pre>
<p>And filter out the e-mail address:</p>
<pre><code>sed 's/.* \(.*@.*\)/\1/' | awk '{ print $1 }'
</code></pre>
<p>Replace all quotes and backslash quotes:</p>
<pre><code>sed -e 's/\\"//g' -e 's/"//g' -e "s/'//g"
</code></pre>
<p>The problem now is that some e-mail adresses are indeed multiple e-mail adresses
(abc@example.com;def@example.com) and some e-mail adresses are lower, some upper case.</p>
<p>Breaking up the concatenated addresses can be done use awk easily:</p>
<pre><code>awk '{ gsub(";", "\n"); print $0 }'
</code></pre>
<p>Transforming all addresses to lower case can be done using the fine utility <strong>tr</strong>:</p>
<pre><code>tr '[A-Z]' '[a-z]'
</code></pre>
<p>Filter out all duplicates:</p>
<pre><code>sort | uniq
</code></pre>
<p>The result is a list of e-mail addresses. Making them usable for copy & paste
into webmail of exchange needs another filter to convert <strong>\n</strong> to <strong>;</strong>, but
add one <strong>\n</strong> at the end:</p>
<pre><code>awk 'ORS=";" { print $0 } END { ORS="\n"; print "" }'
</code></pre>
<p>So in the end, the complete chanin looks like this:</p>
<pre><code>git log -p | grep ^- | grep cronwrapper | \
grep '@' | sed 's/.* \(.*@.*\)/\1/' | awk '{ print $1 }' | \
sed -e 's/\\"//g' -e 's/"//g' -e "s/'//g" | \
tr '[A-Z]' '[a-z]' | \
awk '{ gsub(";", "\n"); print $0 }' | \
sort | uniq | \
awk 'ORS=";" { print $0 } END { ORS="\n"; print "" }'
</code></pre>
<p>For me, this is a nice demonstration of the power of shell, unix tools and filtering via pipes.</p>
Anacron and cronie: How cron.hourly, cron.daily and cron.weekly workhttps://www.nico.schottelius.org//blog/how-cronie-anacron-cron-hourly-daily-weekly-work/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<h2>Situation</h2>
<p>We noticed that the <a href="http://nginx.org/">nginx</a> logfile is not being rotated
on some freshly setup Centos 6.2 servers, which should have been triggered by
logrotate running from cron. The used cron implementation is cronie together
with anacron.</p>
<h2>Background</h2>
<p>I first suspected the setup being broken due permissions issues
with cronie, which requires special permissions as found in the
<strong>CAVEATS</strong> section of cron(8):</p>
<pre><code>The crontab files have to be regular files or symlinks to regular files,
they must not be executable or writable by anyone else than the owner.
This requirement can be overridden by using the -p option on the crond command line.
</code></pre>
<p>We had this bug before, but this time it is different:</p>
<ul>
<li>The Logrotate cronjob is located at <strong>/etc/cron.daily/logrotate</strong></li>
<li>The cron.{daily, weekly, monthly} jobs are defined in <strong>/etc/anacrontab</strong></li>
<li>The <strong>anacron</strong> command interprets jobs in <strong>/etc/anacrontab</strong></li>
<li>Anacron is called from <strong>/etc/cron.hourly/0anacron</strong></li>
<li><strong>/etc/cron.d/0hourly</strong> contains <strong>01 * * * * root run-parts /etc/cron.hourly</strong></li>
</ul>
<h2>Solution</h2>
<p>In our situation <strong>/etc/cron.d/0hourly</strong> was missing, because we removed all
files from <strong>/etc/cron.d/</strong> and put only our own files in there. The simple
fix is to ensure the contents of this directory are not removed anymore and to
reinstall the <strong>cronie</strong> package to recreate the <strong>/etc/cron.d/0hourly</strong> file.</p>
Managing custom software with environment modules in the Systems Grouphttps://www.nico.schottelius.org//blog/managing-custom-software-with-environment-modules-in-the-systems-group/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<h2>The problem</h2>
<p>Maintaining custom software as a sysadmin is not easily possible for
a research group, because ressources needed to do so easily exceed
the available working time, as soon as the number of software
installations is getting too big or the software too complex.</p>
<p>Researchers on the other hand rely on up-to-date or unpackaged
software to do their work.</p>
<h2>General solution</h2>
<p>One way to solve this issue is to provide a way researchers can install
and maintain their own software, without interferring with the system
software.</p>
<h2>Software solution</h2>
<p>One possible software solution is provided by the
<a href="http://modules.sourceforge.net/">Environment Modules Project</a>.</p>
<h2>Implementation</h2>
<p>The path <strong>/pub/env-modules</strong> should contain the user maintained
software and is mounted via <strong>nfs</strong> and <strong>autofs</strong>.
The Environment Modules Package is installed below
<strong>/pub/env-modules/Modules</strong>, the files to configure modules
(<strong>modulefiles</strong>) reside below <strong>/pub/env-modules/modulefiles/</strong>.</p>
<h3>Installation of modules</h3>
<p>The usual three step work fine, if you've tcl installed:</p>
<pre><code>modules-3.2.8% ./configure --prefix=/pub/env-modules --with-module-path=/pub/env-modules/modulefiles
modules-3.2.8% make
modules-3.2.8% make install
</code></pre>
<h2>Usage</h2>
<h3>Creating a new module (sysadmin part)</h3>
<p>Create a new directory below <strong>/pub/env-modules</strong> and a link
below <strong>/pub/env-modules/modulefiles/</strong> to the newly created directory.
Now give ownership to the researcher who is maintaining the new software,
who can install the software and create a specific modulefile for the
software. For instance:</p>
<pre><code>% mkdir /pub/env-modules/cdist
% chown nicosc /pub/env-modules/cdist
# Delegate support for cdist maintenance into the user owned folder
% ln -s /pub/env-modules/cdist/modulefiles /pub/env-modules/modulefiles/cdist
</code></pre>
<h3>Creating a new module (user part)</h3>
<p>Install the software into your directory and create modulefiles below the
modulefiles directory:</p>
<pre><code>% git clone git://git.schottelius.org/cdist /pub/env-modules/cdist/
% mkdir /pub/env-modules/cdist/modulefiles
% cat << eof > /pub/env-modules/cdist/modulefiles/git
#%Module1.0#####################################################################
##
## cdist modulefile
##
##
##
proc ModulesHelp { } {
puts stderr "\tLet's you use cdist"
}
module-whatis "Configuration Management"
append-path PATH /pub/env-modules/cdist/bin
eof
</code></pre>
<h3>Using env modules</h3>
<p>To actually make use of the new modules, you need to add env modules into your
shell. The following commands illustrate the way for the <strong>bash</strong>:</p>
<pre><code>% . /pub/env-modules/Modules/3.2.8/init/bash
% module avail
----------------------------------- /pub/env-modules/Modules/versions -----------------------------------
3.2.8
------------------------------------- /pub/env-modules/modulefiles --------------------------------------
cdist/git
% module load cdist/git
% module list
Currently Loaded Modulefiles:
1) cdist/git
</code></pre>
Migrating away from puppet to cdisthttps://www.nico.schottelius.org//blog/migrating-away-from-puppet-to-cdist/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>For those not being subscribed to the puppet-users mailing list,
here's my
<a href="http://groups.google.com/group/puppet-users/browse_thread/thread/83801a03c0fea665?pli=1">"goodbye and thanks for the fish"-message</a>:</p>
<pre><code>Date: Mon, 4 Apr 2011 19:26:06 +0200
From: Nico -telmich- Schottelius <nico-puppet-users --at-- schottelius.org>
To: puppet-users --at-- @googlegroups.com
Cc: steven-puppet-users --at-- @armstrong.cc
Subject: [Puppet Users] Migrating away from puppet to cdist
Good morning puppet users,
we, some sysadmins [0] at the computer science departement [1]
at ETH Zurich [2], developed a new configuration management
system called cdist [3], to which we migrate from our puppet
configuration.
I'm writing to this list for two reasons:
1) Say thanks and goodbye to puppet-*
Puppet in contrast to other systems emphasised on "define what I want"
versus "define what todo", which is a great approach and we've
shameless cloned this approach.
Also we discussed a lot of ideas used in puppet (as well as other
systems), from which we learned.
Puppet was the first CM I seriously adopted and it initially saved
me a lot of time. Thanks to the puppet team!
2) Show other puppet users how to get around (common) puppet problems
We're pretty confident that cdist solves some issues we've seen
in puppet and in the sense of FOSS, we'd like to inform others
how we've solved those issues in cdist:
Bootstrap problem
With puppet we needed to have ruby + some gems on the target
hosts. In cdist we only use a posix shell on the target plus
common UNIX tools (like find, rm, grep), as defined by POSIX.
Complex CA / SSL setup / issues
We've had some trouble using ssl certificates, especially with
multi master and frequent reinstallations. In cdist we only
rely on SSH.
Defining configuration in multiple locations
Defining a type multiple times in different locations in puppet
requires use of virtual ressources. In cdist you don't need to
care about this, as long as the parameters stay exactly the
same.
Error messages
If you encountered errors like "400 Bad Request",
"undefined method `closed?'", "can't convert nil into String",
or "undefined method `closed?' for nil:NilClass", you'll be
happy to hear that cdist's error messages contain usable
information.
Very easy extension
Whereas puppet has modules, types and providers, cdist only knows
about types. A type in cdist contains some functionality,
independent of whether you or upstream decided to implement it.
Pull versus Push approach
Puppet requires one (or more for redundancy reasons) central server,
because clients usually contact the master and ask for changes.
Cdist operatas in push mode and can be run from a small machine
like the sysadmin notebook.
Integrated version control
Cdist is usually cloned via git from upstream and changes are
kept in a different git branch. This encourages you to use the
existing version control for your own configuration.
Integrated clean documentation
All cdist documentation is included into the release and can be
compiled into HTML or manpages. Cdist also includes a reference
document that contains all available paths, types and environment
variables.
Unobstrusive upgrade path
Upgrading cdist just requires one "git pull" on your master machine,
no update needed on any client.
Clean release cycle
When in puppet things stopped to work within a minor version,
the cdist release cycle clearly defines that any incompatibility
forces a change on at least the minor (1.x -> 1.y) version.
If you stay on a specific version, like 1.5, things will not break. Promised.
No automatic (magic) behaviour
In puppet you can use title or name without setting it explicitly.
This may be useful in some parts, but maybe surprising as well.
In cdist only the globally available environment variables are
documented and have the same meaning everywhere.
Codebase / Bugs
Puppet contains around 100k lines of code, with cdist you only need
to debug ~ 1k/2k lines (core/with types) lines of code
(according to sloccount[5]).
Age
Warning: Although most pointers above may make cdist look like
superior compared to puppet, cdist is still pretty young
(~4 months old) and may lack some functionality puppet already has.
cdist is usable in production environments already.
It may just not work in very fancy or ancient environments.
If you've any questions, do not hesitate to subscribe to the cdist
mailing list [4] and ask them there.
Cheers,
Nico
[0]: http://sans.ethz.ch
[1]: http://www.inf.ethz.ch
[2]: http://www.ethz.ch
[3]: http://www.nico.schottelius.org/software/cdist/
[4]: http://l.schottelius.org/mailman/listinfo/cdist
[5]: http://www.dwheeler.com/sloccount/
</code></pre>
My Bash and Zsh prompthttps://www.nico.schottelius.org//blog/my-bash-and-zsh-prompt/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>This article is for those who wonder how my very simple, but helpful prompt
in the shell is created and to learn the motivation behind it.</p>
<h2>How it looks like</h2>
<p><a href="https://www.nico.schottelius.org//blog/my-bash-and-zsh-prompt/bash-zsh-prompt-screenshot-20111125.png"><img src="https://www.nico.schottelius.org//blog/my-bash-and-zsh-prompt/bash-zsh-prompt-screenshot-20111125.png" width="199" height="45" alt="Bash/Zsh Prompt" class="img" /></a></p>
<h2>How it is created</h2>
<p>Bash:</p>
<pre><code>PS1='[\t] \[\033[1m\]\h\[\033[0m\]:\W\$ '
</code></pre>
<p>Zsh:</p>
<pre><code>PS1="[%T] %B%m%b:%c%# "
</code></pre>
<h2>Motivation</h2>
<ul>
<li>I need the hostname to know on which box I am working</li>
<li>Time is helpful for copy & paste in logs (and to not waste space with <strong><em>xclock</em></strong>)</li>
<li>Short directory name (\W, %c) is helpful, long paths make the prompt
unusable and I usually know which tree I am in (if not: pwd helps)</li>
<li>No need for <strong>username@</strong> like most distros do: If I am a user,
I am <strong><em>nico</em></strong> (<strong><em>$</em></strong> in bash, <strong><em>%</em></strong> in zsh). Otherwise I am root (<strong><em>#</em></strong>).</li>
</ul>
Puppet bugs that motivated me to migrate away from puppet and write cdisthttps://www.nico.schottelius.org//blog/puppet-bugs-motivation-for-migration-and-cdist/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<h2>Introduction</h2>
<p>For a long time I had a "secret list" of bugs that made me going crazy when
using puppet. But as I get more often asked <strong><em>Why have you writen
<a href="https://www.nico.schottelius.org//software/cdist/">cdist</a> and migrate away from puppet?</em></strong>, I'm publishing the
list here, to give it a real home.</p>
<p>Early clearification, before rumors come up and bad blood created:
This is <strong>not intented</strong> to be a <strong>bash puppet page</strong>, but a
<strong>I don't need to re-explain why I moved away from puppet and
have written cdist page</strong>.</p>
<h2>Bugs</h2>
<p>This is the initial short list, explanations may follow.</p>
<ul>
<li><p><a href="http://projects.puppetlabs.com/issues/86">Puppet cannot create directories and their parents, 2006, rejected</a></p></li>
<li><p><a href="http://projects.puppetlabs.com/issues/1565">Puppet parser order dependant, 2008, still open in 2012</a></p></li>
<li><a href="http://projects.puppetlabs.com/issues/2538">Cannot get return code of command, 2009</a></li>
<li><a href="http://projects.puppetlabs.com/issues/3767">Local puppet != remote, 2010, >= 2 years idle</a></li>
<li><a href="http://projects.puppetlabs.com/issues/3936">Service stopping broken in debian, 2010, >= 10 months idle</a></li>
<li><a href="http://projects.puppetlabs.com/issues/3987">${var} does not work everywhere, 2010, >= 9 months idle</a></li>
<li><a href="http://projects.puppetlabs.com/issues/3997">"magic var" only in some scopes, 2010, rejected</a></li>
<li><a href="http://projects.puppetlabs.com/issues/3998">Mount/autorequire, 2010, >= 1 year idle</a></li>
<li><a href="http://projects.puppetlabs.com/issues/3998">Old bug marked as duplicate of a new one (see above)</a></li>
<li><a href="http://projects.puppetlabs.com/issues/4220">Parser bug</a></li>
<li><a href="http://projects.puppetlabs.com/issues/4680">SSL cert not submitted to a new puppetmaster, 2010, >= 1 year idle</a></li>
<li><a href="http://projects.puppetlabs.com/issues/4715">Reusing defines not possible, 2010, rejected</a></li>
<li><a href="http://projects.puppetlabs.com/issues/4780">Param a=$undef broken, 2010, fixed</a></li>
<li><a href="http://projects.puppetlabs.com/issues/4805">Templating broken, 2010, fixed</a></li>
<li><a href="http://projects.puppetlabs.com/issues/4922">Puppetd creates empty files, if it gets a 404, 2010, >= 11 months idle</a></li>
<li><a href="http://projects.puppetlabs.com/issues/4922">Fixed symptom, not source, rescheduling of import problem, see above</a></li>
<li><a href="http://projects.puppetlabs.com/issues/5048">"" (empty string) is not a valid resource reference, 2010, fixed</a></li>
<li><a href="http://projects.puppetlabs.com/issues/6209">Puppet changes the errror message on 2nd run, 2011, >= 1 year idle</a></li>
<li><a href="http://projects.puppetlabs.com/issues/6210">Fix error messages to be meaningful, 2011, >= 1 year idle</a></li>
<li><a href="https://www.nico.schottelius.org//blog/puppet-name-is-not-as-expected-but-classname/">In puppet, $name is not always what you expect, 2012</a></li>
<li><a href="http://projects.puppetlabs.com/issues/8229">Error "regexp buffer overflow" when backing up binary data, 2011</a></li>
<li><a href="http://projects.puppetlabs.com/issues/14577">Could not intern from pson: expected (with pseudo random values afterwards), 2012</a></li>
<li><a href="http://projects.puppetlabs.com/issues/16946">Regular expressions take precendence over direct node specifications, 2012</a></li>
</ul>
<h2>Contact</h2>
<p>If you think there's something wrong here and want to discuss the listing, do not hesitate
to discuss it on one of the
<a href="https://www.nico.schottelius.org//software/cdist/">cdist communication channels (irc, mailing list, mail)</a>.</p>
Puppet: Duplicate definition - on the same line!https://www.nico.schottelius.org//blog/puppet-duplicate-definition-on-the-same-line/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>I'm having a lot of fun with software,
<a href="https://www.nico.schottelius.org//blog/puppet-sometimes-loads-a-class/">again</a> with
<a href="http://reductivelabs.com/products/puppet">puppet</a>:
Puppet claims in its error message, that I define a resource twice:</p>
<pre><code>err: Could not retrieve catalog: Puppet::Parser::AST::Resource failed
with error ArgumentError: Duplicate definition:
File[nss_ldap_config] is already defined in file
/etc/puppet/modules/auth/manifests/init.pp at line 62;
cannot redefine at
/etc/puppet/modules/auth/manifests/init.pp:62
on node dryad16.ethz.ch
</code></pre>
<p>Well, nice error, isn't it? Maybe you already guessed it, line 62 is the end
of a define:</p>
<pre><code>54 define ldap_config() {
55 $ou = $name
56 file { "nss_ldap_config":
57 path => $auth::nss_ldap_config,
58 mode => 644,
59 owner => root,
60 group => root,
61 content => template("auth/ldap.erb"),
62 }
</code></pre>
<p>I would be pretty happy if puppet told me:</p>
<pre><code>You are using the define ldap_config() from file_x:line_x twice:
File file_a:line_a and File file_b:line_b use it, which defines
a duplicate definition.
</code></pre>
<p>Currently I've to</p>
<pre><code>grep -r ldap_config *
</code></pre>
<p>within my puppet config directory, to find the locations where the define
is called. Because it's not called twice within the same class, I've
to search manually through the classes that include the classes that use
the define to find out where an include is used that (probably indirectly)
includes a conflicting class.</p>
<p>Dear puppet developers, would you mind to include debug help as stated above?</p>
<h1>Update #1</h1>
<p>I switched over to use <a href="https://www.nico.schottelius.org//software/cdist/">cdist</a> instead of Puppet.</p>
Puppet empties new and existing fileshttps://www.nico.schottelius.org//blog/puppet-empties-new-and-existing-files/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>After <a href="http://sans.ethz.ch">we</a> changed our puppetmaster to run
under unicorn plus nginx and the first 2.6.0 client connected,
I realised that puppetd created empty files on the client.
Not even new files created are affected, but also existing
files.</p>
<p>It seems that <a href="http://projects.puppetlabs.com/issues/4319">issue 4319</a>
is related to that problem, as the same entries are found in the
logfile.</p>
<p>The <a href="https://www.nico.schottelius.org//blog/puppet-empties-new-and-existing-files/debuglog">client reports about</a> duplicated files in the filebucket:</p>
<pre><code>info: FileBucket got a duplicate file /etc/pam.d/common-password ({md5}d41d8cd98f00b204e9800998ecf8427e)
info: FileBucket got a duplicate file /etc/pam.d/common-account ({md5}d41d8cd98f00b204e9800998ecf8427e)
info: FileBucket got a duplicate file /etc/pam.d/common-auth ({md5}d41d8cd98f00b204e9800998ecf8427e)
</code></pre>
<p>But hey, they are duplicate, because they all have the same checksum!
And the checksum is everywhere the same, because all files are empty:</p>
<pre><code>% touch test
% md5sum test
d41d8cd98f00b204e9800998ecf8427e test
</code></pre>
<p>In the syslog of the puppetmaster one can see</p>
<pre><code>Oct 1 14:31:14 sans-puppetca puppetmaster_unicorn: 129.132.85.166 - - [01/Oct/2010 14:31:14] "GET /production/file_content//autofs/auto.net HTTP/1.0" 404 44 0.0012
</code></pre>
<p>So in essence, what happens is:</p>
<ul>
<li>puppetd 2.6.0 submits two slashes in the path (//)</li>
<li>puppetmaster via unicorn does not find the file, because of the double slash</li>
<li>puppetd sees the 404 error and creates a empty file</li>
</ul>
<p>Switching to webbrick as a workaround works, because it accepts the two slashes.</p>
<p>Replacing the two slashes with one in the server does not fix the origin
of the problem, nor does it address the issue that puppetd creates
empty files, if it gets a 404 for the file content.</p>
<h1>Update #1</h1>
<p>I switched over to use <a href="https://www.nico.schottelius.org//software/cdist/">cdist</a> instead of Puppet.</p>
In puppet, $name is not always what you expecthttps://www.nico.schottelius.org//blog/puppet-name-is-not-as-expected-but-classname/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<h2>Situation</h2>
<p>I've tried to create a smart file definition for two files that belong into one
directory using this code snippet:</p>
<pre><code>file { ["check-disk-shell-net-snmp", "check_icinga_config.sh"]:
ensure => present,
path => "${check_base}/${name}",
source => "puppet:///modules/icinga2/${name}",
owner => icinga,
group => icinga,
mode => 775,
require => File["${check_base}"];
}
</code></pre>
<p>As described in the
<a href="http://docs.puppetlabs.com/references/2.7.0/type.html">puppet documentation</a>,
the path is usually constructed by using <strong>namevar</strong>, which I interpret as
"the variable named <strong>name</strong>".</p>
<h2>The problem</h2>
<p>What happens is actually something totally different (puppet --version: 2.7.5):</p>
<pre><code>err: Failed to apply catalog: Cannot alias File[check-disk-shell-net-snmp] to
["/opt/local.ch/sys/icinga/checks/icinga2::serverchecks"] at
/etc/puppet/modules/icinga2/manifests/serverchecks.pp:25; resource
["File", "/opt/local.ch/sys/icinga/checks/icinga2::serverchecks"] already defined at
/etc/puppet/modules/icinga2/manifests/serverchecks.pp:25
</code></pre>
<p>The internal alias message is a bit confusing
(I did not intentionally create an alias), but that puppet is using the classname
instead of the name supplied to file is surprising.</p>
<p><strong>Update:</strong> I've found the correct documentation part in the
<a href="http://docs.puppetlabs.com/guides/language_guide.html">puppet language guide</a>
that describes the feature I was trying to use:</p>
<pre><code>Most resources have an attribute (often called simply name) whose value
will default to the title if you don’t specify it. (Internally, this is
called the “namevar.”) For the file type, the path will default to the
title. A resource’s namevar value almost always has to be unique.
(The exec and notify types are the exceptions.)
</code></pre>
<h2>The solution</h2>
<p>Well, there are two solutions:</p>
<ul>
<li>rewrite to two file entries (simple, code redundancy, ugly)</li>
<li>switch over to using <a href="https://www.nico.schottelius.org//software/cdist/">cdist</a> (more initial effort, biased author)</li>
</ul>
<p>It is very good from time to time being remembered, which motivations I had
when starting the cdist project. In this case, it had been:</p>
<ul>
<li>Supply understandable, good error messages to the user</li>
<li>Do what the user expects</li>
<li>Consistent behaviour</li>
</ul>
<p>\
If you are interested, there is
<a href="http://firma.schottelius.org/english/infrastructure/">commercial support available</a> for
puppet to cdist migrations.
\</p>
Puppet: The quantum effect when loading classeshttps://www.nico.schottelius.org//blog/puppet-sometimes-loads-a-class/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>After experiementing a bit with <a href="http://reductivelabs.com/trac/puppet">puppet</a>
I found a very interesting phenomenon: Sometimes a host fails to load a class
with this error:</p>
<pre><code> err: Could not retrieve catalog: Could not find class common::nico_ethz at /etc/puppet/manifests/nodes/nico.pp:35 on node bach21.ethz.ch
</code></pre>
<p>The strange thing is that it <em>does</em> work sometimes. After describing
the situation in the <a href="irc://irc.freenode.net/#puppet">IRC channel #puppet</a>,
I got an "interesting" explanation for that behaviour:</p>
<p>First of all I did a mistake, because I placed the class
<strong><em>common::nico_ethz</em></strong> into the file
<strong>modules/common/manifests/nico.pp</strong> instead of
<strong>modules/common/manifests/nico_ethz.pp</strong>.</p>
<p>But why does it work sometimes?
It works sometimes, because the <strong><em>puppetmaster</em></strong> compiles the catalog
for <strong><em>all</em></strong> nodes and reuses the compiled catalog for different
hosts. <strong>If</strong> a previous node loaded the class <strong><em>common::nico</em></strong>,
the complete content of <strong>modules/common/manifests/nico.pp</strong>
is in the catalog, including <strong><em>common::nico_ethz</em></strong>. This is the reason
why it sometimes works and that's also the reason why I am writing
this posting:</p>
<ul>
<li>Dear other puppet users: Be aware that sometimes a class may be included
indirectly and thus things work randomly (like
<a href="http://en.wikipedia.org/wiki/Schr%C3%B6dinger%27s_cat">Schrödinger's cat</a>)!</li>
<li>Dear puppet developers: It would be way more helpful, if a wrong
configuration <strong>always</strong> and not only <strong>sometimes</strong> fails!</li>
</ul>
<p>If you've a comment to this blog article, please redirect it to
<a href="http://reductivelabs.com/trac/puppet/wiki/GettingHelp#mailing-lists">the puppet users
mailinglist</a>,
to which I sent a notice about this article.</p>
<h1>Update #1</h1>
<p>I switched over to use <a href="https://www.nico.schottelius.org//software/cdist/">cdist</a> instead of Puppet.</p>
How to use stdin and here documents for templating in cdisthttps://www.nico.schottelius.org//blog/stdin-here-documents-templating-in-cdist/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<h2>Introduction</h2>
<p>In the shell you can see the use of
<a href="http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_07_04">here documents</a> from time to time. They are very practical if you want to
feed some data with line breaks (also referred to as
"document") into another programm at the current position
("here") in the shell.</p>
<p><a href="https://www.nico.schottelius.org//software/cdist/">cdist</a> allows you to make use of stdin and thus
also of here documents in your types. This article gives you some
examples on how you can use them.</p>
<h2>Here documents in short</h2>
<p>For those who have found this page, but are not familiar with here documents,
here is a short example of how you can use them:</p>
<pre><code>cat << eof
Hello world,
this is a here document.
eof
</code></pre>
<p>The interesting part of here documents is that you can
use parameter expansion, command substitution, and arithmetic expansion
(as described in the <strong>here documents</strong> article linked above - opengroup
offers a great reference for shell coders/users):</p>
<pre><code>name="Nico"
cat << eof
Hello $name,
1+1 = $((1+1))
ls ~ = $(ls ~)
eof
</code></pre>
<p>Just try it - copy and paste the above code into your shell and it will
display the result of 1+1 and the contents of your home directory.</p>
<h2>Here documents and stdin in cdist</h2>
<p>Whenever you execute a type in a manifest in cdist like this:</p>
<pre><code>__file /tmp/testfile
</code></pre>
<p>cdist also reads stdin that is supplied to the type.
Not every type that is shipped with cdist makes use
of stdin, but <a href="https://www.nico.schottelius.org/software/cdist/man/latest/man7/cdist-type__file.html">__file</a>
does (always check the manpage of the cdist types - if a type makes
use of stdin, it is documented in there).</p>
<p>Indeed, if <strong>__file</strong> sees that you use "-" as the value for the
<strong>source</strong> parameter, it will use stdin for the content of the file
that it maintains:</p>
<pre><code>echo "Hello file" | __file /tmp/testfile --source -
</code></pre>
<p>Instead of using echo, we could also use the previously mentioned here document:</p>
<pre><code>__file /tmp/testfile --source - << eof
Hello world,
this is a here document.
eof
</code></pre>
<p>Beware, you could use cat like this</p>
<pre><code>cat << eof | __file /tmp/testfile --source -
Hello world,
this is a here document.
eof
</code></pre>
<p>but it is a
<a href="https://en.wikipedia.org/wiki/Cat_(Unix">useless use of cat (UUOC)</a>#Useless_use_of_cat).</p>
<h2>Templating using here documents in cdist</h2>
<p>Here documents are very powerful and they are very useful for templating.
Indeed, the <a href="https://github.com/ungleich/cdist-examples/tree/master/type/__ungleich_nginx_site">__ungleich_nginx_site type</a> uses a template like this in its manifest:</p>
<pre><code>template_in=$__type/files/nginx-template
template_out=$__object/files/nginx-template
export www_dir="$base_dir/www"
export log_dir="$base_dir/logs"
... (including more exports)
mkdir "$__object/files"
sh -e "$template_in" > "$template_out"
</code></pre>
<p>The following code shows the template (<strong>$__type/files/nginx-template</strong>):</p>
<pre><code>cat << eof
#
# Do not change this file. Changes will be overwritten by cdist.
#
server {
# Only bind on the reserved IP address
listen $listen;
eof
servername="$name"
for a in $alias; do
servername="$servername $a"
done
servername="$servername"
cat <<eof
server_name $servername;
location / {
root $www_dir;
eof
if [ -f "$__object/parameter/locationopt" ]; then
echo " # User given location parameters"
while read line; do
echo " $line"
done < "$__object/parameter/locationopt"
fi
cat <<eof
}
access_log $log_dir/access.log;
}
eof
</code></pre>
<h2>Had fun?</h2>
<p>The shell is indeed very powerful, you just need to know how to use it.
This is why cdist was even originally written in shell script and is
still configured in shell script (and will continue to be so).</p>
<p>If you are shell junkie, you may find more addictive drugs
<a href="https://www.nico.schottelius.org//blog/">in this blog</a>.</p>
What is configuration management?https://www.nico.schottelius.org//blog/what-is-configuration-management/2016-02-25T13:34:32Z2015-02-03T14:47:26Z
<p>As I'm currently thinking about writing a configuration management tool,
I'm sitting in the train and philosophise about
the general question: <strong><em>What is configuration management (CM)?</em></strong></p>
<h2>View 1: The System</h2>
<p>Let's imagine I am a computer system.
What happens to me, if I am put under version control?
Somebody (<strong>a process</strong>) which is running on me, changes
stuff on me, so that she (the process) is happy afterwards.</p>
<p>I recognise that some files are added, changed or deleted.
Some processes are being run, some killed.</p>
<p>That's probably it, because I don't own anything else she
can change.</p>
<h2>View 2: The Sysadmin</h2>
<p>I'm one of those guys, who are told to do world domination,
but got bored. I'm a sysadmin. I am very, very lazy.</p>
<p>I installed a lot of systems, just for fun.
Now somebody (probably even a user!) tells me, he wants
something to be changed, because he wants to actually
use the system (pretty awkward idea, but heard about
those situations).</p>
<p>As my boss told me that we cannot exist without users,
I even consider doing the change, though I'm afraid:</p>
<ul>
<li>What happens if the user requests more changes?</li>
<li>What if the machine crashes?</li>
<li>What if another sysadmin needs to add changes?</li>
<li>What if two systems should look very identical, though not completely?</li>
</ul>
<p>This leads to some easy objectives:</p>
<ul>
<li>CM must be easy to read and understand, so I can understand tomorrow what I did today.</li>
<li>CM must be able to redo the work</li>
<li>CM must provide a way to have multiple commiters</li>
<li>Having a way to reuse already defined stuff is helpful</li>
</ul>
<p>Oh, there's another interesting point:
To be able to communicate with a user and to understand him,
it would be very helpful, if I can tell my CM <strong>this is what
the user wants</strong> instead of <strong>do x, y and z</strong>, which neither
the user understand, nor do I know why I did it.</p>
<h2>View 3: The manager</h2>
<p>Yes, it can get even worse, there may be managers or bosses
around, who pay the poor sysadmin. The sysadmin claims to do
her best job, but as a manager, I don't understand what she's
doing. Nor do I really care. I care about the users
(which could be customers as well!) and that their demands.
And about how many users and how many demands my sysadmin
fulfilled. And I want fancy graphics, 24 bit coloured pie
charts in 3D and whatever comes to my crazy manager mind.
And numbers. Many numbers.</p>
<h2>View 4: Merging the views</h2>
<p>Assuming these are the players in my first round of CM
brainstorming, there are some outcomes:</p>
<ul>
<li>CM must be easy to use, so the lazy sysadmin will use it</li>
<li>CM includes ideas from users</li>
<li>The configuration management is maintained by the sysadmin</li>
<li>Your managers are happy, if the CM outputs "manager readable data"</li>
</ul>
<h2>More stuff</h2>
<p>I'll add more ideas about CM here soon. If you (dis|)agree with me,
just [let me know|about] so I can include your critics in the next article.</p>