On 03/31/2016 05:40 PM, Martin Alfke wrote:
Generally it works:
https://github.com/puppetlabs/puppet/blob/master/lib/puppet/parser/functions/create_resources.rb
But no longer required since Puppet 4:
https://docs.puppetlabs.com/puppet/latest/reference/lang_resources_advanced.html#implementing-th
On 31 Mar 2016, at 17:28, Jakov Sosic wrote:
> On 03/31/2016 05:10 PM, Martin Alfke wrote:
>
>> You are passing a Hash as an parameter to a define.
>> Inside the define you expect the parameter to be of type String - according
>> to what you do in the define.
>>
>> You need to take care of sp
On 03/31/2016 05:10 PM, Martin Alfke wrote:
You are passing a Hash as an parameter to a define.
Inside the define you expect the parameter to be of type String - according to
what you do in the define.
You need to take care of splitting data accordingly in your define:
With Puppet 4 this is ve
Hi,
On 31 Mar 2016, at 16:38, Jakov Sosic wrote:
> Hi guys,
>
> I have a `test.pp` manifest that looks like:
>
>
> ```
> define basket($arg) {
> file { "/tmp/$name":
>ensure => present,
>content => $arg,
> }
> }
>
> foobar = {
> 'fruit' => { arg => 'apple' },
> 'berry' => { arg
Hi guys,
I have a `test.pp` manifest that looks like:
```
define basket($arg) {
file { "/tmp/$name":
ensure => present,
content => $arg,
}
}
foobar = {
'fruit' => { arg => 'apple' },
'berry' => { arg => 'watermelon' }
}
@basket[$foobar]
realize( Basket[fruit] )
realize( Bask
On Wednesday, August 5, 2015 at 3:24:33 PM UTC-5, Steve Wray wrote:
>
> Oh thanks, that worked.
>
> I guess I was confused with the semantics of 'clean' and 'deactivate' and
> thought 'deactivate' would... deactivate the node not just 'clean' out its
> virtual resources :)
>
> It would be nice
Oh thanks, that worked.
I guess I was confused with the semantics of 'clean' and 'deactivate' and
thought 'deactivate' would... deactivate the node not just 'clean' out its
virtual resources :)
It would be nice if there was a curl interface for puppetdb to delete
specific virtual resources! S
On 5 Aug 2015 19:10, "Steve Wray" wrote:
>
> I have a problem where a virtual resource has, in an early run, got the
wrong value. I've fixed the manifest so that the virtual resource gets the
correct values and I've rerun Puppet on the node that populates the virtual
resource. However when it is i
I have a problem where a virtual resource has, in an early run, got the
wrong value. I've fixed the manifest so that the virtual resource gets the
correct values and I've rerun Puppet on the node that populates the virtual
resource. However when it is instantiated it still gets the old value.
I
Both of these methods seems to work on puppet 4, and you could try on
puppet 3:
@notify { 'one': before => Notify['two'], }
@notify { 'two': }
Notify <| title == 'one' |> {
before => undef,
}
OR
@notify { 'one': before => Notify['two'], }
@notify { 'two': }
Notify <| title == 'one' |> {
befo
When collecting virtual resources, is there a way to override them to *remove*
specific attributes?
For example, I have a set of service definitions with requires, and I want to
collect them without those. (It's rather more complicated than that, but
illustrates what I want to do.) Is this even
On 12/20/2014 05:35 AM, Varun Utagikar wrote:
> Am sorry for the goof up
Never mind.
Please, as originally requested, add notice() calls and notify resources
to *all* pertinent code paths, especially the body of define users::virtual.
--
You received this message because you are subscribed to t
I am so sorry Felix
I was experimenting with different methods My manifest is as below (ignore
::localuser)
/etc/puppetlabs/puppet/modules/users/manifests/init.pp
class users {
notify { 'Adding User varun' : }
@users::virtual { 'varun':
uid => 1002,
On 12/19/2014 05:08 AM, Varun Utagikar wrote:
>
> Any idea to what mistake am I doing ?
Well, kind of.
The code you posted originally was not accurate, apparently, for you are
actually declaring a virtual resource of type users::virtual::localuser
- this cannot ever be realized by a users::virtu
Hey Felix
I tried realizing the user via :
Users::Virtual<| title == 'varun' |> and also with
realize Users::Virtual['varun']
but to no avail.
I put a notify in my manifest but it gives no significant o/p help just :
/etc/puppetlabs/puppet/modules/users/manifests/init.pp
class users {
On 12/18/2014 10:18 AM, Felix Frank wrote:
>> realize (Users::Virtual ['varun'])
Oh I just noticed - are you using parser=future now?
I seem to recall a comment from Erik that the space in the resource
reference is a problem now, i.e.
Users::Virtual ['varun'] # wrong
vs
Users::Virtual[
On 12/18/2014 08:46 AM, Varun Utagikar wrote:
> nodedefault {
> }
> ###
> node'hdpnamenode1.xor.in' {
> include users
> realize (Users::Virtual ['varun'])
> }
Weird.
Please sprinkle all the code that you pasted with notify resources
Hello All
I could successfully declare and realize virtual users in PE 3.2.3. I am
now testing the same with PE 3.7.0. Unfortunately the user is not being
realized and I am getting no warnings/errors.
I am pasting a snippet of my module manifests :
/etc/puppetlabs/puppet/modules/users/manifest
Please help.
I using virtual resource @user and @group.
If i using next construction i get error with cycles
class users {
Group <| ENABLED_GROUPS |> ->User <| ENABLED_USERS' |> -> User
<| DISABLED_USERS' |> ->Group <| DISABLED_GROUPS |>
}
This construction good, but puppet d
On Tuesday, September 11, 2012, Douglas Garstang wrote:
> So, it seems that create_resources doesn't support virtual resources.
>
What problem are you trying to solve?
-Jeff
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this grou
So, it seems that create_resources doesn't support virtual resources.
Suggestions? Workarounds?
Doug.
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this
Tks!
Work fine now.
Hugs,
2012/8/21 Walter Heck
> Realize add_user instead of user..
>
> Sent from my galaxy tab
> On Aug 22, 2012 3:01 AM, "Douglas Brancaglion"
> wrote:
>
> > realize > }
> On Aug 22, 2012 3:01 AM, "Douglas Brancaglion"
> wrote:
>
>> Hi!
>>
>> I am facing difficulties in u
Realize add_user instead of user..
Sent from my galaxy tab
On Aug 22, 2012 3:01 AM, "Douglas Brancaglion"
wrote:
> realize > }
On Aug 22, 2012 3:01 AM, "Douglas Brancaglion"
wrote:
> Hi!
>
> I am facing difficulties in using the virtual resource types in resorce
> custom, I have a definition
Hi!
I am facing difficulties in using the virtual resource types in resorce
custom, I have a definition of user creation as shown below:
define add_user ( $email, $uid, $key, $groups ) {
$username = $title
user { $username:
comment=> "$email",
:D
I knew it would be something simple, thanks Kristof that's working now.
Brett
On 29 Jun 2012, at 16:54, Kristof Willaert wrote:
> Hi,
>
> [snip]
>
> > node 'puppet-slave.test.net' {
> > include users::accounts
> > User <| title="account" |>
> > }
>
> Your virtual resource is not
Hi,
[snip]
> node 'puppet-slave.test.net' {
>> > include users::accounts
>> > User <| title="account" |>
>> > }
>
>
Your virtual resource is not a "user", but a define called
"users::virtual::account".
So you need to realize it using:
Users::Virtual::Account <| title == "account" |>
Kind re
Thanks for looking Henk,
I think my email client replaced == with =, it is using the comparison op
in the actual code
On Friday, 29 June 2012 16:07:55 UTC+1, (unknown) wrote:
>
> Hi,
>
> On Fri, 29 Jun 2012 15:36:35 +0100
> Brett Maton wrote:
>
> > I'm probably missing something really
Hi,
On Fri, 29 Jun 2012 15:36:35 +0100
Brett Maton wrote:
> I'm probably missing something really simple here, but I can't get
> the following to work:
>
> node 'puppet-slave.test.net' {
> include users::accounts
> User <| title="account" |>
> }
It’s supposed to be a comparison, not an ass
I'm probably missing something really simple here, but I can't get the
following to work:
node 'puppet-slave.test.net' {
include users::accounts
User <| title="account" |>
}
Any suggestions welcomed :)
Modules:
modules/users/manifests/virtual.pp
class users::virtual {
define account (
I have an internal web site that can only be accessed from other servers.
It seems to me that I should pass an array of the addresses to the class
that instantiates the template for the Apache configuration. That seems
easy.
The hard part is getting every node to "register" itself so that it's
Running puppet-2.6.13-2.el6.noarch on CentOS 6.
define backup($apphost, $appfqdn) {
cron { "backup-${apphost}-daily":
command => "/usr/bin/rsync -a $appfqdn:backups/ $backdir/daily
--delete",
hour=> "2",
minute => fqdn_rand(60),
}
}
then elsewhere
@@backu
The request in the ticket is related but might not solve the same problem.
What I think I'm looking for is the generic ability to specify an array of
hashes as a resource title and have Puppet handle it intelligently (that is,
produce a locally scoped hash split from the array and easily accessible
On Tue, Jun 7, 2011 at 4:15 PM, Aaron Grewell wrote:
> $users = [{ username => "bill", uid => "12345" },
> { username => "ted", uid => "12346" }]
Aaron, I think this is a completely sane request. We've talked about
it before, but I can't find an existing ticket. This one seems close,
Hmmm, either I'm doing something wrong or virtual resources are incompatible
with hashes.
When I do this:
$users = [{ username => "bill", uid => "12345" },
{ username => "ted", uid => "12346" }]
define usertest ($alias = $name[username]) {
user {$name[username]:
ensure => pr
> Why would this be? Does anyone know any reliable way to list every
> class a node is including? Is there a reason the users::sys class
> cannot realise resources defined in users?
There is /var/lib/puppet/state/classes.txt.
> We originally tried to use tags to achieve this, but they are
> com
Since I moved our pre-prod puppet master to RHEL6, things have
broken. This is how:
We have two classes, 'users' (which defines all our users as virtual)
and 'users::sys' which realises the systems-admin users.
I then have (this is simplified to show the problem):
node basenode {
include use
Hi,
On 02/17/2011 12:12 AM, Forrie wrote:
> I'm somewhat new to Puppet. I'm trying to establish some Virtual
> Resources so I can realize them based on a TAG.
>
> The error I continue to get is:
>
> Feb 16 18:02:38 test-fms puppet-agent[8590]: Could not retrieve
> catalog from remote server: E
I'm somewhat new to Puppet. I'm trying to establish some Virtual
Resources so I can realize them based on a TAG.
The error I continue to get is:
Feb 16 18:02:38 test-fms puppet-agent[8590]: Could not retrieve
catalog from remote server: Error 400 on SERVER: Syntax error at
'201001'; expected '}
Hello,
I'm trying to rebuild my accounts module so that will completely
manage users via puppet. In my env, as much as I would like to, I
cannot use nis or ldap for authentication, so I'm trying to do it the
puppet way, but I seem to be a little stuck.
I would like to maintain a list of users (c
Woo! Tanx!
On Thu, Sep 9, 2010 at 11:41 PM, Frederik Wagner wrote:
> Hi Doug,
>
> On Thu, Sep 9, 2010 at 7:06 PM, Douglas Garstang
> wrote:
>> Would it be safe to say that virtual resources, once defined, sort of
>> become like a globally scoped object within the node? Ie, in one
>> module I can
Hi Doug,
On Thu, Sep 9, 2010 at 7:06 PM, Douglas Garstang
wrote:
> Would it be safe to say that virtual resources, once defined, sort of
> become like a globally scoped object within the node? Ie, in one
> module I can require=> an object defined as a virtual resource in
> another module, as long
Would it be safe to say that virtual resources, once defined, sort of
become like a globally scoped object within the node? Ie, in one
module I can require=> an object defined as a virtual resource in
another module, as long as they are both being run on the node? The
docs really don't make a lot o
Would it be safe to say that virtual resources, once defined, sort of
become like a globally scoped object within the node? Ie, in one
module I can require=> an object defined as a virtual resource in
another module, as long as they are both being run on the node? The
docs really don't make a lot o
I've seen the workarounds to use the concatenated file resource to fake this,
but is it possible to use something like virtual resources to realize an
array? My pseudo-classes would be like this:
class foo {
@$arr = ['a', 'b']
realize($arr)
}
class foo::c inherits foo {
$arr += ['c']
}
c
Hello,
I want to vitualize a resources - but want to realize an array of
resources...
somthing like:
@file { $myarray :
ensure => directory,
...
}
Can I realize the resources with:
File <| title == $myarray |>
?
Thanks,
-Roy
--
You received this message because you are subscribed t
OK So I'm doing something silly here, but this is the behaviour I'm seeing.
I am instatiating a large number of virtual @nagios_host objects and
@nagios_service objects. Then at run time I see the Nagios_service objects
get propagated but it appears like it selects one of the Nagios_host
objects. O
Hello everybody,
I have a question regarding virtual resources and the exporting/
collection thereof.
I have several hosts that should export one and the same file
resource. This should be collected exactly once by one host.
The resources are exported within a define:
## this define is used
47 matches
Mail list logo