Commit graph

1032 commits

Author SHA1 Message Date
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