Unable to specify hierarchy for data-in-modules

156 views
Skip to first unread message

Igor Berger

unread,
Sep 16, 2013, 11:30:42 AM9/16/13
to puppet...@googlegroups.com
Hello,

I'm running Puppet agent stand-alone on Windows.

I got data-in-modules working. However, no matter what I put into the module hiera.yaml,
I can only override the defaults from common.yaml by osfamily (and not, e.g., by environment).

In the setup below the following command outputs:

>puppet apply --binder -e "notice lookup ('my_key')" --environment=local
Notice: Scope(Class[main]): windows-value
Notice: Compiled catalog for myhostname in environment local in 1.40 seconds

And if I delete the osfamily directory, the same command outputs "common-value".

So, even though osfamily is not part of the hierarchy, it's used to override the common value.
Conversely, environment is part of the hierarchy, but it's not used.

Did I miss anything?

Thanks,
Igor.


Module structure:

my_module/
    hiera.yaml
    data/
        common.yaml
        environment/
            local.yaml
        osfamily/
            windows.yaml


hiera.yaml contains:

---
version: 2
hierarchy:
  [
   ['environment', '${environment}', 'data/environment/${environment}'],
   ['common', 'true', 'data/common']
  ]


data/common.yaml contains:

---
my_key: 'common-value'


data/osfamily/windows.yaml contains:

---
my_key: 'windows-value'


data/environment/local.yaml contains:

---
my_key: 'local-value'

Igor Berger

unread,
Sep 18, 2013, 11:57:44 AM9/18/13
to puppet...@googlegroups.com
Any ideas?

Rob Reynolds

unread,
Sep 19, 2013, 4:03:17 PM9/19/13
to puppet...@googlegroups.com
Henrik posted some updates/fixes to his examples. Can you check that first?


--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To post to this group, send email to puppet...@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.



--
Rob Reynolds
Developer, Puppet Labs

Join us at PuppetConf 2014September 23-24 in San Francisco

MM

unread,
Nov 11, 2013, 11:16:08 AM11/11/13
to puppet...@googlegroups.com
Where can I find this updated examples?

Rob Reynolds

unread,
Nov 11, 2013, 1:30:10 PM11/11/13
to puppet...@googlegroups.com
I believe this was updated in this ARM https://github.com/puppetlabs/armatures/blob/master/arm-9.data_in_modules/index.md

But you may want to check to see if this is still something we are moving forward with.



For more options, visit https://groups.google.com/groups/opt_out.

chengkai liang

unread,
Nov 11, 2013, 3:41:48 PM11/11/13
to puppet...@googlegroups.com
Thanks.


--
You received this message because you are subscribed to a topic in the Google Groups "Puppet Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/puppet-users/Z_6ehvPEm98/unsubscribe.
To unsubscribe from this group and all its topics, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAMJiBK7sxcjhCXJLwOf3mD%2Baq%3DV33NM3C0qD3ZSN%3D2VbmRPfZQ%40mail.gmail.com.

Steven Jonthen

unread,
Nov 30, 2013, 2:03:27 PM11/30/13
to puppet...@googlegroups.com
Hi MM,

Can you tell me how you succeeded in using hiera-data, which is stored in the individual module-directories?

thanks!

chengkai liang

unread,
Dec 5, 2013, 7:30:39 PM12/5/13
to puppet...@googlegroups.com
Well, I can execute this with for individual module via puppet apply --binder true ... I haven't been able to do this successfully on my vagrant box.  I found out that vagrant use --detailed-exitcode option with puppet apply, which interfere with --binder true option.  I have to set binder true in puppet.conf.  Yet I don't have time to try that yet.


--
You received this message because you are subscribed to a topic in the Google Groups "Puppet Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/puppet-users/Z_6ehvPEm98/unsubscribe.
To unsubscribe from this group and all its topics, send an email to puppet-users...@googlegroups.com.

Henrik Lindberg

unread,
Dec 5, 2013, 9:18:34 PM12/5/13
to puppet...@googlegroups.com
On 2013-06-12 1:30, chengkai liang wrote:
> Well, I can execute this with for individual module via *puppet apply
> --binder true ...* I haven't been able to do this successfully on my
> vagrant box. I found out that vagrant use --detailed-exitcode option
> with puppet apply, which interfere with *--binder true* option. I have
> to set*binder true* in puppet.conf. Yet I don't have time to try that yet.
>
>
> On Sat, Nov 30, 2013 at 11:03 AM, Steven Jonthen
> <coffeeju...@gmail.com <mailto:coffeeju...@gmail.com>> wrote:

Please be aware that we decided to not move ahead with the "data in
modules" implementation based on the experimental implementation that is
turned on with --binder=true option.

We found several things - there was way too much complexity being
exposed to users, the first implementation missed support for some
typical use cases, and the entire domain of "providing data to modules"
turned out to be an exchange of one problem for another in several cases.

Meanwhile, if you are brave, and want to experiment. You probably want
my branches with simplifications and additional support for private
data. If for nothing else to gain some experience regarding some of the
issues. (Since we decided not to move ahead, these additions & changes
will not be merged into the puppet code base, and the behavior now
available via --binder will be removed - we have not quite yet figured
out what it will be replaced by though).

Regards
- henrik

chengkai liang

unread,
Dec 6, 2013, 1:25:06 PM12/6/13
to puppet...@googlegroups.com
It is nice to mention this here.

Thanks,
-Chengkai


--
You received this message because you are subscribed to a topic in the Google Groups "Puppet Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/puppet-users/Z_6ehvPEm98/unsubscribe.
To unsubscribe from this group and all its topics, send an email to puppet-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/l7rc5f%24jbs%241%40ger.gmane.org.

R.I.Pienaar

unread,
Dec 6, 2013, 5:59:37 PM12/6/13
to puppet...@googlegroups.com
hello,

I will be releasing a module on the forge with this functionality, but need some
early testers as I do not currently have a varied environment to test against.

Those interested please contact me off list or if you're brave just download
the ripienaar/module_data module into your manifests, it auto activates and needs
no config.

Though this is 0.0.1 release no doubt will kill your kitten.
> > puppet-users...@googlegroups.com.
> > To view this discussion on the web visit https://groups.google.com/d/
> > msgid/puppet-users/l7rc5f%24jbs%241%40ger.gmane.org.
> >
> > For more options, visit https://groups.google.com/groups/opt_out.
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/CANTbHr8NTCAspOEm9gT1xTtYOBBe_k4w_fK92foht1heikhjXA%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages