Re: [Puppet Users] Do modules need to be installed on agents?

2014-07-02 Thread zerozerounouno
Il giorno martedì 1 luglio 2014 04:25:23 UTC+2, Garrett Honeycutt ha scritto: > I agree with Rich. The issue you are likely facing with the selinux > module is that the directory is 'spiette-selinux' instead of 'selinux' > The path was right, but thank you very much (to both of you) for the

[Puppet Users] Do modules need to be installed on agents?

2014-06-30 Thread zerozerounouno
Hi, I'm getting confused about module paths... In a master - agent configuration, if the classes applied to the agent need some additional Forge modules to be installed, is it enough if I install them on the master, or do I need to install them on all clients too? I didn't need to install them

Re: [Puppet Users] sshd configuration

2014-06-17 Thread zerozerounouno
Il giorno martedì 17 giugno 2014 10:29:08 UTC+2, alexanderdav ha scritto: > > You should take a look at > https://forge.puppetlabs.com/domcleal/augeasproviders . > Wow, that worked great and easy, thanks! I whish I'd found it also before using another puppetforge module for sysctl configuration

[Puppet Users] sshd configuration

2014-06-17 Thread zerozerounouno
Hi, what's the best module/way to change some options in the sshd_config file? I just have to change a couple of options from their OS defaults. I searched in the forge but, apart from the fact that I often find it hard to understand how to use some of the contributed modules, it looks like ssh

Re: [Puppet Users] PostgreSQL INSERT

2014-05-28 Thread zerozerounouno
Il giorno martedì 27 maggio 2014 13:54:18 UTC+2, Dirk Heinrichs ha scritto: > I wonder what's wrong with exec? I use for example: > Thank you, I'll try to adapt your example to my needs (I'm on Linux so some of your parameters won't fit), although I have the same feeling Felix expressed. But

[Puppet Users] PostgreSQL INSERT

2014-05-27 Thread zerozerounouno
Hi, how can I use Puppet to insert a row in a table inside a PostgreSQL database? Of course I could manage it through an Exec resource, but isn't there a more "elegant" solution? I would also need to be sure the line isn't already there, before inserting it... I'm looking at the supported modu

[Puppet Users] Re: Setting quotes using augeas type

2014-05-06 Thread zerozerounouno
On Wednesday, April 30, 2014 11:21:47 PM UTC+2, kbrede wrote: But when using the augeas type with the following: > changes => 'set \$database_password "\"test\""', > > The file entry looks like: > $database_password = \"test\"; > Try this (pay attention to what is a single quote and what is a dou

[Puppet Users] Re: Possible to move/rename files?

2014-03-18 Thread zerozerounouno
On Monday, March 17, 2014 5:31:47 PM UTC+1, Jasmine Lognnes wrote: > Right now I replace content is files with e.g. > > replace { 'dummy5': > Er... I didn't even know a "replace" resource type existed. Where does it come from? > Is it possible to rename files with Puppet or is there a bett

[Puppet Users] Re: augeas, ntp.conf and iburst

2014-03-13 Thread zerozerounouno
On Wednesday, March 12, 2014 3:35:09 PM UTC+1, kbrede wrote: > How do I append "iburst" at the end of "time.example.com?" > AFAICT in augtool this works: set /files/etc/ntp.conf/server[1] "time.example.com iburst" So, did you actually try the following? Mind the quotes. changes => [

[Puppet Users] Symlinks to manifests

2014-03-03 Thread zerozerounouno
Hi, I'd like to keep symlinks to my manifests in /etc/puppet/environments/common//manifests/, and have my real manifests reside elsewhere, so that I can organize the real ones in subdirectories as I prefer, e.g. under a CVS tree with an organization based on project or else. Unfortunately, it

Re: [Puppet Users] Condition on class existence on agent

2014-02-28 Thread zerozerounouno
On Thursday, February 27, 2014 5:16:43 PM UTC+1, nikolavp wrote: More can be found in > > http://docs.puppetlabs.com/puppet/latest/reference/lang_classes.html#inheritance > > look at the "Overriding Resource Attributes" section. Although I don't > like inheritance as you describe it if roleB i

[Puppet Users] Re: varying files for puppet agents

2014-02-27 Thread zerozerounouno
On Thursday, February 27, 2014 2:43:34 PM UTC+1, AAB !! wrote: > How to manage files which are not static but dynamic. Different services > can have files which needs different values based on their characteristics! > Like in ssh configuration file the listening interface should be the IP of

Re: [Puppet Users] Condition on class existence on agent

2014-02-27 Thread zerozerounouno
On Thursday, February 27, 2014 8:52:04 AM UTC+1, nikolavp wrote: A specific example I think will be of much help. Some ideas: > > 1) Is "role B" just a more specific "role A" or they aren't so much > related. You can use inheritance if they are and change the file/define Yes, B is some sort of

Re: [Puppet Users] Condition on class existence on agent

2014-02-26 Thread zerozerounouno
On Wednesday, February 26, 2014 2:47:32 PM UTC+1, nikolavp wrote: > What is the reason for the definition of those classes on the same host? > That's because I have some more general "role A" to which some hosts belong, but I also have "role B" which is some sort of further specification of

[Puppet Users] Condition on class existence on agent

2014-02-26 Thread zerozerounouno
Hi, how can I create a condition based on the presence of a specific puppet class on the host? I'm using Foreman, some hosts have myclass_a applied, while others have myclass_a AND myclass_b. Resources in myclass_b are applied after resources in myclass_a. Both classes change a parameter inside

Re: [Puppet Users] Use the same resource in two dependent classes

2014-02-18 Thread zerozerounouno
On Tuesday, February 18, 2014 1:18:36 PM UTC+1, Felix.Frank wrote: > Can the service be moved to a class of its own, which is included and > notified by both A and B? > Indeed, maybe this is a clean and viable solution. I'll look into it. Thanks. -- You received this message because you are

Re: [Puppet Users] Use the same resource in two dependent classes

2014-02-18 Thread zerozerounouno
On Tuesday, February 18, 2014 1:11:15 PM UTC+1, nikolavp wrote: > class A { > service {'myservice': > ensure => 'started', > } > > file { '/etc/default/myservice.conf': > ensure => present, > notify => Service['myservice'], > template => '...',

Re: [Puppet Users] Use the same resource in two dependent classes

2014-02-18 Thread zerozerounouno
On Monday, February 17, 2014 9:40:22 PM UTC+1, Trevor Vaughan wrote: Can you just have Class B 'include' class A and then have the appropriate > resources in Class B notify/require what you need from Class A? > Wouldn't this create a dependency cycle? Class B, as I wrote, "requires" class A. I

Re: [Puppet Users] Re: Tags and dependencies

2014-02-18 Thread zerozerounouno
On Monday, February 17, 2014 3:49:30 PM UTC+1, jcbollinger wrote: > Yes, I believe the combination of two simple expressions into a complex > one via the "and" operator is what Felix was referring to. Despite the > docs, it might be worthwhile to play around a bit to test the outlines of > t

[Puppet Users] Use the same resource in two dependent classes

2014-02-17 Thread zerozerounouno
Hi, I have this situation: Class A: contains a File resource, and a Service resource which requires the File resource (the service needs to be restarted when the file changes). Class B: will be applied only on a subset of machines where class A is applied, and it requires class A - resources be

Re: [Puppet Users] Re: Tags and dependencies

2014-02-14 Thread zerozerounouno
On Friday, February 14, 2014 3:55:29 PM UTC+1, Felix.Frank wrote: On 02/14/2014 03:52 PM, zerozer...@gmail.com wrote: > > File <| (tag == "myname::myclass") and (tag == "post_exec") |> > > While this looks sane, this syntax is not yet supported. Your collectors > must use trivial expressions

[Puppet Users] Re: Tags and dependencies

2014-02-14 Thread zerozerounouno
On Thursday, February 13, 2014 4:23:27 PM UTC+1, jcbollinger wrote: I think so. This looks related to > https://tickets.puppetlabs.com/browse/PUP-1045. Moreover, resources get > automatic tags that may support what you're after even easier than what > you're trying to do. For example, this m

[Puppet Users] Re: Tags and dependencies

2014-02-14 Thread zerozerounouno
On Thursday, February 13, 2014 4:23:27 PM UTC+1, jcbollinger wrote: I think so. This looks related to > https://tickets.puppetlabs.com/browse/PUP-1045. > Uhm… thanks! So the problem is that defaults only apply when the specified attributes are empty for the affected resources; but some tags ar

[Puppet Users] Re: Creating a directory

2014-02-14 Thread zerozerounouno
On Thursday, February 13, 2014 4:18:52 PM UTC+1, Max Hoopmann wrote: > But now I want to do this via the foreman UI. I can create a new > provisioning template connect it with the correct OS and environment, but > when I do a puppetrun in the browser with the foreman UI nothing happens. > Eve

[Puppet Users] Tags and dependencies

2014-02-12 Thread zerozerounouno
Hi, I'm using tags in resource defaults to define resource ordering inside a single class, preventing at the same time dependency cycles with other classes, like this: class myname::myclass { # defaults User { tag => "this_class" } File { tag => "this_class" } Service{ t

[Puppet Users] Exec script from puppet file server

2014-02-07 Thread zerozerounouno
Hi, I need to use an exec resource to execute a shell script, and I'd like to keep the script on the puppet master. Is there a way to make the exec resource execute the script directly from puppet's built-in file server? It doesn't seem to accept the puppet:/// URI type. Otherwise I will need

[Puppet Users] Re: install_options fails for rpm provider

2014-02-06 Thread zerozerounouno
On Thursday, February 6, 2014 12:44:53 PM UTC+1, zerozer...@gmail.com wrote: > AFAICT from the docs < > http://docs.puppetlabs.com/references/latest/type.html#package-provider-features>, > > when using a "package" resource with the rpm provider, the install_options > attribute should be allow

[Puppet Users] install_options fails for rpm provider

2014-02-06 Thread zerozerounouno
Hi, AFAICT from the docs < http://docs.puppetlabs.com/references/latest/type.html#package-provider-features>, when using a "package" resource with the rpm provider, the install_options attribute should be allowed. But it seems it is not taken into account here. I have a resource like this: p

Re: [Puppet Users] Workaround for user password hash

2014-02-06 Thread zerozerounouno
On Thursday, February 6, 2014 11:15:04 AM UTC+1, Felix.Frank wrote: Heh, well the thing with single quotes is - those will make *all* > characters be interpreted literally, including the backslashes. > Uhm… according to < http://docs.puppetlabs.com/puppet/latest/reference/lang_datatypes.html#si

Re: [Puppet Users] Workaround for user password hash

2014-02-06 Thread zerozerounouno
On Wednesday, February 5, 2014 8:31:21 PM UTC+1, Brian Mathis wrote: > There is nothing wrong with the sha1() function, it's just being used > incorrectly. > Just for the record, what would be the correct way to use it for this purpose? I think it could be an interesting topic: when searchin

Re: [Puppet Users] Workaround for user password hash

2014-02-06 Thread zerozerounouno
On Wednesday, February 5, 2014 7:57:01 PM UTC+1, Jeremy wrote: > I believe Chuck is on the right path.. Just from a simple test > (https://gist.github.com/jbouse/8830543) this shows that using the > double quotes is incorrect. Well… it's not "incorrect": you _can_ use double quotes. You jus

Re: [Puppet Users] Workaround for user password hash

2014-02-06 Thread zerozerounouno
On Wednesday, February 5, 2014 7:25:53 PM UTC+1, Chuck Anderson wrote: > Use single quotes rather than double quotes so the $ aren't > interpolated as variables: > But if you are accustomed to using double quotes around strings, you might prefer using them here too, for consistency. Just be

[Puppet Users] Workaround for user password hash

2014-02-05 Thread zerozerounouno
Hi, I suppose it will be useful if I share a workaround I just found for a problem I encountered. I needed a "user" puppet resource to add a user and set its password, on CentOS 6.4. The manifest was applied with no errors, but the password was not set correctly. I tried: password => sha1("

Re: [Puppet Users] Puppet resources or plain script?

2014-01-31 Thread zerozerounouno
On Friday, January 31, 2014 3:08:53 PM UTC+1, liu.cy wrote: > 1. augeas, but it depends on what application are you using. augeas only > works when template available. the most common config files are built-in > supported like sysctl.conf, iptables, httpd.conf. you have to write your > own au

[Puppet Users] Re: Trouble with notify/require/before/subscribe

2014-01-31 Thread zerozerounouno
On Friday, January 31, 2014 1:40:38 PM UTC+1, Stack Kororā wrote: > > Huh. I don't know why, but for some silly reason I thought I had to use > subclasses with arrows. I will re-work my script with them and see how it > goes. > Hi, I'll add that chaining arrows between single resources can quic

Re: [Puppet Users] Puppet resources or plain script?

2014-01-31 Thread zerozerounouno
On Friday, January 31, 2014 11:30:53 AM UTC+1, Jose Luis Ledesma wrote: Without knowing exactly everything you do to deploy a new server, I would > suggest make use of templates to deploy these config files you modify with > seds... > Well, I'm not very skilled with templates yet, but wouldn't

[Puppet Users] Puppet resources or plain script?

2014-01-31 Thread zerozerounouno
Hi, I'm going to use Puppet to replace a long manual process which involves lots of steps mostly like installing packages, copying configuration files, and also doing many string replacements with sed and line additions inside those configuration files. All on CentOS. I was wondering whether tr

[Puppet Users] Re: Spacing in attributes

2014-01-22 Thread zerozerounouno
On Tuesday, January 21, 2014 4:05:48 PM UTC+1, jcbollinger wrote: > Possible alternative explanations: > >- You are quoting the parameter name (which is fine), and at least >some of the added whitespace is going inside the quotes. "ip " => >"192.168.1.1" >- You are inserting a

[Puppet Users] Spacing in attributes

2014-01-20 Thread zerozerounouno
Hi, as far as I understand, spacing should usually not be an issue in manifests between the attribute name and the "arrow", right? For example, for a "host" type resource: ip => "192.168.1.1" …should be the same as: ip => "192.168.1.1" Is that right? It's useful to make manifests ea

Re: [Puppet Users] Re: Alternating results with mount Puppet resource

2014-01-10 Thread zerozerounouno
On Friday, January 10, 2014 3:19:39 PM UTC+1, jcbollinger wrote: > A v2.6 agent should work with a v2.7 master, but it is worthwhile checking > out the effect of the upgrade. > The upgrade to 2.7.23 had no effect on the issue. The master runs 3.3.2 by the way; are there issues with this? >

Re: [Puppet Users] Re: Alternating results with mount Puppet resource

2014-01-10 Thread zerozerounouno
On Friday, January 10, 2014 11:32:59 AM UTC+1, Felix.Frank wrote: > I think your original post to the list was pretty much to the point. I just realized the machine was still running puppet 2.6.18. I now upgraded to 2.7.23 and I'll wait some runs before filing the issue. The bug appears to be

Re: [Puppet Users] Re: Alternating results with mount Puppet resource

2014-01-10 Thread zerozerounouno
On Friday, January 10, 2014 11:05:47 AM UTC+1, Felix.Frank wrote: looks like a minor bug with the mount provider. You may want to file a > report, although you should be able to trivially work around it by > fixing your fstabs, correct? Yes, it's not a big problem for me. I just wanted to be

Re: [Puppet Users] Re: Alternating results with mount Puppet resource

2014-01-10 Thread zerozerounouno
On Thursday, January 9, 2014 3:58:10 PM UTC+1, jcbollinger wrote: > puppet agent --no-daemonize --debug --verbose --interval=120 --logdest >> stdout > > The --interval option is not accepted, so being forced to use the default of 30 minutes I used: PUPPET_EXTRA_OPTS="--debug --verbose --lo

Re: [Puppet Users] Re: Alternating results with mount Puppet resource

2014-01-09 Thread zerozerounouno
On Wednesday, January 8, 2014 11:15:24 AM UTC+1, Felix.Frank wrote: > can you reproduce this using puppet agent --one-time? > "puppet agent --onetime" always fails, just like "puppet agent --test". > If not, you may have to activate debug logging in your background agent. I added "PUPPET_

[Puppet Users] Re: Alternating results with mount Puppet resource

2014-01-08 Thread zerozerounouno
On Tuesday, January 7, 2014 3:10:31 PM UTC+1, zerozer...@gmail.com wrote: > The problem is with automated puppet runs every 30 minutes, as per > default: 50% of the runs end with no errors in the report, even though the > class is not correctly applied. > Just for completeness, here is an exc

[Puppet Users] Alternating results with mount Puppet resource

2014-01-07 Thread zerozerounouno
Hi, I have a problem with a host which has a Puppet class applied to it. The host, a CentOS 6.4 machine, has been provisioned and is managed using Foreman, but I'm not sure this is related to the problem. The class includes a "mount" type resource which should mount a NFS share and add the relat