Re: [Puppet Users] Need to know what ports to open for puppet db to talk to puppet server 5
Hi there! On 2018-09-10 10:31 p.m., David Black wrote: > Need to know what ports to open for puppet db to talk to puppet server 5 According to documentation with only one port (by default 8081 TCP) you should be able to connect to your puppetdb: https://puppet.com/docs/puppetdb/5.2/connect_puppet_master.html#step-3-set-security-policy Cheers! -- 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/f2e71153-d85d-bea6-cef5-5bb9ff443300%40lelutin.ca. For more options, visit https://groups.google.com/d/optout. signature.asc Description: OpenPGP digital signature
[Puppet Users] Re: Duplicate declaration
On Tuesday, September 11, 2018 at 9:31:43 AM UTC-4, jcbollinger wrote: > > > > On Monday, September 10, 2018 at 11:18:34 AM UTC-5, Michael Watters wrote: >> >> I'd prefer to see the entire vhost.pp code >> > Here it is: https://pastebin.com/1Qt9ng7b -- 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/0f73dcd3-ad03-4902-8289-657c1ba44050%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Re: adding require to if/elseif statement?
Thanks Michael, What i ended up having to do was create a separate powershell process then run invoke-webrequest there because start-process allows for -wait. exec { 'client_setup': command => '(Start-Process powershell -ArgumentList (Invoke-WebRequest "Invoke-WebRequest "$$file_source/file.exe " -outfile C:/Windows/dir/file.exe))', provider => powershell, creates => 'C:/Windows/dir/file.exe' require => Package['client_package'], } (Start-Process powershell -ArgumentList (Invoke-WebRequest "Invoke-WebRequest "$$file_source/file.exe " -outfile C:/Windows/dir/file.exe)) On Tuesday, September 11, 2018 at 8:36:27 AM UTC-5, Michael Watters wrote: > > You should be able to add a require => Package['client_package'] parameter > to the exec resource to resolve this. For example: > > > $file_source = lookup('application.client') > > if $facts['domain'] == 'internal' { >file { 'sccm_setup': > path=> 'C:/Windows/ccmsetup/ccmsetup.exe', > source => "$file_source /file.exe" >} > } > else { >exec { 'client_setup': > command => 'Invoke-WebRequest "$$file_source/file.exe " -outfile > "C:/Windows/dir/file.exe" ', > provider => powershell, > creates => 'C:/Windows/dir/file.exe' > require => Package['client_package'], >} > } > package { 'client_package': > } > > > > On Tuesday, September 11, 2018 at 9:09:25 AM UTC-4, Jason McMahan wrote: >> >> Thanks Michael, >> I think my problem is not syntax but rather the invoke-webrequest is not >> actually completing before moving to the package resource. Then as the file >> doesnt exist the run fails. >> Back to drawing board. >> >> Appreciate the quick reply. >> >> >> On Tuesday, September 11, 2018 at 7:27:49 AM UTC-5, Michael Watters wrote: >>> >>> What you have there looks fine but I would change the elsif to an else >>> statement. >>> >>> >>> On Tuesday, September 11, 2018 at 8:08:53 AM UTC-4, Jason McMahan wrote: Good day, I am attempting to add require to an if statement and not sure i am doing it right. Any help would be greatly appreciated. If the machine is joined to our internal domain it will use a file resource, if external i am using a invoke-webrequest as the file is on azure blob storage. $file_source = lookup('application.client') if $facts['domain'] == 'internal' { file { 'sccm_setup': path=> 'C:/Windows/ccmsetup/ccmsetup.exe', source => "$file_source /file.exe" } } elsif $facts['domain'] != 'internal' { exec { 'client_setup': command => 'Invoke-WebRequest "$$file_source/file.exe " -outfile "C:/Windows/dir/file.exe" ', provider => powershell, creates => 'C:/Windows/dir/file.exe' } } package { 'client_package': } >>> -- 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/5582a659-d94e-4272-8a41-8a1591366e71%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Re: adding require to if/elseif statement?
You should be able to add a require => Package['client_package'] parameter to the exec resource to resolve this. For example: $file_source = lookup('application.client') if $facts['domain'] == 'internal' { file { 'sccm_setup': path=> 'C:/Windows/ccmsetup/ccmsetup.exe', source => "$file_source /file.exe" } } else { exec { 'client_setup': command => 'Invoke-WebRequest "$$file_source/file.exe " -outfile "C:/Windows/dir/file.exe" ', provider => powershell, creates => 'C:/Windows/dir/file.exe' require => Package['client_package'], } } package { 'client_package': } On Tuesday, September 11, 2018 at 9:09:25 AM UTC-4, Jason McMahan wrote: > > Thanks Michael, > I think my problem is not syntax but rather the invoke-webrequest is not > actually completing before moving to the package resource. Then as the file > doesnt exist the run fails. > Back to drawing board. > > Appreciate the quick reply. > > > On Tuesday, September 11, 2018 at 7:27:49 AM UTC-5, Michael Watters wrote: >> >> What you have there looks fine but I would change the elsif to an else >> statement. >> >> >> On Tuesday, September 11, 2018 at 8:08:53 AM UTC-4, Jason McMahan wrote: >>> >>> Good day, >>> I am attempting to add require to an if statement and not sure i am >>> doing it right. Any help would be greatly appreciated. >>> >>> If the machine is joined to our internal domain it will use a file >>> resource, if external i am using a invoke-webrequest as the file is on >>> azure blob storage. >>> >>> >>> $file_source = lookup('application.client') >>> >>> if $facts['domain'] == 'internal' { >>> file { 'sccm_setup': >>> path=> 'C:/Windows/ccmsetup/ccmsetup.exe', >>> source => "$file_source /file.exe" >>> } >>> } >>> elsif $facts['domain'] != 'internal' { >>> exec { 'client_setup': >>> command => 'Invoke-WebRequest "$$file_source/file.exe " -outfile >>> "C:/Windows/dir/file.exe" ', >>> provider => powershell, >>> creates => 'C:/Windows/dir/file.exe' >>> } >>> } >>> package { 'client_package': >>> } >>> >> -- 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/861aa7fe-8e71-49d5-a36b-df650596827a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Re: Duplicate declaration
On Monday, September 10, 2018 at 11:18:34 AM UTC-5, Michael Watters wrote: > > I'd prefer to see the entire vhost.pp code but it looks like the issue is > the same as I mentioned previously, you have multiple atqapache::vhost > resources attempting to manage the client base directory. I've ran into a > similar issue with my own modules and was able to hack around it using the > defined() function. For example: > > if !defined(File["$client_base"]) { >file { [ "$client_base", ]: > ensure => 'directory', > owner => "$owner", > group => "$group", > mode=> 0744, > } > } > > There may be a better option but this way ensures that the resource is > only created once. > > Just about any viable alternative is better than using defined(). If you are in control of all the code that may declare that resource then among the best options are - factor out the declaration into a separate class, and declare the class, where needed, via an include-like class declaration. Unlike resources, classes can safely be declared multiple times, as long as all the declarations except possibly the first-evaluated one are of the include-like kind. - A more old-school way would be to move the resource declaration to another existing class that you can rely upon to be included, and make it virtual. Then *realize* it in the places where presently you declare it. - Or perhaps there is already a class that provides an appropriate context and scope such that you can move the declaration to that class and leave it concrete. If you do not have full control of all the declarations and cannot obtain it, then - At minimum, using the ensure_resource() function from puppetlabs/stdlib is slightly less evil than using defined() for this purpose. John -- 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/ec0b6f76-7891-4f8b-988e-d059d7d9a793%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Re: adding require to if/elseif statement?
Thanks Michael, I think my problem is not syntax but rather the invoke-webrequest is not actually completing before moving to the package resource. Then as the file doesnt exist the run fails. Back to drawing board. Appreciate the quick reply. On Tuesday, September 11, 2018 at 7:27:49 AM UTC-5, Michael Watters wrote: > > What you have there looks fine but I would change the elsif to an else > statement. > > > On Tuesday, September 11, 2018 at 8:08:53 AM UTC-4, Jason McMahan wrote: >> >> Good day, >> I am attempting to add require to an if statement and not sure i am doing >> it right. Any help would be greatly appreciated. >> >> If the machine is joined to our internal domain it will use a file >> resource, if external i am using a invoke-webrequest as the file is on >> azure blob storage. >> >> >> $file_source = lookup('application.client') >> >> if $facts['domain'] == 'internal' { >> file { 'sccm_setup': >> path=> 'C:/Windows/ccmsetup/ccmsetup.exe', >> source => "$file_source /file.exe" >> } >> } >> elsif $facts['domain'] != 'internal' { >> exec { 'client_setup': >> command => 'Invoke-WebRequest "$$file_source/file.exe " -outfile >> "C:/Windows/dir/file.exe" ', >> provider => powershell, >> creates => 'C:/Windows/dir/file.exe' >> } >> } >> package { 'client_package': >> } >> > -- 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/28af20fc-4e21-45e9-8b10-b76dc8ba80b5%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Re: adding require to if/elseif statement?
What you have there looks fine but I would change the elsif to an else statement. On Tuesday, September 11, 2018 at 8:08:53 AM UTC-4, Jason McMahan wrote: > > Good day, > I am attempting to add require to an if statement and not sure i am doing > it right. Any help would be greatly appreciated. > > If the machine is joined to our internal domain it will use a file > resource, if external i am using a invoke-webrequest as the file is on > azure blob storage. > > > $file_source = lookup('application.client') > > if $facts['domain'] == 'internal' { > file { 'sccm_setup': > path=> 'C:/Windows/ccmsetup/ccmsetup.exe', > source => "$file_source /file.exe" > } > } > elsif $facts['domain'] != 'internal' { > exec { 'client_setup': > command => 'Invoke-WebRequest "$$file_source/file.exe " -outfile > "C:/Windows/dir/file.exe" ', > provider => powershell, > creates => 'C:/Windows/dir/file.exe' > } > } > package { 'client_package': > } > -- 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/a5678630-875d-478d-b821-401492ad9fe6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] adding require to if/elseif statement?
Good day, I am attempting to add require to an if statement and not sure i am doing it right. Any help would be greatly appreciated. If the machine is joined to our internal domain it will use a file resource, if external i am using a invoke-webrequest as the file is on azure blob storage. $file_source = lookup('application.client') if $facts['domain'] == 'internal' { file { 'sccm_setup': path=> 'C:/Windows/ccmsetup/ccmsetup.exe', source => "$file_source /file.exe" } } elsif $facts['domain'] != 'internal' { exec { 'client_setup': command => 'Invoke-WebRequest "$$file_source/file.exe " -outfile "C:/Windows/dir/file.exe" ', provider => powershell, creates => 'C:/Windows/dir/file.exe' } } package { 'client_package': } -- 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/67ccb8fe-8479-405a-adf0-64fa9347faf2%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Need to know what ports to open for puppet db to talk to puppet server 5
Need to know what ports to open for puppet db to talk to puppet server 5 -- 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/6d5a1c5d-e21d-42eb-a712-d9c599482e60%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.