Commit graph

743 commits

Author SHA1 Message Date
Krzysztof Wilczynski
af5d789e15 First version. Simple prefix function to use within Puppet DSL.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-26 00:04:10 +01:00
Krzysztof Wilczynski
1b4ade7b2a First version. Simple join function to use within Puppet DSL.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-26 00:02:59 +01:00
Krzysztof Wilczynski
f87fcecdfb Small re-factor to fact function.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-26 00:00:58 +01:00
Krzysztof Wilczynski
28254bef6b Changing name of join.rb to join_with_prefix.rb to make room for
its simpler version.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-25 23:33:26 +01:00
Krzysztof Wilczynski
50cb2cd05a Small re-factor of fact function.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-25 23:32:41 +01:00
Krzysztof Wilczynski
7e7c7ce2ee First version. Function opposite to the bool2num one. Converts
number to appropriate boolean value.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-25 03:47:31 +01:00
Krzysztof Wilczynski
1a8617404c Minor update.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-25 03:46:46 +01:00
Krzysztof Wilczynski
87a825e609 First version. Improvment upon bool2num function found on the Internet.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-25 03:19:10 +01:00
Krzysztof Wilczynski
914d5c2f38 Added help accessible via the :doc functionality in Puppet's newfunction.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-25 02:47:16 +01:00
Krzysztof Wilczynski
bb231bdfc2 Updated help message.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-25 02:46:12 +01:00
Krzysztof Wilczynski
a64c206708 Update to error reporting.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-25 02:06:50 +01:00
Krzysztof Wilczynski
61936fdeaa Updated error check and reporting. Also we now return empty
string value i.e. "" instead of raising an exception when a
particular fact is not present.  We also make use of strinterp()
explicitly to evaluate arguments passed to the function.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-25 02:02:00 +01:00
Krzysztof Wilczynski
4a72b0efde Adding more error checking ...
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-24 20:55:35 +01:00
Krzysztof Wilczynski
eefd7a9fc4 Adding ability to specifiy range as the index when selecting indices to collect.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-24 01:35:49 +01:00
Krzysztof Wilczynski
fa68d78b20 Small changes. Added better error checking etc ...
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-23 18:11:08 +01:00
Krzysztof Wilczynski
908459c1ad First version. Function that allows to collect selected indices
from an array within Puppet manifest.  More or less how array slicing
works in Perl ...

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-23 17:45:49 +01:00
Krzysztof Wilczynski
92d4a4eb85 First version. Adding join to Puppet for use within the manifest files.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-23 16:43:11 +01:00
Krzysztof Wilczynski
4a57da669c Fix. It is better to promote good practice...
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-23 02:55:08 +01:00
Krzysztof Wilczynski
0b1aab2ed5 Small changes. Mainly to formatting of the help provided.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-23 01:56:30 +01:00
Krzysztof Wilczynski
54b0d37bac We do not need cronrand.rb any more.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-23 01:44:24 +01:00
Krzysztof Wilczynski
399dd8cca8 First version. A function for Puppet that allows to retrieve a fact from Facter
easily instead of resorting to awful "inline_template" use-and-abuse practices.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-23 01:28:11 +01:00
Krzysztof Wilczynski
55c94178eb Minor changes. Added placeholder for :doc in Puppet's newfunction to fill later. 2011-04-23 01:18:52 +01:00
Krzysztof Wilczynski
e1bb7393bb Create destination directory on-demand i.e. when missing ...
Signed-off-by: Krzsysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-03-23 02:17:32 +00:00
Krzysztof Wilczynski
c3ed006be2 Changing the name of the file to reflect change in the function name. 2011-03-14 13:13:33 +01:00
Krzysztof Wilczynski
d629e15f29 Adding README file ... 2011-03-14 00:04:08 +00:00
Krzysztof Wilczynski
8e6bf2a079 First version. 2011-03-13 23:56:44 +00:00
Krzysztof Wilczynski
a7081fd027 Changing the way how function description and usage was given. Now documentation is exposed properly via Puppet itself. 2011-03-13 23:39:43 +00:00
Krzysztof Wilczynski
c73be8fdbd Changing the name of the file to reflect change in the function name. 2011-03-13 23:37:46 +00:00
Krzysztof Wilczynski
00a4c4ebcc Small re-factor. 2011-03-12 23:15:02 +00:00
Krzysztof Wilczynski
0eea8ac101 Check for the number of arguments given. 2011-03-12 23:05:56 +00:00
Krzysztof Wilczynski
49d208a13e Small re-factor. 2011-03-11 18:30:49 +00:00
Roman Barczyński
36ec2c36ea Merge branch 'kwilczynski-master' 2011-03-04 14:06:42 +01:00
Roman Barczyński
3a4b4559fe Merge branch 'master' of git://github.com/kwilczynski/puppet-functions into kwilczynski-master 2011-03-04 14:04:56 +01:00
Krzysztof Wilczynski
19fd344a0f Fix. The data structure should only be populated and/or set to be empty if and only if key is present. 2011-03-03 13:14:56 +01:00
Krzysztof Wilczynski
c5293e630c Fix. Should yield empty data structure when given key cannot be found in the hash upon parsing YAML file. 2011-03-03 09:18:12 +00:00
Krzysztof Wilczynski
688fd8c1aa Fix. Given vim mode line should end with : in order to work. 2011-03-03 09:17:06 +00:00
Krzysztof Wilczynski
1064abcb6e Re-factor. Removed not needed shebang for Ruby. 2011-03-03 09:10:36 +00:00
Roman Barczyński
ab749e7414 no need for "#! ruby", vim modeline must end with ":", and fixed not found key bug 2011-03-03 04:08:32 +01:00
Roman Barczyński
5caaf18c10 Merge git://github.com/kwilczynski/puppet-functions 2011-03-03 03:46:58 +01:00
Krzysztof Wilczynski
e566661cc7 Fix to a type in the documentation. 2011-03-03 02:45:11 +00:00
Krzysztof Wilczynski
20fcf0e610 Re-factor of the code to make it more Puppet-friendly and update of the short documentation in the comment lines. 2011-03-03 02:37:26 +00:00
Roman Barczyński
13098ff934 cronrand - stateful (between puppet runs) randomizer eg. for cron minutes for equal load distribution 2011-03-03 03:09:55 +01:00
Roman Barczyński
b305bbeac7 initial version 2011-03-03 02:48:35 +01:00