LEFT | RIGHT |
1 # == Class: docker | 1 # == Class: docker |
2 # | 2 # |
3 # Install docker (https://www.docker.com/) | 3 # Install docker (https://www.docker.com/) |
4 # | 4 # |
5 # == Parameters: | 5 # == Parameters: |
6 # | 6 # |
7 # [*source*] | 7 # [*source*] |
8 # Overwrite the default apt::source used (given Class['apt'] is defined). | 8 # Overwrite the default apt::source used (given Class['apt'] is defined). |
9 # | 9 # |
10 # [*package*] | 10 # [*package*] |
(...skipping 17 matching lines...) Expand all Loading... |
28 # | 28 # |
29 class docker( | 29 class docker( |
30 $source = hiera('docker::source', {}), | 30 $source = hiera('docker::source', {}), |
31 $package = hiera('docker::package', {}), | 31 $package = hiera('docker::package', {}), |
32 ) { | 32 ) { |
33 | 33 |
34 include stdlib | 34 include stdlib |
35 | 35 |
36 ensure_resource('package', $title, merge({ | 36 ensure_resource('package', $title, merge({ |
37 name => 'docker-engine', | 37 name => 'docker-engine', |
| 38 ensure => 'latest', |
| 39 provider => 'apt', |
38 }, $package)) | 40 }, $package)) |
39 | 41 |
40 # Used as default $ensure parameter for most resources below | 42 # Used as default $ensure parameter for most resources below |
41 $ensure = getparam(Package[$title], 'ensure') ? { | 43 $ensure = getparam(Package[$title], 'ensure') ? { |
42 /^(absent|purged|held)$/ => 'absent', | 44 /^(absent|purged|held)$/ => 'absent', |
43 default => 'present', | 45 default => 'present', |
44 } | 46 } |
45 | 47 |
46 # Using ensure_*state functions | 48 # Using ensure_*state functions |
47 if ensure_state($ensure) { | 49 if ensure_state($ensure) { |
(...skipping 14 matching lines...) Expand all Loading... |
62 release => downcase("$::osfamily-$::lsbdistcodename"), | 64 release => downcase("$::osfamily-$::lsbdistcodename"), |
63 include_src => false, | 65 include_src => false, |
64 key => '58118E89F3A912897C070ADBF76221572C52609D', | 66 key => '58118E89F3A912897C070ADBF76221572C52609D', |
65 key_server => 'hkp://ha.pool.sks-keyservers.net:80', | 67 key_server => 'hkp://ha.pool.sks-keyservers.net:80', |
66 }, $source)) | 68 }, $source)) |
67 | 69 |
68 Apt::Source[$title] -> Package[$title] | 70 Apt::Source[$title] -> Package[$title] |
69 } | 71 } |
70 } | 72 } |
71 | 73 |
LEFT | RIGHT |