Skip to content

apt weak_ssl paramerer --- workaround for apt key error: "certificate verify failed (unable to get local issuer certificate)"? #52

Description

@mc-hack

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 6
  • Ruby: -
  • Distribution: Debian 11.3 (Bullseye)
  • Module version: v8.0.0

How to reproduce (e.g Puppet code you use)

using elastic_stack to manage repo at fresh debian bullseye installation:

	class { 'elastic_stack::repo':
  		version => 7,
	}

What are you seeing

Error: certificate verify failed (unable to get local issuer certificate)

What behaviour did you expect instead

like to have "weak_ssl" option for apt::source module as workaround:

Boolean           $apt_weak_ssl  = false,

.. and then:

  case $facts['os']['family'] {
    'Debian': {
      include apt

      apt::source { 'elastic':
        ensure   => 'present',
        comment  => $description,
        location => $base_url,
        release  => 'stable',
        repos    => 'main',
        key      => {
          'id'     => $key_id,
          'source'  => $key_source,
          'weak_ssl'  => $apt_weak_ssl,
        },
        include  => {
          'deb' => true,
          'src' => false,
        },
        pin      => $priority,
      }
    }

Output log

Error: Could not set 'present' on ensure: SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get local issuer certificate) (file: /etc/puppetlabs/code/environments/production/modules/apt/manifests/key.pp, line: 55)
Error: Could not set 'present' on ensure: SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get local issuer certificate) (file: /etc/puppetlabs/code/environments/production/modules/apt/manifests/key.pp, line: 55)
Wrapped exception:
SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get local issuer certificate)
Error: /Stage[first]/Elastic_stack::Repo/Apt::Source[elastic]/Apt::Key[Add key: 46095ACC8548582C1A2699A9D27D666CD88E42B4 from Apt::Source elastic]/Apt_key[Add key: 46095ACC8548582C1A2699A9D27D666CD88E42B4 from Apt::Source elastic]/ensure: change from 'absent' to 'present' failed: Could not set 'present' on ensure: SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get local issuer certificate) (file: /etc/puppetlabs/code/environments/production/modules/apt/manifests/key.pp, line: 55)

Any additional information you'd like to impart

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions