[Puppet Users] Re: Hiera Dummy Question

2013-07-12 Thread Brian Warsing
Thanks, I knew it was something silly.

On Friday, 12 July 2013 14:23:03 UTC-7, jcbollinger wrote:
>
>
>
> On Friday, July 12, 2013 2:04:36 PM UTC-5, Brian Warsing wrote:
> This:
>
>> Error: Could not find data item test::message in any Hiera data file and 
>> no default supplied at /etc/puppet/manifests/test.pp:17 on node node.foo.bar
>
>
> Tells you exactly what the problem is.  Puppet is trying to look up a 
> value for the parameter by the parameter's fully-qualified (but 
> non-absolute) name, "test::message".  Your data instead contain a key 
> "test", whose corresponding value happens to be a hash that has "message" 
> among its own keys.  That's not the same thing at all.  To provide a value 
> intended for automatic binding to your class parameter, your data should 
> look like this:
>
> ---
> test::message: This message brought to you by hiera
>
>
> 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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Hiera Dummy Question

2013-07-12 Thread Brian Warsing
Hi,

I have a simple hiera data file:

# /etc/puppet/hiera/defaults.yaml
---
test:
  message: This message brought to you by hiera


I run `sudo hiera test` and get:

{"message"=>"This message brought to you by hiera"}

I then create a test class:

# test.pp
class test ($message) {
  notify {"Param is: ${message}":}
}

include test

And try to apply the manifest `sudo puppet apply -d test.pp`, but I get 
back the following err:

Debug: hiera(): Hiera YAML backend starting
Debug: hiera(): Looking up test::message in YAML backend
Debug: hiera(): Looking for data source defaults
Debug: hiera(): Looking up test::message in YAML backend
Debug: hiera(): Looking for data source defaults
Error: Could not find data item test::message in any Hiera data file and no 
default supplied at /etc/puppet/manifests/test.pp:17 on node node.foo.bar
Error: Could not find data item test::message in any Hiera data file and no 
default supplied at /etc/puppet/manifests/test.pp:17 on node node.foo.bar

When I try `sudo hiera test::message`, sure enough, it returns nil.

Can anybody tell me what I am missing?

Thanks,

--
Brian

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Controlling access to filebucket

2013-02-18 Thread Brian Warsing
Hi,

Is there a way to control access to the filebucket?

Specifically, I wish to allow agents to backup to the filebucket but never 
restore.

Is this possible to do?

Thanks,

Brian

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Filebucket: storage and retrieval of unique per node files

2013-02-11 Thread Brian Warsing
Hi,

I need to backup a unique file from each of my nodes to a remote filebucket.

I will also need to be able to retrieve/restore said file on-demand at a 
later date.

I'm familiar with the basic config and operation for filebucket, but 
confused about how one restores a file for a given host without knowing the 
file's MD5 sum.

Do I need the MD5 sum? Other than looking though reports, how does one find 
out what the MD5 sum of the backed up file is?

Is there a strategy for dealing with this?

Thanks,

Brian

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Mac OS X group resource bug?

2012-02-17 Thread Brian Warsing
Hi,

I think I may have found a bug in how Mac OS X in handling group
resources (I'm still new at this).

Using Puppet 2.7.10 and Mac OS X I can create and modify groups
without error.

I provision...

group { 'com.apple.access_ssh':
  members => ['thisadmin', 'thatadmin'],
  gid => '509',
  ensure  => 'present'
}

Then append a single known common user...

group { 'com.apple.access_ssh':
  members => ['thisadmin', 'thatadmin', 'root'],
  gid => '509',
  ensure  => 'present'
}

This works under Lion, but not under 10.5. or 10.6. Instead, I receive
this error...

debug: Puppet::Type::Group::ProviderDirectoryservice: Executing '/usr/
bin/dscl -plist . -read /Groups/com.apple.access_ssh'
old and new mismatch!
err: /Stage[main]/Mmv2::System::Groups/Group[com.apple.access_ssh]:
Could not evaluate: old and new mismatch! at /etc/puppet/modules/mmv2/
manifests/system/groups.pp:11

The error appears to stem from a change to puppet/property.rb, but I'm
not sure why.

Any pointers? Should I file a bug?

Here's the trace...

debug: Puppet::Type::Group::ProviderDirectoryservice: Executing '/usr/
bin/dscl -plist . -read /Groups/com.apple.access_ssh'
old and new mismatch!
/Library/Ruby/Site/1.8/puppet/parameter.rb:165:in `fail'
/Library/Ruby/Site/1.8/puppet/property.rb:187:in `insync?'
/Library/Ruby/Site/1.8/puppet/property.rb:162:in `safe_insync?'
/Library/Ruby/Site/1.8/puppet/transaction/resource_harness.rb:61:in
`perform_changes'
/Library/Ruby/Site/1.8/puppet/transaction/resource_harness.rb:60:in
`each'
/Library/Ruby/Site/1.8/puppet/transaction/resource_harness.rb:60:in
`perform_changes'
/Library/Ruby/Site/1.8/puppet/transaction/resource_harness.rb:133:in
`evaluate'
/Library/Ruby/Site/1.8/puppet/transaction.rb:49:in `apply'
/Library/Ruby/Site/1.8/puppet/transaction.rb:84:in `eval_resource'
/Library/Ruby/Site/1.8/puppet/transaction.rb:104:in `evaluate'
/Library/Ruby/Site/1.8/puppet/util.rb:476:in `thinmark'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
1.8/benchmark.rb:308:in `realtime'
/Library/Ruby/Site/1.8/puppet/util.rb:475:in `thinmark'
/Library/Ruby/Site/1.8/puppet/transaction.rb:104:in `evaluate'
/Library/Ruby/Site/1.8/puppet/transaction.rb:386:in `traverse'
/Library/Ruby/Site/1.8/puppet/transaction.rb:99:in `evaluate'
/Library/Ruby/Site/1.8/puppet/resource/catalog.rb:141:in `apply'
/Library/Ruby/Site/1.8/puppet/configurer.rb:121:in
`retrieve_and_apply_catalog'
/Library/Ruby/Site/1.8/puppet/util.rb:180:in `benchmark'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
1.8/benchmark.rb:308:in `realtime'
/Library/Ruby/Site/1.8/puppet/util.rb:179:in `benchmark'
/Library/Ruby/Site/1.8/puppet/configurer.rb:120:in
`retrieve_and_apply_catalog'
/Library/Ruby/Site/1.8/puppet/configurer.rb:151:in `run'
/Library/Ruby/Site/1.8/puppet/agent.rb:46:in `run'
/Library/Ruby/Site/1.8/puppet/agent/locker.rb:11:in `lock'
/Library/Ruby/Site/1.8/puppet/agent.rb:46:in `run'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
1.8/sync.rb:230:in `synchronize'
/Library/Ruby/Site/1.8/puppet/agent.rb:46:in `run'
/Library/Ruby/Site/1.8/puppet/agent.rb:110:in `with_client'
/Library/Ruby/Site/1.8/puppet/agent.rb:44:in `run'
/Library/Ruby/Site/1.8/puppet/application.rb:172:in `call'
/Library/Ruby/Site/1.8/puppet/application.rb:172:in `controlled_run'
/Library/Ruby/Site/1.8/puppet/agent.rb:42:in `run'
/Library/Ruby/Site/1.8/puppet/agent.rb:85:in `start'
/Library/Ruby/Site/1.8/puppet/external/event-loop/signal-system.rb:
95:in `call'
/Library/Ruby/Site/1.8/puppet/external/event-loop/signal-system.rb:
95:in `__signal__'
/Library/Ruby/Site/1.8/puppet/external/event-loop/signal-system.rb:
95:in `each'
/Library/Ruby/Site/1.8/puppet/external/event-loop/signal-system.rb:
95:in `__signal__'
(eval):2:in `signal'
/Library/Ruby/Site/1.8/puppet/external/event-loop/event-loop.rb:317:in
`sound_alarm'
/Library/Ruby/Site/1.8/puppet/agent.rb:89:in `start'
/Library/Ruby/Site/1.8/puppet/daemon.rb:125:in `start'
/Library/Ruby/Site/1.8/puppet/application/agent.rb:364:in `main'
/Library/Ruby/Site/1.8/puppet/application/agent.rb:319:in
`run_command'
/Library/Ruby/Site/1.8/puppet/application.rb:309:in `run'
/Library/Ruby/Site/1.8/puppet/application.rb:413:in `hook'
/Library/Ruby/Site/1.8/puppet/application.rb:309:in `run'
/Library/Ruby/Site/1.8/puppet/application.rb:404:in `exit_on_fail'
/Library/Ruby/Site/1.8/puppet/application.rb:309:in `run'
/Library/Ruby/Site/1.8/puppet/util/command_line.rb:69:in `execute'
/usr/bin/puppet:4
err: /Stage[main]/Mmv2::System::Groups/Group[com.apple.access_ssh]:
Could not evaluate: old and new mismatch! at /etc/puppet/modules/mmv2/
manifests/system/groups.pp:11

-- 
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 group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.goog

[Puppet Users] RubyCocoa

2011-11-29 Thread Brian Warsing
Hi,

I built a primitive type/provider for computergroups on Mac OS X. To
implement the standard provider#exists? method, I tried to grab a
plist from dscl and compare it with the resource definition. I didn't
get very far...

err: Could not retrieve catalog from remote server: Error 400 on
SERVER: Could not autoload computergroup: Could not autoload /etc/
puppet/modules/mymodule/lib/puppet/provider/computergroup/
computergroup.rb: no such file to load -- osx/cocoa at /etc/puppet/
modules/mymodule/manifests/policy/mcx.pp:20 on node foo.bar.com

I am guessing this to be expected, but I was hoping somebody might be
able to explain why?

Thanks,

--
B.

-- 
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 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.