[Puppet Users] issuse with Puppet Not authorized

2016-07-19 Thread 吕哲
environment: [root@client1 puppet]# more /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.80.28 master.mylab.com master 192.168.80.27 db.mylab.com db 192.168.80.29

[Puppet Users] Can i do this with hiera

2016-07-19 Thread Alex Samad
Hi if I have this hieradata/ |-- common.yaml |-- nodes | `-- dev1.adbc.com.yaml |-- os | `-- RedHat.yaml :hierarchy: # node specific - "nodes/%{::trusted.certname}" # Applicaiton - YB - "ybapplication/%{::pp_ybapplication}" # Envornment - YB - "ybenv/%{::pp_ybenv}" #

Re: [Puppet Users] Hiera Lookups Fail with variables

2016-07-19 Thread Rob Nelson
If the value is nil, then it skips that tier entirely. On Tuesday, July 19, 2016, John Baird wrote: > I was using calling_class as an example. %{calling_module} used to work, > but now does not. Are you aware of what should be used instead? Things > like %{::hostname}

[Puppet Users] Re: Hiera Lookups Fail with variables

2016-07-19 Thread John Baird
I was using calling_class as an example. %{calling_module} used to work, but now does not. Are you aware of what should be used instead? Things like %{::hostname} do not work either. My other real concern is that when using something like "%{calling_module}/random_thing", there is no

[Puppet Users] Re: Hiera Lookups Fail with variables

2016-07-19 Thread Gavin Williams
John Yes, the 'common1' and 'common2' tiers are being ignored because 'calling_class' doesn't expand to anything when running on the command line. Try running hiera -d 'dhcpd::package_name' environment=production calling_class=*x* replacing x with the corresponding class_name you'd expect to

[Puppet Users] Re: Hiera Lookups Fail with variables

2016-07-19 Thread John Baird
If you look at the hiera debug output from the last reply I posted, it clearly shows that several folders with variables are not looked at when it should be. Even if it doesn't find data in those folders, hiera should still explicitly show that it is TRYING to look there, but that doesn't

Re: [Puppet Users] Hiera Lookups Fail with variables

2016-07-19 Thread Rob Nelson
That is correct, when those values are not found, hiera doesn't search those tiers at all. The debug information could be more helpful about it, though. Rob Nelson rnels...@gmail.com On Tue, Jul 19, 2016 at 1:27 PM, Gavin Williams wrote: > John > > I'm pretty sure when

[Puppet Users] Re: puppet 8140 port is not listening

2016-07-19 Thread Jason Hatman
Hello. I had this issue as well. My VM only has 2GB of RAM total and puppetserver was configured to use the same, 2GB. That's why it failed. The puppetserver service never was starting. I edited /etc/default/puppetserver to only allow puppet server to use 1GB and then the service started

Re: [Puppet Users] Hiera Lookups Fail with variables

2016-07-19 Thread Gavin Williams
John I'm pretty sure when you're running hiera on the command line, you need to 'provide' the fact values. See https://docs.puppet.com/hiera/3.2/command_line.html#fact-sources HTH Gav On Tuesday, 19 July 2016 18:14:55 UTC+1, John Baird wrote: > > All files should be readable as they are

Re: [Puppet Users] Hiera Lookups Fail with variables

2016-07-19 Thread John Baird
All files should be readable as they are either 755 or 644. Even if they don't exist, hiera should still attempt to "Search" that path and show me what directories it is searching when doing so with debug on. Since it is not showing the directories with variables, it, for some reason, is

[Puppet Users] Function best approach

2016-07-19 Thread Peter Berghold
Let me preface everything I'm about to say by saying I only started seriously coding in Ruby about a year ago. I've been a Perl guy since 1989 and C/C++ and friends for longer than that so I'm not a total newbie. The question I'm going to ask notwithstanding. :-) What I'm trying to accomplish

[Puppet Users] File_line help (regex?)

2016-07-19 Thread mike r
trying to make sure my grub conf file contains a string, cat /etc/default/grub GRUB_DISABLE_SUBMENU=true GRUB_TERMINAL_OUTPUT="console" *GRUB_CMDLINE_LINUX="crashkernel=auto audit=1 rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet"* GRUB_DISABLE_RECOVERY="true" my manifest has this, $file

[Puppet Users] ssh_authorized_key ensure => absent?

2016-07-19 Thread dkoleary
Hey; I'm trying to add/delete ssh key from a specific user. Adding keys works; however, removing them doesn't. Here's what I have: ssh_authorized_key { 'dkoleary': ensure => absent, key => '[[long_key_snipped]]', type=> 'ssh-dss', user=> 'dkoleary', } Anyone

Re: [Puppet Users] Hiera Lookups Fail with variables

2016-07-19 Thread Rob Nelson
It cannot find the files. Do they exist and are they readable to the user you are running hiera/the puppet master service as? On Monday, July 18, 2016, John Baird wrote: > Attempting to use hiera to hold all of my node-specific variables. It has > been some time since I

[Puppet Users] Hiera Lookups Fail with variables

2016-07-19 Thread John Baird
Attempting to use hiera to hold all of my node-specific variables. It has been some time since I have run a puppet server, but I know it's not THAT hard. That being said, my modules run fine, but hiera is not looking them up correctly. It appears that any lines that contain any variables in

Re: [Puppet Users] Puppet module and Hiera variable access

2016-07-19 Thread Robert Story
On Mon, 18 Jul 2016 20:54:43 +0200 Tobias wrote: TK> for testing Hiera a have written a common.yaml with TK> TK> qmonitoring::db::icinga2_ido_password: "mypwd34" TK> qmonitoring::db::icinga2_webdb_password: "mypwd544" TK> TK> and I have a module named qmonitoring with a class named TK> TK>