[Puppet Users] package to uninstall some windows software failed because its require interaction at some point for confirmation
Hi, package (using default provider for windows) to uninstall windows software failed because its require interaction at some point for confirmation. It should be silent. Is there someone here who experienced the same and solved? the manifest is like : package { "uninstall_${soft}": ensure=> 'absent', name => $soft, uninstall_options => [ ], } I tried using uninstall_option : /q /quiet /silent, --force-uninstall, etc... but still not working, specifically I had the problem with FileZilla, Gmail, Chrome, Google Drive The error displayed in event viewer is : /Package[uninstall_Google Chrome]/ensure: change from '117.0.5938.150' to 'absent' failed: Failed to uninstall: The remote adapter is not compatible. (corrective) Failed to uninstall: The remote adapter is not compatible. and for Gmail, Google Drive: Package[uninstall_Google Drive]/ensure: change from '1.0' to 'absent' failed: FormatMessageW could not format code 3221225477 (corrective) -- 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/2d6c86ca-a5e7-40d1-9f57-4022ce79f654n%40googlegroups.com.
Re: [Puppet Users] Puppet counter part for ruby caller function/object
Op dinsdag 13 december 2016 11:54:29 UTC+1 schreef Henrik Lindberg: > > On 12/12/16 11:11, Michel Verbraak wrote: > > I have been googling around to find an answer but was not able to find > it. > > > > I have created my own custom type in puppet. According to the > > documentation here Puppet Resource Types manual > > < > https://github.com/puppetlabs/puppet-specifications/blob/master/language/resource_types.md>. > > > > This type creates a config file and in it I would like to add as comment > > lines information from where the resource is called/created. > > > > I want to get the filename, classname, linenumber of the puppet class > > and pp file calling this custom type (resource)? > > > > I know in Ruby I can use the "caller" function/variable/object to get a > > stack trace. But when I do this in my custom type I get a stack trace > > from Ruby and not Puppet. > > > > For example I have the following code: > > > > # File my_module/manifests/my_module.pp > > class my_module{ > > > > my_module_type( {'aname':;} > > } > > > > # File my_module/lib/puppet/type/my_module_type.pp > > Puppet::Type.newtype(:my_module_type) do > > newparam(:trace) do > > defaultto caller.inspect > > end > > end > > > > So "caller.inspect" produces: > > > > > ["/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/classgen.rb:136:in > > > `class_eval'", > > > "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/classgen.rb:136:in > > `genthing'", > > > "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/classgen.rb:36:in > > `genclass'", > > "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type.rb:459:in > > `newparam'", > > "/vagrant/site/my_module/lib/puppet/type/my_module_type.rb:69:in `block > > in '", > > > "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/classgen.rb:136:in > > `c...] > > > > It nicely shows a stack trace of the different puppet ruby files used. > > But what I would like is something like: > > > > [ my_module/manifests/my_module.pp:3:in "class my_module", .] > > > > Is this possible? If so how? > > > > The two locations you are trying to tie together are very far apart. > The creation of the resource takes place in a .pp file parsed and > evaluated by the compiler (typically on the master side). Much later the > agent side is acting on a instance of your resource type. That instance > was recreated from the information in the catalog that the compiler > produced. > > The catalog contains file and line information for resources. > (In some versions of puppet this information is missing if the resources > were created with the create_resources function). > > IIRC, you can get them via methods file() and line() on the resource. > > As you already found out, the caller of the actual logic on the agent > side is something completely different. > > - henrik > > > Regards, > > > > Michel. > > > > > > -- > > 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 > > <mailto:puppet-users+unsubscr...@googlegroups.com >. > > To view this discussion on the web visit > > > https://groups.google.com/d/msgid/puppet-users/cef67564-c584-4014-b21b-df28308418a5%40googlegroups.com > > > < > https://groups.google.com/d/msgid/puppet-users/cef67564-c584-4014-b21b-df28308418a5%40googlegroups.com?utm_medium=email&utm_source=footer>. > > > > For more options, visit https://groups.google.com/d/optout. > > > -- > > Visit my Blog "Puppet on the Edge" > http://puppet-on-the-edge.blogspot.se/ > Op dinsdag 13 december 2016 11:54:29 UTC+1 schreef Henrik Lindberg: > > On 12/12/16 11:11, Michel Verbraak wrote: > > I have been googling around to find an answer but was not able to find > it. > > > > I have created my own custom type in puppet. According to the > > documentation here Puppet Resource Types manual > > < > https://github.com/puppetlabs/puppet-specifications/blob/master/language/resource_types.md>. > > > > This type creates a config file and in it I would like to add as comment >
[Puppet Users] Puppet counter part for ruby caller function/object
I have been googling around to find an answer but was not able to find it. I have created my own custom type in puppet. According to the documentation here Puppet Resource Types manual <https://github.com/puppetlabs/puppet-specifications/blob/master/language/resource_types.md>. This type creates a config file and in it I would like to add as comment lines information from where the resource is called/created. I want to get the filename, classname, linenumber of the puppet class and pp file calling this custom type (resource)? I know in Ruby I can use the "caller" function/variable/object to get a stack trace. But when I do this in my custom type I get a stack trace from Ruby and not Puppet. For example I have the following code: # File my_module/manifests/my_module.pp class my_module{ my_module_type( {'aname':;} } # File my_module/lib/puppet/type/my_module_type.pp Puppet::Type.newtype(:my_module_type) do newparam(:trace) do defaultto caller.inspect end end So "caller.inspect" produces: ["/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/classgen.rb:136:in `class_eval'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/classgen.rb:136:in `genthing'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/classgen.rb:36:in `genclass'", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type.rb:459:in `newparam'", "/vagrant/site/my_module/lib/puppet/type/my_module_type.rb:69:in `block in '", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/classgen.rb:136:in `c...] It nicely shows a stack trace of the different puppet ruby files used. But what I would like is something like: [ my_module/manifests/my_module.pp:3:in "class my_module", .] Is this possible? If so how? Regards, Michel. -- 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/cef67564-c584-4014-b21b-df28308418a5%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Puppet 2.6.18 Automodule loading -> Wrong number of Arguments (1 for 2)
Dear Puppet-Users, I'm currently stucking at a wired error message. Below I've posted all important output. When I run this configuration on the same machine or on an client I geht the following error: err: Could not retrieve catalog from remote server: Error 400 on SERVER: wrong number of arguments (1 for 2) at /etc/puppet/manifests/site.pp:2 [code] puppet@de-dussmon2:/etc/puppet/manifests> puppet --version 2.6.18 [/code] [code] puppet@de-dussmon2:/etc/puppet/manifests> cat site.pp node default { include test } [/code] [code] puppet@de-dussmon2:/etc/puppet/manifests/modules/test/manifests> cat init.pp class test{ case $::operatingsystem { 'SLES': { $path_file = "/etc/puppet/testfile" } 'windows': { $path_file = "C:/testfile.txt" } } file {'testfile': path=> $path_file, ensure => file, content => $operatingsystem, } } [/code] [code] puppet@de-dussmon2:/etc/puppet/manifests/modules/test/manifests> puppet master --configprint modulpath /etc/puppet/manifests/modules [/code] -- 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/b7a07d48-1106-4d48-8b36-a77fb3c89a3f%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: How to refer to common variables across multiple modules?
I've found that using Hiera for this type of problem work's really well. Hiera is integrated into Puppet 3.0+ https://github.com/puppetlabs/hiera Drew On Thursday, May 2, 2013 4:54:47 PM UTC-4, rogerl...@gmail.com wrote: > > We need to refer to common variables across multiple modules. For example, > our dns module, firewall module and monitoring module need knowledge of our > radius server IP address. Is the correct approach to create a 'common' > class where these variables are defined and then reference them from each > module and create a class dependancy as below. We are using a custom ENC > which outputs the class parameters. > > # modules/common/manifest/init.ppclass common ( > $radius_ip, > $fw_ip, > $zabbix_ip,) {} > # modules/common/manifest/apache.ppclass apache ( > $fw_ip = $common::fw_ip, > $zabbix_ip =$common::zabbix_ip,) { > class { 'common': } -> > class { 'apache': }} > # modules/common/manifest/maradns.ppclass maradns ( > $radius_ip = $common::radius_ip, > $fw_ip = $common::vpn_ip,){ > class { 'common': } -> > class { 'apache': }} > # ENC ouput--- > classes: > common: > fw_ip: '10.50.1.1' > radius_ip: '10.50.1.12' > zabbix_ip: '10.50.1.11' > apache: > ntp: > maradns: > environment: production > > > -- 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.
Re: [Puppet Users] New to hiera
Hi Larry, I'm curious to your opinion on point # 3, are you talking about OS packages or your organizations app version? If the latter, I was thinking of using hiera, maybe with a backend other than yaml such as redis, to store the version of the app, that way like you said it could be used in deploy pipeline. Why wouldn't you want to do this? In addition to what everyone else has said, one of the bigger win's of using hiera, is the flexibility it offers you with overriding variables. With the below hierarchy you can override based off an individual server, environment or datacenter. This could be powerful if you wanted to test some new JVM settings on just one server in production or an entire datacenter. You can use any facter fact you want to define your hierarchy. :hierarchy: - %{fqdn} - env/%{env}/common - datacenter/%{datacenter} - common Drew On Sunday, May 5, 2013 2:04:19 PM UTC-4, Larry Fast wrote: > > Hi Josh, > Here's what we found. I would love to hear about other approaches because > we're still debating and building out our service. > > 1. Yes it's a great way to escape from parameterized classes. If you ever > needed to 'include' a class in two places, parameterized classes makes this > difficult or impossible. > 2. I don't recommend using automatic hiera lookup. There are some subtle > gotchas in it especially when using hashes in hiera. In my office our > recommended practice is as almost as you wrote it, class bar ($foo = > hiera('bar::foo')) { ... }. Hiera automatic lookup is a good way to allow > an easier transition from parameterized classes so it may still be a good > choice for you. As Ashley points out, read the latest docs! > 3. If you explicitly use the hiera() call, you'll get nice "variable not > found" messages when you make a mistake. Clear error messages are rare in > puppet so don't underestimate their value. > 4. Don't over complicate your hiera tree. It's not the place for > everything. Pick your largest collection of system-to-system variation and > put that in hiera. > > In our office we identified three variations that we *wanted* to put in > hiera: > 1. Variation between servers *within* an instance of our service > 2. Variation between similar servers across different instances of our > service (eg. Identity of the zookeeper in production, staging & QA) > 3. Version differences between instances of our service. IE. use hiera to > manage the pipeline of releases. > > What we *actually* put into hiera was only #2. When #1 started creeping > into hiera things got very messy. #1 is better handled by managing server > Roles. #3 should never go into Hiera - but I'm still arguing this point > with my co-workers. > > Caveate Emptor: We're still hemming and hawwing about all this. > Cheers, Larry Fast > > -- 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] Re: Environment supersets using Hiera
Would you be able to do something like this... :hierarchy: - %{fqdn} - %{environment}/settings (environment specific settings) - common On Friday, February 22, 2013 9:11:08 AM UTC-5, Alexander Fortin wrote: > > Hi folks, > > I'm using Puppet 3.0.1 and hiera 1.1.1, and this is my hierarchy now: > :hierarchy: > - %{fqdn} > - %{environment} > - common > > but I'd like to achieve something like this: > > if my node has environment=vagrant, then Hiera sources should be: > - /var/lib/hiera/vagrant.yaml > - /var/lib/hiera/devel.yaml > - /var/lib/hiera/common.yaml > > if environment=devel: > - /var/lib/hiera/devel.yaml > - /var/lib/hiera/common.yaml > > if environment=production: > - /var/lib/hiera/common.yaml > > I'm going through documentation but seems there's no mention to this > kind of setup. > > Any hint? Thanks! > > -- > Alexander Fortin > https://www.vizify.com/alexander-fortin > -- 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] Re: Not able to install puppet enterprise onn agent node using install command.
What operating system are you running the command from? Does running "ssh -i /usr/local/puppet/lalit.ppk root@ ec2-54-242-140-98.compute-1.amazonaws.com" allow you to login? >From what I understand a .ppk file is generated from putty, in order to use it with an open ssh agent you would need to convert the putty private key to a format it can understand Drew On Monday, December 24, 2012 5:19:17 AM UTC-5, lalit jangra wrote: > > Hi, > > I have created an agent node from a master node using below command. > > puppet node_aws create --image ami-cc5af9a5 --keyname icos-client --type > ti.micro > > Now as i am trying to install puppet on it using below command > > puppet node install \ > --install-script=puppet- > enterprise \ > --installer-payload=/usr/local/puppet/puppet-2.7.0.tar.gz \ > --installer-answers=/usr/local/puppet/agent.txt \ > --puppetagent-certname=ip-10-224-122-211.ec2.internal \ > --login root \ > --debug \ > --keyfile /usr/local/puppet/lalit.ppk \ > ec2-54-242-140-98.compute-1.amazonaws.com > > I am getting below error message. > > [root@ip-10-224-122-211 puppet]# puppet node install \ > > --install-script=puppet-enterprise \ > > --installer-payload=/usr/local/puppet/puppet-2.7.0.tar.gz \ > > --installer-answers=/usr/local/puppet/agent.txt \ > > --puppetagent-certname=ip-10-224-122-211.ec2.internal \ > > --login root \ > > --debug \ > > --keyfile /usr/local/puppet/lalit.ppk \ > > ec2-54-242-140-98.compute-1.amazonaws.com > notice: Waiting for SSH response ... > info: Executing remote command ... > debug: Command: date > err: not a private key (/usr/local/puppet/lalit.ppk) > err: Try 'puppet help node install' for usage > > Using same ppk file, i am able to login to agent node using ssh/putty > client.I also tried using private dns instead of public dns but no success. > Can anybody help. > > Regards, > Lalit. > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/FO0Eq4V5gXcJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Re: question with puppet
You can read all about the puppet file server here. http://docs.puppetlabs.com/guides/file_serving.html On Wednesday, November 7, 2012 11:54:36 AM UTC-5, bobby38 wrote: > > I have added a new folder to my /modules/backup called files > /modules/backup/files > i have verified the new files folder resides in puppet master and owned by > puppet and it has the right permission > when i source to the a file inside file folder > > source => "puppet:///backup/files/foo", > > i am getting the below error mesage > Could not evaluate: Could not retrieve information from environment > source(s) puppet:///backup/files/foo > > any suggestion? > Thanks > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/wVNdd_2WhKgJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Re: 400 permission denied error
Is /etc/puppet/auth.conf owned by the puppet process? You could also try setting it as world readable. And make sure in your puppet.conf under the agent stanza, the server block is set to the domain name of the puppet master. You should be able to telnet to it on port 8140. [agent] server = puppet.localhost On Tuesday, November 13, 2012 3:55:44 PM UTC-5, frap wrote: > > I'm just getting started with puppet and there's something I can't get > working. I have a client/agent setup at the moment. > > When running puppet agent for the first time, I get the following error: > > puppet agent --test > dnsdomainname: Unknown host > Error: Could not request certificate: Error 400 on SERVER: Permission > denied - /etc/puppet/auth.conf > > My auth.conf looks like this, which I believe is how it is out of the box. > > # allow nodes to retrieve their own catalog (ie their configuration) > path ~ ^/catalog/([^/]+)$ > method find > allow $1 > > # allow all nodes to access the certificates services > path /certificate_revocation_list/ca > method find > allow * > > # allow all nodes to store their reports > path /report > method save > allow * > > # inconditionnally allow access to all files services > # which means in practice that fileserver.conf will > # still be used > path /file > allow * > > ### Unauthenticated ACL, for clients for which the current master doesn't > ### have a valid certificate > > # allow access to the master CA > path /certificate/ca > auth no > method find > allow * > > path /certificate/ > auth no > method find > allow * > > path /certificate_request > auth no > method find, save > allow * > > # this one is not stricly necessary, but it has the merit > # to show the default policy which is deny everything else > path / > auth any > > SElinux is off and all firewall ports are open. Can anyone help? > > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/W3BCpKJzzc8J. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Re: Upgrade guide?
Hello; Sorry, I meant to say I downloaded the tarball, made the RPM using said tarball (using the redhat/puppet.spec) and moved teh RPM over to the copied puppetmaster server. So for all intents and purposes I am using the RPMs. On Mar 23, 3:58 pm, Adam Gibbins wrote: > On 23 March 2011 22:49, Michel wrote: > > > > > Hello; > > > Is there any documentation on how to perform a puppet upgrade? I > > download the tarball and extracted it to my copied puppetmaster > > server. Right now I have all the node definitions working, but any > > modules are not working. > > (not even a simply touch foo.txt exec command) > > > Some errors I am getting are related to tests > > > Parametr onlyif failed: 'test -f /etc/puppet/puppet.conf` is not a > > qualified and no path was specified. > > > We are upgrading from 2.5-1 to 2.6.6-1 > > Is there a reason you're extracting the tarball over using your > operating systems package management? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Upgrade guide?
Hello; Is there any documentation on how to perform a puppet upgrade? I download the tarball and extracted it to my copied puppetmaster server. Right now I have all the node definitions working, but any modules are not working. (not even a simply touch foo.txt exec command) Some errors I am getting are related to tests Parametr onlyif failed: 'test -f /etc/puppet/puppet.conf` is not a qualified and no path was specified. We are upgrading from 2.5-1 to 2.6.6-1 -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Integer comparison in Puppet Templates
Hello; Is it possible to include integer comparison in Puppet templates? An example node 'testy' { $foo = 5 if ( $foo > 4 ) { include users::four } include files::motd } class files::motd { file { "/etc/motd": content => template("files/motd.conf.erb") } Template mord.conf.erb <%if foo > 4 %> Have a foursy day <% end%> In this eaxmple the users::four is included in the node. When it goes to the motd.conf.erb file though it complains that I am trying to compare a string to an integer. Any way around this? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Puppet
Hello list, I have a puppet setup for 35 serveurs. It works fine everywhere except on 3 out of 4 firewalls (software firewalls with iptables and bridges). On those three machines, puppet dies without any errors in the logs. I have also tried with debug mode and saw nothing when puppet dies. The 4 firewalls have the very same setup: iptables, conntrackd and heartbeat on CentOS 5.3 latest. $ uname -ar Linux hostname 2.6.29.2 #2 SMP Wed May 13 12:11:15 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux $ rpm -qa | grep puppet puppet-0.24.5-1.el5 Any ideas how I can troubleshoot my issue? Thanks a lot, Jean-Michel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~--~~~~--~~--~--~---