This is a cool way to do it!

Thanks a lot


On Thu, Aug 1, 2013 at 6:17 AM, daddy dp <[email protected]> wrote:

> you can pass puppet options
>     puppet.options = ["--pluginsync","--verbose","--hiera_config
> /vagrant/modules/puppet/templates/master/hiera.yaml","--environment
> #{ROLE}"]
> and sync folder with hiera data
>     config.vm.synced_folder "hieradata",
> "/etc/puppet/environments/#{ROLE}/hieradata"
>
>
>
> On Tuesday, July 30, 2013 5:32:36 PM UTC+3, chengkai liang wrote:
>>
>> Hi All,
>> I am using Vagrant to provision a box (CentOS 6.x) with puppet
>> provisioner.  The box is built by using veewee, with ruby 1.8.7 and puppet
>> 3.2 iinstalled, and the vagrant environment layout is,
>>
>> .
>> ├── Gemfile
>> ├── Gemfile.lock
>> ├── Rakefile
>> ├── Vagrantfile
>> ├── definitions
>> │   └── centos-6.3.minimal
>> ├── hiera
>> │   └── data
>> ├── iso
>> │   ├── CentOS-6.3-x86_64-minimal.iso
>> │   └── VBoxGuestAdditions_4.2.12.iso
>> ├── puppet
>> │   ├── Puppetfile
>> │   ├── environments
>> │   ├── manifests
>> │   └── modules
>> └── r10k.yaml
>>
>> Puppet will execute the puppet/manfests/default.pp for executing all the
>> modules include within in.  Now, I have the following modules list in this
>> default.pp,
>>
>> include stdlib
>> i*nclude hiera_config*
>> include confluence_facts
>> include confluence_setup
>>
>> One thing to note is that by default, hiera.yaml was installed at
>> /etc/hiera.yaml, yet puppet is looking for hiera.yaml at
>> /etc/puppet/hiera.yaml.  As a result, hiera_config is created to remedy the
>> problem (puppet will complaint it can't find hiera.yaml in /etc/puppet
>> directory).
>>
>> Here problem, when running *vagrant destroy* -> *vagrant up*, during the
>> provision phase, puppet complaint can't find /etc/puppet/hiera.yaml, and
>> keep executing the reset of the modules but not hiera_config.  If I comment
>> out all the modules but hiera_config, then this module gets executed.  And
>> I can finally un-comment all the modules and execute them all successfully.
>>
>> Why puppet behaves in this way?  Is there a way to enforce hiera_config
>> being executed?
>>
>> -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/dTWWj_kPlxE/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/puppet-users.
> 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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to