Hi! Sorry if this has already been discussed . . .
I have a requirement to disallow root logins on my UK servers, but allow
them on my US servers. I have an sshd_config template and am hoping to use
hiera to get a Yes/No depending on the country. However It seems that
hiera is having a hard time dealing with Yes/No:
[root@gmatzpupmaster hieradata] $ grep estate_root_perm 70-country/u*
70-country/uk.yaml:estate_root_perm: No
70-country/us.yaml:estate_root_perm: Yes
[root@gmatzpupmaster hieradata] $ hiera estate_root_perm mserv_loc=uk
/opt/puppet/lib/ruby/gems/1.8/gems/hiera-puppet-0.3.0/lib/hiera/backend/puppet_backend.rb:41:in
`lookup': uninitialized constant Hiera::Backend::Puppet_backend::Puppet
(NameError)
from
/opt/puppet/lib/ruby/gems/1.8/gems/hiera-0.3.0/lib/hiera/backend.rb:160:in
`lookup'
from
/opt/puppet/lib/ruby/gems/1.8/gems/hiera-0.3.0/lib/hiera/backend.rb:157:in
`each'
from
/opt/puppet/lib/ruby/gems/1.8/gems/hiera-0.3.0/lib/hiera/backend.rb:157:in
`lookup'
from /opt/puppet/lib/ruby/gems/1.8/gems/hiera-0.3.0/lib/hiera.rb:59:in
`lookup'
from /opt/puppet/lib/ruby/gems/1.8/gems/hiera-0.3.0/bin/hiera:208
from /opt/puppet/bin/hiera:19:in `load'
from /opt/puppet/bin/hiera:19
[root@gmatzpupmaster hieradata] $ hiera estate_root_perm mserv_loc=us
true
If I change the value to something else it works:
[root@gmatzpupmaster hieradata] $ vi 70-country/u*
2 files to edit
[root@gmatzpupmaster hieradata] $ grep estate_root_perm 70-country/u*
70-country/uk.yaml:estate_root_perm: ukukukuk
70-country/us.yaml:estate_root_perm: usususus
[root@gmatzpupmaster hieradata] $ hiera estate_root_perm mserv_loc=uk
ukukukuk
[root@gmatzpupmaster hieradata] $ hiera estate_root_perm mserv_loc=us
usususus
Any thoughts?
Thanks a lot,
Guy
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.