[Puppet Users] hiera doesn't works on puppet 3.8.4
Hi Guys, I'm trying to migrate my puppet master from Puppet 3.4.3 to 3.8.4 I'm having a lot of issues, and the last one is hiera, on the previous version its works fine. in the old server I have these: common.yaml: --- adminusers : - "DOMAIN1\user1" - "DOMAIN2\user1" - "DOMAIN1\user2" - "DOMAIN1\user3" - "DOMAIN1\user4" atlassianadmusers : - "DOMAIN1\user1" - "DOMAIN2\user1" localgroup : Administrators noadminusers: - "none" perlmodules: - "none" and when I execute hiera I got these: [root@oldserver production]# hiera -c /etc/puppet/hiera.yaml -a adminusers --debug environment=development DEBUG: Tue Dec 22 08:29:49 -0500 2015: Hiera YAML backend starting DEBUG: Tue Dec 22 08:29:49 -0500 2015: Looking up adminusers in YAML backend DEBUG: Tue Dec 22 08:29:49 -0500 2015: Looking for data source common DEBUG: Tue Dec 22 08:29:49 -0500 2015: Found adminusers in common ["DOMAIN1\\user1", "DOMAIN2\\user1", "DOMAIN1\\user2", "DOMAIN1\\user3", "DOMAIN1\\user4"] but in the new server I have the same common.yaml file, but I got these: [root@newserver hieradata]# hiera -c /etc/puppet/hiera.yaml -a perlmodules --debug environment=development DEBUG: 2015-12-22 08:31:53 -0500: Hiera YAML backend starting DEBUG: 2015-12-22 08:31:53 -0500: Looking up perlmodules in YAML backend DEBUG: 2015-12-22 08:31:53 -0500: Looking for data source common DEBUG: 2015-12-22 08:31:53 -0500: Cannot find datafile /etc/puppetlabs/code/environments/development/hieradata/common.yaml, skipping nil The old server is CentOS 6.4, with puppet server 3.4.3-1 hiera 1.1.2-1 the new cerver is CentOS 7, with puppet server 3.8.4-1 hiera 3.0.1-1 Could you tell me what I'm doing wrong? please, or tell me what I'm missing here? Thank you in advance, Regards. -- 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/2aad4b80-58e1-4036-8ec0-2d09957cef43%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] help with scoping variable into a template
Hi guys, I'm working on puppet for windows, and now I have to work on a template that use the value from a variable set it on a class, the problem that i got is always I got undef value on the result file. I checked this URL without no results http://stackoverflow.com/questions/10589404/puppet-cant-find-variable-for-template These are my classes variables: class direct::config () { require direct::setup $nameSite = 'some.site.com' .. } and this where I use it on my template locate on direct/templates/conf/css.erb: . DomainIP %= @ipaddress %,127.0.0.1 DefServerName %= scope.lookupvar(direct::config::nameSite) % . . And the file results css.cfg: . DomainIP 10.10.10.23,127.0.0.1 DefServerName undefined . . I expected DefServerName some.site.com Could you help me with this issue? What Am I doing wrong? Thank you in advance... Best Regards. -- 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/-/-2FK6mx9ESQJ. 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] Trying to add Domain user to a Local group issue
Hi guys, I'm trying to add a domain user to the local group Administrators of windows, and I got this error: err: /Stage[main]/Userwindows/Group[Administrators]/members: change from AdministratorFarm AdminsDomain AdminsDomain Adminsbandrewsmruizmparra to DOMAIN\user failed: Add OLE error code:8007056B in Active Directory A member could not be added to or removed from the local group because the member does not exist. HRESULT error code:0x80020009 Exception occurred. debug: /Schedule[puppet]: Skipping device resources because running on a host debug: Finishing transaction 143308680 my manifest is this: class userwindows() { group { 'Administrators': members = 'DOMAIN\user', } } where DOMAIN is my real domain name, and user is the real username... Isn't a permission issue, when I tested adding manually the user to the group works fine, is only with the puppet agent, by the way I'm running puppet agent as administrator on that server, is a windows 2008 R2 server. puppet agent version 2.7.14 , what am i doing wrong? Any help will be appreciated, thank you in advance.. Best regards Thank you in -- 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/-/6uDFYvpatrYJ. 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.
Re: [Puppet Users] question about Cusctom Facts
Hi Jeff On Thursday, May 24, 2012 5:50:03 PM UTC-4, Jeff McCune wrote: On Thu, May 24, 2012 at 1:33 PM, Marco Parra D. marco.parr...@gmail.comwrote: But my question was can I change the path where puppet copi the custom facts? Yes, this is the plugindest puppet agent option. What is it currently set to? You can check using puppet agent --configprint plugindest Here is the output for this: puppet agent --configprint plugindest because when I run puppet agent, my custom facts were copied to c:\programdata\puppetlabs\**facter\lib\facter and facter didn't see it, How did you install Puppet? Puppet shouldn't be copying custom facts into this directory, the default location on Windows is C:\ProgramData\PuppetLabs\puppet\var\lib Here's a screenshot of the default behavior of the MSI packages published at https://downloads.puppetlabs.com/windows/ I installed using MSI file for 2.7.14 version, using default install http://links.puppetlabs.com/windows_msi_plugindest.png In the screenshot, you can see puppet agent downloads and loads plugins from C:\ProgramData\PuppetLabs\puppet\var\lib, facter doesn't load facts from here without the --puppet option, and that the plugindest setting is set to C:\ProgramData\PuppetLabs\puppet\var\lib but when I set the variable FACTERLIB on window to: set FACTERLIB=C:\Program Files (x86)\Puppet Labs\Puppet\facter\lib\facter; **C:\ProgramData\PuppetLabs\**puppet\var\lib\facter You really shouldn't have to set FACTERLIB at all. Oh, I see, now If I run: C:\Windows\system32facter --puppet udp_status true I got the value, but, now my doubt is, Can I use my custom facts inside my modules?... facter did see the custom fact: C:\Windows\system32facter udp_status C:\Windows\system32set FACTERLIB=C:\Program Files (x86)\Puppet Labs\Puppet\facter\lib\facter;**C:\ProgramData\PuppetLabs\** puppet\var\lib\facter C:\Windows\system32facter udp_status true is there a way to change that? But If I don't stup FACTERLIB, facter on windows agent don't find my custom facts, facter is reading the facts on c:\Program Files (x86)\Puppet Labs\facter\lib\facter, not in the C:\ProgramData\PuppetLabs\var\lib\folder Yes, this is the plugindest setting in puppet.conf. Please let me know if the default behavior is something other than the setting of C:\ProgramData\PuppetLabs\puppet\var\lib I'll try adding plugingdest in puppet.conf on windows node... If I change this value, Can I mess something else? I need use facter without --puppet... Thanks you Jeff -Jeff Best regards.. -- 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/-/Q6mQxkOwZTQJ. 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.
Re: [Puppet Users] question about Cusctom Facts
Hi Jeff, On Friday, May 25, 2012 10:42:20 AM UTC-4, Jeff McCune wrote: On Fri, May 25, 2012 at 6:17 AM, mparrad marco.parr...@gmail.com wrote: Hi Jeff On Thursday, May 24, 2012 5:50:03 PM UTC-4, Jeff McCune wrote: On Thu, May 24, 2012 at 1:33 PM, Marco Parra D. marco.parr...@gmail.com wrote: But my question was can I change the path where puppet copi the custom facts? Yes, this is the plugindest puppet agent option. What is it currently set to? You can check using puppet agent --configprint plugindest Here is the output for this: puppet agent --configprint plugindest I think you forgot to copy and paste the output. Sorry , here is now: C:\Windows\system32puppet agent --configprint plugindest C:/ProgramData/PuppetLabs/puppet/var/lib In general there are a couple of key points. First, custom facts distributed via Puppet pluginsync are always available in your manifests. Second, if you distribute your custom facts via pluginsync you should use facter --puppet to load them with Facter. Keep in mind Facter and Puppet are two separate applications which is why --puppet is necessary. Third, Facter (and Puppet) load things from multiple places. This is how our plugin system works. With regard to Facter the libraries that come bundled in the package are installed to C:\Program Files (x86)\Puppet Labs\Puppet\facter\lib. You shouldn't ever need to tell Facter to load things from this path since it will load from here automatically. Also, you shouldn't ever put your own custom facts in this location since the package may overwrite the directory on an upgrade. Hope this helps. Thank you Jeff, this clarify me how puppet and facter works with custom facts. -Jeff -- 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/-/2mnqFoZXmqYJ. 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] question about Cusctom Facts
Hi guys, I've been working with Puppet on Windows 2.7.14, I trying to use my own custom facts, but I have to put in on Windows Agent machine manually, I tried using pluginsync=true, and I put my *.rb files on My Moudle/lib/facter and It works but It only copy the files to C:\ProgramData\PuppetLabs\puppet\var\lib\facter, and facter on windows machine didn't find this facts, I have to put a FACTERLIB variable on windows machine, pointing to both directories FACTERLIB=C:\Program Files (x86)\Puppet Labs\Puppet\facter\lib\facter;C:\ProgramData\PuppetLabs\puppet\var\lib\facter puppet agent facter search facters on FACTERLIB=C:\Program Files (x86)\Puppet Labs\Puppet\facter\lib\facter How can I change this? May I change the pluginsync copy the customs facts to C:\Program Files (x86)\Puppet Labs\Puppet\facter\lib\facter instead C:\ProgramData\PuppetLabs\puppet\var\lib\facter I tried changing on C:\ProgramData\PuppetLabs\puppet\etc\puppet.conf adding factpath to C:\Program Files (x86)\Puppet Labs\Puppet\facter\lib\facter, but the files didn't copy from master to the windows agent... Any directions will be appreciated, thanks in advance.. Best Regards. -- 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/-/rYHK948k2J4J. 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: Custom facts question on windows 2008 R2
Hi guys, I realized that If I make the file udp_status.rb and I put on D:\Program Files (x86)\Puppet Labs\Puppet\facter\lib\facter, that's where I installed puppet from the MSI file, and I use the Powershell script that I made, I got the value that I expect when I run facter: D:\facter udp_status true Now, My question will be: How can I use thi fact on a resource exec, Is this possible?, I tried using with onlyif = $udp_status but I got several errors about convertions and another stuffs... What would be the correct way to use a fact on a resource EXEC on windows? any help would be appreciated best regards On Thursday, May 10, 2012 11:40:15 AM UTC-4, mparrad wrote: Hi guys, I'm trying to define a custom fact on windows puppet agent, I'm using the version 2.7.14. I made a powershell that checks for the state of a service and return true or false. If I execute it on powershell I got this: PS C:\programdata\PuppetLabs\facter\ext .\udp_status.ps1 udp_status=true But If I ran facter I didn't see the facter and value for this custom fact I put the .ps1 file on C:\programdata\PuppetLabs\facter\ext but I can't see the value for the fact... What am I doing wrong? thank you in advance... Regards -- 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/-/MQR3kXNa93UJ. 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] Issue with puppet windows
Hi guys, I'm trying to create my module to install splunk forwarder on windows boxes, I have this init.pp file on my module manifests: class splunk-mp() { file {'D:\Install': ensure = directory, mode = 0777, } file {'D:\Install\Apps': ensure = directory, mode = 0777, source = 'puppet:///modules/splunk-mp/Apps', recurse = true, } package {Universal Forwarder: source = d:\\Install\\Apps\\splunkforwarder-4.3-115073-x64-release.msi, ensure = installed, install_options = { AGREETOLICENSE = 'Yes', RECEIVING_INDEXER = 192.168.10.13:9997, LAUNCHSPLUNK = 1, SERVICESTARTTYPE = auto, WINEVENTLOG_APP_ENABLE = 1, WINEVENTLOG_SEC_ENABLE = 1, WINEVENTLOG_SYS_ENABLE = 1, WINEVENTLOG_FWD_ENABLE = 1, WINEVENTLOG_SET_ENABLE = 1, ENABLEADMON= 1, }, require = File['D:\Install\Apps'], } service {SplunkForwarder: ensure = running, enable = true, require = Package['Universal Forwarder'], } } This works fine the first time, and then never again works, I'm thinking the case somebody by error uninstall splunk forwarder on the windows box. the second time after I uninstalled splunk forwarder and run puppet agent again, I got this message: C:\Users\Administratorpuppet agent --test notice: Ignoring --listen on onetime run info: Retrieving plugin info: Caching catalog for cscltest01.office.com info: Applying configuration version '1333133419' err: /Stage[main]/Splunk-mp/Service[SplunkForwarder]: Could not evaluate: Cannot get status of SplunkForwarder, error was: The specified service does not exist as an installed service. notice: Finished catalog run in 2.05 seconds notice: /File[C:/ProgramData/PuppetLabs/puppet/var/state/last_run_summary.yaml]/content: Could you tell what it's wrong on here? Regards.. -- 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/-/Ei2hPw9axz0J. 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] File copy on puppet windows failed!
Hi guys, I'm trying to use puppet to run and install splunk on a Windows Box, I have created a module called splunk, and I try to get the powershell script and the files from the puppet master, everything is almost right but the file with the msi package couldn't copied to the windows box, What am I doing wrong?, could you help me please? Is it possible? copying files from the master to a windows client box?... This is my module init.pp file: class splunk() { file {'D:\Powershell-Scripts': ensure = directory, mode = 0777, } file {'D:\Powershell-Scripts\libs': ensure = directory, mode = 0777, } file {'D:\Powershell-Scripts\Apps': ensure = directory, mode = 0777, } file {D:/Powershell-Scripts/install-splunkforwarder.ps1: ensure = 'file', content = template(/etc/puppet/modules/splunk/templates/install-splunkforwarder.ps1), } file {D:/Powershell-Scripts/libs/MainFunctions.ps1: ensure = 'file', content = template(/etc/puppet/modules/splunk/templates/libs/MainFunctions.ps1), } And this is what I got on windows puppet agent when I ran: C:\Users\Administratorpuppet agent --test notice: Ignoring --listen on onetime run info: Retrieving plugin info: Caching catalog for cscltest01.office.comscore.com info: Applying configuration version '1333025700' err: /Stage[main]/Splunk/File[D:/Powershell-Scripts/Apps/splunkforwarder-4.3-115073-x64-release.msi]: Could not evaluate: Could not retrieve information from environment production source(s) puppet:///modules/splunk/files/splunkforwarder-4.3-115073-x64-release.msi at /etc/puppet/modules/splunk/manifests/init.pp:31 notice: Finished catalog run in 0.33 seconds notice: /File[C:/ProgramData/PuppetLabs/puppet/var/state/last_run_summary.yaml]/content: Regards. -- 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/-/IcMoISXXqyAJ. 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: File copy on puppet windows failed!
Hi guys, I check my fileserver.conf file, and I see that /etc/puppet/files was allowed to serve files, and also modules, I tried changing my init.pp file to from this: file {D:/Powershell-Scripts/Apps/splunkforwarder-4.3-115073-x64-release.msi: mode = 0777, source = 'puppet:///modules/splunk/files/splunkforwarder-4.3-115073-x64-release.msi', } to this, and this works, file {D:/Powershell-Scripts/Apps/splunkforwarder-4.3-115073-x64-release.msi: mode = 0777, source = 'puppet:///files/splunkforwarder-4.3-115073-x64-release.msi', } What is missing to fileserver works with modules directories?, I want to have a order on my modules and his files, this is my fileserver.conf: [files] path /etc/puppet/files allow * [modules] allow * [plugins] allow * Regards... On Thursday, March 29, 2012 10:01:55 AM UTC-3, mparrad wrote: Hi guys, I'm trying to use puppet to run and install splunk on a Windows Box, I have created a module called splunk, and I try to get the powershell script and the files from the puppet master, everything is almost right but the file with the msi package couldn't copied to the windows box, What am I doing wrong?, could you help me please? Is it possible? copying files from the master to a windows client box?... This is my module init.pp file: class splunk() { file {'D:\Powershell-Scripts': ensure = directory, mode = 0777, } file {'D:\Powershell-Scripts\libs': ensure = directory, mode = 0777, } file {'D:\Powershell-Scripts\Apps': ensure = directory, mode = 0777, } file {D:/Powershell-Scripts/install-splunkforwarder.ps1: ensure = 'file', content = template(/etc/puppet/modules/splunk/templates/install-splunkforwarder.ps1), } file {D:/Powershell-Scripts/libs/MainFunctions.ps1: ensure = 'file', content = template(/etc/puppet/modules/splunk/templates/libs/MainFunctions.ps1), } And this is what I got on windows puppet agent when I ran: C:\Users\Administratorpuppet agent --test notice: Ignoring --listen on onetime run info: Retrieving plugin info: Caching catalog for cscltest01.office.comscore.com info: Applying configuration version '1333025700' err: /Stage[main]/Splunk/File[D:/Powershell-Scripts/Apps/splunkforwarder-4.3-115073-x64-release.msi]: Could not evaluate: Could not retrieve information from environment production source(s) puppet:///modules/splunk/files/splunkforwarder-4.3-115073-x64-release.msi at /etc/puppet/modules/splunk/manifests/init.pp:31 notice: Finished catalog run in 0.33 seconds notice: /File[C:/ProgramData/PuppetLabs/puppet/var/state/last_run_summary.yaml]/content: Regards. -- 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/-/sEiaIEQxNeYJ. 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 windows File permissions
Hi Guys, I'm recently start working with puppet and mostly puppet for windows, On linux works perfect, but on windows works fine!, but I got a issue working on c:\windows\system32\inetsrv\config folder, I need modify the file applicationHost.config using puppet, to keep centralized the config for IIS, but when I run the puppet agent for windows the behavior it's real weird, The execution finish without errors, also said the file was updated, or created, but when I take a look to the file, it's remain without changes. I'm working with puppet master 2.7.1 on CentOS 5.7 server, and puppet for windows 2.7.1 on Windows 2008 R2 server... I tried changing the permissions to the folder, I put read/write permission, I put Full control, I take ownership, but nothing, when I run the puppet agent I got the next: On puppet master i wrote this init.pp for a module called iisconfig: class iisconfig() { file { 'C:\Windows\System32\drivers\etc\hosts': ensure = present, content = template(/etc/puppet/modules/iisconfig/files/hosts), } file { 'C:\Windows\System32\inetsrv\config\applicationHost.config': ensure = 'present', content = template('/etc/puppet/modules/iisconfig/files/applicationHost.config'), } file { c:/temp/test.txt: ensure = 'file', mode = '660', owner = 'Administrator', group = 'Administrators', content = template('/etc/puppet/modules/iisconfig/files/applicationHost.config'), } } This is the execution C:\temppuppet agent --test notice: Ignoring --listen on onetime run info: Retrieving plugin info: Caching catalog for test01.office.com info: Applying configuration version '1330497348' notice: /Stage[main]/Iisconfig/File[C:\Windows\System32\drivers\etc\hosts]/content: info: FileBucket adding {md5}f6b9e9fce03e4bbd9952814d55353857 info: /Stage[main]/Iisconfig/File[C:\Windows\System32\drivers\etc\hosts]: Filebucketed C:/Windows/System32/drivers/etc/hosts to puppet sum f6b9e9fce03e4bbd9952814d55353857 notice: /Stage[main]/Iisconfig/File[C:\Windows\System32\drivers\etc\hosts]/content: content changed '{md5}f6b9e9fce03e4bbd9952814d55353 to '{md5}32aca7ae45f022642e2f5b0156dcb3ca' notice: /Stage[main]/Iisconfig/File[c:/temp/test.txt]/content: info: FileBucket adding {md5}b3589a284c00ce9a67dd42ccaf15e46d info: /Stage[main]/Iisconfig/File[c:/temp/test.txt]: Filebucketed c:/temp/test.txt to puppet with sum b3589a284c00ce9a67dd42ccaf15e46d notice: /Stage[main]/Iisconfig/File[c:/temp/test.txt]/content: content changed '{md5}b3589a284c00ce9a67dd42ccaf15e46d' to '{md5}881bfbf113937635f5c35241ed2' notice: Finished catalog run in 8.25 seconds notice: /File[C:/ProgramData/PuppetLabs/puppet/var/state/last_run_summary.yaml]/content: The first file and the last one works fine, but the file I need to modify didn't works, but also didn't show any error message or something Could you please give me any directions? or tell me What I doing wrong? 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/-/ZUxK5U-yWZYJ. 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.