File tree 5 files changed +0
-30
lines changed 5 files changed +0
-30
lines changed Original file line number Diff line number Diff line change 351
351
# Absolute path to a file containing the PGP keyring used to sign this repository. Value is used to set signed-by on the source entry.
352
352
# See https://wiki.debian.org/DebianRepository/UseThirdParty for details.
353
353
#
354
- # @param keyring_force_update
355
- # Forces to update the with keyring provided gpg key.
356
- #
357
354
class docker (
358
355
Optional[String] $version = $docker::params::version,
359
356
String $ensure = $docker::params::ensure,
473
470
Optional[Variant[String,Array]] $registry_mirror = $docker::params::registry_mirror,
474
471
Boolean $acknowledge_unsupported_os = false ,
475
472
Stdlib::Absolutepath $keyring = ' /etc/apt/keyrings/docker.gpg' ,
476
- Boolean $keyring_force_update = false ,
477
473
478
474
# Windows specific parameters
479
475
Optional[String] $docker_msft_provider_version = $docker::params::docker_msft_provider_version,
Original file line number Diff line number Diff line change 15
15
# @param gpg_ensure
16
16
# Whether or not the gpg package is ensured by this module.
17
17
#
18
- # @param keyring_force_update
19
- # Forces to update the with keyring provided gpg key.
20
18
class docker::repos (
21
19
$location = $docker::package_location,
22
20
$key_source = $docker::package_key_source,
23
21
$key_check_source = $docker::package_key_check_source,
24
22
$architecture = $facts[' os' ][' architecture' ],
25
23
$keyring = $docker::keyring,
26
24
$gpg_ensure = $docker::params::gpg_ensure,
27
- $keyring_force_update = $docker::keyring_force_update,
28
25
) {
29
26
ensure_packages($docker::prerequired_packages )
30
27
40
37
if $gpg_ensure {
41
38
ensure_packages([' gpg' ])
42
39
}
43
- if $keyring_force_update {
44
- exec { 'Remove Docker-GPG-Key' :
45
- path => ' /bin/' ,
46
- cwd => ' /tmp' ,
47
- command => " rm ${keyring} " ,
48
- }
49
- Exec[' Remove Docker-GPG-Key' ] -> Archive[$keyring ]
50
- }
51
40
52
41
archive { $keyring:
53
42
ensure => present ,
Original file line number Diff line number Diff line change 33
33
'with keyring set to optional path' => {
34
34
'keyring' => '/root/keyrings/docker.gpg' ,
35
35
} ,
36
- 'with keyring set to force update' => {
37
- 'keyring_force_update' => true ,
38
- } ,
39
36
}
40
37
41
38
describe 'docker' , type : :class do
187
184
'use_upstream_package_source' => defaults [ 'use_upstream_package_source' ] ,
188
185
'version' => defaults [ 'version' ] ,
189
186
'keyring' => defaults [ 'keyring' ] ,
190
- 'keyring_force_update' => defaults [ 'keyring_force_update' ] ,
191
187
} . merge ( default_params ) . merge ( local_params )
192
188
193
189
let ( :facts ) do
Original file line number Diff line number Diff line change @@ -89,7 +89,6 @@ def get_defaults(_facts)
89
89
tmp_dir_config = true
90
90
version = :undef
91
91
keyring = '/etc/apt/keyrings/docker.gpg'
92
- keyring_force_update = false
93
92
94
93
if _facts [ :os ] [ 'family' ] == 'windows'
95
94
compose_install_path = "#{ _facts [ 'docker_program_files_path' ] } /Docker"
@@ -490,6 +489,5 @@ def get_defaults(_facts)
490
489
'use_upstream_package_source' => use_upstream_package_source ,
491
490
'version' => version ,
492
491
'keyring' => keyring ,
493
- 'keyring_force_update' => keyring_force_update ,
494
492
}
495
493
end
Original file line number Diff line number Diff line change 31
31
if params [ 'use_upstream_package_source' ]
32
32
# check if debian version is atleast 11 and ubuntu version is atleast 22
33
33
if ( facts [ :operatingsystem ] == 'Debian' && facts [ :operatingsystemrelease ] =~ /1[1-9]/ ) || ( facts [ :operatingsystem ] == 'Ubuntu' && facts [ :operatingsystemrelease ] =~ /2[2-9]/ )
34
- if params [ 'keyring_force_update' ]
35
- it {
36
- is_expected . to contain_exec ( 'Remove Docker-GPG-Key' ) . with (
37
- 'path' => '/bin/' ,
38
- 'cwd' => '/tmp' ,
39
- 'command' => "rm #{ keyring } " ,
40
- ) . that_comes_before ( "Archive[#{ keyring } ]" )
41
- }
42
- end
43
34
it {
44
35
is_expected . to contain_class ( 'archive' )
45
36
is_expected . to contain_archive ( keyring )
You can’t perform that action at this time.
0 commit comments