Hi,
there are some minor not-best-practices in your code:
1. create_resource
I prefer using lambda over create_resources as these allows explizit resource
declaration which are then bound to the class.
This gives you explizit ordering, which you must add if using create_resource.
2. explizit lo
hello there,
I would like to clean up my puppet recipes.
My init.pp. I have ~three_hundred entries as '*new resources*'(see below).
here is how is setup today. I am wondering if we could do better. I am
working with puppet v5.
ideas or suggestions? thank you very much.
*mymodule/manifests/i
Hi guys,
I'm having difficulties with create_resources in latest 4.x master/agent
combo...
This is the example create_resources call:
$logstash_configs = hiera_hash('logstash::configfiles', {})
create_resources('::logstash::configfile', $logstash_configs)
This was working ok in version
Repositories defined in yaml, yum module below. Understand some of my
floundering is still in this module so things like ensure => "present" are
not intended to be taken literally
What this really does is wipe out the entire /etc/yum.repos.d/ directory
then recreates the repos from yaml, not id
Hi guys,
I'm looking for a solution to svn checkout a branch and directly config the
branch modules using create_resources.
My yaml would look like this I think for a one time checkout, which will
grab all the modules and configure them one by one:
svnsource:
repourl:
branch:
copydir:
The "template('tomcat/context.xml.erb')" is taken as a literal string when read
from hiera.
In this case you might wrap the file in a define to use the puppet template()
function:
define mymodule::hieratesting ( $content ) {
file { $name:
content => template($content),
}
}
create_resour
Hi,
I am trying to use create_resources with hiera.
My hiera testing.yaml (snippet) looks like this
tomcat::confs:
"%{hiera('webapps_dir')}/tomcat/conf/context.xml":
content: template('tomcat/context.xml.erb')
tomcat::default_confs:
ensure: present
owner: "%{hiera('tomcat::user')}"
On Friday, November 22, 2013 6:50:27 PM UTC-6, erkules wrote:
>
> Ahoi,
>
> On Thu, Nov 21, 2013 at 12:01:14PM +0100, Felix Frank wrote:
> > Hi,
> >
> > tough call. You may have to replicate the file type in a defined type
> > like so:
> >
> > define my_file($owner="root",$mode="644",...,$
Ahoi,
On Thu, Nov 21, 2013 at 12:01:14PM +0100, Felix Frank wrote:
> Hi,
>
> tough call. You may have to replicate the file type in a defined type
> like so:
>
> define my_file($owner="root",$mode="644",...,$template="") {
>
> if $template { File[$name] { content => template($template) } }
>
Hi,
tough call. You may have to replicate the file type in a defined type
like so:
define my_file($owner="root",$mode="644",...,$template="") {
if $template { File[$name] { content => template($template) } }
file { $name: owner => $owner, ... }
}
Then you can create_resource('my_file',hier
Doing create_resources('file',hiera_hash('input'))
works great for some hiera like
input:
/tmp/a.txt:
owner: root
ensure: file
...
Im not able to put any template() stuff in there
input:
/tmp/a.txt:
owner: root
ensure: file
content: template("create_re/aha.erb")
Instead of
On Wednesday, September 5, 2012 5:43:04 PM UTC+2, Dan Bode wrote:
>
>
>
> On Wed, Sep 5, 2012 at 8:37 AM, JeremyCampbell
>
> > wrote:
>
>>
>>
>> On Wednesday, September 5, 2012 5:20:49 PM UTC+2, Dan Bode wrote:
>>
>>>
>>>
>>> On Wed, Sep 5, 2012 at 8:15 AM, JeremyCampbell wrote:
>>>
>
On Wed, Sep 5, 2012 at 8:37 AM, JeremyCampbell
wrote:
>
>
> On Wednesday, September 5, 2012 5:20:49 PM UTC+2, Dan Bode wrote:
>
>>
>>
>> On Wed, Sep 5, 2012 at 8:15 AM, JeremyCampbell wrote:
>>
>>>
>>>
>>> On Wednesday, September 5, 2012 4:15:31 PM UTC+2, Dan Bode wrote:
>>>
On Wed,
On Wednesday, September 5, 2012 5:20:49 PM UTC+2, Dan Bode wrote:
>
>
>
> On Wed, Sep 5, 2012 at 8:15 AM, JeremyCampbell
>
> > wrote:
>
>>
>>
>> On Wednesday, September 5, 2012 4:15:31 PM UTC+2, Dan Bode wrote:
>>
>>>
>>>
>>> On Wed, Sep 5, 2012 at 7:05 AM, JeremyCampbell wrote:
>>>
I have
On Wed, Sep 5, 2012 at 8:15 AM, JeremyCampbell
wrote:
>
>
> On Wednesday, September 5, 2012 4:15:31 PM UTC+2, Dan Bode wrote:
>
>>
>>
>> On Wed, Sep 5, 2012 at 7:05 AM, JeremyCampbell wrote:
>>
>>> I have written a custom function that returns a hash of data to be used
>>> by the *create_resources
On Wednesday, September 5, 2012 4:15:31 PM UTC+2, Dan Bode wrote:
>
>
>
> On Wed, Sep 5, 2012 at 7:05 AM, JeremyCampbell
>
> > wrote:
>
>> I have written a custom function that returns a hash of data to be used
>> by the *create_resources* function.
>>
>> class network::multiroute::mhpeers (
On Wed, Sep 5, 2012 at 7:05 AM, JeremyCampbell
wrote:
> I have written a custom function that returns a hash of data to be used by
> the *create_resources* function.
>
> class network::multiroute::mhpeers (
> ) {
> $routes = gen_ip_routes("gw.uk")
> create_resources(network::multiroute::mhpeer
I have written a custom function that returns a hash of data to be used by
the *create_resources* function.
class network::multiroute::mhpeers (
) {
$routes = gen_ip_routes("gw.uk")
create_resources(network::multiroute::mhpeer, $routes)
}
However, on the puppet client I get "err: Could not
Hi,
I am trying to create multiple users using puppet. I have created a ENC and
trying to use class wrapped defined types with create_resources function.
For some reason things are falling apart. I would really appreciate some
help on these
Here are the details about my classes and configurati
Hi all,
I would like to create a configuration along the lines of
complex_user { "joe":
uid => 42,
sshkeys => {
"key1-comment" => { key => "...", ... },
"key2-comment" => { key => "...", ...}
}
...
}
That is, a definition that will
20 matches
Mail list logo