Re: [Puppet Users] puppet resource, and parameters that take arrays...

2010-12-23 Thread Daniel Pittman
On Fri, Dec 24, 2010 at 16:04, William Van Hevelingen  wrote:
>> Sorry, nope:
[...]
> Ack my bad misread the output.

No problem there.  I figured that this time I better actually include
the "error" message though. ;)

> I think its a bug, I seem to remember that the parsedfile provider doesn't
> always work correctly under puppet resource

My impression is that it isn't parsing the command line properly to
extract the array data, but it sounds like I am going to have to dig
into the code.  Oh, well. :)

Regards,
Daniel
-- 
✣ Daniel Pittman            ✉ dan...@rimspace.net            ☎ +61 401 155 707
              ♽ made with 100 percent post-consumer electrons

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] puppet resource, and parameters that take arrays...

2010-12-23 Thread William Van Hevelingen
>
> Sorry, nope:
>

Ack my bad misread the output.

>
>
I think its a bug, I seem to remember that the parsedfile provider doesn't
always work correctly under puppet resource


-- 
William Van Hevelingen
wva...@gmail.com

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] puppet resource, and parameters that take arrays...

2010-12-23 Thread Daniel Pittman
On Fri, Dec 24, 2010 at 15:37, William Van Hevelingen  wrote:

> Its helpful if you include error messages

There were no error messages, just incorrect behaviour, but it is a
fair request. :)

> but the answer is
> puppet resource host some.example.com ip=127.0.0.1
> host_aliases="['www.example.com','mail.example.com']"

Sorry, nope:

dan...@ea:~$ puppet resource host some.example.com target=${PWD}/demo
ip=127.0.0.1 host_aliases="['www.example.com','mail.example.com']"
notice: /Host[some.example.com]/ensure: created
host { 'some.example.com':
ip => '127.0.0.1',
host_aliases => ['['www.example.com','mail.example.com']'],
target => '/Users/daniel/demo',
ensure => 'present'
}
dan...@ea:~$ cat demo
# HEADER: This file was autogenerated at Fri Dec 24 15:49:25 +1100 2010
# HEADER: by puppet.  While it can still be managed manually, it
# HEADER: is definitely not recommended.
127.0.0.1   some.example.com['www.example.com','mail.example.com']

That would ... well, "not work" is a nice way to put it.  Puppet just
did as asked, but broke my hosts file in the process.  If I used that
live. :)

Regards,
Daniel
-- 
✣ Daniel Pittman            ✉ dan...@rimspace.net            ☎ +61 401 155 707
              ♽ made with 100 percent post-consumer electrons

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] puppet resource, and parameters that take arrays...

2010-12-23 Thread William Van Hevelingen
>
>
> Its helpful if you include error messages, but the answer is

puppet resource host some.example.com ip=127.0.0.1 host_aliases="['
www.example.com','mail.example.com']"

-- 
William Van Hevelingen
wva...@gmail.com

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] puppet resource, and parameters that take arrays...

2010-12-23 Thread Daniel Pittman
So, I had occasion to try and use the 'puppet resource' operation for
the first time, and colour me foolish but I can't actually work it
out.

Specifically, I can't figure out how to get an array of values set:

] puppet resource host some.example.com ip=127.0.0.1
host_aliases=www.example.com,mail.example.com

That doesn't work.  Neither does giving the host_aliases argument
multiple times, or "[www,mail]", or "['www','mail']", and I can't
identify any other approach from the docs.  Now, obviously I can dive
into the code, but I figured to ask if anyone else can tell me the
answer without having to do that I can be happy. :)

Regards,
Daniel
-- 
✣ Daniel Pittman            ✉ dan...@rimspace.net            ☎ +61 401 155 707
              ♽ made with 100 percent post-consumer electrons

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.