On 2015-27-08 9:01, Martin Alfke wrote:
On 27 Aug 2015, at 02:08, Henrik Lindberg <henrik.lindb...@cloudsmith.com>
wrote:
On 2015-26-08 17:56, Martin Alfke wrote:
Hi Henrik,
On 26 Aug 2015, at 17:49, Henrik Lindberg <henrik.lindb...@cloudsmith.com>
wrote:
Hash[String, Struct[{ uid => Integer, home => Pattern[/^\/.*/]}]] $hash
Am I missing something?
Within the Struct I provide the key name (uid) and Type (Integer) and the
second key (home) with Type (Pattern).
Yes, you are indeed. Your regular expression is however not correct for the
home directories that you have given. The regexp /^\/.*/ requires that the
string starts with a slash. If you change your input to say
home => '/home/jones'
it should work.
Ah. It does work providing correct data.
The error message if I do provide a string with missing / at start pointed me
into wrong direction.
Many thanks for your help.
I know learned that using Struct inside has will not give a detailed output on
a specific sub hash to be wrong.
It complains about the whole hash being wrong without details.
We have improvements for how type mismatches are reported. Hope to get
that into 4.3.0. It has a couple of heuristics regarding what is most
useful to know, and in your case it will point to the "path" where the
first mismatch was found.
- henrik
--
Visit my Blog "Puppet on the Edge"
http://puppet-on-the-edge.blogspot.se/
--
You received this message because you are subscribed to the Google Groups "Puppet
Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to puppet-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-dev/mrs0vn%24oqb%241%40ger.gmane.org.
For more options, visit https://groups.google.com/d/optout.