Update cdist beta docs

pull/1/head
Darko Poljak 2 years ago
parent e22a8731c4
commit a68a2efa1b

@ -12,7 +12,7 @@ This is the machine from which you will configure target hosts.
* /bin/sh: A POSIX like shell (for instance bash, dash, zsh)
* Python >= 3.5
* SSH client
* sphinx (for building html docs and/or the man pages)
* sphinx with the rtd theme (for building html docs and/or the man pages)
Target Hosts
~~~~~~~~~~~~

@ -143,6 +143,7 @@ The following types are available:
- __apt_key_uri (`cdist-type__apt_key_uri(7) <man7/cdist-type__apt_key_uri.html>`_)
- __apt_mark (`cdist-type__apt_mark(7) <man7/cdist-type__apt_mark.html>`_)
- __apt_norecommends (`cdist-type__apt_norecommends(7) <man7/cdist-type__apt_norecommends.html>`_)
- __apt_pin (`cdist-type__apt_pin(7) <man7/cdist-type__apt_pin.html>`_)
- __apt_ppa (`cdist-type__apt_ppa(7) <man7/cdist-type__apt_ppa.html>`_)
- __apt_source (`cdist-type__apt_source(7) <man7/cdist-type__apt_source.html>`_)
- __apt_unattended_upgrades (`cdist-type__apt_unattended_upgrades(7) <man7/cdist-type__apt_unattended_upgrades.html>`_)

@ -57,6 +57,7 @@ resolved name to stdout - if any. The script must be executable.
Simplest script:
.. code-block:: sh
#!/bin/sh
case "$1" in
@ -71,6 +72,7 @@ Simplest script:
Resolving name from `PTR` DNS record:
.. code-block:: sh
#!/bin/sh
for cmd in dig sed; do

@ -11,6 +11,7 @@ cdist types
__apt_key_uri <man7/cdist-type__apt_key_uri>
__apt_mark <man7/cdist-type__apt_mark>
__apt_norecommends <man7/cdist-type__apt_norecommends>
__apt_pin <man7/cdist-type__apt_pin>
__apt_ppa <man7/cdist-type__apt_ppa>
__apt_source <man7/cdist-type__apt_source>
__apt_unattended_upgrades <man7/cdist-type__apt_unattended_upgrades>

@ -0,0 +1,79 @@
cdist-type__apt_pin(7)
======================
NAME
----
cdist-type__apt_pin - Manage apt pinning rules
DESCRIPTION
-----------
Adds/removes/edits rules to pin some packages to a specific distribution. Useful if using multiple debian repositories at the same time. (Useful, if one wants to use a few specific packages from backports or perhaps Debain testing... or even sid.)
REQUIRED PARAMETERS
-------------------
distribution
Specifies what distribution the package should be pinned to. Accepts both codenames (buster/bullseye/sid) and suite names (stable/testing/...).
OPTIONAL PARAMETERS
-------------------
package
Package name, glob or regular expression to match (multiple) packages. If not specified `__object_id` is used.
priority
The priority value to assign to matching packages. Deafults to 500. (To match the default target distro's priority)
state
Will be passed to underlying `__file` type; see there for valid values and defaults.
BOOLEAN PARAMETERS
------------------
None.
EXAMPLES
--------
.. code-block:: sh
# Add the bullseye repo to buster, but do not install any packages by default,
# only if explicitely asked for (-1 means "never" for apt)
__apt_pin bullseye-default \
--package "*" \
--distribution bullseye \
--priority -1
require="__apt_pin/bullseye-default" __apt_source bullseye \
--uri http://deb.debian.org/debian/ \
--distribution bullseye \
--component main
__apt_pin foo --package "foo foo-*" --distribution bullseye
__foo # Assuming, this installs the `foo` package internally
__package foo-plugin-extras # Assuming we also need some extra stuff
SEE ALSO
--------
:strong:`apt_preferences`\ (5)
:strong:`cdist-type__apt_source`\ (7)
:strong:`cdist-type__apt_backports`\ (7)
:strong:`cdist-type__file`\ (7)
AUTHORS
-------
Daniel Fancsali <fancsali@gmail.com>
COPYING
-------
Copyright \(C) 2021 Daniel Fancsali. You can redistribute it
and/or modify it under the terms of the GNU General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.

@ -3,112 +3,73 @@ cdist-type__rsync(7)
NAME
----
cdist-type__rsync - Mirror directories using rsync
cdist-type__rsync - Mirror directories using ``rsync``
DESCRIPTION
-----------
WARNING: This type is of BETA quality:
- it has not been tested widely
- interfaces *may* change
- if there is a better approach to solve the problem -> the type may even vanish
If you are fine with these constraints, please read on.
This cdist type allows you to mirror local directories to the
target host using rsync. Rsync will be installed in the manifest of the type.
If group or owner are giveng, a recursive chown will be executed on the
target host.
A slash will be appended to the source directory so that only the contents
of the directory are taken and not the directory name itself.
The purpose of this type is to bring power of ``rsync`` into ``cdist``.
REQUIRED PARAMETERS
-------------------
source
Where to take files from
Source directory in local machine.
If source is directory, slash (``/``) will be added to source and destination paths.
OPTIONAL PARAMETERS
-------------------
group
Group to chgrp to.
destination
Destination directory. Defaults to ``$__object_id``.
owner
User to chown to.
Will be passed to ``rsync`` as ``--chown=OWNER``.
Read ``rsync(1)`` for more details.
destination
Use this as the base destination instead of the object id
group
Will be passed to ``rsync`` as ``--chown=:GROUP``.
Read ``rsync(1)`` for more details.
mode
Will be passed to ``rsync`` as ``--chmod=MODE``.
Read ``rsync(1)`` for more details.
options
Defaults to ``--recursive --links --perms --times``.
Due to `bug in Python's argparse<https://bugs.python.org/issue9334>`_, value must be prefixed with ``\``.
remote-user
Use this user instead of the default "root" for rsync operations.
Defaults to ``root``.
OPTIONAL MULTIPLE PARAMETERS
----------------------------
rsync-opts
Use this option to give rsync options with.
See rsync(1) for available options.
Only "--" options are supported.
Write the options without the beginning "--"
Can be specified multiple times.
MESSAGES
--------
NONE
option
Pass additional options to ``rsync``.
See ``rsync(1)`` for all possible options.
Due to `bug in Python's argparse<https://bugs.python.org/issue9334>`_, value must be prefixed with ``\``.
EXAMPLES
--------
.. code-block:: sh
# You can use any source directory
__rsync /tmp/testdir \
--source /etc
# Use source from type
__rsync /etc \
--source "$__type/files/package"
# Allow multiple __rsync objects to write to the same dir
__rsync mystuff \
--destination /usr/local/bin \
--source "$__type/files/package"
__rsync otherstuff \
--destination /usr/local/bin \
--source "$__type/files/package2"
# Use rsync option --exclude
__rsync /tmp/testdir \
--source /etc \
--rsync-opts exclude=sshd_conf
# Use rsync with multiple options --exclude --dry-run
__rsync /tmp/testing \
--source /home/tester \
--rsync-opts exclude=id_rsa \
--rsync-opts dry-run
SEE ALSO
--------
:strong:`rsync`\ (1)
__rsync /var/www/example.com \
--owner root \
--group www-data \
--mode 'D750,F640' \
--source "$__files/example.com/www"
AUTHORS
-------
Nico Schottelius <nico-cdist--@--schottelius.org>
Ander Punnar <ander-at-kvlt-dot-ee>
COPYING
-------
Copyright \(C) 2015 Nico Schottelius. You can redistribute it
and/or modify it under the terms of the GNU General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
Copyright \(C) 2021 Ander Punnar. You can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option)
any later version.

@ -38,6 +38,7 @@ cert-path
EXAMPLES
--------
.. code-block:: sh
__snakeoil_cert localhost-rsa \
--common-name localhost \
--key-type rsa:4096

@ -1 +1 @@
.fa:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-weight:normal;font-style:normal;src:url("../fonts/fontawesome-webfont.eot");src:url("../fonts/fontawesome-webfont.eot?#iefix") format("embedded-opentype"),url("../fonts/fontawesome-webfont.woff") format("woff"),url("../fonts/fontawesome-webfont.ttf") format("truetype"),url("../fonts/fontawesome-webfont.svg#FontAwesome") format("svg")}.fa:before{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;text-decoration:inherit}a .fa{display:inline-block;text-decoration:inherit}li .fa{display:inline-block}li .fa-large:before,li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-0.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before,ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before{content:""}.icon-book:before{content:""}.fa-caret-down:before{content:""}.icon-caret-down:before{content:""}.fa-caret-up:before{content:""}.icon-caret-up:before{content:""}.fa-caret-left:before{content:""}.icon-caret-left:before{content:""}.fa-caret-right:before{content:""}.icon-caret-right:before{content:""}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:"Lato","proxima-nova","Helvetica Neue",Arial,sans-serif;z-index:400}.rst-versions a{color:#2980B9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27AE60;*zoom:1}.rst-versions .rst-current-version:before,.rst-versions .rst-current-version:after{display:table;content:""}.rst-versions .rst-current-version:after{clear:both}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book{float:left}.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#E74C3C;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#F1C40F;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:gray;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:solid 1px #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .icon-book{float:none}.rst-versions.rst-badge .fa-book{float:none}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book{float:left}.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge .rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width: 768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}
.fa:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-style:normal;font-weight:400;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#FontAwesome) format("svg")}.fa:before{font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1}.fa:before,a .fa{text-decoration:inherit}.fa:before,a .fa,li .fa{display:inline-block}li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before,.icon-book:before{content:"\f02d"}.fa-caret-down:before,.icon-caret-down:before{content:"\f0d7"}.fa-caret-up:before,.icon-caret-up:before{content:"\f0d8"}.fa-caret-left:before,.icon-caret-left:before{content:"\f0d9"}.fa-caret-right:before,.icon-caret-right:before{content:"\f0da"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60}.rst-versions .rst-current-version:after{clear:both;content:"";display:block}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 434 KiB

File diff suppressed because one or more lines are too long

@ -1,6 +1,6 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
VERSION: '6.9.7',
VERSION: '6.9.8',
LANGUAGE: 'None',
COLLAPSE_INDEX: false,
BUILDER: 'html',

@ -0,0 +1 @@
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}({4:function(e,t,r){}});

@ -0,0 +1,4 @@
/**
* @preserve HTML5 Shiv 3.7.3-pre | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
*/
!function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=y.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=y.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),y.elements=c+" "+a,j(b)}function f(a){var b=x[a[v]];return b||(b={},w++,a[v]=w,x[w]=b),b}function g(a,c,d){if(c||(c=b),q)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():u.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||t.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),q)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return y.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(y,b.frag)}function j(a){a||(a=b);var d=f(a);return!y.shivCSS||p||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),q||i(a,d),a}function k(a){for(var b,c=a.getElementsByTagName("*"),e=c.length,f=RegExp("^(?:"+d().join("|")+")$","i"),g=[];e--;)b=c[e],f.test(b.nodeName)&&g.push(b.applyElement(l(b)));return g}function l(a){for(var b,c=a.attributes,d=c.length,e=a.ownerDocument.createElement(A+":"+a.nodeName);d--;)b=c[d],b.specified&&e.setAttribute(b.nodeName,b.nodeValue);return e.style.cssText=a.style.cssText,e}function m(a){for(var b,c=a.split("{"),e=c.length,f=RegExp("(^|[\\s,>+~])("+d().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),g="$1"+A+"\\:$2";e--;)b=c[e]=c[e].split("}"),b[b.length-1]=b[b.length-1].replace(f,g),c[e]=b.join("}");return c.join("{")}function n(a){for(var b=a.length;b--;)a[b].removeNode()}function o(a){function b(){clearTimeout(g._removeSheetTimer),d&&d.removeNode(!0),d=null}var d,e,g=f(a),h=a.namespaces,i=a.parentWindow;return!B||a.printShived?a:("undefined"==typeof h[A]&&h.add(A),i.attachEvent("onbeforeprint",function(){b();for(var f,g,h,i=a.styleSheets,j=[],l=i.length,n=Array(l);l--;)n[l]=i[l];for(;h=n.pop();)if(!h.disabled&&z.test(h.media)){try{f=h.imports,g=f.length}catch(o){g=0}for(l=0;g>l;l++)n.push(f[l]);try{j.push(h.cssText)}catch(o){}}j=m(j.reverse().join("")),e=k(a),d=c(a,j)}),i.attachEvent("onafterprint",function(){n(e),clearTimeout(g._removeSheetTimer),g._removeSheetTimer=setTimeout(b,500)}),a.printShived=!0,a)}var p,q,r="3.7.3",s=a.html5||{},t=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,u=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,v="_html5shiv",w=0,x={};!function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",p="hidden"in a,q=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){p=!0,q=!0}}();var y={elements:s.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:r,shivCSS:s.shivCSS!==!1,supportsUnknownElements:q,shivMethods:s.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=y,j(b);var z=/^$|\b(?:all|print)\b/,A="html5shiv",B=!q&&function(){var c=b.documentElement;return!("undefined"==typeof b.namespaces||"undefined"==typeof b.parentWindow||"undefined"==typeof c.applyElement||"undefined"==typeof c.removeNode||"undefined"==typeof a.attachEvent)}();y.type+=" print",y.shivPrint=o,o(b),"object"==typeof module&&module.exports&&(module.exports=y)}("undefined"!=typeof window?window:this,document);

@ -0,0 +1,4 @@
/**
* @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
*/
!function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.3-pre",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b),"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:this,document);

@ -1,3 +1 @@
/* sphinx_rtd_theme version 0.4.3 | MIT license */
/* Built 20190212 16:02 */
require=function r(s,a,l){function c(e,n){if(!a[e]){if(!s[e]){var i="function"==typeof require&&require;if(!n&&i)return i(e,!0);if(u)return u(e,!0);var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}var o=a[e]={exports:{}};s[e][0].call(o.exports,function(n){return c(s[e][1][n]||n)},o,o.exports,r,s,a,l)}return a[e].exports}for(var u="function"==typeof require&&require,n=0;n<l.length;n++)c(l[n]);return c}({"sphinx-rtd-theme":[function(n,e,i){var jQuery="undefined"!=typeof window?window.jQuery:n("jquery");e.exports.ThemeNav={navBar:null,win:null,winScroll:!1,winResize:!1,linkScroll:!1,winPosition:0,winHeight:null,docHeight:null,isRunning:!1,enable:function(e){var i=this;void 0===e&&(e=!0),i.isRunning||(i.isRunning=!0,jQuery(function(n){i.init(n),i.reset(),i.win.on("hashchange",i.reset),e&&i.win.on("scroll",function(){i.linkScroll||i.winScroll||(i.winScroll=!0,requestAnimationFrame(function(){i.onScroll()}))}),i.win.on("resize",function(){i.winResize||(i.winResize=!0,requestAnimationFrame(function(){i.onResize()}))}),i.onResize()}))},enableSticky:function(){this.enable(!0)},init:function(i){i(document);var t=this;this.navBar=i("div.wy-side-scroll:first"),this.win=i(window),i(document).on("click","[data-toggle='wy-nav-top']",function(){i("[data-toggle='wy-nav-shift']").toggleClass("shift"),i("[data-toggle='rst-versions']").toggleClass("shift")}).on("click",".wy-menu-vertical .current ul li a",function(){var n=i(this);i("[data-toggle='wy-nav-shift']").removeClass("shift"),i("[data-toggle='rst-versions']").toggleClass("shift"),t.toggleCurrent(n),t.hashChange()}).on("click","[data-toggle='rst-current-version']",function(){i("[data-toggle='rst-versions']").toggleClass("shift-up")}),i("table.docutils:not(.field-list,.footnote,.citation)").wrap("<div class='wy-table-responsive'></div>"),i("table.docutils.footnote").wrap("<div class='wy-table-responsive footnote'></div>"),i("table.docutils.citation").wrap("<div class='wy-table-responsive citation'></div>"),i(".wy-menu-vertical ul").not(".simple").siblings("a").each(function(){var e=i(this);expand=i('<span class="toctree-expand"></span>'),expand.on("click",function(n){return t.toggleCurrent(e),n.stopPropagation(),!1}),e.prepend(expand)})},reset:function(){var n=encodeURI(window.location.hash)||"#";try{var e=$(".wy-menu-vertical"),i=e.find('[href="'+n+'"]');if(0===i.length){var t=$('.document [id="'+n.substring(1)+'"]').closest("div.section");0===(i=e.find('[href="#'+t.attr("id")+'"]')).length&&(i=e.find('[href="#"]'))}0<i.length&&($(".wy-menu-vertical .current").removeClass("current"),i.addClass("current"),i.closest("li.toctree-l1").addClass("current"),i.closest("li.toctree-l1").parent().addClass("current"),i.closest("li.toctree-l1").addClass("current"),i.closest("li.toctree-l2").addClass("current"),i.closest("li.toctree-l3").addClass("current"),i.closest("li.toctree-l4").addClass("current"),i[0].scrollIntoView())}catch(o){console.log("Error expanding nav for anchor",o)}},onScroll:function(){this.winScroll=!1;var n=this.win.scrollTop(),e=n+this.winHeight,i=this.navBar.scrollTop()+(n-this.winPosition);n<0||e>this.docHeight||(this.navBar.scrollTop(i),this.winPosition=n)},onResize:function(){this.winResize=!1,this.winHeight=this.win.height(),this.docHeight=$(document).height()},hashChange:function(){this.linkScroll=!0,this.win.one("hashchange",function(){this.linkScroll=!1})},toggleCurrent:function(n){var e=n.closest("li");e.siblings("li.current").removeClass("current"),e.siblings().find("li.current").removeClass("current"),e.find("> ul li.current").removeClass("current"),e.toggleClass("current")}},"undefined"!=typeof window&&(window.SphinxRtdTheme={Navigation:e.exports.ThemeNav,StickyNav:e.exports.ThemeNav}),function(){for(var r=0,n=["ms","moz","webkit","o"],e=0;e<n.length&&!window.requestAnimationFrame;++e)window.requestAnimationFrame=window[n[e]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[n[e]+"CancelAnimationFrame"]||window[n[e]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(n,e){var i=(new Date).getTime(),t=Math.max(0,16-(i-r)),o=window.setTimeout(function(){n(i+t)},t);return r=i+t,o}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(n){clearTimeout(n)})}()},{jquery:"jquery"}]},{},["sphinx-rtd-theme"]);
!function(n){var e={};function t(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return n[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=n,t.c=e,t.d=function(n,e,i){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:i})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var i=Object.create(null);if(t.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var o in n)t.d(i,o,function(e){return n[e]}.bind(null,o));return i},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.p="",t(t.s=0)}([function(n,e,t){t(1),n.exports=t(3)},function(n,e,t){(function(){var e="undefined"!=typeof window?window.jQuery:t(2);n.exports.ThemeNav={navBar:null,win:null,winScroll:!1,winResize:!1,linkScroll:!1,winPosition:0,winHeight:null,docHeight:null,isRunning:!1,enable:function(n){var t=this;void 0===n&&(n=!0),t.isRunning||(t.isRunning=!0,e((function(e){t.init(e),t.reset(),t.win.on("hashchange",t.reset),n&&t.win.on("scroll",(function(){t.linkScroll||t.winScroll||(t.winScroll=!0,requestAnimationFrame((function(){t.onScroll()})))})),t.win.on("resize",(function(){t.winResize||(t.winResize=!0,requestAnimationFrame((function(){t.onResize()})))})),t.onResize()})))},enableSticky:function(){this.enable(!0)},init:function(n){n(document);var e=this;this.navBar=n("div.wy-side-scroll:first"),this.win=n(window),n(document).on("click","[data-toggle='wy-nav-top']",(function(){n("[data-toggle='wy-nav-shift']").toggleClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift")})).on("click",".wy-menu-vertical .current ul li a",(function(){var t=n(this);n("[data-toggle='wy-nav-shift']").removeClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift"),e.toggleCurrent(t),e.hashChange()})).on("click","[data-toggle='rst-current-version']",(function(){n("[data-toggle='rst-versions']").toggleClass("shift-up")})),n("table.docutils:not(.field-list,.footnote,.citation)").wrap("<div class='wy-table-responsive'></div>"),n("table.docutils.footnote").wrap("<div class='wy-table-responsive footnote'></div>"),n("table.docutils.citation").wrap("<div class='wy-table-responsive citation'></div>"),n(".wy-menu-vertical ul").not(".simple").siblings("a").each((function(){var t=n(this);expand=n('<span class="toctree-expand"></span>'),expand.on("click",(function(n){return e.toggleCurrent(t),n.stopPropagation(),!1})),t.prepend(expand)}))},reset:function(){var n=encodeURI(window.location.hash)||"#";try{var e=$(".wy-menu-vertical"),t=e.find('[href="'+n+'"]');if(0===t.length){var i=$('.document [id="'+n.substring(1)+'"]').closest("div.section");0===(t=e.find('[href="#'+i.attr("id")+'"]')).length&&(t=e.find('[href="#"]'))}t.length>0&&($(".wy-menu-vertical .current").removeClass("current"),t.addClass("current"),t.closest("li.toctree-l1").addClass("current"),t.closest("li.toctree-l1").parent().addClass("current"),t.closest("li.toctree-l1").addClass("current"),t.closest("li.toctree-l2").addClass("current"),t.closest("li.toctree-l3").addClass("current"),t.closest("li.toctree-l4").addClass("current"),t.closest("li.toctree-l5").addClass("current"),t[0].scrollIntoView())}catch(n){console.log("Error expanding nav for anchor",n)}},onScroll:function(){this.winScroll=!1;var n=this.win.scrollTop(),e=n+this.winHeight,t=this.navBar.scrollTop()+(n-this.winPosition);n<0||e>this.docHeight||(this.navBar.scrollTop(t),this.winPosition=n)},onResize:function(){this.winResize=!1,this.winHeight=this.win.height(),this.docHeight=$(document).height()},hashChange:function(){this.linkScroll=!0,this.win.one("hashchange",(function(){this.linkScroll=!1}))},toggleCurrent:function(n){var e=n.closest("li");e.siblings("li.current").removeClass("current"),e.siblings().find("li.current").removeClass("current"),e.find("> ul li.current").removeClass("current"),e.toggleClass("current")}},"undefined"!=typeof window&&(window.SphinxRtdTheme={Navigation:n.exports.ThemeNav,StickyNav:n.exports.ThemeNav}),function(){for(var n=0,e=["ms","moz","webkit","o"],t=0;t<e.length&&!window.requestAnimationFrame;++t)window.requestAnimationFrame=window[e[t]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[e[t]+"CancelAnimationFrame"]||window[e[t]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(e,t){var i=(new Date).getTime(),o=Math.max(0,16-(i-n)),r=window.setTimeout((function(){e(i+o)}),o);return n=i+o,r}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(n){clearTimeout(n)})}()}).call(window)},function(n,e){n.exports=jQuery},function(n,e,t){}]);

@ -1,24 +1,31 @@
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8">
<meta name="generator" content="Docutils 0.17: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>26. Best practice &mdash; cdist 6.9.8 documentation</title>
<title>26. Best practice &mdash; cdist 6.9.7 documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript" src="_static/js/modernizr.min.js"></script>
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
@ -29,10 +36,6 @@
<script type="text/javascript" src="_static/js/theme.js"></script>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="27. Execution stages" href="cdist-stages.html" />
@ -63,7 +66,7 @@
<div class="version">
6.9.7
6.9.8
</div>
@ -80,6 +83,7 @@
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
@ -141,6 +145,7 @@
</div>
</div>
</nav>
@ -175,18 +180,20 @@
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html">Docs</a> &raquo;</li>
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li><span class="section-number">26. </span>Best practice</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/cdist-best-practice.rst.txt" rel="nofollow"> View page source</a>
@ -200,17 +207,17 @@
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section id="best-practice">
<div class="section" id="best-practice">
<h1><span class="section-number">26. </span>Best practice<a class="headerlink" href="#best-practice" title="Permalink to this headline"></a></h1>
<p>Practices used in real environments</p>
<section id="passwordless-connections">
<div class="section" id="passwordless-connections">
<h2><span class="section-number">26.1. </span>Passwordless connections<a class="headerlink" href="#passwordless-connections" title="Permalink to this headline"></a></h2>
<p>It is recommended to run cdist with public key authentication.
This requires a private/public key pair and the entry
&quot;PermitRootLogin without-password&quot; in the sshd server.
See sshd_config(5) and ssh-keygen(1).</p>
</section>
<section id="speeding-up-ssh-connections">
</div>
<div class="section" id="speeding-up-ssh-connections">
<h2><span class="section-number">26.2. </span>Speeding up ssh connections<a class="headerlink" href="#speeding-up-ssh-connections" title="Permalink to this headline"></a></h2>
<p>When connecting to a new host, the initial delay with ssh connections
is pretty big. As cdist makes many connections to each host successive
@ -223,16 +230,16 @@ ControlPersist=2h</cite>).</p>
<p>Note that the sshd_config on the server can configure the maximum number of
parallel multiplexed connections this with <cite>MaxSessions N</cite> (N defaults to 10
for OpenSSH v7.4).</p>
</section>
<section id="speeding-up-shell-execution">
</div>
<div class="section" id="speeding-up-shell-execution">
<h2><span class="section-number">26.3. </span>Speeding up shell execution<a class="headerlink" href="#speeding-up-shell-execution" title="Permalink to this headline"></a></h2>
<p>On the source host, ensure that /bin/sh is <em>not</em> bash: bash is quite slow for
script execution. Instead, you could use dash after installing it:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ln</span> <span class="o">-</span><span class="n">sf</span> <span class="o">/</span><span class="nb">bin</span><span class="o">/</span><span class="n">dash</span> <span class="o">/</span><span class="nb">bin</span><span class="o">/</span><span class="n">sh</span>
</pre></div>
</div>
</section>
<section id="multi-master-or-environment-setups">
</div>
<div class="section" id="multi-master-or-environment-setups">
<h2><span class="section-number">26.4. </span>Multi master or environment setups<a class="headerlink" href="#multi-master-or-environment-setups" title="Permalink to this headline"></a></h2>
<p>If you plan to distribute cdist among servers or use different
environments, you can do so easily with the included version
@ -257,8 +264,8 @@ you can clone it multiple times:</p>
<span class="n">machine</span><span class="o">-</span><span class="n">b</span> <span class="o">%</span> <span class="n">git</span> <span class="n">clone</span> <span class="n">git</span><span class="p">:</span><span class="o">//</span><span class="n">your</span><span class="o">-</span><span class="n">git</span><span class="o">-</span><span class="n">server</span><span class="o">/</span><span class="n">cdist</span>
</pre></div>
</div>
</section>
<section id="separating-work-by-groups">
</div>
<div class="section" id="separating-work-by-groups">
<h2><span class="section-number">26.5. </span>Separating work by groups<a class="headerlink" href="#separating-work-by-groups" title="Permalink to this headline"></a></h2>
<p>If you are working with different groups on one cdist-configuration,
you can delegate to other manifests and have the groups edit only
@ -270,8 +277,8 @@ their manifests. You can use the following snippet in
<span class="n">sh</span> <span class="o">-</span><span class="n">e</span> <span class="s2">&quot;$__manifest/cbrg&quot;</span>
</pre></div>
</div>
</section>
<section id="maintaining-multiple-configurations">
</div>
<div class="section" id="maintaining-multiple-configurations">
<h2><span class="section-number">26.6. </span>Maintaining multiple configurations<a class="headerlink" href="#maintaining-multiple-configurations" title="Permalink to this headline"></a></h2>
<p>When you need to manage multiple sites with cdist, like company_a, company_b
and private for instance, you can easily use git for this purpose.
@ -329,8 +336,8 @@ Including a possible common base that is reused across the different sites:</p>
</pre></div>
</div>
<p>Have a look at git-remote(1) to adjust the remote configuration, which allows</p>
</section>
<section id="multiple-developers-with-different-trust">
</div>
<div class="section" id="multiple-developers-with-different-trust">
<h2><span class="section-number">26.7. </span>Multiple developers with different trust<a class="headerlink" href="#multiple-developers-with-different-trust" title="Permalink to this headline"></a></h2>
<p>If you are working in an environment that requires different people to
work on the same configuration, but having different privileges, you can
@ -349,8 +356,8 @@ implement this scenario with a gateway host and sudo:</p>
</li>
</ul>
<p>For more details consult sudoers(5)</p>
</section>
<section id="templating">
</div>
<div class="section" id="templating">
<h2><span class="section-number">26.8. </span>Templating<a class="headerlink" href="#templating" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li><p>create directory files/ in your type (convention)</p></li>
@ -387,8 +394,8 @@ cat <span class="s">&lt;&lt; EOF</span>
<span class="go"> --source &quot;$__object/files/basic.conf&quot;</span>
</pre></div>
</div>
</section>
<section id="testing-a-new-type">
</div>
<div class="section" id="testing-a-new-type">
<h2><span class="section-number">26.9. </span>Testing a new type<a class="headerlink" href="#testing-a-new-type" title="Permalink to this headline"></a></h2>
<p>If you want to test a new type on a node, you can tell cdist to only use an
object of this type: Use the '--initial-manifest' parameter
@ -406,8 +413,8 @@ of cdist:</p>
cdist config --initial-manifest - cdist-dev-01.ungleich.ch
</pre></div>
</div>
</section>
<section id="other-content-in-cdist-repository">
</div>
<div class="section" id="other-content-in-cdist-repository">
<h2><span class="section-number">26.10. </span>Other content in cdist repository<a class="headerlink" href="#other-content-in-cdist-repository" title="Permalink to this headline"></a></h2>
<p>Usually the cdist repository contains all configuration
items. Sometimes you may have additional resources that
@ -419,8 +426,8 @@ in the repository for such content: It allows you to
easily distinguish what is used by cdist and what is not
and also to store all important files in one
repository.</p>
</section>
<section id="notes-on-cdist-order-dependency">
</div>
<div class="section" id="notes-on-cdist-order-dependency">
<h2><span class="section-number">26.11. </span>Notes on CDIST_ORDER_DEPENDENCY<a class="headerlink" href="#notes-on-cdist-order-dependency" title="Permalink to this headline"></a></h2>
<p>With CDIST_ORDER_DEPENDENCY all types are executed in the order in which they
are created in the manifest. The current created object automatically depends
@ -428,7 +435,7 @@ on the previously created object.</p>
<p>It essentially helps you to build up blocks of code that build upon each other
(like first creating the directory xyz than the file below the directory).</p>
<p>This can be helpful, but one must be aware of its side effects.</p>
<section id="cdist-order-dependency-kills-parallelization">
<div class="section" id="cdist-order-dependency-kills-parallelization">
<h3><span class="section-number">26.11.1. </span>CDIST_ORDER_DEPENDENCY kills parallelization<a class="headerlink" href="#cdist-order-dependency-kills-parallelization" title="Permalink to this headline"></a></h3>
<p>Suppose you have defined CDIST_ORDER_DEPENDENCY and then, among other things,
you specify creation of three, by nature independent, files.</p>
@ -461,38 +468,38 @@ __file /tmp/file3
<span class="nb">unset</span> CDIST_ORDER_DEPENDENCY
</pre></div>
</div>
</section>
</section>
</section>
</div>
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="cdist-stages.html" class="btn btn-neutral float-right" title="27. Execution stages" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="cdist-reference.html" class="btn btn-neutral float-left" title="25. Reference" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
<a href="cdist-stages.html" class="btn btn-neutral float-right" title="27. Execution stages" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="cdist-reference.html" class="btn btn-neutral float-left" title="25. Reference" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright ungleich GmbH 2021
&#169; Copyright ungleich GmbH 2021.
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
@ -501,7 +508,6 @@ __file /tmp/file3
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);

@ -1,24 +1,31 @@
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8">
<meta name="generator" content="Docutils 0.17: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>12. Bootstrap &mdash; cdist 6.9.7 documentation</title>
<title>12. Bootstrap &mdash; cdist 6.9.8 documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript" src="_static/js/modernizr.min.js"></script>
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
@ -29,10 +36,6 @@
<script type="text/javascript" src="_static/js/theme.js"></script>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="13. Configuration" href="cdist-configuration.html" />
@ -63,7 +66,7 @@
<div class="version">
6.9.7
6.9.8
</div>
@ -80,6 +83,7 @@
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
@ -131,6 +135,7 @@
</div>
</div>
</nav>
@ -165,18 +170,20 @@
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html">Docs</a> &raquo;</li>
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li><span class="section-number">12. </span>Bootstrap</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/cdist-bootstrap.rst.txt" rel="nofollow"> View page source</a>
@ -190,12 +197,12 @@
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section id="bootstrap">
<div class="section" id="bootstrap">
<h1><span class="section-number">12. </span>Bootstrap<a class="headerlink" href="#bootstrap" title="Permalink to this headline"></a></h1>
<p>This document describes the usual steps recommended for a new
cdist setup. It is recommended that you have read and understood
<a class="reference external" href="cdist-quickstart.html">cdist quickstart</a> before digging into this.</p>
<section id="location">
<div class="section" id="location">
<h2><span class="section-number">12.1. </span>Location<a class="headerlink" href="#location" title="Permalink to this headline"></a></h2>
<p>First of all, you should think about where to store your configuration
database and who will be accessing or changing it. Secondly you have to
@ -208,8 +215,8 @@ relies on is recommended, for use as backup as well as to allow easy collaborati
with others.</p>
<p>For more sophisticated setups developing cdist configurations with multiple
people, have a look at <a class="reference external" href="cdist-best-practice.html">cdist best practice</a>.</p>
</section>
<section id="setup-working-directory-and-branch">
</div>
<div class="section" id="setup-working-directory-and-branch">
<h2><span class="section-number">12.2. </span>Setup working directory and branch<a class="headerlink" href="#setup-working-directory-and-branch" title="Permalink to this headline"></a></h2>
<p>I assume you have a fresh copy of the cdist tree in ~/cdist, cloned from
one of the official URLs (see <a class="reference external" href="cdist-quickstart.html">cdist quickstart</a> if you don't).
@ -256,8 +263,8 @@ ethz-systems, localch, customerX, ... But this is pretty much up to you.</p>
</pre></div>
</div>
<p>From now on, you can use git as usual to commit your changes in your own branch.</p>
</section>
<section id="publishing-the-configuration">
</div>
<div class="section" id="publishing-the-configuration">
<h2><span class="section-number">12.3. </span>Publishing the configuration<a class="headerlink" href="#publishing-the-configuration" title="Permalink to this headline"></a></h2>
<p>Usually a development machine like a notebook should be considered
temporary only. For this reason and to enable shareability, the configuration
@ -284,8 +291,8 @@ reachable via ssh and has git installed:</p>
<p>Now you have setup the git repository to synchronise the <strong>mycompany</strong>
branch with the <strong>master</strong> branch on the host <strong>loch</strong>. Thus you can commit
as usual in your branch and push out changes by entering <strong>git push</strong>.</p>
</section>
<section id="updating-from-origin">
</div>
<div class="section" id="updating-from-origin">
<h2><span class="section-number">12.4. </span>Updating from origin<a class="headerlink" href="#updating-from-origin" title="Permalink to this headline"></a></h2>
<p>Whenever you want to update your cdist installation, you can use git to do so:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># Update git repository with latest changes from origin</span>
@ -298,37 +305,37 @@ as usual in your branch and push out changes by entering <strong>git push</stron
<span class="n">cdist</span><span class="o">%</span> <span class="n">git</span> <span class="n">merge</span> <span class="n">origin</span><span class="o">/</span><span class="mf">2.0</span>
</pre></div>
</div>
</section>
</section>
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="cdist-configuration.html" class="btn btn-neutral float-right" title="13. Configuration" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="man1/cdist-new-type.html" class="btn btn-neutral float-left" title="11. cdist-new-type(1)" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
<a href="cdist-configuration.html" class="btn btn-neutral float-right" title="13. Configuration" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="man1/cdist-new-type.html" class="btn btn-neutral float-left" title="11. cdist-new-type(1)" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright ungleich GmbH 2021
&#169; Copyright ungleich GmbH 2021.
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
@ -337,7 +344,6 @@ as usual in your branch and push out changes by entering <strong>git push</stron
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);

@ -1,24 +1,31 @@
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8">
<meta name="generator" content="Docutils 0.17: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>28. Local cache overview &mdash; cdist 6.9.7 documentation</title>
<title>28. Local cache overview &mdash; cdist 6.9.8 documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript" src="_static/js/modernizr.min.js"></script>
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
@ -29,10 +36,6 @@
<script type="text/javascript" src="_static/js/theme.js"></script>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="29. Saving output streams" href="cdist-saving-output-streams.html" />
@ -63,7 +66,7 @@
<div class="version">
6.9.7
6.9.8
</div>
@ -80,6 +83,7 @@
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
@ -132,6 +136,7 @@
</div>
</div>
</nav>
@ -166,18 +171,20 @@
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html">Docs</a> &raquo;</li>
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li><span class="section-number">28. </span>Local cache overview</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/cdist-cache.rst.txt" rel="nofollow"> View page source</a>
@ -191,9 +198,9 @@
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section id="local-cache-overview">
<div class="section" id="local-cache-overview">
<h1><span class="section-number">28. </span>Local cache overview<a class="headerlink" href="#local-cache-overview" title="Permalink to this headline"></a></h1>
<section id="description">
<div class="section" id="description">
<h2><span class="section-number">28.1. </span>Description<a class="headerlink" href="#description" title="Permalink to this headline"></a></h2>
<p>While executing, cdist stores data to local cache. Currently this feature is
one way only. That means that cdist does not use stored data for future runs.
@ -206,8 +213,8 @@ configuration option or by using <strong>CDIST_CACHE_PATH_PATTERN</strong>
environment variable.</p>
<p>For more info on cache path pattern see <strong>CACHE PATH PATTERN FORMAT</strong>
section in cdist man page.</p>
</section>
<section id="cache-overview">
</div>
<div class="section" id="cache-overview">
<h2><span class="section-number">28.2. </span>Cache overview<a class="headerlink" href="#cache-overview" title="Permalink to this headline"></a></h2>
<p>As noted above each configured host has got its subdirectory in local cache.
Entries in host's cache directory are as follows.</p>
@ -236,7 +243,7 @@ cdist</p>
<dt>typeorder</dt><dd><p>file containing types in order of execution.</p>
</dd>
</dl>
<section id="object-cache-overview">
<div class="section" id="object-cache-overview">
<h3><span class="section-number">28.2.1. </span>Object cache overview<a class="headerlink" href="#object-cache-overview" title="Permalink to this headline"></a></h3>
<p>Each object under <strong>object</strong> directory has its own structure.</p>
<dl class="simple">
@ -280,38 +287,38 @@ outputs</p>
outputs.</p>
</dd>
</dl>
</section>
</section>
</section>
</div>
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="cdist-saving-output-streams.html" class="btn btn-neutral float-right" title="29. Saving output streams" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="cdist-stages.html" class=