Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: modules/docker/manifests/init.pp

Issue 29370801: Noissue - New module for installing docker on debian (Closed)
Left Patch Set: Setting suitable defaults for docker package Created Jan. 6, 2017, 3:04 p.m.
Right Patch Set: Setting the defaults in a more beautiful place Created Jan. 6, 2017, 3:07 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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*]
11 # Overwrite the default package options, to fine-tune the target version (i.e. 11 # Overwrite the default package options, to fine-tune the target version (i.e.
12 # ensure => 'latest') or remove Fluentd (ensure => 'absent' or 'purged') 12 # ensure => 'latest') or remove docker (ensure => 'absent' or 'purged')
13 # 13 #
14 # === Examples: 14 # === Examples:
15 # 15 #
16 # class {'docker': 16 # class {'docker':
17 # package => { 17 # package => {
18 # ensure => 'latest', 18 # ensure => 'latest',
19 # }, 19 # },
20 # source => { 20 # source => {
21 # location => 'https://apt.dockerproject.org/repo', 21 # location => 'https://apt.dockerproject.org/repo',
22 # release => downcase("$::osfamily-$::lsbdistcodename"), 22 # release => downcase("$::osfamily-$::lsbdistcodename"),
23 # include_src => false, 23 # include_src => false,
24 # key => '58118E89F3A912897C070ADBF76221572C52609D', 24 # key => '58118E89F3A912897C070ADBF76221572C52609D',
25 # key_server => 'hkp://ha.pool.sks-keyservers.net:80', 25 # key_server => 'hkp://ha.pool.sks-keyservers.net:80',
26 # } 26 # }
27 # } 27 # }
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 ensure => 'latest',
33 provider => 'apt',
34 }),
35 ) { 32 ) {
36 33
37 include stdlib 34 include stdlib
38 35
39 ensure_resource('package', $title, merge({ 36 ensure_resource('package', $title, merge({
40 name => 'docker-engine', 37 name => 'docker-engine',
38 ensure => 'latest',
39 provider => 'apt',
41 }, $package)) 40 }, $package))
42 41
43 # Used as default $ensure parameter for most resources below 42 # Used as default $ensure parameter for most resources below
44 $ensure = getparam(Package[$title], 'ensure') ? { 43 $ensure = getparam(Package[$title], 'ensure') ? {
45 /^(absent|purged|held)$/ => 'absent', 44 /^(absent|purged|held)$/ => 'absent',
46 default => 'present', 45 default => 'present',
47 } 46 }
48 47
49 # Using ensure_*state functions 48 # Using ensure_*state functions
50 if ensure_state($ensure) { 49 if ensure_state($ensure) {
(...skipping 14 matching lines...) Expand all
65 release => downcase("$::osfamily-$::lsbdistcodename"), 64 release => downcase("$::osfamily-$::lsbdistcodename"),
66 include_src => false, 65 include_src => false,
67 key => '58118E89F3A912897C070ADBF76221572C52609D', 66 key => '58118E89F3A912897C070ADBF76221572C52609D',
68 key_server => 'hkp://ha.pool.sks-keyservers.net:80', 67 key_server => 'hkp://ha.pool.sks-keyservers.net:80',
69 }, $source)) 68 }, $source))
70 69
71 Apt::Source[$title] -> Package[$title] 70 Apt::Source[$title] -> Package[$title]
72 } 71 }
73 } 72 }
74 73
LEFTRIGHT
« no previous file | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld