From 79e8eff032cd24fcd6c178d6881c6a11dcca0d42 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 9 Mar 2012 23:23:22 +0100 Subject: [PATCH 1/7] ONE != ONLY Signed-off-by: Nico Schottelius --- doc/man/man7/cdist-type.text | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/man/man7/cdist-type.text b/doc/man/man7/cdist-type.text index 1147511e..22e72a01 100644 --- a/doc/man/man7/cdist-type.text +++ b/doc/man/man7/cdist-type.text @@ -139,8 +139,8 @@ Always ensure the manifest is executable, otherwise cdist will not be able to execute it. For more information about manifests see cdist-manifest(7). -SINGLETON - ONLY INSTANCE ONLY ------------------------------- +SINGLETON - ONE INSTANCE ONLY +----------------------------- If you want to ensure that a type can only be used once per target, you can mark it as a singleton: Just create the (empty) file "singleton" in your type directory: From cec0418794d6f04f07cbd8b82d4c104f66d93b6a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 9 Mar 2012 23:27:52 +0100 Subject: [PATCH 2/7] ++changes(2.0.9) Signed-off-by: Nico Schottelius --- doc/changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/changelog b/doc/changelog index 7533133a..cdc0c956 100644 --- a/doc/changelog +++ b/doc/changelog @@ -7,6 +7,7 @@ Changelog 2.0.9: * 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) * Feature __package: Support for OpenWRT (Giel van Schijndel) From c12501b63df9b57e74a16445116560ae083fb13e Mon Sep 17 00:00:00 2001 From: Matt Coddington Date: Fri, 9 Mar 2012 17:32:45 -0500 Subject: [PATCH 3/7] added rsync copy example --- other/examples/remote/rsync/copy | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 other/examples/remote/rsync/copy diff --git a/other/examples/remote/rsync/copy b/other/examples/remote/rsync/copy new file mode 100755 index 00000000..ca1f1959 --- /dev/null +++ b/other/examples/remote/rsync/copy @@ -0,0 +1,30 @@ +#!/bin/sh +# +# 2012 Matt Coddington (mcoddington at gmail.com) +# +# This file is part of cdist. +# +# cdist is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# cdist is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with cdist. If not, see . +# +# +# Use rsync to copy files. This particular invocation of rsync makes +# a backup of the file before overwriting it. For example, if cdist +# overwrites /etc/passwd then you'll end up with the old copy at +# /etc/passwd~cdist +# +# Usage: +# __remote_copy="/path/to/this/script" cdist config target_host +# + +rsync --backup --suffix=~cdist -e 'ssh -i /root/.ssh/cdist -o User=root' $@ From 9c98f387b2d154219072bfa70f5a739e061a87c1 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 9 Mar 2012 23:34:46 +0100 Subject: [PATCH 4/7] remove redundant redundant sentence Signed-off-by: Nico Schottelius --- doc/man/man7/cdist-type.text | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/doc/man/man7/cdist-type.text b/doc/man/man7/cdist-type.text index 22e72a01..7e3198f3 100644 --- a/doc/man/man7/cdist-type.text +++ b/doc/man/man7/cdist-type.text @@ -186,10 +186,8 @@ WRITING THE GENCODE SCRIPT There are two gencode scripts: ***gencode-local*** and ***gencode-remote***. The output of gencode-local is executed locally, whereas the output of gencode-remote is executed on the target. - The gencode scripts can make use of the parameters, the global explorers -and the type specific explorers. The output (stdout) of these script is -saved by cdist and will be executed on the target. +and the type specific explorers. If the gencode scripts encounter an error, it should print diagnostic messages to stderr and exit non-zero. If you need to debug the gencode From 115f0549555c66c59c50915d99bdde8326297a25 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 9 Mar 2012 23:39:47 +0100 Subject: [PATCH 5/7] move submit stuff into cdist-hacker Signed-off-by: Nico Schottelius --- doc/man/man7/cdist-hacker.text | 8 +++++--- doc/man/man7/cdist-type.text | 10 +++------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/doc/man/man7/cdist-hacker.text b/doc/man/man7/cdist-hacker.text index 646439a3..ee88ca29 100644 --- a/doc/man/man7/cdist-hacker.text +++ b/doc/man/man7/cdist-hacker.text @@ -54,9 +54,9 @@ work nor kill the authors brain: seperate branches. This way one feature can already be included, even if the other needs to be improved. -As soon as your work meets these requirements, you can contact me -(IRC, Mailinglist, Phone, RFC 1149) and I'll check your code before -including it. +As soon as your work meets these requirements, write a mail +for inclusion to the mailinglist **cdist at cdist -- at -- l.schottelius.org** +or open a pull request at http://github.com/telmich/cdist. HOW TO SUBMIT A NEW TYPE @@ -75,6 +75,8 @@ code and thus such a type introduces redundant functionality that is given by core cdist already. + + SEE ALSO -------- - cdist(7) diff --git a/doc/man/man7/cdist-type.text b/doc/man/man7/cdist-type.text index 7e3198f3..92a2b36d 100644 --- a/doc/man/man7/cdist-type.text +++ b/doc/man/man7/cdist-type.text @@ -222,17 +222,13 @@ never ever touch this folder). HOW TO INCLUDE A TYPE INTO UPSTREAM CDIST ----------------------------------------- If you think your type may be useful for others, ensure it works with the -current master branch of cdist and submit the git url containing the type for -inclusion to the mailinglist **cdist at cdist -- at -- l.schottelius.org** -or open a pull request at http://github.com/telmich/cdist. - -Ensure a corresponding manpage named man.text in asciidoc format with -the manpage-name "cdist-type__NAME" is included in the type directory. - +current master branch of cdist and have a look at cdist-hacker(7) on +how to submit it. SEE ALSO -------- - cdist-explorer(7) +- cdist-hacker(7) - cdist-stages(7) - cdist-tutorial(7) From 9ef7482ec1669f78c174d8042768b37ad4c90b72 Mon Sep 17 00:00:00 2001 From: Matt Coddington Date: Fri, 9 Mar 2012 17:39:54 -0500 Subject: [PATCH 6/7] remove ssh key location to simplify and match other examples --- other/examples/remote/rsync/copy | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/other/examples/remote/rsync/copy b/other/examples/remote/rsync/copy index ca1f1959..f6b93c5c 100755 --- a/other/examples/remote/rsync/copy +++ b/other/examples/remote/rsync/copy @@ -18,13 +18,13 @@ # along with cdist. If not, see . # # -# Use rsync to copy files. This particular invocation of rsync makes -# a backup of the file before overwriting it. For example, if cdist -# overwrites /etc/passwd then you'll end up with the old copy at -# /etc/passwd~cdist +# Use rsync over ssh to copy files. This particular invocation of +# rsync makes a backup of the file before overwriting it. For example, +# if cdist overwrites /etc/passwd then you'll end up with the old copy +# at /etc/passwd~cdist. # # Usage: # __remote_copy="/path/to/this/script" cdist config target_host # -rsync --backup --suffix=~cdist -e 'ssh -i /root/.ssh/cdist -o User=root' $@ +rsync --backup --suffix=~cdist -e 'ssh -o User=root' $@ From a35c81d2e1d750b9cc24994d5bbba0320d8bae39 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 9 Mar 2012 23:48:04 +0100 Subject: [PATCH 7/7] ++changes(2.0.9) Signed-off-by: Nico Schottelius --- doc/changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/changelog b/doc/changelog index cdc0c956..8164228d 100644 --- a/doc/changelog +++ b/doc/changelog @@ -13,6 +13,7 @@ Changelog * 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) 2.0.8: 2012-02-20 * Bugfix core: Remove another nasty traceback when sending SIGINT (aka Ctrl-C)