[Puppet Users] Re: Generate Puppet manifiest from server

2014-09-25 Thread Paul Tötterman
> > Anyone knows if there is any possibility to generate a puppet manifiest > from a server to use it as a template to other servers?. > Take a look at BluePrint Cheers, Paul -- You received this message because you are subscribed to the Google Groups "P

[Puppet Users] Re: How to get agents ip address in master manifest file

2014-08-13 Thread Paul Tötterman
> > I have a requirement to get the value of the ip address which send the > request for the catalog for the master in one of my manifest file. How can > i retrieve it inside master manifest file ? > Read about facts: https://docs.puppetlabs.com/learning/variables.html Cheers, Paul -- You r

[Puppet Users] Re: Puppet module for Windows 2012 SNMP Service

2014-07-23 Thread Paul Tötterman
> > Does anyone have a module or example puppet code for turning on SNMP > server and setting the community on a Windows 2012 server? > I think SNMP on Windows 2012 is deprecated: http://technet.microsoft.com/en-us/library/hh831568 Cheers, Paul -- You received this message because you are s

[Puppet Users] Re: A file managed by puppet that is left alone if customized

2014-04-28 Thread Paul Tötterman
I actually just had a revelation and thought of a better way: $dir = inline_template('<%=ENV["HOME"]%>') # again, just to make testing > using puppet apply easier > file { "$dir/foo": > source => ["file://$dir/foo.local", 'file:///etc/motd'] # the latter > would typically be a puppet:/// UR

Re: [Puppet Users] A file managed by puppet that is left alone if customized

2014-04-28 Thread Paul Tötterman
> > For files in user's home directories I would manage the skeleton files > using puppet and then when the user account is created they'll be copied > into their home directory. That obviously only works for new users though. > It won't account for existing users or for updating the file if it

[Puppet Users] A file managed by puppet that is left alone if customized

2014-04-24 Thread Paul Tötterman
Hi, I'm managing workstations using puppet, and I was wondering if there's a better way to do this: $dir = inline_template('<%=ENV["HOME"]%>') define customizable_file($source=undef,$template=undef,$replacemd5='') { > $tmplname = $template ? { > undef => "$name.common", >

[Puppet Users] Re: file_line manifest

2014-04-14 Thread Paul Tötterman
Hi, > Can you have an idea? > Your regular expression doesn't match the existing setting. Since you are dealing with an ini-file, try using puppetlabs-inifile instead of file_line. Cheers, Paul -- You received this message because you are

[Puppet Users] Re: Windows msi needed to udpate dns server list

2014-03-19 Thread Paul Tötterman
> > Does anyone have a suggestion of how to do this using and msi? I plan to > use the puppet agent to run the msi to make the updates, but if someone has > a different suggestion on puppet to mange that list of IP addresses on > windows, we are open to suggestions !! > Modify the settings in

Re: [Puppet Users] when a puppet exec resource contains several "single commands", puppet exec only fails if the last exec command fails

2014-03-10 Thread Paul Tötterman
> > in bash, for example, if you type "set -e" first, bash will stop and fail > as soon as a concatenated command fails. > (i agree that this behaviour is unfortunatelly not enabled by default in > bash scripts) > >> exec {'test': >>> command => "/bin/ls /doesnotexit; /bin/echo hello", >>> }

Re: [Puppet Users] Re: facter-1.7.3 and puppet-3.3.1 on OS X Mavericks 10.9

2014-02-11 Thread Paul Tötterman
> > Paul, that ssl error looks like the following post on puppet-users: > https://groups.google.com/forum/#!topic/puppet-users/4-6EimF_-NY/discussion, > which relates to SNI. > Thank you for pointing me in the right direction. > Adding a server alias to your puppetmaster vhost may resolve yo

Re: [Puppet Users] Re: facter-1.7.3 and puppet-3.3.1 on OS X Mavericks 10.9

2014-02-11 Thread Paul Tötterman
> facter-1.7.4-rc1 is available and it looks like it works! Actually, it wasn't until 1.7.5 that the packages available from downloads.puppetlabs.com were fixed, but it really seems to work now. However, I have a problem with puppet on OS X 10.9. I'm using the latest packaged version 3.4.2. It m

[Puppet Users] Re: puppet nagios module integration

2013-12-30 Thread Paul Tötterman
Hi, I'll try to answer, since I'm using the nagios_* -types in puppet. > 1) Do we need to install nagios separately. > Just using the nagios_* -types will not install nagios for you. But it is entirely possible to install nagios using puppet. There might even be such a module available, but

Re: [Puppet Users] How to store "bash command:" output in a variable as array

2013-11-25 Thread Paul Tötterman
> > Btw: the difference between exec and generate is that generate is executed > right on the beginning of Puppet run > No. The difference is that generate() is run on the master and exec on the agent: http://docs.puppetlabs.com/references/latest/function.html#generate Cheers, Paul -- You re

[Puppet Users] Re: Zone-file out of LDAP

2013-11-06 Thread Paul Tötterman
Hi Steven, I want to put all the data, which is needed for my zone-files into > OpenLDAP. Next I need a tool, which creates zone-files out of the > information which is stored in OpenLDAP. > > Have you any idea how to do that? > http://www.venaas.no/dns/ldap2zone/ or https://github.com/ptma

Re: [Puppet Users] facter-1.7.3 and puppet-3.3.1 on OS X Mavericks 10.9

2013-11-01 Thread Paul Tötterman
> > It's the same issue as this: https://projects.puppetlabs.com/issues/18205 > Thank you for digging it up for me. Somehow google just failed me. > It seems to be fixed already but not included in the current release > version. Building Puppet and Facter from source resolves this issue so I'

[Puppet Users] facter-1.7.3 and puppet-3.3.1 on OS X Mavericks 10.9

2013-10-30 Thread Paul Tötterman
Hi, Is anyone else getting this: $ facter /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require': cannot load such file -- facter/application (LoadError) from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/

[Puppet Users] Re: FW: parameters to a defined type from the puppet console

2013-10-08 Thread Paul Tötterman
> > I can't use the same class with different parameters for the same node Classes can only be declared once per node. If you want multiple somethings per node, you need defined types. Would something like this work? define foo($param) { notice { $param: } } node example { foo { 'test1':

[Puppet Users] Re: puppet-chocolatey error

2013-09-17 Thread Paul Tötterman
> >I think puppet does not provide the support for "chocolatey". Not out-of-the-box, but https://github.com/chocolatey/puppet-chocolatey adds that support. Cheers, Paul -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe fro

[Puppet Users] Re: Resolving duplicated resources

2013-07-19 Thread Paul Tötterman
Hi, It seems there are a few ways to remedy this, such as defining a new class > for the mod_ssl > packageand > including that class in both modules. However, I'd like to figure out > if it's possible to rectify this situa

[Puppet Users] Re: Same package name for gem and deb

2013-07-12 Thread Paul Tötterman
> > I understand that from the Puppet point of view both are package resources with the same name. But from the human(my) side this doesn't > make much sense. > May I suggest a couple of workarounds? - Use fpm to convert the gem to a deb. - Use fpm to create a deb package called zookeeper-d

Re: [Puppet Users] Recommended method of running puppet periodically on mac os x

2013-07-11 Thread Paul Tötterman
> > I just responded to you ask.puppetlabs.com post, but I'll duplicate the > reply here. Thank you Peter, much appreciated. You wouldn't happen to know of a resource that collects puppet & osx wisdom? Cheers, Paul -- You received this message because you are subscribed to the Google Grou

[Puppet Users] Re: "Looping" around a custom fact list

2013-07-11 Thread Paul Tötterman
> What I want Puppet to do is to "loop" through this list of potential > kernels and install a specific driver package for all possibilities. > Is this even possible without a custom provider ? > I doubt it, unless you also export a installed_kernel_count => 3 fact. Cheers, Paul -- You rece

[Puppet Users] Recommended method of running puppet periodically on mac os x

2013-07-10 Thread Paul Tötterman
Hi, I tried asking this question on ask.puppetlabs.com, but haven't got any responses yet: https://ask.puppetlabs.com/question/1975/recommended-method-of-running-puppet-periodically-on-mac-os-x/ Is there some source of puppet & mac os x knowledge that I'm unaware of? I was kind of hoping that

[Puppet Users] Re: Problems with the connection. Please help me!

2013-07-09 Thread Paul Tötterman
> > $ puppet agent --server ipofthemaster --waitforcert 60 --test You must have hostnames for puppet. The SSL certificates are valid for some certain cn, which corresponds to hostname. The ip address doesn't match hostname, so SSL refuses the connection. Set up DNS or hosts files. Cheers, Pau

[Puppet Users] Re: Puppet Management with Dual Boot Workstation

2013-06-18 Thread Paul Tötterman
Hi, I'm trying to figure out what is the best way to handle a single system > that dual boots with a puppet client running in each. In this case we are > talking about Ubuntu 12.04 and Windows 8. Should I just copy the > certificate from one OS to the other? Should I have a different > cert

[Puppet Users] Re: Manage users with Winbind (Samba) installed

2013-06-13 Thread Paul Tötterman
Hi, How can I fix it? I need to tell Puppet to remove only users with ID from > 1000 to 299 (because from 300 starts winbind mapping) and not to > try to remove winbind users > Have you considered writing a suitable user provider? Cheers, Paul -- You received this message because yo

[Puppet Users] Re: Recommend a good tutorial on using Hiera as an ENC?

2013-06-10 Thread Paul Tötterman
Hi, > Can anyone recommend a good tutorial on using Hiera as an ENC? There's not that much to it. Maybe have a look at: http://blog.yo61.com/assigning-resources-to-nodes-with-hiera-in-puppet.html Cheers, Paul -- You received this message because you are subscribed to the Google Groups "P

Re: [Puppet Users] Announce: Puppet 3.2.1 Available

2013-05-24 Thread Paul Tötterman
> > Did something change in the way Puppet outputs messages? Until this morning we used the following to run Puppet from Cron on all our nodes: > But as of 3.2.1 this produces output on every Puppet agent run and that > output is mailed out, resulting in hundreds of messages which contain

[Puppet Users] Re: Problems installing git for windows using Puppet

2013-05-23 Thread Paul Tötterman
> This might not be related to Puppet but it seems that the installation > process hangs. I have tried this configuration on an empty w2008r2 VM. Any particular reason you're using a file and a exec resource? I have a samba share and the following: package { 'VLC media player 2.0.5':

[Puppet Users] Re: Delete directory contents if this is older then ..

2013-05-21 Thread Paul Tötterman
Hi, Is there any other puppet recommended way of doing that ? > http://docs.puppetlabs.com/references/latest/type.html#tidy Cheers, Paul -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails

[Puppet Users] Re: Can anyone recommend a module with a resource managing a block of lines in a file?

2013-05-06 Thread Paul Tötterman
Hi, On Sunday, May 5, 2013 2:25:02 AM UTC+3, Schofield wrote: > > I'm hoping a commonly used module that provides a resource for managing > multiple contiguous lines in a file already exists and someone can point me > to it. I want something like the file_line type in the puppet labs stdlib >

Re: [Puppet Users] Windows Puppet waits for , then warns "Facter::Util::Resolution.exec with a shell built-in is deprecated"

2013-04-22 Thread Paul Tötterman
> > Found it: The two occurrences of %SystemRoot% should really be %SYSTEMROOT%. Fixed it, works now. > Shouldn't environment variables be case-insensitive? What code is responsible for expanding those environment variables? Cheers, Paul -- You received this message because you are subscr

[Puppet Users] Re: Windows Puppet waits for , then warns "Facter::Util::Resolution.exec with a shell built-in is deprecated"

2013-04-13 Thread Paul Tötterman
Hi, How do I fix/disable this warning? > It seems like you've added some extra facter facts? They seem to be implemented incorrectly. Remove the problematic one. Cheers, Paul -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe fr

[Puppet Users] Re: Remove msi from windows 7

2013-04-08 Thread Paul Tötterman
> Could someone help me to understand why the place absent, the package you > are installing is not removed? > > package { 'mozilla': > This is a wild guess, but the package title (name, whatever it's called) should match the item in the Programs and Features Control Panel. Try fixing that a

Re: [Puppet Users] Re: Windows Firewall Question

2013-03-12 Thread Paul Tötterman
> > Does anyone know of this provider? If not I can start to make one with > netsh but it will probably take me a while > I really suggest you do it via the proper firewall COM API, e.g. with powershell: http://stackoverflow.com/questions/11956291/how-can-i-add-a-widows-firewall-rule-with-a-c

[Puppet Users] Re: Windows Firewall Question

2013-03-07 Thread Paul Tötterman
> > As someone who generally hates using execs unless I absolutely have to, I > would recommend using the Puppet Labs registry module. I can dig out some > examples tomorrow if you like. I'm a bit wary about prodding in the registry behind the back of windows firewall, but please tell me if i

[Puppet Users] Re: migrating from cfengine to puppet, node wrangling question

2013-02-20 Thread Paul Tötterman
Hi Michael This works, but I'm not sure it's the best way about going about it. I'm > trying to define host groups in my site.pp file in such a way that when > puppet runs on my nodes, they "know" their functional role and are > configured accordingly. May I suggest that you look into using

[Puppet Users] Re: Mounting windows fileshare

2013-02-20 Thread Paul Tötterman
Hi! I am looking for a way of mounting a windows fileshare without using 'exec > net use ...' and haven't found a type that supplies this functionality. > https://gist.github.com/ptman/3968655 -- not pretty, but worked for me > The windows documentation mentions that to use UNC paths you have

[Puppet Users] Re: How to puppetise Task Scheduler on Windows

2013-02-13 Thread Paul Tötterman
Hi David, Is it possible to manage Task Scheduler through puppet? Yes: http://docs.puppetlabs.com/references/latest/type.html#scheduledtask Cheers, Paul -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop

[Puppet Users] Re: how to check whether a linux process is running?

2013-02-13 Thread Paul Tötterman
Hi Oliver, if process A is running, do nothing. > > else mount share and install package A > This doesn't really sit well with the declarative nature of Puppet. It would be better if your package pre-installation scripts were to cleanly implement this imperative procedure. Something like shut d

[Puppet Users] Re: semi-standalone puppet mode

2013-02-12 Thread Paul Tötterman
Hi Ivan, > Had somebody invented something like that and how? > Doesn't puppet do that right now? If it's unable to fetch a new catalog from master it uses the cached catalog that it has received previously. Cheers, Paul -- You received this message because you are subscribed to the Google

[Puppet Users] Re: Puppetlabs nginx module

2012-12-10 Thread Paul Tötterman
> > Isn't this pretty bad because other module that may include stdlib would > cause an error? Have you considered adding an issue at github? Cheers, Paul -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web vi

[Puppet Users] Re: Fileserver in standalone mode.

2012-11-23 Thread Paul Tötterman
> > My workaround for now is to simply move the files to a module named files > and reference them as "puppet:///modules/files/path/to/file", but it seems > like there might be a better solution. I don't know about better, but you can also use file:///... URIs in the source parameter. Cheers

[Puppet Users] Re: Really long puppet runs...

2012-11-02 Thread Paul Tötterman
> > I've got a 3.0.0 node on Ubuntu 12.04 talking to a 2.7.19 master on Ubuntu > 10.04. Stop. That is not supported. Master must be newer or equal to client. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web

[Puppet Users] Re: Setting up Java on Windows

2012-10-19 Thread Paul Tötterman
Hi, > Still struggling to set the Global PATH variable in a nice way. I set the path using PowerShell (a script which is deployed and executed by puppet), but I imagine you could do something similar with ruby and the win32 api: Function Set-Path { Param([Parameter(Mandatory=$true)][st

[Puppet Users] Re: base64 within module

2012-10-15 Thread Paul Tötterman
Hi Luca, I have to convert a string in base64 before placing it inside a template > with puppet. > Is there a function available and how? > Puppet templates are embedded ruby, and you can do almost anything you can with regular ruby. So you the Base64 module from ruby: <% require 'base64' %> <

Re: [Puppet Users] Creation of modifiable files via puppet

2012-10-08 Thread Paul Tötterman
> Is it possible then I should be running an exec to copy the file from the server and use the unless (file exists already)? exec { 'foobar': command => '/usr/bin/wget https://... -O /file/location', creates => '/file/location', } Cheers, Paul -- You received this message because you are s

Re: [Puppet Users] Puppet 3.0.0 and Augeas on Ubuntu Lucid 10.04

2012-10-04 Thread Paul Tötterman
Hi Eric, Thank you. I filled in some more detail, and started following the bug. Let's continue there. Cheers, Paul On Thursday, October 4, 2012 4:01:28 AM UTC+3, Eric Sorenson wrote: > > Hi Paul, I created a ticket to track this issue, thanks for posting the > trace output and manifest. > > h

Re: [Puppet Users] Puppet 3.0.0 and Augeas on Ubuntu Lucid 10.04

2012-10-03 Thread Paul Tötterman
> Ubuntu released a backport of 0.3.0 into lucid-backports which will > resolve the issue for you here: > http://packages.ubuntu.com/lucid-backports/libaugeas-ruby Unfortunately upgrading the package did not solve the problem. Also the error message doesn't match the bug report. --trace gives

[Puppet Users] Puppet 3.0.0 and Augeas on Ubuntu Lucid 10.04

2012-10-02 Thread Paul Tötterman
Hi, My manifests used to work with 2.7.19 but after upgrading to 3.0.0 I keep getting: Error: /Stage[main]/.../Augeas[...]: Could not evaluate: uninitialized constant Augeas::NO_LOAD Anyone else had and solved this problem? On precise I just get: Warning: Augeas[...](provider=augeas): Loading f

[Puppet Users] Re: ssh keys - registering multiple keys onto a same remote account

2012-09-20 Thread Paul Tötterman
Hi Hiu, > key1=[ '', 'Y', 'ZZZ'] > ... > key => $key1, > http://docs.puppetlabs.com/references/latest/type.html#sshauthorizedkey does not suggest that the provider would support an array for key. I suggest doing something like: $user = 'user' ssh_authorize

Re: [Puppet Users] Right approach to Windows installers

2012-09-17 Thread Paul Tötterman
> > UNC paths is on the roadmap http://projects.puppetlabs.com/issues/8657 I'm using UNC paths with 2.7.19. Works fine. https://github.com/puppetlabs/puppet-docs/pull/100 Cheers, Paul -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view

[Puppet Users] Re: Difference between puppet agent and puppetd

2012-08-17 Thread Paul Tötterman
Hi Axel, `puppetd` is the old (< 2.6.0?) way to call the agent, and `puppet agent` is the new way. The old way is still supported, but support will probably be removed at some point. Cheers, Paul -- You received this message because you are subscribed to the Google Groups "Puppet Users" grou

Re: [Puppet Users] cwd dot folders

2012-07-26 Thread Paul Tötterman
> > exec { myexectest: >path=> "/bin:/usr/bin:/usr/sbin", > cwd => "/home/user/.ssh", > creates=> "/home/user/.ssh/test.txt" > command =>"echo test > test.txt", > } > > http://

[Puppet Users] Re: How to delete users from groups ?

2012-07-24 Thread Paul Tötterman
> > So I can do it using membership => inclusive (instead of > key_membership) > You're right, I took a too quick look at http://docs.puppetlabs.com/references/latest/type.html Cheers, Paul -- You received this message because you are subscribed to the Google Groups "Puppet Users" group.

[Puppet Users] Re: How to delete users from groups ?

2012-07-22 Thread Paul Tötterman
Hi eduardo, > Is there another way to do it ?. > user { "$username": ensure => present, key_membership => inclusive, groups => ['all', 'groups', 'except', '$group'], # full listing of all groups $username belongs to } or group { "$group", ensure => present, attribute_membership

Re: [Puppet Users] file_line type issue, possible bug

2012-06-12 Thread Paul Tötterman
> > Depending on your sudo version you could also put snippets in > /etc/sudoers.d. This has the advantage of allowing each class to manage its > own sudoers file without any Puppet conflicts. > Make sure to implement some kind of ordering for the snippets. From the man-page: "Where there are m

[Puppet Users] Re: Duplicate package resource solutions?

2012-06-11 Thread Paul Tötterman
Hi Ryan, > I searched through the forum and found a few related threads but no clear > puppet sanctioned solution. We have several modules that require the same > package, for example rsync or gcc. We usually solve these conflicts by > making that package a standalone module. We don't want to

[Puppet Users] Re: Update .k5login with Puppet

2012-06-04 Thread Paul Tötterman
Hi Dhaval, > can you anyone suggest me how can i update .k5login to append new entry or > remove existing line > Can you use the file_line type in puppet stdlib? https://github.com/puppetlabs/puppetlabs-stdlib/blob/master/lib/puppet/type/file_line.rb Cheers, Paul -- You received this mes

[Puppet Users] Re: Augeas & Arrays

2012-05-28 Thread Paul Tötterman
> > augeas{"$port": > There's a difference between $var and "$var". With quotes the array is forced to a string. Cheers, Paul -- 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.co

Re: [Puppet Users] Re: Puppet master errors with stored configurations : sqlite3 instead of mysql

2012-05-18 Thread Paul Tötterman
> > I'm using Passenger, so there is no need to restart puppet master > (according to > http://projects.puppetlabs.com/projects/1/wiki/Using_Passenger) > Did you restart your webserver then? Or redeploy the passenger app http://modrails.com/documentation/Users%20guide%20Nginx.html#_redeploying

[Puppet Users] Re: 2 storedconfig questions, both Sshkey related...

2012-05-10 Thread Paul Tötterman
I'm also having problems with exporting and collecting ssh keys. > 1: Are "complex" searches just not supported? I want to simply do: > Sshkey <<| tag == "some_tag" and type == "rsa" |>> (the type is > mandatory, but this won't let me do complex searches, so i'm stuck > only collecting the on

Re: [Puppet Users] Re: Removing lines from a file

2012-03-23 Thread Paul Tötterman
> > One (hopefully) last question...How do I take the file_line.rb file and > put it so puppet recognises it? Do I do that with a define or can I just > take the file and place it somewhere for it to work? > Read about modules ( http://docs.puppetlabs.com/guides/modules.html ) and use the pupp

[Puppet Users] Re: Puppet Windows exec

2012-03-23 Thread Paul Tötterman
Hi Jay, > exec { 'ExecCreatedFolder': >command => "mkdir C:\PuppetOrdner\​ExecCreatedFolder", > } mkdir is a command implemented by the windows command processor cmd.exe, not a callable program. http://docs.puppetlabs.com/references/stable/type.html#exec states that the Windows p

Re: [Puppet Users] Re: Removing lines from a file

2012-03-23 Thread Paul Tötterman
Hi John > I can see where 'file_line' will add a line but I don't know enough ruby > to know, will it remove a line that does exist? > 'ensurable' sounds like it can manage both 'ensure => present' and 'ensure => absent'. And sure enough, if you look into the provider: https://github.com/pup

[Puppet Users] Re: Puppet staging server

2012-03-07 Thread Paul Tötterman
Hi Gonzalo, > I tried to implement a second Puppet server as a "staging" server with the idea of being able to run puppet in dry run mode against this staging server. Have you looked at environments for differentiating between staging and production instead of separate puppet masters? > I ran

[Puppet Users] Re: Looping through all registered client nodes?

2012-02-27 Thread Paul Tötterman
Hi, > I'm looking to see if there's a way that I can set up a class on my > puppetmaster node to loop through all of the defined nodes and add a > hosts entry for the internal IP. I think I'm good with the actual > adding of the entry, but I'm curious as to how to get access to all > defined

[Puppet Users] Re: Capture the output of exec command

2012-02-21 Thread Paul Tötterman
Hi Sateesh, I need to capture the output of an exec command in puppet manifest > variable. How can I do this. > You cannot, since the manifest is compiled into a catalog on the puppet master and then the catalog is sent to the agent, which can be on a different machine, and only then is the c