https://www.puppet.com/community logo
Join Slack
Powered by
# puppet
  • s

    Slackbot

    07/27/2022, 9:37 AM
    This message was deleted.
    h
    m
    • 3
    • 4
  • m

    Massimiliano (Max)

    07/27/2022, 9:37 AM
    both statements are being ignored
  • b

    Brian

    07/27/2022, 10:44 AM
    Hi, using the puppet apache module I'm trying to declare the class
    apache::mod::dir
    to adjust DirectoryIndex values globally. I get a duplicate declaration error but don't see it declared anywhere. Any ideas? puppet --version 6.23.0 https://forge.puppet.com/modules/puppetlabs/apache/6.4.0/reference#apachemoddir
    Copy code
    # <https://forge.puppet.com/modules/puppetlabs/apache/reference#apachemoddir>
      class { 'apache::mod::dir':
        indexes => ['index.php', ',index.html', 'index.html.var', 'index.htm', 'index.htm.var', 'index.cgi', 'index.shtml'],
      }
    Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Duplicate declaration: Class[Apache::Mod::Dir] is already declared; cannot redeclare (file: /etc/puppetlabs/code/environments/master/site-modules/profiles/manifests/www.pp, line: 118) (file: /etc/puppetlabs/code/environments/master/site-modules/profiles/manifests/www.pp, line: 118, column: 3) on node wwwproj4
    Copy code
    egrep -Ri 'apache::mod' .
    ./puppetboard.pp:    class { 'apache::mod::wsgi':
    ./www/proxy.pp:  include apache::mod::proxy
    ./www/proxy.pp:  include apache::mod::proxy_fcgi
    ./www/proxy.pp:  include apache::mod::proxy_balancer
    ./www/proxy.pp:  include apache::mod::proxy_connect
    ./www/proxy.pp:  include apache::mod::proxy_html
    ./www/proxy.pp:  include apache::mod::proxy_http
    ./www/proxy.pp:  include apache::mod::proxy_wstunnel
    ./www/proj.pp:  include apache::mod::proxy
    ./www/proj.pp:  class { 'apache::mod::passenger':
    ./www.pp:  class { 'apache::mod::ssl':
    ./www.pp:  class { 'apache::mod::auth_cas':
    ./www.pp:  class { 'apache::mod::md':
    ./www.pp:  class { 'apache::mod::status':
    ./www.pp:  class { 'apache::mod::userdir': }
    ./www.pp:  class { 'apache::mod::remoteip': }
    ./www.pp:  class { 'apache::mod::proxy_fcgi': }
    ./www.pp:  #class { 'apache::mod::prefork':
    ./www.pp:  class { 'apache::mod::php':
    ./www.pp:  class { 'apache::mod::fcgid': }
  • b

    Brian

    07/27/2022, 10:47 AM
    Hi, using the puppet apache module I'm trying to declare the class
    apache::mod::dir
    to adjust DirectoryIndex values. I get a duplicate declaration error but don't see it declared anywhere. Any ideas? puppet --version 6.23.0 https://forge.puppet.com/modules/puppetlabs/apache/6.4.0/reference#apachemoddir
    Copy code
    # <https://forge.puppet.com/modules/puppetlabs/apache/reference#apachemoddir>
      class { 'apache::mod::dir':
        indexes => ['index.php', ',index.html', 'index.html.var', 'index.htm', 'index.htm.var', 'index.cgi', 'index.shtml'],
      }
    Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Duplicate declaration: Class[Apache::Mod::Dir] is already declared; cannot redeclare (file: /etc/puppetlabs/code/environments/master/site-modules/profiles/manifests/www.pp, line: 118) (file: /etc/puppetlabs/code/environments/master/site-modules/profiles/manifests/www.pp, line: 118, column: 3) on node wwwproj4
    Copy code
    egrep -Ri 'apache::mod' .
    ./puppetboard.pp:    class { 'apache::mod::wsgi':
    ./www/proxy.pp:  include apache::mod::proxy
    ./www/proxy.pp:  include apache::mod::proxy_fcgi
    ./www/proxy.pp:  include apache::mod::proxy_balancer
    ./www/proxy.pp:  include apache::mod::proxy_connect
    ./www/proxy.pp:  include apache::mod::proxy_html
    ./www/proxy.pp:  include apache::mod::proxy_http
    ./www/proxy.pp:  include apache::mod::proxy_wstunnel
    ./www/proj.pp:  include apache::mod::proxy
    ./www/proj.pp:  class { 'apache::mod::passenger':
    ./www.pp:  class { 'apache::mod::ssl':
    ./www.pp:  class { 'apache::mod::auth_cas':
    ./www.pp:  class { 'apache::mod::md':
    ./www.pp:  class { 'apache::mod::status':
    ./www.pp:  class { 'apache::mod::userdir': }
    ./www.pp:  class { 'apache::mod::remoteip': }
    ./www.pp:  class { 'apache::mod::proxy_fcgi': }
    ./www.pp:  #class { 'apache::mod::prefork':
    ./www.pp:  class { 'apache::mod::php':
    ./www.pp:  class { 'apache::mod::fcgid': }
  • n

    Neeloj

    07/27/2022, 11:04 AM
    hi all, does anyone have good article or something about Puppet / threat modeling(STRIDE)? thanks
  • n

    Neeloj

    07/27/2022, 11:05 AM
    hi all, does anyone have good article or something about Puppet / threat modeling(STRIDE)? thanks
  • b

    Brian

    07/27/2022, 11:14 AM
    Hi, using the puppet apache module I'm trying to declare the class
    apache::mod::dir
    to adjust DirectoryIndex values globally. I get a duplicate declaration error but don't see it declared anywhere. Any ideas? puppet --version 6.23.0 https://forge.puppet.com/modules/puppetlabs/apache/6.4.0/reference#apachemoddir
    Copy code
    # <https://forge.puppet.com/modules/puppetlabs/apache/reference#apachemoddir>
      class { 'apache::mod::dir':
        indexes => ['index.php', ',index.html', 'index.html.var', 'index.htm', 'index.htm.var', 'index.cgi', 'index.shtml'],
      }
    Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Duplicate declaration: Class[Apache::Mod::Dir] is already declared; cannot redeclare (file: /etc/puppetlabs/code/environments/master/site-modules/profiles/manifests/www.pp, line: 118) (file: /etc/puppetlabs/code/environments/master/site-modules/profiles/manifests/www.pp, line: 118, column: 3) on node wwwproj4
    Copy code
    egrep -Ri 'apache::mod' .
    ./puppetboard.pp:    class { 'apache::mod::wsgi':
    ./www/proxy.pp:  include apache::mod::proxy
    ./www/proxy.pp:  include apache::mod::proxy_fcgi
    ./www/proxy.pp:  include apache::mod::proxy_balancer
    ./www/proxy.pp:  include apache::mod::proxy_connect
    ./www/proxy.pp:  include apache::mod::proxy_html
    ./www/proxy.pp:  include apache::mod::proxy_http
    ./www/proxy.pp:  include apache::mod::proxy_wstunnel
    ./www/proj.pp:  include apache::mod::proxy
    ./www/proj.pp:  class { 'apache::mod::passenger':
    ./www.pp:  class { 'apache::mod::ssl':
    ./www.pp:  class { 'apache::mod::auth_cas':
    ./www.pp:  class { 'apache::mod::md':
    ./www.pp:  class { 'apache::mod::status':
    ./www.pp:  class { 'apache::mod::userdir': }
    ./www.pp:  class { 'apache::mod::remoteip': }
    ./www.pp:  class { 'apache::mod::proxy_fcgi': }
    ./www.pp:  #class { 'apache::mod::prefork':
    ./www.pp:  class { 'apache::mod::php':
    ./www.pp:  class { 'apache::mod::fcgid': }
  • s

    Slackbot

    07/27/2022, 1:19 PM
    This message was deleted.
    b
    j
    t
    • 4
    • 5
  • t

    tuxmea

    07/27/2022, 1:45 PM
    You must use https and provide a signed cert, key and ca.
  • k

    Ken Meservy

    07/27/2022, 2:28 PM
    Hey folks! I'm running into an issue with the PDK that I'm hoping someone can help me out with. I'm working on a fork of puppetlabs-scheduled_task and after adding a couple of things I'm trying to run
    pdk validate
    and I'm running into an error. I've tried several different fixes for what I'm running into and can't seem to get around it,
    pdk bundle update
    &
    pdk bundle install
    also error with the same message:
    Copy code
    The dependency puppet-module-posix-default-r2.7 (~> 1.0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for x64-mingw32 but the dependency is only for ruby. To add those platforms to the bundle, run `bundle lock --add-platform ruby`.
    The dependency puppet-module-posix-dev-r2.7 (~> 1.0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for x64-mingw32 but the dependency is only for ruby. To add those platforms to the bundle, run `bundle lock --add-platform ruby`.
    The dependency voxpupuli-puppet-lint-plugins (>= 3.0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for x64-mingw32 but the dependency is only for ruby. To add those platforms to the bundle, run `bundle lock --add-platform ruby`.
    The dependency puppet-module-posix-system-r2.7 (~> 1.0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for x64-mingw32 but the dependency is only for ruby. To add 
    those platforms to the bundle, run `bundle lock --add-platform ruby`.
    Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
    
    current directory:
    C:/Users/mcswe/AppData/Local/PDK/cache/ruby/2.7.0/gems/nio4r-2.5.8/ext/nio4r
    C:/Program\ Files/Puppet\ Labs/DevelopmentKit/private/ruby/2.7.6/bin/ruby.exe -I
    C:/Program\ Files/Puppet\
    Labs/DevelopmentKit/private/ruby/2.7.6/lib/ruby/site_ruby/2.7.0 -r
    ./siteconf20220727-13800-g7xe0j.rb extconf.rb
    C:/Program Files/Puppet
    Labs/DevelopmentKit/private/ruby/2.7.6/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in
    `require': cannot load such file -- devkit (LoadError)
    from C:/Program Files/Puppet
    Labs/DevelopmentKit/private/ruby/2.7.6/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in
    `require'
            from extconf.rb:7:in `<main>'
    
    extconf failed, exit code 1
    
    Gem files will remain installed in
    C:/Users/mcswe/AppData/Local/PDK/cache/ruby/2.7.0/gems/nio4r-2.5.8 for
    inspection.
    Results logged to
    C:/Users/mcswe/AppData/Local/PDK/cache/ruby/2.7.0/extensions/x64-mingw32/2.7.0/nio4r-2.5.8/gem_make.out
    
    An error occurred while installing nio4r (2.5.8), and Bundler cannot continue.
    Make sure that `gem install nio4r -v '2.5.8' --source '<https://rubygems.org/>'`
    succeeds before bundling.
    
    In Gemfile:
      github_changelog_generator was resolved to 1.16.4, which depends on
        async-http-faraday was resolved to 0.11.0, which depends on
          async-http was resolved to 0.56.6, which depends on
            async-io was resolved to 1.33.0, which depends on
              async was resolved to 1.30.3, which depends on
                nio4r
    
    pdk (FATAL): Unable to install missing Gemfile dependencies.
    I can't seem to get the pdk to install that nio4r gem. I've completely removed the pdk from my system and did a fresh install this morning & that didn't resolve it either. I can see other folks having trouble with getting this gem installed & that it requires the ruby devkit, but I'm not sure how the pdk handles that - if I install ruby & the devkit standalone I can install this gem just fine. My machine is running Windows 10 & I'm on pdk version 2.5.0. I think if I knew a bit more about how ruby worked I could figure this out but I'm kind of stuck at the moment. Does anyone have any suggestions? Thanks! Edit: This is the error message reported in my user cache:
    Copy code
    C:/Program\ Files/Puppet\ Labs/DevelopmentKit/private/ruby/2.7.6/bin/ruby.exe -I C:/Program\ Files/Puppet\ Labs/DevelopmentKit/private/ruby/2.7.6/lib/ruby/site_ruby/2.7.0 -r ./siteconf20220727-17072-la23zl.rb extconf.rb
    C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.7.6/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require': cannot load such file -- devkit (LoadError)
    	from C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.7.6/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
    	from extconf.rb:7:in `<main>'
    
    extconf failed, exit code 1
  • d

    Dr Bunsen Honeydew

    07/27/2022, 2:28 PM
    See the
    puppetlabs-scheduled_task
    module at https://forge.puppet.com/puppetlabs/scheduled_task?src=slack&amp;channel=puppet
  • k

    Ken Meservy

    07/27/2022, 3:07 PM
    Hey folks! I'm running into an issue with the PDK that I'm hoping someone can help me out with. I'm working on a fork of puppetlabs-scheduled_task and after adding a couple of things I'm trying to run
    pdk validate
    and I'm running into an error. I've tried several different fixes for what I'm running into and can't seem to get around it,
    pdk bundle update
    &
    pdk bundle install
    also error with the same message:
    Copy code
    The dependency puppet-module-posix-default-r2.7 (~> 1.0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for x64-mingw32 but the dependency is only for ruby. To add those platforms to the bundle, run `bundle lock --add-platform ruby`.
    The dependency puppet-module-posix-dev-r2.7 (~> 1.0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for x64-mingw32 but the dependency is only for ruby. To add those platforms to the bundle, run `bundle lock --add-platform ruby`.
    The dependency voxpupuli-puppet-lint-plugins (>= 3.0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for x64-mingw32 but the dependency is only for ruby. To add those platforms to the bundle, run `bundle lock --add-platform ruby`.
    The dependency puppet-module-posix-system-r2.7 (~> 1.0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for x64-mingw32 but the dependency is only for ruby. To add 
    those platforms to the bundle, run `bundle lock --add-platform ruby`.
    Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
    
    current directory:
    C:/Users/mcswe/AppData/Local/PDK/cache/ruby/2.7.0/gems/nio4r-2.5.8/ext/nio4r
    C:/Program\ Files/Puppet\ Labs/DevelopmentKit/private/ruby/2.7.6/bin/ruby.exe -I
    C:/Program\ Files/Puppet\
    Labs/DevelopmentKit/private/ruby/2.7.6/lib/ruby/site_ruby/2.7.0 -r
    ./siteconf20220727-13800-g7xe0j.rb extconf.rb
    C:/Program Files/Puppet
    Labs/DevelopmentKit/private/ruby/2.7.6/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in
    `require': cannot load such file -- devkit (LoadError)
    from C:/Program Files/Puppet
    Labs/DevelopmentKit/private/ruby/2.7.6/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in
    `require'
            from extconf.rb:7:in `<main>'
    
    extconf failed, exit code 1
    
    Gem files will remain installed in
    C:/Users/mcswe/AppData/Local/PDK/cache/ruby/2.7.0/gems/nio4r-2.5.8 for
    inspection.
    Results logged to
    C:/Users/mcswe/AppData/Local/PDK/cache/ruby/2.7.0/extensions/x64-mingw32/2.7.0/nio4r-2.5.8/gem_make.out
    
    An error occurred while installing nio4r (2.5.8), and Bundler cannot continue.
    Make sure that `gem install nio4r -v '2.5.8' --source '<https://rubygems.org/>'`
    succeeds before bundling.
    
    In Gemfile:
      github_changelog_generator was resolved to 1.16.4, which depends on
        async-http-faraday was resolved to 0.11.0, which depends on
          async-http was resolved to 0.56.6, which depends on
            async-io was resolved to 1.33.0, which depends on
              async was resolved to 1.30.3, which depends on
                nio4r
    
    pdk (FATAL): Unable to install missing Gemfile dependencies.
    I can't seem to get the pdk to install that nio4r gem. I've completely removed the pdk from my system and did a fresh install this morning & that didn't resolve it either. I can see other folks having trouble with getting this gem installed & that it requires the ruby devkit, but I'm not sure how the pdk handles that - if I install ruby & the devkit standalone I can install this gem just fine. My machine is running Windows 10 & I'm on pdk version 2.5.0. I think if I knew a bit more about how ruby worked I could figure this out but I'm kind of stuck at the moment. Does anyone have any suggestions? Thanks! Edit: This is the error message reported in my user cache:
    Copy code
    C:/Program\ Files/Puppet\ Labs/DevelopmentKit/private/ruby/2.7.6/bin/ruby.exe -I C:/Program\ Files/Puppet\ Labs/DevelopmentKit/private/ruby/2.7.6/lib/ruby/site_ruby/2.7.0 -r ./siteconf20220727-17072-la23zl.rb extconf.rb
    C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.7.6/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require': cannot load such file -- devkit (LoadError)
    	from C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.7.6/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
    	from extconf.rb:7:in `<main>'
    
    extconf failed, exit code 1
  • j

    Jason Grammenos

    07/27/2022, 5:52 PM
    As a follow up to my earlier question. I got the curl call working and have been playing with auth.conf to allow the request, but i cannot seem to get the HOCON rule to work
    Copy code
    {
                # Allow access to the certificate clean endpoint
                match-request: {
                    path: "/puppet-ca/v1/clean"
                    type: path
                    method: put
                }
                allow: ["test01.internal"]
                sort-order: 500
                name: "cert clean from nodes"
            },
  • s

    Slackbot

    07/27/2022, 5:53 PM
    This message was deleted.
    j
    • 2
    • 2
  • s

    Slackbot

    07/27/2022, 6:45 PM
    This message was deleted.
    n
    p
    +2
    • 5
    • 10
  • s

    Slackbot

    07/27/2022, 7:19 PM
    This message was deleted.
    n
    j
    d
    • 4
    • 16
  • s

    Slackbot

    07/27/2022, 7:41 PM
    This message was deleted.
    c
    d
    +2
    • 5
    • 17
  • d

    David

    07/27/2022, 7:42 PM
    Guys, I’m baffled by this. This is a puppet run on a Solaris 11.4 box running puppet 6.26.0. On 11.3, running puppet 5.5.10 I don’t have any issues but after upgrading to 11.4 I get this.
    Copy code
    root@ldm-infrad52 # puppet apply /tmp/dm --logdest=console
    Warning: Facter: Command /usr/bin/curl <http://prov.uk.gcb.corp/cgi-bin/remote-hquery.py?Hostname=>`uname -n`&results=Role| tr -cd '[:alpha:]' resulted with the following stderr message: % Total  % Received % Xferd Average Speed  Time  Time   Time Current
                     Dload Upload  Total  Spent  Left Speed
    100  19  0  19  0   0   18   0 --:--:-- 0:00:01 --:--:--  18
    Warning: Facter: Command /usr/bin/curl <http://prov.uk.gcb.corp/cgi-bin/remote-hquery.py?Hostname=>`uname -n`&results=Role| tr -cd '[:alpha:]' resulted with the following stderr message: % Total  % Received % Xferd Average Speed  Time  Time   Time Current
                     Dload Upload  Total  Spent  Left Speed
    100  19  0  19  0   0   18   0 --:--:-- 0:00:01 --:--:--  18
    Notice: Scope(Class[All_all_resolver]): ldm-infrad52 has a derivedsite of: TSQ
    Notice: Compiled catalog for ldm-infrad52.dev.uk.gcb.corp in environment production in 0.38 seconds
    Notice: /Stage[main]/All_all_resolver/Svccfg[svc:/network/dns/client/:properties/config/search]/ensure: created
    Notice: /Stage[main]/All_all_resolver/Svccfg[svc:/network/dns/client/:properties/config/nameserver]/ensure: created
    Notice: /Stage[main]/All_all_resolver/Svccfg[svc:/network/dns/client/:properties/config/options]/ensure: created
    Notice: /Stage[main]/All_all_resolver/Service[svc:/network/dns/client:default]: Triggered 'refresh' from 3 events
    Notice: Applied catalog in 18.06 seconds
    Error: Could not run: undefined local variable or method `audit_handle' for #<Puppet::Application::Apply:0x0000000104c6f980>
    So to me it looks as if the apply finished applying the catalog, but then gets this error. Tried googling but to no avail. I thought it was down to the reporting so I made sure that report was set to false in the puppet.conf. Any ideas ?
  • n

    natemccurdy

    07/27/2022, 8:03 PM
    Do you have
    use-legacy-auth-conf
    set in
    /etc/puppetlabs/puppetserver/conf.d/puppetserver.conf
    ?
  • v

    vchepkov

    07/27/2022, 10:57 PM
    well, call me confused, why would Windows 2012 think it's version 6?
  • v

    vchepkov

    07/27/2022, 10:57 PM
    Copy code
    C:\ProgramData\PuppetLabs>facter os
    {
      architecture => "x64",
      family => "windows",
      hardware => "x86_64",
      name => "windows",
      release => {
        full => "6.3.9600",
        major => "6",
        minor => "3"
      },
      windows => {
        edition_id => "ServerStandard",
        installation_type => "Server",
        product_name => "Windows Server 2012 R2 Standard",
        system32 => "C:\Windows\system32"
      }
    }
  • n

    n3snah

    07/27/2022, 10:59 PM
    This was the build number if I recall correctly.
  • v

    vchepkov

    07/27/2022, 11:00 PM
    is this something new? this breaks a lot of things
  • n

    n3snah

    07/27/2022, 11:00 PM
    Windows release info is very hard to consume. This is inline with Windows 8.1 also
  • n

    n3snah

    07/27/2022, 11:00 PM
    nope. its always been like this if I recall
  • n

    n3snah

    07/27/2022, 11:01 PM
    You will notice it on MS technet articles from time to time also
  • v

    vchepkov

    07/27/2022, 11:02 PM
    Well, they can keep it whatever, but I think facter should say 2012
  • n

    natemccurdy

    07/27/2022, 11:06 PM
    What version of puppet/facter are you using?
  • v

    vchepkov

    07/27/2022, 11:06 PM
    let me check, I went to 2016 and it tells fine
  • v

    vchepkov

    07/27/2022, 11:06 PM
    Copy code
    C:\Windows\system32>facter os
    {
      architecture => "x64",
      family => "windows",
      hardware => "x86_64",
      name => "windows",
      release => {
        full => "2016",
        major => "2016"
      },
      windows => {
        edition_id => "ServerStandard",
        installation_type => "Server",
        product_name => "Windows Server 2016 Standard",
        release_id => "1607",
        system32 => "C:\Windows\system32"
      }
    }
1...108109110...428Latest