Commit graph

267 commits

Author SHA1 Message Date
Krzysztof Wilczynski
517227c75f Added TODO for future reference.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-29 04:18:29 +01:00
Krzysztof Wilczynski
1c07b8dba9 First version. Simple abs function to use within Puppet DSL.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-29 03:09:52 +01:00
Krzysztof Wilczynski
177f0c730b Removing old unused file.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-28 03:45:05 +01:00
Krzysztof Wilczynski
d25cd57dbe First version. Simple strftime function to use within Puppet DSL.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-28 03:44:28 +01:00
Krzysztof Wilczynski
31041c0e37 First version. Simple time function to use within Puppet DSL.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-28 03:44:11 +01:00
Krzysztof Wilczynski
fc886ed7b7 First version. Simple is_string function to use within Puppet DSL.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-28 03:43:34 +01:00
Krzysztof Wilczynski
d495723d6f First version. Simple is_array function to use within Puppet DSL.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-28 03:43:14 +01:00
Krzysztof Wilczynski
0bd7550336 Minor changes.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-28 03:42:37 +01:00
Krzysztof Wilczynski
79191fc127 Changing name of the function from include to includes as it clashes with
a core function from Puppet::Parser.  I had no idea that you can over-write
some of the that way. Oops.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-27 23:26:41 +01:00
Krzysztof Wilczynski
cd4904b9d9 First version. Simple range function to use within Puppet DSL.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-26 23:45:50 +01:00
Krzysztof Wilczynski
0e3c0385ef Removing string interpolation from fact.rb. I am not sure whether
we should fiddle with this.  The old behaviour e.g. evaluate when
inside "" and don't do anything when inside '' is probably better
choice in the end as people are used to it working that way.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-26 04:21:32 +01:00
Krzysztof Wilczynski
c229a323a1 Changed comment line wording.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-26 04:21:00 +01:00
Krzysztof Wilczynski
6776d09c0a Removing surplus files.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-26 03:55:04 +01:00
Krzysztof Wilczynski
67ea75883f Changing name of collect_indices.rb to values_at.rb in order to be
reasemble Ruby's Array#values_at more.  Added support for ranges
with hyphen, two and three dots notation.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-26 03:18:50 +01:00
Krzysztof Wilczynski
5225570018 First version. Simple delete_at function to use within Puppet DSL.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-26 02:54:18 +01:00
Krzysztof Wilczynski
6bf04e1353 Small re-factor. We prefer our local clone of the array ...
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-26 02:53:40 +01:00
Krzysztof Wilczynski
528a16e377 First version. Simple size function to use within Puppet DSL.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-26 01:29:53 +01:00
Krzysztof Wilczynski
c9dcca03b5 First version. Simple unique function to use within Puppet DSL.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-26 00:14:48 +01:00
Krzysztof Wilczynski
45b5b472a1 First version. Simple shuffle function to use within Puppet DSL.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-26 00:14:38 +01:00
Krzysztof Wilczynski
4d6b350509 First version. Simple reverse function to use within Puppet DSL.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-26 00:14:24 +01:00
Krzysztof Wilczynski
19f6ca9d75 First version. Simple include function to use within Puppet DSL.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-26 00:14:12 +01:00
Krzysztof Wilczynski
a718b9b4a4 First version. Simple count function to use within Puppet DSL.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-26 00:13:31 +01:00
Krzysztof Wilczynski
de0e7adb66 First version. Simple empty function to use within Puppet DSL.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-26 00:09:26 +01:00
Krzysztof Wilczynski
738db6eb70 Re-factor of the original function. Now its behaviour is either to join
with prefix or just add prefix or simply join.  This depends on its use.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2011-04-26 00:05:20 +01:00
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