Re: [Puppet Users] Re: puppetlabs-postgrest module not loaded
Hello, Its configuration file is hiera.yaml, and path depends on how it is invoked, which can be one of the following ways: -When Is invoked from puppet, the path will be: /etc/puppet/hiera.yaml -When Is invoked from CLI or when used in the Ruby code: /etc/hiera.yaml So you have to see for the rights. The establishment of a hierarchy allows control over the deployment of modules. By including the package in the common file. The entire node receive packages. Hence the use of the hierarchy for that installed on one or more dedicated server for application. The problem here is that it does not find the class PostgreSQL. We must therefore indicate the missing class. http://docs.puppetlabs.com/hiera/1/puppet.html#assigning-classes-to-nodes-with-hiera-hierainclude http://docs.puppetlabs.com/hiera/1/complete_example.html Le mardi 8 septembre 2015 16:19:39 UTC+2, jcbollinger a écrit : > > > > On Friday, September 4, 2015 at 6:54:52 AM UTC-5, David Levray wrote: >> >> Thanks for your return. >> >> It is noted that hiera your search directly in the common.yaml, it is not >> your path hierarchy. >> > > > Oh, come on. It is not erroneous to have an Hiera hierarchy consisting of > only one level. Correct operation of Hiera does not depend on there being > more than one, as evidenced, for example, by the fact that Alfredo's > configuration *has been working for him* except with respect to > postgres. All appearances point to the issue being associated with the > details of the data that Hiera is providing to Puppet, not Hiera's general > configuration. > > > >> >> >> Here's an example search or hiera good in the order of hierarchy: >> >> My hierarchy is: >> >> >> :hierarchy: >> >> - "node/%{fqdn}" >> >> - "virtual/%{virtual}" >> >> - "osfamily/%{osfamily}" >> >> - common >> >> >> > > > Very good, but Alfredo's hierarchy does not need to look like yours. > > > >> >> >> >> >> So check the following: >> >> 1 / verifies that the file points /etc/hiera.yaml of your file >> /etc/puppet/hiera.yaml: >> >> ls -rtla /etc/hiera.yaml >> >> /etc/hiera.yaml -> /etc/puppet/hiera.yaml >> >> >> >> 2 / Check the owners: >> >> Chown puppet: puppet /etc/puppet/hiera.yaml >> >> Chown -R puppet: puppet / etc / puppet / hieradata / >> >> >> > > > Hiera data files do not need to be owned by 'puppet' so long as 'puppet' > can read them. In fact, it is better for them to be owned by root and > writable only by root, for, as a general rule, it is preferable for > services to be unable to modify their own data and configuration. That > reduces the surface area accessible to malicious actors. > > > 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 view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/83b7272f-d037-40ba-bce4-27dccbf67176%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Re: puppetlabs-postgrest module not loaded
Hello, sorry, but I do understand your réponce: but if I change something on the nodes/puppet-sql.alflab.net it gets reflected into the node with the new catalog. Mysql installed? different commands past returns 'nil': >> DEBUG: Fri Sep 04 20:19:04 +1000 2015: Looking up postgresql::server >> in YAML backend >> DEBUG: Fri Sep 04 20:19:04 +1000 2015: Looking for data source common >> nil This is possible because no variable is configured. The easiest thing to set the configuration in common (to start) and set the hierarchy problem after. Exemple: comon.yaml: --- ssh::server_options: Port: '22' Restart instance Puppet, and then repeat the search: hiera -d -h ssh::server_options DEBUG: Mon Sep 07 12:24:09 + 2015: Hiera YAML backend starting DEBUG: Mon Sep 07 12:24:09 + 2015: Looking up ssh::server_options in YAML backend DEBUG: Mon Sep 07 12:24:09 + 2015: Looking for data source common DEBUG: Mon Sep 07 12:24:09 + 2015: Found ssh::server_options in common {"PermitEmptyPasswords"=>"no", "AcceptEnv"=>"LANG LC_*", "MaxAuthTries"=>"3", "PasswordAuthentication"=>"yes", "AuthorizedKeysFile"=>"%h/.ssh/authorized_keys", "PubkeyAuthentication"=>"yes", "Banner"=>"/etc/issue.net", "ListenAddress"=>["127.0.0.0", "0.0.0.0"], "Subsystem"=>"sftp /usr/libexec/openssh/sftp-server", "PermitRootLogin"=>"yes", "PrintMotd"=>"yes", "X11Forwarding"=>"no", "Port"=>"22", "StrictModes"=>"yes", "SyslogFacility"=>"AUTHPRIV", "Protocol"=>"2", "AllowGroups"=>"*", "AFSTokenPassing"=>"no", "AllowUsers"=>"*", "ChallengeResponseAuthentication"=>"no", "AllowTcpForwarding"=>"no", "UsePAM"=>"yes"} Le lundi 7 septembre 2015 13:42:41 UTC+2, Alfredo De Luca a écrit : > > Hi David. > Here is the output > > > [root@puppet-server puppet]# ls -rtla /etc/hiera.yaml > lrwxrwxrwx 1 root root 22 Sep 4 14:46 /etc/hiera.yaml -> > /etc/puppet/hiera.yaml > [root@puppet-server puppet]# > > > > The owner was root so I changed it as per your suggestions so now it's > puppet. > But still can't search with hiera. it seems to lookup only in common > but if I change something on the nodes/puppet-sql.alflab.net it gets > reflected into the node with the new catalog. > > weird > Alfredo > > > > > On Fri, Sep 4, 2015 at 9:54 PM, David Levray <dle...@gmail.com > > wrote: > > Thanks for your return. > > > > It is noted that hiera your search directly in the common.yaml, it is > not > > your path hierarchy. > > > > > > > > Here's an example search or hiera good in the order of hierarchy: > > > > My hierarchy is: > > > > > > :hierarchy: > > > > - "node/%{fqdn}" > > > > - "virtual/%{virtual}" > > > > - "osfamily/%{osfamily}" > > > > - common > > > > > > > > > > > > # hiera -d -m toto.local sudo::configs > > > > DEBUG: Fri Sep 04 11:36:29 + 2015: Hiera YAML backend starting > > > > DEBUG: Fri Sep 04 11:36:29 + 2015: Looking up sudo::configs in YAML > > backend > > > > DEBUG: Fri Sep 04 11:36:29 + 2015: Looking for data source > > node/toto.local > > > > DEBUG: Fri Sep 04 11:36:29 + 2015: Cannot find datafile > > /etc/puppet/hieradb/node/ toto.local .yaml, skipping > > > > DEBUG: Fri Sep 04 11:36:29 + 2015: Looking for data source > > virtual/vmware > > > > DEBUG: Fri Sep 04 11:36:29 + 2015: Cannot find datafile > > /etc/puppet/hieradb/virtual/vmware.yaml, skipping > > > > DEBUG: Fri Sep 04 11:36:29 + 2015: Looking for data source > > osfamily/RedHat > > > > DEBUG: Fri Sep 04 11:36:29 + 2015: Cannot find datafile > > /etc/puppet/hieradb/osfamily/RedHat.yaml, skipping > > > > DEBUG: Fri Sep 04 11:36:29 + 2015: Looking for data source common > > > > DEBUG: Fri Sep 04 11:36:29 + 2015: Found sudo::configs in common > > > > {"toto"=>{"content"=>"toto ALL=(ALL) NOPASSWD: ALL"}} > > > > > > > > > > > > > > >
[Puppet Users] Re: SSL Cert's are generated but not saved
Hello, look in /var/lib/puppet/ssl Your directry SSL is setting in file puppet.conf. exemple: vardir = /var/lib/puppet ssldir = $vardir/ssl Look your puppet.conf by Le mercredi 2 septembre 2015 22:14:24 UTC+2, Michael Holt a écrit : > > Hi, > > I'm working on using puppet to manage a fleet of Mac's. I have run the > puppet in the background while at the mac login window after > /etc/puppet/puppet.conf is configured. > > puppet.conf: > [master] > # These are needed when the puppetmaster is run by passenger > # and can safely be removed if webrick is used. > ssl_client_header = SSL_CLIENT_S_DN > ssl_client_verify_header = SSL_CLIENT_VERIFY > pluginsync=true > > [agent] > ##This is managed by puppet > server=puppetserverurl > certname=c02n5heug3qj > report=true > pluginsync=true > environment=macs > > Puppet Agent command: > sudo /usr/bin/puppet agent --detailed-exitcodes --onetime --no-daemonize > --verbose --environment macs --waitforcert 20 > > it is run by a LaunchDaemon. It runs sucessfully once and my settings are > applied but the SSL certs are not saved in /etc/puppet/ssl > > I've been looking all over and can't find anyone with this issue. Does > anyone have any pointers? > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/547f2d3e-f6ee-41ac-a37f-ed5c399ec260%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Re: puppetlabs-postgrest module not loaded
Thanks for your return. It is noted that hiera your search directly in the common.yaml, it is not your path hierarchy. Here's an example search or hiera good in the order of hierarchy: My hierarchy is: :hierarchy: - "node/%{fqdn}" - "virtual/%{virtual}" - "osfamily/%{osfamily}" - common # hiera -d -m toto.local sudo::configs DEBUG: Fri Sep 04 11:36:29 + 2015: Hiera YAML backend starting DEBUG: Fri Sep 04 11:36:29 + 2015: Looking up sudo::configs in YAML backend DEBUG: Fri Sep 04 11:36:29 + 2015: Looking for data source *node* /toto.local DEBUG: Fri Sep 04 11:36:29 + 2015: Cannot find datafile */etc/puppet/hieradb/node*/ toto.local .yaml, skipping DEBUG: Fri Sep 04 11:36:29 + 2015: Looking for data source *virtual/* vmware DEBUG: Fri Sep 04 11:36:29 + 2015: Cannot find datafile */etc/puppet/hieradb/virtual/*vmware.yaml, skipping DEBUG: Fri Sep 04 11:36:29 + 2015: Looking for data source *osfamily* /RedHat DEBUG: Fri Sep 04 11:36:29 + 2015: Cannot find datafile */etc/puppet/hieradb/osfamily*/RedHat.yaml, skipping DEBUG: Fri Sep 04 11:36:29 + 2015: Looking for data source *common* DEBUG: Fri Sep 04 11:36:29 + 2015: *Found sudo::configs in common* {"toto"=>{"content"=>"toto ALL=(ALL) NOPASSWD: ALL"}} So check the following: 1 / verifies that the file points /etc/hiera.yaml of your file /etc/puppet/hiera.yaml: ls -rtla /etc/hiera.yaml /etc/hiera.yaml -> /etc/puppet/hiera.yaml 2 / Check the owners: Chown puppet: puppet /etc/puppet/hiera.yaml Chown -R puppet: puppet / etc / puppet / hieradata / Restart your instance Puppet Master for the changes to take effect. Le vendredi 4 septembre 2015 12:21:15 UTC+2, Alfredo De Luca a écrit : > > Hi David. > Here is the output. > [root@puppet-server puppet]# hiera -d postgresql::server > DEBUG: Fri Sep 04 20:18:29 +1000 2015: Hiera YAML backend starting > DEBUG: Fri Sep 04 20:18:29 +1000 2015: Looking up postgresql::server > in YAML backend > DEBUG: Fri Sep 04 20:18:29 +1000 2015: Looking for data source common > nil > [root@puppet-server puppet]# hiera -d postgresql::server > DEBUG: Fri Sep 04 20:19:04 +1000 2015: Hiera YAML backend starting > DEBUG: Fri Sep 04 20:19:04 +1000 2015: Looking up postgresql::server > in YAML backend > DEBUG: Fri Sep 04 20:19:04 +1000 2015: Looking for data source common > nil > > [root@puppet-server puppet]# > [root@puppet-server puppet]# hiera -d sudo::configs fqdn= > puppet-sql.alflab.net > DEBUG: Fri Sep 04 20:19:17 +1000 2015: Hiera YAML backend starting > DEBUG: Fri Sep 04 20:19:17 +1000 2015: Looking up sudo::configs in YAML > backend > DEBUG: Fri Sep 04 20:19:17 +1000 2015: Looking for data source common > nil > [root@puppet-server puppet]# hiera -d -a postgresql::server > fqdn=puppet-sql.alflab.net > DEBUG: Fri Sep 04 20:19:23 +1000 2015: Hiera YAML backend starting > DEBUG: Fri Sep 04 20:19:23 +1000 2015: Looking up postgresql::server > in YAML backend > DEBUG: Fri Sep 04 20:19:23 +1000 2015: Looking for data source common > nil > [root@puppet-server puppet]# hiera -d -h postgresql::server > fqdn=puppet-sql.alflab.net > DEBUG: Fri Sep 04 20:19:31 +1000 2015: Hiera YAML backend starting > DEBUG: Fri Sep 04 20:19:31 +1000 2015: Looking up postgresql::server > in YAML backend > DEBUG: Fri Sep 04 20:19:31 +1000 2015: Looking for data source common > nil > > > On Fri, Sep 4, 2015 at 2:06 AM, David Levray <dle...@gmail.com > > wrote: > > In /etc/puppet/hieradata/nodes/ create a file > 'puppet-sql.alflab.net.yaml' > > that contains: > > > > --- > > postgresql::server: > > > > > > restart your instance PuppetMaster (service httpd/apache2 restart) > > Then we test hiera debug mode if it finds the information: > > > > hiera -d postgresql::server > > hiera -d sudo::configs fqdn=puppet-sql.alflab.net > > > > or (for array) > > hiera -d -a postgresql::server fqdn=puppet-sql.alflab.net > > > > or (for hash): > > hiera -d -h postgresql::server fqdn=puppet-sql.alflab.net > > > > > > Can you give the return orders, please > > > > > > > > > > > > > > Le samedi 29 août 2015 06:31:29 UTC+2, Alfredo De Luca a écrit : > >> > >> Hi all. > >> Using Puppet open source 3.8 with hiera for test purpose. > >> > >> I installed puppetlabs-postgresql from forge but when on my puppet > >> client yaml I use postgresql I got the following error: > >> > >> > >> Error: Could not retrieve catalog from remote server: Error 400
[Puppet Users] Re: Display the contents of a yaml file
Hi, Look: hiera-file: designed by Adrien Thebo to manage a data type that previously could not be stored in a healthy way in Hiera, that is, simple files. or hiera-http and hiera-mysql: are other powerful backends Hiera written by Craig Dunn. They allow us to recover our data either via a REST interface or MySQL queries on a database. Le vendredi 4 septembre 2015 10:35:04 UTC+2, Sergiu Cornea a écrit : > > Thank you John, > > Thank you for your answer and sorry for the ambiguity. > > The YAML file I am referring to is the node's YAML file such as in the > Puppet's NTP complete example: > > --- classes: - ntp - apache - postfix ntp::restrict: - ntp::autoupdate: > false ntp::enable: true ntp::servers: - 0.us.pool.ntp.org iburst - > 1.us.pool.ntp.org iburst - 2.us.pool.ntp.org iburst - 3.us.pool.ntp.org > iburst > > What I was looking for it was a way of displaying the node's YAML file > using Puppet or Foreman's Web API. > > Once again thank you for your help. > > Kind regards, > Sergiu > > On Thursday, 3 September 2015 09:10:42 UTC+1, Sergiu Cornea wrote: >> >> Good morning guys, >> >> I am not sure if I am asking the right question, however, I am looking >> for a Puppet / Foreman Web API that when called with a node name it will >> display the contents of that YAML file? The reason why I am asking is that >> I want a particular node YAML file to be displayed in a WebUI. >> >> Does anyone knows how to do this? >> >> Thank you, >> >> Regards, >> Sergiu >> > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/7700e5c1-96f1-4093-915e-bd64783da439%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Re: Installing foreman
Hi, install foreman : 1/ foreman-installer -i 2/ unselect puppet 3/ select : Configure foreman Configure foreman_proxy Configure foreman_cli if use foreman with vmware: Configure foreman_compute_vmware if use foreman with kvm: Configure foreman_compute_libvirt that communicates with puppet foreman, configure the foreman_proxy in /etc/foreman-proxy/settings.yml and /etc/foreman-proxy/settings.d/puppet.yml By Le jeudi 3 septembre 2015 14:58:55 UTC+2, Vishal Goel a écrit : > > Hi! I want to install foreman on a* debain squeeze* machine. It has *puppet > 2.7.18 *installed and is already in development as a puppetmaster. It has > been deploying on a lot of slave machines. I looked up a lot on google but > the links that I found install puppetmster on machine as well which I don't > want to. > > So, what should I do? > > Thank you. > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/6a7b3219-8e88-41bc-81d4-740de418f570%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Re: puppetlabs-postgrest module not loaded
In /etc/puppet/hieradata/nodes/ create a file 'puppet-sql.alflab.net.yaml' that contains: --- postgresql::server: restart your instance PuppetMaster (service httpd/apache2 restart) Then we test hiera debug mode if it finds the information: hiera -d postgresql::server hiera -d sudo::configs fqdn=puppet-sql.alflab.net or (for array) hiera -d -a postgresql::server fqdn=puppet-sql.alflab.net or (for hash): hiera -d -h postgresql::server fqdn=puppet-sql.alflab.net Can you give the return orders, please Le samedi 29 août 2015 06:31:29 UTC+2, Alfredo De Luca a écrit : > > Hi all. > Using Puppet open source 3.8 with hiera for test purpose. > > I installed puppetlabs-postgresql from forge but when on my puppet > client yaml I use postgresql I got the following error: > > > Error: Could not retrieve catalog from remote server: Error 400 on > SERVER: Could not find class postgresql for puppet-sql.alflab.net on > node puppet-sql.alflab.net > > > Any clue why? > > Here is the yaml file > > --- > classes: > - sudo > - selinux > - postgresql > > All the rest is working just fine. Also I tried puppetlabs-mysql but > same error. > > Regards > > -- > Alfredo > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/6a741c4e-35ad-43c2-bb2d-3c48c7bc558c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Re: Puppetboard : PuppetDB not available Error
netstat -laputen | grep 8080 ?? Le mardi 1 septembre 2015 19:39:40 UTC+2, Gopal Reddy a écrit : > > Hi, > > I am trying to configure puppetboard in my environment. We are using > opensource puppet. > > Have a Seperate Puppet master, Postgres, puppetDB+puppetboard. > > ERROR > = > Internal Server Error > > This error usually occurs because: > >- We were unable to reach PuppetDB; >- The query to be executed was malformed resulting in an incorrectly >encoded request. > > Please have a look at the log output for further information. > > > Below is what I am doing. > > Installed puppetboard using "pip install pythonboard" > > settings.py > cat settings.py > PUPPETDB_HOST = 'sjc-it-pdb001.mydomain.com' > PUPPETDB_PORT = 8080 > #PUPPETDB_SSL_VERIFY = /etc/puppetdb/ssl/ca.pem > #PUPPETDB_KEY = /etc/puppetdb/ssl/private.pem > #PUPPETDB_CERT = /etc/puppetdb/ssl/public.pem > PUPPETDB_TIMEOUT = 20 > DEV_LISTEN_HOST = '127.0.0.1' > DEV_LISTEN_PORT = 5000 > UNRESPONSIVE_HOURS = 2 > ENABLE_QUERY = True > LOGLEVEL = 'info' > > Apache Configuration File > = > > ServerName sjc-it-pdb001.mydomain.com > WSGIDaemonProcess puppetboard user=apache group=apache threads=5 > WSGIScriptAlias / /var/www/puppetboard/wsgi.py > ErrorLog /var/log/httpd/puppetboard.error.log > CustomLog /var/log/httpd/puppetboard.access.log combined > > Alias /static /usr/lib/python2.7/site-packages/puppetboard/static > > Satisfy Any > Allow from all > > > > WSGIProcessGroup puppetboard > WSGIApplicationGroup %{GLOBAL} > Require all granted > > > > > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/46936b67-0e89-4f9b-bbb7-6e00896ca642%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Re: puppetlabs-postgrest module not loaded
Hello, please : cat hiera.yaml puppet module list puppet module list --environment xxx (xx = environment your node) ty Le samedi 29 août 2015 06:31:29 UTC+2, Alfredo De Luca a écrit : > > Hi all. > Using Puppet open source 3.8 with hiera for test purpose. > > I installed puppetlabs-postgresql from forge but when on my puppet > client yaml I use postgresql I got the following error: > > > Error: Could not retrieve catalog from remote server: Error 400 on > SERVER: Could not find class postgresql for puppet-sql.alflab.net on > node puppet-sql.alflab.net > > > Any clue why? > > Here is the yaml file > > --- > classes: > - sudo > - selinux > - postgresql > > All the rest is working just fine. Also I tried puppetlabs-mysql but > same error. > > Regards > > -- > Alfredo > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/9835033d-4c83-4e53-b604-cf316c9239e0%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.