[Puppet Users] Re: Could not autoload puppet/provider/apt_key/apt_key
Hi, it seems, we have to upgrade to Puppet7. The error is gone, with this version. Denny Fuchs schrieb am Freitag, 23. Februar 2024 um 16:10:02 UTC+1: > Hello, > > because of Bookworm and apt-key, we have to upgrade apt and stdlib on our > Puppet6 Server. I've get on all nodes with Debian Buster: > > Error: Could not autoload puppet/provider/apt_key/apt_key: > /etc/puppetlabs/code/environments/newmod/modules/apt/lib/puppet/provider/apt_key/apt_key.rb:100: > > syntax error, unexpected ']' > ... key_long: fingerprint[-16..], # last 16 characters of fin... > ... ^ > /etc/puppetlabs/code/environments/newmod/modules/apt/lib/puppet/provider/apt_key/apt_key.rb:101: > > syntax error, unexpected ']' > ... key_short: fingerprint[-8..], # last 8 characters of fing... > ... ^ > /etc/puppetlabs/code/environments/newmod/modules/apt/lib/puppet/provider/apt_key/apt_key.rb:103: > > syntax error, unexpected tLABEL, expecting '=' > key_type: nil, > ^ > /etc/puppetlabs/code/environments/newmod/modules/apt/lib/puppet/provider/apt_key/apt_key.rb:103: > > Can't assign to nil > key_type: nil, >^ > /etc/puppetlabs/code/environments/newmod/modules/apt/lib/puppet/provider/apt_key/apt_key.rb:104: > > syntax error, unexpected ',', expecting keyword_end > ...ed: Time.at(pub_split[5].to_i), > ... ^ > /etc/puppetlabs/code/environments/newmod/modules/apt/lib/puppet/provider/apt_key/apt_key.rb:105: > > syntax error, unexpected ',', expecting keyword_end > ...y_expired: pub_split[1] == 'e', > ... ^ > /etc/puppetlabs/code/environments/newmod/modules/apt/lib/puppet/provider/apt_key/apt_key.rb:107: > > syntax error, unexpected '}', expecting keyword_end > } > ^ > Error: Failed to load custom type 'apt_key' from > '/etc/puppetlabs/code/environments/newmod/modules/apt/lib/puppet/type/apt_key.rb': > > Could not autoload puppet/provider/apt_key/apt_key: > /etc/puppetlabs/code/environments/newmod/modules/apt/lib/puppet/provider/apt_key/apt_key.rb:100: > > syntax error, unexpected ']' > > any idea, what happens ? I've tried also > > puppet generate types --environment ... > > but without success ... > > any suggestions ? > > cu denny > > -- 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/e5e7207e-951c-40bf-bc1c-0dc4aeec3d53n%40googlegroups.com.
[Puppet Users] Could not autoload puppet/provider/apt_key/apt_key
Hello, because of Bookworm and apt-key, we have to upgrade apt and stdlib on our Puppet6 Server. I've get on all nodes with Debian Buster: Error: Could not autoload puppet/provider/apt_key/apt_key: /etc/puppetlabs/code/environments/newmod/modules/apt/lib/puppet/provider/apt_key/apt_key.rb:100: syntax error, unexpected ']' ... key_long: fingerprint[-16..], # last 16 characters of fin... ... ^ /etc/puppetlabs/code/environments/newmod/modules/apt/lib/puppet/provider/apt_key/apt_key.rb:101: syntax error, unexpected ']' ... key_short: fingerprint[-8..], # last 8 characters of fing... ... ^ /etc/puppetlabs/code/environments/newmod/modules/apt/lib/puppet/provider/apt_key/apt_key.rb:103: syntax error, unexpected tLABEL, expecting '=' key_type: nil, ^ /etc/puppetlabs/code/environments/newmod/modules/apt/lib/puppet/provider/apt_key/apt_key.rb:103: Can't assign to nil key_type: nil, ^ /etc/puppetlabs/code/environments/newmod/modules/apt/lib/puppet/provider/apt_key/apt_key.rb:104: syntax error, unexpected ',', expecting keyword_end ...ed: Time.at(pub_split[5].to_i), ... ^ /etc/puppetlabs/code/environments/newmod/modules/apt/lib/puppet/provider/apt_key/apt_key.rb:105: syntax error, unexpected ',', expecting keyword_end ...y_expired: pub_split[1] == 'e', ... ^ /etc/puppetlabs/code/environments/newmod/modules/apt/lib/puppet/provider/apt_key/apt_key.rb:107: syntax error, unexpected '}', expecting keyword_end } ^ Error: Failed to load custom type 'apt_key' from '/etc/puppetlabs/code/environments/newmod/modules/apt/lib/puppet/type/apt_key.rb': Could not autoload puppet/provider/apt_key/apt_key: /etc/puppetlabs/code/environments/newmod/modules/apt/lib/puppet/provider/apt_key/apt_key.rb:100: syntax error, unexpected ']' any idea, what happens ? I've tried also puppet generate types --environment ... but without success ... any suggestions ? cu denny -- 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/ca193b1b-72bb-4da6-a8ba-844df098ad2cn%40googlegroups.com.
[Puppet Users] custom_fact broke with 7.x (Facter.puppet_vardir)
ne, where it breaks is: Facter.puppet_vardir can someone give me a hint, how we can solve it ? the full fact is: #!/usr/bin/env ruby # Puppet classes and modules as facts # Source: modules/custom/lib/facter/classes.rb require 'facter' begin Facter.puppet_vardir rescue Facter.loadfacts() end vardir=Facter.value("puppet_vardir") statedir="#{vardir}/state" classes_file="#{statedir}/classes.txt" if File.exists?(classes_file) #File exists, load it. f=File.open(classes_file, 'r') classes_hash = {} modules_array = [] File.foreach(classes_file) do |l| modules_array << l.chomp.gsub(/::.*/, '') end modules_array = modules_array.sort.uniq modules_array.each do |i| classes_array = [] classes_array << i File.foreach(classes_file) do |l| classes_array << l.chomp if l =~ /^#{i}/ classes_array = classes_array.sort.uniq end classes_hash[i] = classes_array end Facter.add(:puppet_modules) do confine :kernel => 'Linux' setcode do modules_array.sort.uniq.join(', ').to_s end end Facter.add(:puppet_classes) do confine :kernel => 'Linux' setcode do classes_hash.map { |_k, v| v }.sort.uniq.join(', ').to_s end end end cu denny -- 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/4cd5ad31-ef7e-4cd4-a838-4600f3f6d43cn%40googlegroups.com.
[Puppet Users] PuppetDB / hiera and Sensitive() questions
Hello, - Puppet: node: 3.7.2-4 / puppet server: 2.7.2-1puppetlabs1 / puppetdb: 4.4.0-1puppetlabs1 - Distribution: Debian Jessie - Module version: latest I have some questions about the Sensitive() function: I've *rewritten* my config to something like this: class profile::grafana::base ( ... $grafana_database_password = Sensitive(hiera('monitoring::grafana::database::password')), ... ) { ... $database_cfg = { database => { type => 'mysql', host => "${database_server}:3306", name => "$grafana_database", user => "$grafana_database_user", password => $grafana_database_password.unwrap, } } The first question is: Is that correct ? I found the password in cleartext in the PuppetDB, but I don't know, if I have to clear the database first, to get rid all of the sensitive values,or if PuppetDB removes the passwords automatically after some time. The second question is: How looks like a plain hieradata line, to tell Puppet it is a sensitive value ? For Example: icinga2::feature::idomysql::password: "%{hiera('monitoring::icinga::mysql_password')}" icinga2::feature::idomysql::database: "%{hiera('monitoring::icinga::mysql_db')}" The password itself is stored in hiera-eyaml but I don't want to find it in the Puppetdb or logs. Should I ask the module maintainer to support it, or is it possible to do it on my own? cu denny -- 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/e4896bec-0f88-4cf8-a7e7-14c49dc1c839%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Re: merge / extend variable hiera_hash() + inline_template
hi, solved by switching to a custom fact function: classes_file = '/var/lib/puppet/state/classes.txt' classes_hash = {} modules_array = [] File.foreach(classes_file) do |l| modules_array << l.chomp.gsub(/::.*/, '') end modules_array = modules_array.sort.uniq modules_array.each do |i| classes_array = [] classes_array << i File.foreach(classes_file) do |l| classes_array << l.chomp if l =~ /^#{i}/ classes_array = classes_array.sort.uniq end classes_hash[i] = classes_array end Facter.add(:puppet_modules, :timeout => 10) do confine :kernel => 'Linux' setcode do modules_array.sort.uniq.join(', ').to_s end end Facter.add(:puppet_classes, :timeout => 10) do confine :kernel => 'Linux' setcode do classes_hash.map { |_k, v| v }.sort.uniq.join(', ').to_s end end from https://www.netways.de/fileadmin/images/Events_Trainings/Events/OSMC/2015/Slides_2015/The_Road_to_lazy_Monitoring_with_Icinga2_and_Puppet-Tom_De_Vylder.pdf which gives me a hash back, instead of an array. cu denny -- 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/90e3c2a5-e78b-4ebe-b32c-c67216a1a2ec%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] merge / extend variable hiera_hash() + inline_template
Hello, I have the following construct class profile::icinga2::agent ( String $monitoring_host = "mon-01.example.com", String $monitoring_ip = "192.168.1.1", ){ ... @@::icinga2::object::host { $::fqdn: display_name => $::fqdn, address => $::ipaddress, check_command => 'hostalive', vars => hiera_hash('icinga_vars', {} ), target=> "/etc/icinga2/zones.d/master/${::fqdn}.conf" } ... } That works fine, to get my values out my hieradata/common.yaml. Now I need to extend the variable "vars" with: ... vars => { puppet_classes => inline_template ('<%= classes.sort.join(" ") %>'), }, How can I get both in "vars" ? cu denny -- 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/819414e1-2f5e-4aa8-84e1-0f1e9b79e66c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Need Ruby help for facts (inline_template) --> <%= classes.collect { |k, v| v }.sort.join(" ") %> --> empty
hi, I've found the reason. The class profile::icinga2::agent must be loaded after all other classes. Than I get all classes from the node back. cu denny -- 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/215688c3-159a-4ee7-98be-96d940577989%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Need Ruby help for facts (inline_template) --> <%= classes.collect { |k, v| v }.sort.join(" ") %> --> empty
hi, what is very interesting: If I'm go back to my old vars=> hiera_hash('icinga_vars', {}), and adding to hieradata/common.yaml puppet_classes: "%{::classes}" than I get back all classes, but with the "[" "]" vars.puppet_classes = "["settings", "augeas::files"]" So, it seems, that only the classes are listed, which are from the manifest of my class "profile::icinga2::agent", which is included via "include profile::icinga2::agent" in the node manifest. cu denny -- 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/d5381c79-6c11-44ce-8056-6a309a45deaf%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Need Ruby help for facts (inline_template) --> <%= classes.collect { |k, v| v }.sort.join(" ") %> --> empty
hi Derek, Am Montag, 17. April 2017 21:50:37 UTC+2 schrieb Derek Harkness: > > In your example it looks like classes is an array not a hash. Should be > able to just do classes.join(“ “). > > Derek > > I tried it, as the "module" example uses only .join. It works only for a few classes (13 in numbers): + vars.puppet_classes = "base::root::password host.domain.local icinga2 icinga2::config icinga2::feature::api icinga2::feature::checker icinga2::feature::mainlog icinga2::install icinga2::params icinga2::repo icinga2::service profile::icinga2::agent settings" but facter -p classes --yaml | wc -l 96 so I have over 90 classes which are not shown. Very strange. Is there a limit ? cu denny -- 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/aac02373-1bc3-4e03-8cd0-328aaba9029c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Re: Need Ruby help for facts (inline_template) --> <%= classes.collect { |k, v| v }.sort.join(" ") %> --> empty
hi, I tried to use ".each" instead of ".collect" in the inline_template and than I get "some" output, but only a few classes and not all": + vars.puppet_classes = "base::root::password icinga2 icinga2::config icinga2::feature::api icinga2::feature::checker icinga2::feature::mainlog icinga2::install icinga2::params icinga2::repo icinga2::service profile::icinga2::agent settings" instead of ~30. strange. -- 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/4577e615-4881-49c4-b1cb-140214c6be79%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Need Ruby help for facts (inline_template) --> <%= classes.collect { |k, v| v }.sort.join(" ") %> --> empty
Hello, for my Icinga2, I want to add all classes to vars, like described in https://goo.gl/z798HG (page 41). I added the sjoeboo/puppet-common module, which gives me all classes as a fact: facter -p classes ["settings", "host.foo.local", "base::root::password", "icinga2::params", "icinga2", ... ] facter -p classes --yaml --- classes: - settings - host.foo.local - "base::root::password" - "icinga2::params" - icinga2 I tried the line: [...] puppet_classes => inline_template( '<%= classes.collect { |k, v| v }.sort.join(" ") %>' ), [...] so that in the end... vars.settings vars.host.foo.local vars.base vars.icinga2 is generated for the Icinga2 monitoring host. But in my case, the following is generated instead: + vars.puppet_classes = "" Maybe, the howto is a bit older and the syntax was changed a bit. We use the Puppet 3.7.2-4 agent. Any suggestions are very welcome :-) cu denny -- 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/d20e6894-1379-4039-855d-9babfa447be6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] writing custom fact -> return value not as expected
Thank you guys for the clarification! Stupid question #2: How do I get facter use LC_ALL=en_US.UTF-8 instead of LC_ALL=C? A simple add to my Facter::Util::Resolution.exec("...") did not work, of course. Denny Am Mittwoch, 11. Januar 2017 08:07:06 UTC+1 schrieb Dirk Heinrichs: > > Am 10.01.2017 um 22:29 schrieb Stefan Schulte: > > % LC_ALL=de_DE.utf8 /usr/bin/who -b |awk '{print $3}' > > 19:34 > > % LC_ALL=en_US.utf8 /usr/bin/who -b |awk '{print $3}' > > 2017-01-10 > > > Interesting. On my system, there's no difference between them (left out > the awk part for clarity): > > % LC_ALL=en_US.UTF-8 who -b > system boot 2017-01-02 11:10 > % LC_ALL=de_DE.UTF-8 who -b > system boot 2017-01-02 11:10 > > % LC_ALL=C /usr/bin/who -b |awk '{print $3}' > > Jan > > > Only here: > > % LC_ALL=C who -b > system boot Jan 2 11:10 > > Bye... > > Dirk > -- > *Dirk Heinrichs* > Senior Systems Engineer, Delivery Pipeline > OpenTextTM Discovery | Recommind > *Email*: dirk.he...@recommind.com > *Website*: www.recommind.de > > Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach > > Vertretungsberechtigte Geschäftsführer John Marshall Doolittle, Gordon > Davies, Roger Illing, Registergericht Amtsgericht Bonn, Registernummer HRB > 10646 > > This e-mail may contain confidential and/or privileged information. If you > are not the intended recipient (or have received this e-mail in error) > please notify the sender immediately and destroy this e-mail. Any > unauthorized copying, disclosure or distribution of the material in this > e-mail is strictly forbidden > > Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte > Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail > irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und > vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte > Weitergabe dieser Mail sind nicht gestattet. > > www.recommind.com > -- 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/45ad386c--46a9-a027-139653b7735e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Re: writing custom fact -> return value not as expected
Tried out another customfact "lastyumupdate" which looks like: Facter.add(:lastyumupdate) do setcode do Facter::Util::Resolution.exec("yum history |grep -E '^.*(Update| U).*$' |head -n 1 |awk '{print $6}'") end end This one returns on command line "2017-01-10" AND sets the fact correct $ puppet facts |grep last "lastrebootdate": "Jan", "lastyumupdate": "2017-01-10", Any help is appreciated :) Denny Am Dienstag, 10. Januar 2017 17:47:36 UTC+1 schrieb Denny: > > PS: I'm running facter 3.5.0 with puppet 4.8.1 on CentOS 7 > > > Am Dienstag, 10. Januar 2017 17:44:23 UTC+1 schrieb Denny: >> >> Hi there, >> >> probably a pretty easy to answer question. >> >> I want to try out adding custom facts. My first custom fact should be >> "lastrebootdate" >> >> My code looks like this: >> >> Facter.add(:lastrebootdate) do >> setcode do >> Facter::Util::Resolution.exec("/usr/bin/who -b |awk '{print $3}'") >> end >> end >> >> Running the command on the system returns "2017-01-30" >> >> Deploying my fact on a puppet node and running the puppet agent returns >> "Jan". >> >> $ puppet facts |grep lastrebootdate >> "lastrebootdate": "Jan", >> >> What did I miss? >> >> Thank you, >> >> Denny >> > -- 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/e2a73c2c-af6f-42b1-a56c-13fd794f9349%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Re: writing custom fact -> return value not as expected
Tried out another customfact "lastyumupdate" which looks like: Facter.add(:lastyumupdate) do setcode do Facter::Util::Resolution.exec("yum history |grep -E '^.*(Update| U).*$' |head -n 1 |awk '{print↪$6}'") end end This one returns on command line "2017-01-10" AND sets the fact correct $ puppet facts |grep last "lastrebootdate": "Jan", "lastyumupdate": "2017-01-10", Any help is appreciated :) Denny Am Dienstag, 10. Januar 2017 17:47:36 UTC+1 schrieb Denny: > > PS: I'm running facter 3.5.0 with puppet 4.8.1 on CentOS 7 > > > Am Dienstag, 10. Januar 2017 17:44:23 UTC+1 schrieb Denny: >> >> Hi there, >> >> probably a pretty easy to answer question. >> >> I want to try out adding custom facts. My first custom fact should be >> "lastrebootdate" >> >> My code looks like this: >> >> Facter.add(:lastrebootdate) do >> setcode do >> Facter::Util::Resolution.exec("/usr/bin/who -b |awk '{print $3}'") >> end >> end >> >> Running the command on the system returns "2017-01-30" >> >> Deploying my fact on a puppet node and running the puppet agent returns >> "Jan". >> >> $ puppet facts |grep lastrebootdate >> "lastrebootdate": "Jan", >> >> What did I miss? >> >> Thank you, >> >> Denny >> > -- 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/0ed5ff4f-634e-4b52-a1e8-bb6985b38aad%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Re: writing custom fact -> return value not as expected
PS: I'm running facter 3.5.0 with puppet 4.8.1 on CentOS 7 Am Dienstag, 10. Januar 2017 17:44:23 UTC+1 schrieb Denny: > > Hi there, > > probably a pretty easy to answer question. > > I want to try out adding custom facts. My first custom fact should be > "lastrebootdate" > > My code looks like this: > > Facter.add(:lastrebootdate) do > setcode do > Facter::Util::Resolution.exec("/usr/bin/who -b |awk '{print $3}'") > end > end > > Running the command on the system returns "2017-01-30" > > Deploying my fact on a puppet node and running the puppet agent returns > "Jan". > > $ puppet facts |grep lastrebootdate > "lastrebootdate": "Jan", > > What did I miss? > > Thank you, > > Denny > -- 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/2e65ff6b-38c6-40cc-bc7e-2e0d107e32f2%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] writing custom fact -> return value not as expected
Hi there, probably a pretty easy to answer question. I want to try out adding custom facts. My first custom fact should be "lastrebootdate" My code looks like this: Facter.add(:lastrebootdate) do setcode do Facter::Util::Resolution.exec("/usr/bin/who -b |awk '{print $3}'") end end Running the command on the system returns "2017-01-30" Deploying my fact on a puppet node and running the puppet agent returns "Jan". $ puppet facts |grep lastrebootdate "lastrebootdate": "Jan", What did I miss? Thank you, Denny -- 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/f91eae2b-b980-4dd5-a544-2fc0a2f8e9ef%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] eyaml for mysql users in hiera style (puppetlabs-mysql)
hi, we using eyaml for all passwords and certificates. I was able to retrieve for ::mysql::server::root_password the password via eyaml, but I wonder, if it is also possible for the created mysql users. The most howtos uses plain/hashed passwords (which is bad) in hiera, or put the whole configuration in eyaml (also bad). So, how can I get the user password into my hiera config? mysql::server::grants: 'icinga2_ido_db@192.168.43.%/icinga2_ido_db.*': ensure : 'present' options: 'GRANT' privileges : ['ALL'] table : 'icinga2_ido_db.*' user : 'icingaweb2_db@192.168.43.%' mysql::server::users: 'icinga2_ido_db@192.168.43.%': ensure: 'present' In the good old manifest, it works like the following: mysql::db { 'mydb': user => 'myuser', password => hiera('mariadb_db'), host => 'localhost', grant => ['SELECT', 'UPDATE'], } Any suggestions? cu denny -- 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/33636a67-0824-4cfb-bf96-9ed269c5909e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Re: Puppet3 | hiera | role -> Problem role/mysql.yaml not used -> example from rnelson0.com with mysql
Hi Rob, I got it working :-) I don't know at this time, if the layout is quite OK, but for the moment hieradata/node/mon.example.com.yaml hieradata/role/mon.yaml hieradata/global.yaml thanks a lot for the great help :-) I used also the role/profile howto from you :-) cu denn -- 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/06466f47-ef76-40d9-b61c-a99e3ac01f3e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Re: Puppet3 | hiera | role -> Problem role/mysql.yaml not used -> example from rnelson0.com with mysql
hi, thanks for the reply :-) I added a custom fact via modules/role/lib/facter/role.rb Facter.add(:role) do setcode do host = Facter.value(:fqdn) declared_role = Facter.value(host) declared_role.nil? ? 'base' : declared_role end end I copied that piece of code and it works, if I change "base" to "mysql_server". In the end, I can execute on the mon.example.com "facter -p role" and I get "mysql_server" back. So far so good. I saw many examples how to set the fact, but mostly I dislike them (e.g. create file /etc/system_role ... hardcoded in the Facter.add ). What I miss: how can I set the fact (role in my case) via hiera, or via node manifest ? cu denny -- 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/2840db66-1c91-43c9-8e96-47f52b38f7e6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Re: Puppet3 | hiera | role -> Problem role/mysql.yaml not used -> example from rnelson0.com with mysql
hi Rob, maybe it helps: I found something in the Puppet server logs, while calling the agent on the node: [...] 2016-12-21 20:59:16,496 INFO [puppet-server] Puppet Caching node for mon. example.com 2016-12-21 20:59:17,236 WARN [puppet-server] Scope(Class[main]) Could not look up qualified variable '::role'; 2016-12-21 20:59:17,236 WARN [puppet-server] Scope(Class[main]) Could not look up qualified variable '::profile'; 2016-12-21 20:59:17,238 WARN [puppet-server] Scope(Class[main]) Could not look up qualified variable '::datacenter'; 2016-12-21 20:59:17,239 WARN [puppet-server] Scope(Class[main]) Could not look up qualified variable '::role'; 2016-12-21 20:59:17,240 WARN [puppet-server] Scope(Class[main]) Could not look up qualified variable '::profile'; 2016-12-21 20:59:17,241 WARN [puppet-server] Scope(Class[main]) Could not look up qualified variable '::datacenter'; 2016-12-21 20:59:17,243 WARN [puppet-server] Scope(Class[main]) Could not look up qualified variable '::role'; 2016-12-21 20:59:17,243 WARN [puppet-server] Scope(Class[main]) Could not look up qualified variable '::profile'; 2016-12-21 20:59:17,245 WARN [puppet-server] Scope(Class[main]) Could not look up qualified variable '::datacenter'; 2016-12-21 20:59:18,406 ERROR [puppet-server] Puppet Must pass backupuser to Class[Mysql::Server::Backup] at /opt/puppet/environments/test/modules/ profile/manifests/mysql/server.pp:12 on node mon.example.com /usr/lib/ruby/vendor_ruby/puppet/util/errors.rb:106:in `fail' /usr/lib/ruby/vendor_ruby/puppet/resource.rb:482:in `validate_complete' org/jruby/RubyHash.java:1342:in `each' [...] cu denny -- 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/1140e0f8-ee1a-4fe8-b3b8-3b33dbe1f954%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Re: Puppet3 | hiera | role -> Problem role/mysql.yaml not used -> example from rnelson0.com with mysql
hi, yep, restarting after every change. -- 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/c1bc2d00-8c3e-411f-b8be-cf1136ddc320%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Re: Puppet3 | hiera | role -> Problem role/mysql.yaml not used -> example from rnelson0.com with mysql
hi Rob, I had to use a slightly different command: hiera -c /etc/puppet/hiera.yaml mysql::server::backup::backupuser environment=test ::role=mysql_server --debug [...] DEBUG: 2016-12-21 19:14:39 +0100: Hiera JSON backend starting DEBUG: 2016-12-21 19:14:39 +0100: Looking up mysql::server::backup::backupuser in JSON backend DEBUG: 2016-12-21 19:14:39 +0100: Looking for data source role/mysql_server DEBUG: 2016-12-21 19:14:39 +0100: Cannot find datafile /etc/puppet/hiera/ role/mysql_server.json, skipping DEBUG: 2016-12-21 19:14:39 +0100: Looking for data source common DEBUG: 2016-12-21 19:14:39 +0100: Cannot find datafile /etc/puppet/hiera/ common.json, skipping DEBUG: 2016-12-21 19:14:39 +0100: Hiera YAML backend starting DEBUG: 2016-12-21 19:14:39 +0100: Looking up mysql::server::backup::backupuser in YAML backend DEBUG: 2016-12-21 19:14:39 +0100: Looking for data source role/mysql_server DEBUG: 2016-12-21 19:14:39 +0100: Found mysql::server::backup::backupuser in role/mysql_server dbbackup So, that seems to be working, so something else must be wrong in my config files. cu denny -- 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/68e1bc79-6709-47a3-a3e3-7a9cbd483a84%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Puppet3 | hiera | role -> Problem role/mysql.yaml not used -> example from rnelson0.com with mysql
hi, I try to understand the example from https://rnelson0.com/2015/02/02/deploying-mysql-with-puppet-without-disabling-selinux/comment-page-1/ with MySQL. At this moment, most parts are working, except role/mysql.yaml . It seems, that this file isn't noticed by hiera/puppet: :yaml: :datadir: "/etc/puppet/environments/%{environment}/hieradata" :hierarchy: - "node/%{::fqdn}" - "role/%{::role}" - "profile/%{::profile}" - "operatingsystem/%{::operatingsystem}/%{::operatingsystemmajrelease}" - "operatingsystem/%{::operatingsystem}" - "osfamily/%{::osfamily}" - "datacenter/%{::datacenter}" - "virtual/%{::is_virtual}" - common All other files are copied from the above example, except: hiera/puppet_role/ -> hieradata/role/ The problem is (puppet agent -t on the example host): Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Must pass backupuser to Class[Mysql::Server::Backup] at /opt/puppet/environments/test/modules/profile/manifests/mysql/server.pp:12 on node mon.example.com Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run What is wrong, so that /opt/puppet/environments/test/hieradata/role/mysql.yaml isn't working on the Puppet master. - ./manifests/site.pp hiera_include('classes', '') node default { $role = hiera('role') include $role } - manifests/mon.example.com.pp node 'mon.example.com' { include role::mysql_server } - ...test/hieradata/node/mon.example.com.yaml # Mon --- classes: apt apt::mirror: http://debianmirror.example.bla/pub/linux/debian/debian/ apt::source: true --- mysql::server::override_options : 'client': [...] Puppet Version is 3.8.7-1puppetlabs1 on Debian 7.11 Any suggestions? cu denny -- 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/f512e2d7-5034-424e-a2a3-401bb1c3fd55%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Syntax problem, if/case in class section for $hostname
hi, in the last 5 min I was able to solve my problem. The problem was that I wanted to override a parameterized class .. my solution is is now: class users::fbar::params { if ($::hostname =~ /^devpc21+(\d+)./) { $groups = [ 'admin' ] } else { $groups = [ 'devel' ] } } class users::fbar ( $ensure = present, $groups = $users::fbar::params::groups ) inherits users::fbar::params { case $ensure { present: { users::add_user { fbar: comment=> 'Foo Bar', uid => 1024, groups => $groups, shell => '/bin/bash', yubikeyid => 'cxx', require => Group[ $groups ], } } absent: { users::del_user { ['fbar' ]: managehome => true, } } } } It seems to be impossible to use if/case/whatever as selector for a parameter. cu denny -- 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/b9dbdb86-4f26-4a61-b23a-f64e797919bd%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Syntax problem, if/case in class section for $hostname
hi, I try to get an if/case thing working, but I always get a syntax error. We have something like that for an user: modules/users/manifests/fbar.pp class users::fbar ( $ensure = present, $groups = [ 'develop' ] ) { case $ensure { present: { users::add_user { foobar: comment=> 'Foo bar', uid => 1024, groups => $groups, shell => '/bin/bash', require => Group[$groups], } } absent: { users::del_user { ['fbar' ]: managehome => true, } } } } which is included on a node ... environments/dev/manifests/developpc.pp [...] # distribute users class { 'users::fbar': ensure => present, } The only thing I want, is to change the group on a special node with $hostname =~ /regex$/ I tried a lot to change from $groups = [ 'develop' ] to $groups = [ 'admins' ] with if/else and with case but ended up with syntax error on '}' ... expected ... (if i remember right). So, what I have done wrong ? cu denny -- 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/daff705a-73b1-42ce-b084-718a4b9bfb7b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Re: Slow Mirror
Hello Daniel, just for your interest: Seems the slow download is produced by our own network (bug in router/switch). So we'll investigate this issue on our own and will respond to you if we found the bug and puppetlab is still slow for us. Please pardon the inconvenience. Best regards, Denny 2015-06-17 2:39 GMT+02:00 Daniel Parks d...@puppetlabs.com: On Tuesday, June 16, 2015, Xav Paice xavpa...@gmail.com wrote: When we go to http://apt.puppetlabs.com/pool/trusty/main/p/puppet/ there's no files at all - although the server responds pretty quickly - is this a known thing? Turns out we messed up an exclude when rsyncing the other day, and lost those while moving from one server to another. Oops. Sorry about that! And thanks for letting me know. Daniel -- You received this message because you are subscribed to a topic in the Google Groups Puppet Users group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/puppet-users/5dvAj1ijQAE/unsubscribe. To unsubscribe from this group and all its topics, 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/CAPNukCk8iqShSF_GpAFGuxiXnpm3o_Gfqrd-bdppJFQuHpvuoA%40mail.gmail.com https://groups.google.com/d/msgid/puppet-users/CAPNukCk8iqShSF_GpAFGuxiXnpm3o_Gfqrd-bdppJFQuHpvuoA%40mail.gmail.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- 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/CAP3cjw30FTEQDuKOm0AcgL5TuSQxGTR9g2W6Z01-mWhWQuXhmg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Re: Slow Mirror
Hello Daniel and Daniel, thank you very much for your response. The output you wanted is here: root@s110077:~# curl -o /dev/null http://yum.puppetlabs.com/fedora/f21/products/SRPMS/razor-torquebox-3.1.1.5-1.fc21.src.rpm % Total% Received % Xferd Average Speed TimeTime Time Current Dload Upload Total SpentLeft Speed 15 61.8M 15 9.7M0 0 167k 0 0:06:18 0:00:59 0:05:19 83367 We can't download faster than 1mb/s. When I use another Server from other network everything works fine. Can you check if there is a speedlimit active for 217.79.215.0/24 ? To other mirrors (such as debian) we can download as fast as possible (~30-50mb/s) Am Donnerstag, 11. Juni 2015 00:05:11 UTC+2 schrieb Daniel Parks: On Wednesday, June 10, 2015 at 4:30:33 AM UTC-7, Denny B wrote: since two days we aren't able to synchronize our local mirror with apt.puppetlabs.com. The maximum speed to download everything is about 50-100kb/s which is really really slow for our whole datacenter. Hi Denny, I'm the other Daniel on the ops team at Puppet. :) I can rsync from my house, so it is probably a network problem. Traceroute looks okay. Could you try downloading a large file over HTTP and see how fast it is? For example, I get: $ curl -o /dev/null http://yum.puppetlabs.com/fedora/f21/products/SRPMS/razor-torquebox-3.1.1.5-1.fc21.src.rpm % Total% Received % Xferd Average Speed TimeTime Time Current Dload Upload Total SpentLeft Speed 100 61.8M 100 61.8M0 0 5976k 0 0:00:10 0:00:10 --:--:-- 6320k (Sorry, I'm posting this from Google Groups and I can't tell if this is going to turn out as HTML or just plain text.) Thanks, Daniel -- 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/ee9bdb18-b689-43fa-a448-a8425619f523%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Slow Mirror
Hello everyone, since two days we aren't able to synchronize our local mirror with apt.puppetlabs.com. The maximum speed to download everything is about 50-100kb/s which is really really slow for our whole datacenter. Are there any problems with your mirror? Did you maybe blocked us? Currently it takes ages to get a synchron mirror. Thanks in advance. Best regards, Denny For proper debug: Output rsync: [..] dists/lucid-20130301133454158727269/.refs/dependencies/rubygem-mustache_0.99.4-1puppetlabs1.dsc 915 100%1.22kB/s0:00:00 (xfer#25, to-check=1508/1866) dists/lucid-20130301133454158727269/.refs/dependencies/rubygem-mustache_0.99.4-1puppetlabs1_all.deb 79302 100% 59.80kB/s0:00:01 (xfer#26, to-check=1507/1866) dists/lucid-20130301133454158727269/.refs/dependencies/rubygem-mustache_0.99.4-1puppetlabs2.diff.gz 1710 100% 11.52kB/s0:00:00 (xfer#27, to-check=1506/1866) dists/lucid-20130301133454158727269/.refs/dependencies/rubygem-mustache_0.99.4-1puppetlabs2.dsc 915 100%6.16kB/s0:00:00 (xfer#28, to-check=1505/1866) dists/lucid-20130301133454158727269/.refs/dependencies/rubygem-mustache_0.99.4.orig.tar.gz 37714 100% 82.58kB/s0:00:00 (xfer#29, to-check=1504/1866) dists/lucid-20130301133454158727269/dependencies/binary-all/Packages 7686 100% 15.07kB/s0:00:00 (xfer#30, to-check=1499/1866) dists/lucid-20130301133454158727269/dependencies/binary-amd64/Packages 11370 100% 18.98kB/s0:00:00 (xfer#31, to-check=1498/1866) dists/lucid-20130301133454158727269/dependencies/binary-i386/Packages 11371 100% 18.14kB/s0:00:00 (xfer#32, to-check=1497/1866) dists/lucid-20130301133454158727269/dependencies/source/Sources 13142 100% 17.48kB/s0:00:00 (xfer#33, to-check=1496/1866) [..] We connect to following IP: 198.58.114.168 Our IP: 217.79.215.X -- 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/9795521e-ba4f-41c1-99b9-f0f7aa4085b7%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] apache::vhost add prefix to logfiles
Hi there, this is - for sure - pretty easy to solve but I'm a bit stuck right now... I want to add a prefix to my apache-vhost access and error logs depending on what kind of application is installed on this vhost Right now my config looks something like this: apache::vhost { 'vhost.example.com': port= '80', docroot = '/var/www/html/someprettywebsite', serveradmin = 'dontcal...@example.com', } which produces two log files: /var/log/http/vhost.example.com_error.log /var/log/http/vhost.example.com_access.log but what I want is something like: /var/log/http/wordpress_vhost.example.com_error.log /var/log/http/wordpress_vhost.example.com_access.log I've tried things like the example below, but didn't work :( apache::vhost { 'vhost.example.com': port= '80', docroot = '/var/www/html/someprettywebsite', serveradmin = 'dontcal...@example.com', access_log_file = wordpress_${access_log_file}, } Any suggestions are welcome, Denny -- 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/0931-1ab3-462a-9441-2ded4a79a879%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] apache::vhost add prefix to logfiles
puppetlabs-apache (v1.1.1) Am Freitag, 24. Oktober 2014 13:35:23 UTC+2 schrieb cwebber: Denny, Which apache module are you using? — cwebber On Oct 24, 2014, at 12:32 AM, Denny nomore...@gmail.com javascript: wrote: Hi there, this is - for sure - pretty easy to solve but I'm a bit stuck right now... I want to add a prefix to my apache-vhost access and error logs depending on what kind of application is installed on this vhost Right now my config looks something like this: apache::vhost { 'vhost.example.com': port= '80', docroot = '/var/www/html/someprettywebsite', serveradmin = 'dontc...@example.com javascript:', } which produces two log files: /var/log/http/vhost.example.com_error.log /var/log/http/vhost.example.com_access.log but what I want is something like: /var/log/http/wordpress_vhost.example.com_error.log /var/log/http/wordpress_vhost.example.com_access.log I've tried things like the example below, but didn't work :( apache::vhost { 'vhost.example.com': port= '80', docroot = '/var/www/html/someprettywebsite', serveradmin = 'dontc...@example.com javascript:', access_log_file = wordpress_${access_log_file}, } Any suggestions are welcome, Denny -- 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...@googlegroups.com javascript:. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/0931-1ab3-462a-9441-2ded4a79a879%40googlegroups.com https://groups.google.com/d/msgid/puppet-users/0931-1ab3-462a-9441-2ded4a79a879%40googlegroups.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- 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/298497a4-6140-4c52-b544-9c2a2c74b58c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] apache::vhost add prefix to logfiles
thanks, but this would be far to much work for like 100 vhosts, which I want to sort into 2-3 groups of vhosts in fact, it's probably easier to put them into different directories Am Freitag, 24. Oktober 2014 14:27:47 UTC+2 schrieb cwebber: Ok, So when you call `access_log_file = “wordpress_${access_log_file}”` puppet is pulling $access_log_file from the scope in which you called apache::vhost what you probably want to do is something like: $vhost_name = ‘vhost.example.com' $vhost_type = ‘wordpress’ apache::vhost {$vhost_name: port= 80, docroot = /var/www/html/${vhost_name}”, serveradmin = ‘ihaz...@mail.com javascript:’, access_log_file = “${vhost_type}_${vhost_name}_access.log”, error_log_file = “${vhost_type}_${vhost_name}_error.log” } On Oct 24, 2014, at 5:17 AM, Denny nomore...@gmail.com javascript: wrote: puppetlabs-apache (v1.1.1) Am Freitag, 24. Oktober 2014 13:35:23 UTC+2 schrieb cwebber: Denny, Which apache module are you using? — cwebber On Oct 24, 2014, at 12:32 AM, Denny nomore...@gmail.com wrote: Hi there, this is - for sure - pretty easy to solve but I'm a bit stuck right now... I want to add a prefix to my apache-vhost access and error logs depending on what kind of application is installed on this vhost Right now my config looks something like this: apache::vhost { 'vhost.example.com': port= '80', docroot = '/var/www/html/someprettywebsite', serveradmin = 'dontc...@example.com', } which produces two log files: /var/log/http/vhost.example.com_error.log /var/log/http/vhost.example.com_access.log but what I want is something like: /var/log/http/wordpress_vhost.example.com_error.log /var/log/http/wordpress_vhost.example.com_access.log I've tried things like the example below, but didn't work :( apache::vhost { 'vhost.example.com': port= '80', docroot = '/var/www/html/someprettywebsite', serveradmin = 'dontc...@example.com', access_log_file = wordpress_${access_log_file}, } Any suggestions are welcome, Denny -- 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...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/0931-1ab3-462a-9441-2ded4a79a879%40googlegroups.com https://groups.google.com/d/msgid/puppet-users/0931-1ab3-462a-9441-2ded4a79a879%40googlegroups.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- 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...@googlegroups.com javascript:. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/298497a4-6140-4c52-b544-9c2a2c74b58c%40googlegroups.com https://groups.google.com/d/msgid/puppet-users/298497a4-6140-4c52-b544-9c2a2c74b58c%40googlegroups.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- 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/15880dcf-6fb8-495d-a12b-b601ea5afa5f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Basic question - LDAP: puppetclass ryslog::server vs. modules/ryslog/server.pp
hi, I try to reorganize my filesystemstructure for Puppet and have some problems. I assign all my classes to the nodes via LDAP, for example: rsyslog::server. The problem is now, that (for example) the saz-rsyslog module uses the defaults (example: save logs to /srv/log), instead of using my one: /etc/puppet/modules/rsyslog/init.pp class rsyslog include rsyslog::server, rsyslog::client { purge_rsyslog_d = false, } server.pp class rsyslog::server inherits rsyslog { 'rsyslog::server': enable_tcp = true, enable_udp = true, enable_onefile = false, server_dir = '/var/log/remote/', } client.pp class rsyslog::client inherits rsyslog { log_remote = true, remote_type = 'udp', log_local = false, log_auth_local = false, custom_config = undef, server = 'logserver.example.com', port= '514', preserve_fqdn = true, } db.pp class rsyslog::database inherits rsyslog { backend = 'mysql', server = 'localhost', database = 'Syslog', username = 'rsyslog', password = 'secret', } The modules are imported via: /etc/puppet/manifests/site.pp [...] import rsyslog [...] What I have done wrong? Any suggestions? cu denny -- 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/4ed51570-c750-4787-89ed-742553301a92%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Re: puppet applying wrong/old configuration to client
Thanks for your reply - in fact it was totally my fault. I had applied some classed in puppet-dashboard as well as in the node.pp file. Topic can be closed. Am Mittwoch, 5. März 2014 16:34:40 UTC+1 schrieb jcbollinger: On Tuesday, March 4, 2014 4:07:26 AM UTC-6, Denny wrote: Hi all, I'm pretty new to puppet and couldn't find any solution yet. Right now I have seven hosts managed via puppet. Four of them are kinda broken since yesterday. They are using an old/cached(?) configuration. My current node definition looks like: node /^host\d+\.domain\.local$/ { include nrpe include bashrc include motd include crontab include anacrontab class { 'yum': extrarepo = [ 'epel', 'puppetlabs' ], } class { 'resolv_conf': searchpath = 'domain.local', nameservers = [ '1.2.3.4', '1.2.3.5' ], } class { 'rsyslog': syslogserver = 'graylog.domain.local', syslogport = '12501', } } Actually my node is applying an old definition (with ntp and postfix, which I removed for testing purposes): That your ntp and postfix classes are still being applied is not a sure sign that your nodes are using stale catalogs. Even though those classes are no longer declared directly in your node block, it could be that one or more of the classes you do declare in turn declare them. You could test the freshness of your catalog via a Puppet version of the tried and true print statement debugging technique. For example, add this to your node block: notify { 'freshness message': message = 'This is version 42 of site.pp' } If the agent gets a fresh catalog then it will include that resource, which will cause the specified message to be emitted into the agent's log output. Otherwise, not. root@host01 /var/lib/puppet # /etc/init.d/ntpd stop Shutting down ntpd:[ OK ] root@host01 /var/lib/puppet # rm /etc/postfix/main.cf rm: remove regular file `/etc/postfix/main.cf'? y root@host01 /var/lib/puppet # puppet agent --test In general, you might find it useful to specify the --debug flag as well to enable more detailed log output when you are troubleshooting. That isn't necessary to get the Notify's output, however. 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/13a2cbbb-8796-400c-bbe3-70b194b58cac%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] puppet applying wrong/old configuration to client
Hi all, I'm pretty new to puppet and couldn't find any solution yet. Right now I have seven hosts managed via puppet. Four of them are kinda broken since yesterday. They are using an old/cached(?) configuration. My current node definition looks like: node /^host\d+\.domain\.local$/ { include nrpe include bashrc include motd include crontab include anacrontab class { 'yum': extrarepo = [ 'epel', 'puppetlabs' ], } class { 'resolv_conf': searchpath = 'domain.local', nameservers = [ '1.2.3.4', '1.2.3.5' ], } class { 'rsyslog': syslogserver = 'graylog.domain.local', syslogport = '12501', } } Actually my node is applying an old definition (with ntp and postfix, which I removed for testing purposes): root@host01 /var/lib/puppet # /etc/init.d/ntpd stop Shutting down ntpd:[ OK ] root@host01 /var/lib/puppet # rm /etc/postfix/main.cf rm: remove regular file `/etc/postfix/main.cf'? y root@host01 /var/lib/puppet # puppet agent --test Info: Retrieving plugin Info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb Info: Loading facts in /var/lib/puppet/lib/facter/concat_basedir.rb Info: Loading facts in /var/lib/puppet/lib/facter/puppi_projects.rb Info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb Info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb Info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb Info: Loading facts in /var/lib/puppet/lib/facter/last_run.rb Info: Caching catalog for host01.domain.local Info: Applying configuration version '1393926479' Notice: /Stage[main]/Postfix/File[/etc/postfix/main.cf]/ensure: defined content as '{md5}49b648101b0e361231a977aa89e0dd60' Info: /Stage[main]/Postfix/File[/etc/postfix/main.cf]: Scheduling refresh of Service[postfix] Info: /Stage[main]/Postfix/File[/etc/postfix/main.cf]: Scheduling refresh of Service[postfix] Notice: /Stage[main]/Postfix/Service[postfix]: Triggered 'refresh' from 2 events Notice: /Stage[main]/Ntp::Service/Service[ntp]/ensure: ensure changed 'stopped' to 'running' Info: /Stage[main]/Ntp::Service/Service[ntp]: Unscheduling refresh on Service[ntp] Notice: Finished catalog run in 11.03 seconds root@host01 /var/lib/puppet # What I did until now: - restarted puppet master (apache/passenger) - removed and re-added host01 to puppet (with server restart in between) - removed puppet package and /var/lib/puppet from the client, readded the package + configuration - removed and re-added node-definition (with server restart in between) - touched all .pp files I'm running puppet 3.4.3 on the server and clients. Any help would be greatly appreciated! Denny -- 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/9a6f67ad-bf16-4f21-b59a-8b3b14f814de%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Problem with jlyheden/puppet-tcpwrapper and Concat
hi, I want to use the jlyheden/puppet-tcpwrapper module for my hosts.allow/deny but I can't get it working. On the puppet client (called with name fai) I get: -- err: Could not run Puppet configuration client: Could not find dependent Exec[concat_] for File[/var/lib/puppet/concat//fragments/15_hosts_deny_sshd] at /etc/puppet/environments/production/modules/concat/manifests/fragment.pp:51 - puppet-concat is installed and plugin-sync is enabled too. The classes comes from LDAP and my definition looks like: - cat /etc/puppet/manifests/classes/tcpwrapper.pp include concat::setup tcpwrapper::hosts::allow { sshd: pattern = 127.0.0.1 127.0.0.2 192.168.1.0/24 } tcpwrapper::hosts::deny { sshd: pattern = ALL } - If I comment out the tcpwrapper lines, /etc/hosts.allow|deny are replaced with an empty file (except the manged by puppet line) What I have done wrong? Some more information: on the puppet client: - root@FAI:~# find /var/lib/puppet/concat/ /var/lib/puppet/concat/ /var/lib/puppet/concat/_etc_hosts.allow /var/lib/puppet/concat/_etc_hosts.allow/fragments /var/lib/puppet/concat/_etc_hosts.allow/fragments/01_hosts_allow /var/lib/puppet/concat/_etc_hosts.allow/fragments.concat /var/lib/puppet/concat/_etc_hosts.allow/fragments.concat.out /var/lib/puppet/concat/bin /var/lib/puppet/concat/bin/concatfragments.sh /var/lib/puppet/concat/_etc_hosts.deny /var/lib/puppet/concat/_etc_hosts.deny/fragments /var/lib/puppet/concat/_etc_hosts.deny/fragments/01_hosts_deny /var/lib/puppet/concat/_etc_hosts.deny/fragments.concat /var/lib/puppet/concat/_etc_hosts.deny/fragments.concat.out root@FAI:~# cat /var/lib/puppet/concat/_etc_hosts.deny/fragments/01_hosts_deny # MANAGED BY PUPPET - What is strange: the directory /var/lib/puppet/concat//fragments doesn't exists. any suggestions? -- 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] Puppet.type is deprecated
Hi @ all ! I have updated my puppetserver to version 0.25.4. After testing connectivity with older clients (ver. 0.24.8) everything looks fine. Now, I'm beginning to upgrade these clients. Clients running with ver. 0.25.4, gets the following message on every run: warning: Puppet.type is deprecated; use Puppet::Type.type. First I had Facter in my focus (ver. 1.5.5) so i have facter upgraded to ver. 1.5.7, but the error still exists. Using google and looking in this group didn't bring me forward in this case. Has anybody a hint for me ? Thanks in advance Denny -- 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] Re: Puppet.type is deprecated
Hi James, thank you for your quick reply. I'm running CentOS 5.3 so i have installed the new version from the epel-repo with yum install puppet-server. Regards Denny On 12 Apr., 14:53, James Turnbull ja...@lovedthanlost.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/04/10 10:41 PM, Denny wrote: Hi @ all ! I have updated my puppetserver to version 0.25.4. After testing connectivity with older clients (ver. 0.24.8) everything looks fine. Now, I'm beginning to upgrade these clients. Clients running with ver. 0.25.4, gets the following message on every run: warning: Puppet.type is deprecated; use Puppet::Type.type. First I had Facter in my focus (ver. 1.5.5) so i have facter upgraded to ver. 1.5.7, but the error still exists. How did you upgrade? Using what mechanism? Are you sure you removed the old Puppet files? Regards James Turnbull - -- Author of: * Pro Linux System Administration (http://tinyurl.com/linuxadmin) * Pulling Strings with Puppet (http://tinyurl.com/pupbook) * Pro Nagios 2.0 (http://tinyurl.com/pronagios) * Hardening Linux (http://tinyurl.com/hardeninglinux) -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (Darwin) Comment: Using GnuPG with Mozilla -http://enigmail.mozdev.org/ iQEVAwUBS8MXuyFa/lDkFHAyAQLiUggAo/5tX3/GC8QBCZIazX7eQBTdLfbRGHvj ctHl/KX+cHQTVPbNt+chfodPaByOukD6aSMTuOGLIhNxE/cqhhytcCnM9Gxm2KEl mVUZhk8xXUHQh94dG6HQVedskXohnKKbMjLVu7mra4QnwncLqg7bRX1elF+sqHO1 uwnPsmiTGSHDqbuAiiRxkOLovj6FYuZzdd/N55sYb3dRJc4YPtKOYbiNm+87u4m+ +DtAaReQrXIpeeBTaoATy3cOjFhUuT6vmmNVHmNllv5BCNANyjlPFzqYPRDERaiq bZHT/QuH9/VKOu67OgD7RZiOqnxsKWB1bYVaApsO+0YLmgG/trJ7bQ== =+Y6q -END PGP SIGNATURE- -- 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] Re: Puppet.type is deprecated
Thank you. I will check this. Regards Denny On 12 Apr., 15:12, James Turnbull ja...@lovedthanlost.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/04/10 11:00 PM, Denny wrote: Hi James, thank you for your quick reply. I'm running CentOS 5.3 so i have installed the new version from the epel-repo with yum install puppet-server. I think you might have some stray 0.24.x files around. I suggest deleting Puppet from a client (removing the /usr/lib/ruby/etc/puppet direcotry) and then re-installing the package. Regards James Turnbull - -- Author of: * Pro Linux System Administration (http://tinyurl.com/linuxadmin) * Pulling Strings with Puppet (http://tinyurl.com/pupbook) * Pro Nagios 2.0 (http://tinyurl.com/pronagios) * Hardening Linux (http://tinyurl.com/hardeninglinux) -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (Darwin) Comment: Using GnuPG with Mozilla -http://enigmail.mozdev.org/ iQEVAwUBS8McNCFa/lDkFHAyAQKJ2wf9Gw72Bm31Zx6xwsr0EE/+lvKK5QqlDGO1 wldKBLMHb54udLQJeOFGfP8Vx9xijFkfukPRLdYx4/+BB223bwBLMOp9xKFPdeAD D4fGZrlEyh7MpzZgQ92nwH1IQ2VllylthSIjiQ6f2nKk+JBXOLSjNTajK9FF/Wh3 VSG2GvhK8ytQiiPdc5rQypO0173hL8+eTsnoFlJ1+gDynI92Stkr9hxvBhipcD/e RHuegE5cU0g+wSzzC+hrZ3rQ2tJH+6YBa3EXMaopdD9PNG6ynMfMvtAYMC0yVU78 fIdtFE6ImKrEW+gIjrB4ZIyjkLsv83MrqrGoxyZJUO4rA8TInJzr8w== =5K+b -END PGP SIGNATURE- -- 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.