On Friday, July 10, 2015 at 7:29:44 AM UTC-5, Albert Shih wrote:
>
> Hi again. 
>
>
> Is it some very bad thing to manage some hiera file through puppet ? 
>
> I've a class to create a vm (virtual machin), so when I want a new vm I do 
> something like 
>
>   hyperviser.pp --> 
>
>     add_vm { 'newvm': 
>      param => 
>      } 
>
> but when the vm is up and running I use puppet to manage this vm, so I 
> need 
> to launch puppet agent inside that vm. 
>
> For that I need to create a 
>
>   hieradata/newvm.yaml 
>
> and add 
>
>   manifest/nodes/newvm.pp 
>
>

The general idea makes me uneasy, but probably it would work.  I presume 
that you will not this way be managing any data applicable to the 
puppetmaster itself or to the relevant hypervisor.  If you use this 
approach to manage only node-specific data for the managed VMs, then at 
least you have some separation.

 

> Is it a good idea to use exported ressource to create those two files ? 
>


If you're going to go down this path at all, then using exported resources 
is the only approach I think makes sense.  You would want the hiera data in 
question to be generated via a template or some other function -- it would 
be needlessly overcomplicated to take an approach that required the hiera 
file to be physically present on the master other than in the appropriate 
hiera directory.

Do note, however, that that will introduce some delay into the timing of 
the VMs' data being accessible.  They will be *exported* when the 
hypervisor's catalog is built, but those exported resources will not be 
applied to the master until the next time it performs a catalog run.


John

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/84ebf8f2-78d9-452c-b25b-a374e589b28c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to