[Puppet Users] How can we add multiple lines to a file ?
Hello, I am looking for an option to add multiple lines to a */etc/bashrc* and */etc/profile*. I can do this with *file_line*, but is there any other alternative. *file_line* does the job but for each line I will have to create a *file_line* resource, which does not sound good for multiple lines. Regards, Vikas -- 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/e56de655-943c-46d3-95db-3365ea4d34ee%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] How to install GIT on puppet Server
Hi Vikas, Thanks for your reply...Below are the steps I followed: I have copied GIT software to my node (git-2.0.4) and my nodes.pp looks like below: node dayrhetamp076.enterprisenet.org { package { 'git': ensure = present, source ='/etc/puppet/git-2.0.4', (Path of the git software) } } First I tried with not providing Source and later I provided the GIT software path on the machine where it exists.But in both the scenarios I got the following errors: TypeError: Can not open SQL database: unable to open database file Error: /Stage[main]/Main/Node[dayrhetamp076.enterprisenet.org]/Package[git]/ensure: change from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y list git' returned 1: (process:9133): GLib-CRITICAL **: g_timer_stop: assertion `timer != NULL' failed (process:9133): GLib-CRITICAL **: g_timer_destroy: assertion `timer != NULL' failed Traceback (most recent call last): File /usr/bin/yum, line 29, in module yummain.user_main(sys.argv[1:], exit_code=True) File /usr/share/yum-cli/yummain.py, line 285, in user_main errcode = main(args) File /usr/share/yum-cli/yummain.py, line 136, in main result, resultmsgs = base.doCommands() File /usr/share/yum-cli/cli.py, line 434, in doCommands self._getTs(needTsRemove) File /usr/lib/python2.6/site-packages/yum/depsolve.py, line 99, in _getTs self._getTsInfo(remove_only) File /usr/lib/python2.6/site-packages/yum/depsolve.py, line 110, in _getTsInfo pkgSack = self.pkgSack File /usr/lib/python2.6/site-packages/yum/__init__.py, line 887, in lambda pkgSack = property(fget=lambda self: self._getSacks(), File /usr/lib/python2.6/site-packages/yum/__init__.py, line 669, in _getSacks self.repos.populateSack(which=repos) File /usr/lib/python2.6/site-packages/yum/repos.py, line 308, in populateSack sack.populate(repo, mdtype, callback, cacheonly) File /usr/lib/python2.6/site-packages/yum/yumRepo.py, line 187, in populate dobj = repo_cache_function(xml, csum) File /usr/lib64/python2.6/site-packages/sqlitecachec.py, line 46, in getPrimary self.repoid)) TypeError: Can not open SQL database: unable to open database file Can you please help me out to resolve this? Satish. On Tuesday, August 12, 2014 5:51:44 AM UTC+5:30, Vikas Kumar wrote: Hi Satish, I would make a local repo and install it from there, just in case my server isn't connected to internet. If it is, you need not worry about it. Just install the package, and tweak the configuration files for your setup. Regards, Vikas On Monday, 11 August 2014 19:50:45 UTC+10, Satish Katuru wrote: Correct me If I am wrong.This means puppet automatically takes the latest version of GIT from the Repository and deploy it on the Master Server. What about other softwares like java...etc ? What is the procedure for other software installation which puppet wont take from the repository? -- 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/9747ac38-4305-40a9-b888-bfe9f6c7a3b5%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] How to install GIT on puppet Server
Hi Satish, Which flavor or version of Linux are you using ? I can try creating the scenario on my test machine and check myself. In the meantime, can you please post output of this command - /usr/bin/yum -d 0 -e 0 -y list git A small suggestion - Use code syntax for pasting logs, it makes a post much readable. Regards, Vikas -- 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/a6ebd322-69b4-4035-ae7e-011062c5c4e1%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Access to apt.puppetlabs.com slow for some IP addresses
Hello, thanks for confirming there's nothing wrong on the apt.puppetlabs.com side! That leaves our testbed's networking setup as the most likely culprit then. Either way, we'll set up a caching proxy to reduce the load we are causing on upstream repositories now. Cheers, Johannes Am Freitag, 8. August 2014 19:49:44 UTC+2 schrieb Matthaus Litteken: Johannes, I don't see anything on our end that would be causing the issue you're seeing. I have enabled some additional logging on the apt repos to get us extra information about what might be going on. I have also opened a ticket https://tickets.puppetlabs.com/browse/CPR-60 to track this issue. Please feel free to add any additional information that might help us diagnose the problem. Thanks! On Wed, Aug 6, 2014 at 2:11 AM, Johannes Grassler j.gra...@syseleven.de javascript: wrote: Hello, we are currently creating and tearing down lots of VMs in our lab environment. This includes retrieving and installing Puppet from the Puppetlabs repository at apt.puppetlabs.com. Recently we found that from some addresses in our lab's /24 access to http://apt.puppetlabs.com is painfully slow (things are trickling in at ~800 bytes per second). We double-checked our lab network and the automated VM provisioning process and found nothing amiss. Now we are wondering whether we ran into some kind of rate limiting on the repository's side, since we do repeatedly retrieve the same packages in the course of VM provisioning, more often than not from the same IP address. One of the 'slow' addresses in question is 37.44.0.243. Is there anyone on this list who could look into this? If we are indeed causing too much load we'd be happy to set up a public mirror of apt.puppetlabs.com. Cheers, Johannes -- SysEleven GmbH Umspannwerk - Aufgang C Ohlauer Straße 43 10999 Berlin Tel +49 30 233 2012 0 Fax +49 30 616 755 50 http://www.syseleven.de http://www.facebook.com/SysEleven Firmensitz: Berlin Registergericht: AG Berlin Charlottenburg, HRB 108571 B Geschäftsführer: Marc Korthaus, Thomas Lohner -- 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/a289bd73-cddf-4b76-80d1-c5e5ee6f30d5%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- Matthaus Owens Puppet Labs Join us at PuppetConf 2014, September 20-24 in San Francisco Register by September 8th to take advantage of the Final Countdown —save $149! -- 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/f4484498-7092-4c41-964d-358c30359fc0%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Very large resource_statuses. reports:prune:orphaned fails with Mysql error
Hi! I use Puppet enterprise 2.7.2. In the database for Puppet Dashboard the resource_statuses table has grown rapidly the past month (when I was on vacation). I have experienced this earlier also and have implemented the suggested solution here: https://projects.puppetlabs.com/issues/6717 (downloaded a new rake task reports:prune:orphaned). I have sucessfully executed that task in the past, but now it fails with an error: Mysql::Error: Lock wait timeout exceeded; try restarting transaction: delete from resource_statuses where report_id not in (select id from reports) limit 1000. The resource_statuses.ibd file is 103 GB! (containing about 250 million rows). When this happened earlier the rake task reports:prune:orphaned ran for many days, but eventually completed. Is it possible to quickly drop the whole resource_statuses table and recreate it? Note that I also currently work with upgrade / migration to Puppet Enterprise 3.x but need to maintain this 2.7.2 installation in paralell. Best regards, Erling -- 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/f87939b4-61b1-4837-8969-07cf9022a552%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] install windows package
If you mean installing a windows package (such as an MSI or EXE) – you should review the package resource type documentation https://docs.puppetlabs.com/puppet/latest/reference/resources_package_windows.html https://docs.puppetlabs.com/references/latest/type.html#package This works really well out of the box if your installer displays information in Control Panel/Installed Programs. If your installer doesn’t, you should look at using Rob Reynold’s Chocolatey packaging tool in conjunction with Josh Cooper’s Chocolatey Provider for the package resource type. -Jim From: huhm4n Sent: Monday, August 11, 2014 5:22 PM To: puppet-users@googlegroups.com Subject: [Puppet Users] install windows package is it possible to install the windows package using puppet? I know I can do it using the Powershell but I want to dry run it to ensure if it is installed first? -- 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/62c3ed1c-2dc4-4ac7-a605-d747de0083f8%40googlegroups.com. 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/AA972CB808994769B2841136239CB859%40JimHPPavilionG6. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Verify whether the directory has files or not
Hi, I want to copy files into agent machine if the directory in Master server has files? How to Check whether the directory has files or not?(need to add a condition) Sathish. -- 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/78274b7c-dbac-4563-ae0c-21071155ee2b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] How to install GIT on puppet Server
Hi Vikas, Please find the below information: Linux version: *Linux 2.6.32-358.6.2.el6.x86_64 x86_64* Below is the output for the command /usr/bin/yum -d 0 -e 0 -y list git **Note* Red Hat Network repositories are not listed below. You must run this command as root to access RHN repositories.Error: No matching Packages to list* On Tuesday, August 12, 2014 12:42:10 PM UTC+5:30, Vikas Kumar wrote: Hi Satish, Which flavor or version of Linux are you using ? I can try creating the scenario on my test machine and check myself. In the meantime, can you please post output of this command - /usr/bin/yum -d 0 -e 0 -y list git A small suggestion - Use code syntax for pasting logs, it makes a post much readable. Regards, Vikas -- 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/ced8a465-fc1a-48df-90a4-fad9f8ed990c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Very large resource_statuses. reports:prune:orphaned fails with Mysql error
On 8/12/2014 1:34 AM, Erling Ringen Elvsrud wrote: Hi! I use Puppet enterprise 2.7.2. In the database for Puppet Dashboard the resource_statuses table has grown rapidly the past month (when I was on vacation). I have experienced this earlier also and have implemented the suggested solution here: https://projects.puppetlabs.com/issues/6717 (downloaded a new rake task reports:prune:orphaned). I have successfully executed that task in the past, but now it fails with an error: Mysql::Error: Lock wait timeout exceeded; try restarting transaction: delete from resource_statuses where report_id not in (select id from reports) limit 1000. The resource_statuses.ibd file is 103 GB! (containing about 250 million rows). When this happened earlier the rake task reports:prune:orphaned ran for many days, but eventually completed. Is it possible to quickly drop the whole resource_statuses table and recreate it? Note that I also currently work with upgrade / migration to Puppet Enterprise 3.x but need to maintain this 2.7.2 installation in parallel. You could try dropping the table and recreating it, but it might orphan all the resources. If you want the longer safer way, this is how I've done it in the past. Note that you'll need to dump and import the data for that table in order to reclaim the space from the table. https://ask.puppetlabs.com/question/884/how-do-i-reduce-the-space-mysql-is-using-for-puppet-dashboard/?answer=885#post-id-885 Ramin -- 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/53EA38AA.401%40badapple.net. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Very large resource_statuses. reports:prune:orphaned fails with Mysql error
On 8/12/2014 8:54 AM, Ramin K wrote: On 8/12/2014 1:34 AM, Erling Ringen Elvsrud wrote: Hi! I use Puppet enterprise 2.7.2. In the database for Puppet Dashboard the resource_statuses table has grown rapidly the past month (when I was on vacation). I have experienced this earlier also and have implemented the suggested solution here: https://projects.puppetlabs.com/issues/6717 (downloaded a new rake task reports:prune:orphaned). I have successfully executed that task in the past, but now it fails with an error: Mysql::Error: Lock wait timeout exceeded; try restarting transaction: delete from resource_statuses where report_id not in (select id from reports) limit 1000. The resource_statuses.ibd file is 103 GB! (containing about 250 million rows). When this happened earlier the rake task reports:prune:orphaned ran for many days, but eventually completed. Is it possible to quickly drop the whole resource_statuses table and recreate it? Note that I also currently work with upgrade / migration to Puppet Enterprise 3.x but need to maintain this 2.7.2 installation in parallel. You could try dropping the table and recreating it, but it might orphan all the resources. If you want the longer safer way, this is how I've done it in the past. Note that you'll need to dump and import the data for that table in order to reclaim the space from the table. https://ask.puppetlabs.com/question/884/how-do-i-reduce-the-space-mysql-is-using-for-puppet-dashboard/?answer=885#post-id-885 I made an error. Because you're already using file per table the optimize step will reclaim the space as long as you've already purged the data. Ramin -- 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/53EA39A2.6070903%40badapple.net. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Disable firewall using puppetlabs firewall module
Hi, I'm trying to setup the firewall module to be disabled on certain nodes (for testing). However, when even if i set the following: class { 'firewall': ensure = stopped, } The firewall is still running on centos 6.5 and is sometimes stopped on centos 7.0. I've also noticed that the firewall rules keep changing between runs (which i think is some of the problem). Below is the sample code i've got going: manifests/site.pp -- resources { firewall: purge = true, } Firewall { before = Class['test::post'], require = Class['test::pre'], } modules/test/manifests/pre.pp -- class test::pre { Firewall { require = undef, } # Default firewall rules firewall { '000 accept all icmp': proto = 'icmp', action = 'accept', } } modules/test/manifests/post.pp -- class test::post { firewall { '999 drop all': proto = 'all', action = 'drop', before = undef, } } manifests/nodes/test.pp -- node ... { class { 'firewall': ensure = stopped, } class { 'test::pre': } class { 'test::post': } class { 'ssh': } } modules/ssh/manifests/init.pp class ssh { include ssh::server } modules/ssh/manifests/server.pp class ssh::server ( .. ){ firewall { '100 allow ssh': chain = 'INPUT', state = ['NEW', 'ESTABLISHED'], dport = '22', proto = 'tcp', action = 'accept', } ... } = OUTPUT = First Run - Notice: /Stage[main]/Test::Pre/Firewall[000 accept all icmp]/ensure: created Notice: /Stage[main]/Firewall::Linux::Redhat/Service[iptables]/ensure: ensure changed 'running' to 'stopped' Notice: /Stage[main]/Ssh::Server/Firewall[100 allow ssh]/ensure: created Notice: /Stage[main]/Test::Post/Firewall[999 drop all]/ensure: created Notice: Finished catalog run in 2.57 seconds Second Run - Notice: /Stage[main]/Test::Pre/Firewall[000 accept all icmp]/ensure: created Notice: /Stage[main]/Firewall::Linux::Redhat/Service[iptables]/ensure: ensure changed 'running' to 'stopped' Notice: Finished catalog run in 2.38 seconds Third Run See First Run ... (loops) As a side note, i poked/hacked through the ruby code in the module and i was seeing this difference between centos 7.0 and centos 6.5. It seems that the 'proto', 'icmp' stuff isn't parsed correctly?? centos 6.5 output: - Debug: (provider=iptables): sijis/@property_hash #B: protoicmpactionacceptensurepresentline-A INPUT -p icmp -m comment --comment 000 accept all icmp -j ACCEPT chainINPUTname000 accept all icmptablefilterprovideriptables centos 7.0.1406 - Debug: (provider=iptables): sijis/@property_hash #B: {:name=000 accept all icmp, :proto=icmp, :chain=INPUT, :line=-A INPUT -p icmp -m comment --comment \000 accept all icmp\ -j ACCEPT, :provider=iptables, :table=filter, :ensure=:present, :action=accept} I added this line debug 'sijis/@property_hash #B: %s' % @property_hash.to_s to https://github.com/puppetlabs/puppetlabs-firewall/blob/master/lib/puppet/provider/firewall/iptables.rb#L123-L127 I'd appreciate any feedback. Thanks Sijis -- 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/ab3e3a43-07d0-4489-bc66-b0cbcd8849ac%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Re: How can we add multiple lines to a file ?
On Tuesday, August 12, 2014 1:57:14 AM UTC-5, Vikas Kumar wrote: Hello, I am looking for an option to add multiple lines to a */etc/bashrc* and */etc/profile*. I can do this with *file_line*, but is there any other alternative. *file_line* does the job but for each line I will have to create a *file_line* resource, which does not sound good for multiple lines. Regards, Vikas Vikas, Maybe try using concat module (https://github.com/puppetlabs/puppetlabs-concat)? But i think you'll still have multiple concat::fragment entries. Sijis -- 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/72ec07d4-2f78-4889-94d4-938d331d324c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Exported resources applied on exporting host - EL7 only
I have noticed a very strange problem on CentOS 7 nodes where they are collecting and/or applying their exported resources. I have a class called brazos::firewall that's used internally to export a firewall rule that is then collected by brazos::gw to allow specific systems through the gateway server's NAT. Below are the actual classes. I've found that on CentOS 6 systems, the resource is correctly exported (NOT applied by exporting host) and collected by the gw server. On CentOS 7 systems the resource is exported, and also applied by the exporting host when it's not supposed to be. All systems are running Puppet 3.6.2. I have tested this issue using the Pupppetlabs yum repo version of Puppet as well as the EPEL7 version, both show this issue. How can this behavior be debugged? I have looked in /var/lib/puppet/state/classes.txt on the nodes incorrectly applying their exported resource and the brazos::gw class is not listed. I have no idea WHY the Firewall resource is being applied when it should be exported. I am using Hiera to assign classes and set parameters and Foreman to set the environment and provide various top-scope variables. The only thing applied to EL7 systems that's different than EL6 systems in my Hiera configuration is the path to EPEL repos, paths to a few commands (like mco), and the Puppet version. No separate classes are applied that differ from EL6 systems. Thanks - Trey brazos::firewall: class brazos::firewall ( $allow_forward = false, ) inherits brazos::params { validate_bool($allow_forward) if $allow_forward { @@firewall { 050 allow forward ${::fqdn}: ensure = 'present', chain = 'FORWARD', action = 'accept', proto = 'all', source = $::fqdn, destination = '0.0.0.0/0', tag = 'allow_forward', } } } brazos::gw: class brazos::gw ( $private_interface = 'UNSET', $private_subnet = '192.168.200.0/22', $ib_interface = 'ib0', $ib_subnet = '192.168.208.0/22', $public_interface = 'UNSET', ) inherits brazos::params { snip Firewall | tag == 'allow_forward' | snip } -- 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/15ce31eb-07bd-4076-bc75-4f51f577162f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] How to make puppetlabs_spec_helper ignore modules inside fixtures
Hello all, I have created this module: https://github.com/Spantree/puppet-thrift and everything worked fine all specs ran fine. Now I using the puppetlabs/apt module and when I run the 'rake spec' it is trying to run the 'apt' tests, and it is failing (I think) because I am not providing the appropriate facts. Is there a way to ignore the rspecs inside the fixtures/modules/ directory? I tried to do this: require 'rake'require 'rspec/core/rake_task' RSpec::Core::RakeTask.new(:spec) do |t| t.pattern = 'spec/*/*_spec.rb'end But it didn't work. Can anybody point me in the right direction here? Thanks in advance, Seb -- 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/1d7b8768-0e72-40c3-97f7-623d08f028ac%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Problems logging into PE dashboard after inactivity
I have recently noticed the following problem: after long periods of inactivity I do not succeed logging into the PE dashboard. Here is the error: https://puppet/api/server_status?ticket=ST-1407871225rFODw30IRUDwdOspCwK The page you were looking for doesn't exist. You may have mistyped the address or the page may have moved. Even when executing https:://puppet again Rails always redirects me to this url. Sometimes restarting the Puppet master helps, or I have to go to https://puppet/nodes/host name of Puppet master. Any suggestions will be greatly appreciated. Werner -- 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/3faf3053-81a5-43ee-806c-df6b5d7f265f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Augeas hates me!!!
Hello, all! I am trying to add some new modules to an openSuse 13.1 host with Puppet and Augeas with no luck. The modules themselves are already installed by the example42/apache module, but I can't get the apache::module syntax to properly add the modules to the proper openSuse config files. So, I'm opting for Augeas to do the dirty-work. I have the following definition in the server's manifest (dev-apache.pp) file (the apache::module command are still there, but don't work, so the augeas section is the brute-force attempt; I just included them both so you can see the current state of this class manifest): ... apache::module { 'status': } apache::module { 'asis': } apache::module { 'auth_digest': } apache::module { 'headers': } apache::module { 'proxy': } apache::module { 'proxy_http': } apache::module { 'rewrite': } apache::module { 'vhost_alias': } apache::module { 'authz_default': } apache::module { 'proxy_balancer': } augeas { 'apache2': context = /files/etc/sysconfig/apache2, lens= sysconfig.lns, incl= '/usr/share/augeas/lenses/dist/', changes = 'set APACHE_MODULES actions alias auth_basic authn_file authz_host authz_groupfile authz_user autoindex cgi dir env expires include log_config mime negotiation setenvif ssl userdir reqtimeout authn_core authz_core status asis auth_digest headers proxy proxy_http rewrite vhost_alias authz_default proxy_balancer', } ... When running the agent in --debug --verbose --test, I get this debug output from augeas: Debug: Augeas[apache2](provider=augeas): Opening augeas with root /, lens path , flags 64 Debug: Augeas[apache2](provider=augeas): Augeas version 1.0.0 is installed Debug: Augeas[apache2](provider=augeas): Will attempt to save and only run if files changed Debug: Augeas[apache2](provider=augeas): sending command 'set' with params [ /files/etc/sysconfig/apache2/APACHE_MODULES, actions alias auth_basic authn_file authz_host authz_groupfile authz_user autoindex cgi dir env expires include log_config mime negotiation setenvif ssl userdir reqtimeout authn_core authz_core status asis auth_digest headers proxy proxy_http rewrite vhost_alias authz_default proxy_balancer] Debug: Augeas[apache2](provider=augeas): Skipping because no files were changed Debug: Augeas[apache2](provider=augeas): Closed the augeas connection No errors, but the file is marked as unchanged. Before the puppet run, /etc/sysconfig/apache2 contains this line: APACHE_MODULES=foo and obviously, it's the same afterwards. Any insight into what I may be doing wrong? -- 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/3d666f47-8b6e-436a-8791-a15e50ab9771%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Today's outage on tickets.puppetlabs.com
We had an outage today on the Puppet Labs JIRA ticket tracker. tickets.puppetlabs.com was unavailable from 1800 GMT to 2000 GMT (1110 PDT to 1300 PDT) The service is back up, and no data has been lost. For anyone who is interested, we'll be publishing the results of our post-mortem on the Puppet Labs blog this week. If you have any immediate questions, please feel free to reach out to me directly. -- Nigel CIO, Puppet Labs -- 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/CAGUqgV9CmB_vw5OHuJFY9tKko3AiO7V%3DZaKsoV_XuWicmdWHjg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Saucy leaving apt.puppetlabs.com
Ubuntu saucy has reached end of life on July 17, 2014 [1]. As such, we will not be building new packages for saucy. We will remove it from our apt repository on Monday, September 15. [1] - https://lists.ubuntu.com/archives/ubuntu-announce/2014-July/000187.html -- Melissa Stone Release Engineer, Puppet Labs *Join us at PuppetConf 2014 http://www.puppetconf.com/, September 20-24 in San Francisco* *Register by September 8th to take advantage of the Final Countdown https://www.eventbrite.com/e/puppetconf-2014-tickets-7666774529?discount=FinalCountdown * *—**save $149!* -- 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/CAHEe_kqfDFdb3GksZfjv04XpVutCJ8wgPjPMfPEdXi9XFKHC-Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] How to install GIT on puppet Server
Hi Satish, I was looking the flavor of Linux OS not the kernel. Run the below command to check OS major and minor version. facter | egrep 'operatingsystem|lsbdistid|lsbdistdescription' Also, the output of the command states that you do not git in your repository. /usr/bin/yum -d 0 -e 0 -y list git *Note* Red Hat Network repositories are not listed below. You must run this command as root to access RHN repositories. Error: No matching Packages to list I think *git* rpm is there by default in all RedHat based OS. Still can you run below commands and share the output. yum clean all yum repolist yum list all | grep git Regards, Vikas On Tuesday, 12 August 2014 20:52:39 UTC+10, Satish Katuru wrote: Hi Vikas, Please find the below information: Linux version: *Linux 2.6.32-358.6.2.el6.x86_64 x86_64* Below is the output for the command /usr/bin/yum -d 0 -e 0 -y list git **Note* Red Hat Network repositories are not listed below. You must run this command as root to access RHN repositories.Error: No matching Packages to list* On Tuesday, August 12, 2014 12:42:10 PM UTC+5:30, Vikas Kumar wrote: Hi Satish, Which flavor or version of Linux are you using ? I can try creating the scenario on my test machine and check myself. In the meantime, can you please post output of this command - /usr/bin/yum -d 0 -e 0 -y list git A small suggestion - Use code syntax for pasting logs, it makes a post much readable. Regards, Vikas -- 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/8f0d8e9c-28ed-4ffe-9e7f-d676a73dc844%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Re: Verify whether the directory has files or not
Hi Satish, It depends on which resource are you trying to use. Please elaborate your question. Regards, Vikas On Tuesday, 12 August 2014 20:36:57 UTC+10, Satish Katuru wrote: Hi, I want to copy files into agent machine if the directory in Master server has files? How to Check whether the directory has files or not?(need to add a condition) Sathish. -- 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/3dfe180d-25a2-48dd-b7bf-6ceba36fbf39%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Re: variable not being picked up by hiera hierarchy
Found my own answer - so though i'd post it here incase anyone else is trying to learn this stuff :) The variable i was trying to reference was located inside a class, so it would have had to have been referenced as %{classname::variable}, this is considered bad practice as its not a top scope variable and it could run into issues further down the track - my solution was to create a puppet custom fact and reference it via ${::fact_name} This is a snippet from my custom fact, so I hope it helps someone else; All the hosts are named type-role-env-loc eg int-vmhost-testing-location machine_role.rb is the file name and i had it located in the base module puppet/modules/base/lib/facter -- stuff in this dir (modulename/lib/facter) is automatically picked up by puppet. Facter.add('machine_role') do setcode do $hostname = Facter.value('hostname') case $hostname when /-vmhost-/ $machine_role = 'vmhost' when /-Othermachinenames-/ $machine_role = 'whatever' default $machine_role = 'unknown' end end end so that above creates a puppet custom fact, which facter -p (-p tell it to use puppet custom manifests) will return machine_role = rolename If you're testing on a local machine outside of puppet set your path to where the facter file is located $ export FACTERLIB=~/puppet/modules/base/lib/facter:$FACTERLIB $ facter machine_role vmhost inside hiera.conf i setup a hierarchy and one of the lines was... - role/%{::machine_role} so I had a directory created inside the :datadir: dir called roles which contains files like vmhost.yaml whatever.yaml unknown.yaml also a quick way to see if things are working properly.. hiera -d -c /path/to/hiera.yaml param_to_check ::machine_role=vmhost Once you have this setup in puppet and *IF* you have updated your hiera.conf make sure you restart puppet! This gave me the ability if required to have different conditions for different host types as defined by their hostname. Cheers David -- 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/90ea51eb-aa01-42f3-b357-9aa77245cc80%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Re: Augeas hates me!!!
Hello, I think double quotes in your set statement are the culprit. Try to use set as below 'set /files/whatever/path \'your text in quotes\'', Regards, Vikas -- 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/8698f74d-b5cf-470f-983e-ca170861d468%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Re: Augeas hates me!!!
Thanks, I'll give that a try in the morning. On Aug 12, 2014 8:39 PM, Vikas Kumar vikas...@gmail.com wrote: Hello, I think double quotes in your set statement are the culprit. Try to use set as below 'set /files/whatever/path \'your text in quotes\'', Regards, Vikas -- 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/BPOYk4BU-bY/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/8698f74d-b5cf-470f-983e-ca170861d468%40googlegroups.com https://groups.google.com/d/msgid/puppet-users/8698f74d-b5cf-470f-983e-ca170861d468%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/CABd8GATM_LTiqDiDBKXvbUifF8VHN19pPu4T_aVwkg4UJgjxag%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.