Uploaded image for project: 'Puppet Server'
  1. Puppet Server
  2. SERVER-2877

ensure_resource does not work

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Incomplete
    • Affects Version/s: SERVER 6.1.0
    • Fix Version/s: None
    • Component/s: Puppet Server
    • Labels:
      None
    • Template:
      PUP Bug Template
    • Method Found:
      Needs Assessment
    • QA Risk Assessment:
      Needs Assessment

      Description

      Puppet Version: 6.17
      Puppet Server Version: 6.12
      OS Name/Version: Ubuntu 18 LTS

       

      helmut@mail:~$ sudo puppet agent -t -v
      Info: Using configured environment 'production'
      Info: Retrieving pluginfacts
      Info: Retrieving plugin
      Info: Retrieving locales
      Info: Loading facts
      Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Function Call, Duplicate declaration: File[/etc/openvpn/certificates/cert.crt] is already declared at (file: /etc/puppetlabs/code/modules/openvpn/manifests/init.pp, line: 103); cannot redeclare (file: /etc/puppetlabs/code/modules/openvpn/manifests/init.pp, line: 183) (file: /etc/puppetlabs/code/modules/openvpn/manifests/init.pp, line: 183, column: 7) on node mail
      Warning: Not using cache on failed catalog
      Error: Could not retrieve catalog; skipping run
      helmut@mail:~$
      

      Line 103:

       ensure_resource('file', "${openvpnConf['cert']}", {
       mode => '0644',
       owner => "${rootUID}",
       group => "${rootGID}",
       source => "puppet:///modules/${module_name}/etc/openvpn/certificates/client/${basename($openvpnConf['cert'])}",
       require => Package["${openvpnPackage}"],
       notify => Service["${openvpnService}"],
       })
      

      Line 183:

       ensure_resource('file', "${openvpnConf['cert']}", {
       mode => '0644',
       owner => "${rootUID}",
       group => "${rootGID}",
       source => "puppet:///modules/${module_name}/etc/openvpn/certificates/server/${basename($openvpnConf['cert'])}",
       require => Package["${openvpnPackage}"],
       notify => Service["${openvpnService}"],
       })
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            Helmut Helmut Ritter
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support