diff --git a/src/extra/manual/beta/_sources/cdist-type.rst.txt b/src/extra/manual/beta/_sources/cdist-type.rst.txt index a5eefff5..12a203b7 100644 --- a/src/extra/manual/beta/_sources/cdist-type.rst.txt +++ b/src/extra/manual/beta/_sources/cdist-type.rst.txt @@ -216,6 +216,73 @@ In the __file type, stdin is used as source for the file, if - is used for sourc .... +Stdin inside a loop +~~~~~~~~~~~~~~~~~~~ +Since cdist saves type's stdin content in the object as **$__object/stdin**, +so it can be accessed in manifest and gencode-* scripts, this can lead to +unexpected behavior. For example, suppose you have some type with the following +in its manifest: + +.. code-block:: sh + + if [ -f "$__object/parameter/foo" ] + then + while read -r l + do + __file "$l" + echo "$l" >&2 + done < "$__object/parameter/foo" + fi + +and init manifest: + +.. code-block:: sh + + __foo foo --foo a --foo b --foo c + +You expect that manifest stderr content is: + +.. code-block:: sh + + a + b + c + +and that files *a*, *b* and *c* are created. But all you get in manifest stderr +is: + +.. code-block:: sh + + a + +and only *a* file is created. + +When redirecting parameter *foo* file content to while's stdin that means that all +commands in while body have this same stdin. So when *__file* type gets executed, +cdist saves its stdin which means it gets the remaining content of parameter *foo* +file, i.e.: + +.. code-block:: sh + + b + c + +The solution is to make sure that your types inside such loops get their stdin +from somewhere else, e.g. for the above problem *__file* type can get empty +stdin from */dev/null*: + +.. code-block:: sh + + if [ -f "$__object/parameter/foo" ] + then + while read -r l + do + __file "$l" < /dev/null + echo "$l" >&2 + done < "$__object/parameter/foo" + fi + + Writing the manifest -------------------- In the manifest of a type you can use other types, so your type extends diff --git a/src/extra/manual/beta/_sources/man7/cdist-type__acl.rst.txt b/src/extra/manual/beta/_sources/man7/cdist-type__acl.rst.txt index 092eb555..d066aae5 100644 --- a/src/extra/manual/beta/_sources/man7/cdist-type__acl.rst.txt +++ b/src/extra/manual/beta/_sources/man7/cdist-type__acl.rst.txt @@ -10,11 +10,7 @@ DESCRIPTION ----------- ACL must be defined as 3-symbol combination, using ``r``, ``w``, ``x`` and ``-``. -Fully supported on Linux (tested on Debian and CentOS). - -Partial support for FreeBSD, OSX and Solaris. - -OpenBSD and NetBSD support is not possible. +Fully supported and tested on Linux (ext4 filesystem), partial support for FreeBSD. See ``setfacl`` and ``acl`` manpages for more details. diff --git a/src/extra/manual/beta/_sources/man7/cdist-type__apt_key.rst.txt b/src/extra/manual/beta/_sources/man7/cdist-type__apt_key.rst.txt index 9009877e..234bc715 100644 --- a/src/extra/manual/beta/_sources/man7/cdist-type__apt_key.rst.txt +++ b/src/extra/manual/beta/_sources/man7/cdist-type__apt_key.rst.txt @@ -28,6 +28,12 @@ keyserver the keyserver from which to fetch the key. If omitted the default set in ./parameter/default/keyserver is used. +keydir + key save location, defaults to ``/etc/apt/trusted.pgp.d`` + +uri + the URI from which to download the key + EXAMPLES -------- @@ -47,15 +53,20 @@ EXAMPLES # same thing with other keyserver __apt_key UbuntuArchiveKey --keyid 437D05B5 --keyserver keyserver.ubuntu.com + # download key from the internet + __apt_key rabbitmq \ + --uri http://www.rabbitmq.com/rabbitmq-signing-key-public.asc + AUTHORS ------- Steven Armstrong +Ander Punnar COPYING ------- -Copyright \(C) 2011-2014 Steven Armstrong. You can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation, either version 3 of the +Copyright \(C) 2011-2019 Steven Armstrong and Ander Punnar. You can +redistribute it and/or modify it under the terms of the GNU General Public +License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. diff --git a/src/extra/manual/beta/cdist-best-practice.html b/src/extra/manual/beta/cdist-best-practice.html index 498e38ea..aae026f7 100644 --- a/src/extra/manual/beta/cdist-best-practice.html +++ b/src/extra/manual/beta/cdist-best-practice.html @@ -8,7 +8,7 @@ - 25. Best practice — cdist 5.1.0 documentation + 25. Best practice — cdist 5.1.1 documentation @@ -23,7 +23,7 @@