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: Created Jan. 6, 2017, 2:34 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')
f.nicolaisen 2017/01/06 14:37:47 copy paste waste
f.lopez 2017/01/06 14:46:23 Acknowledged.
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 ) { 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
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
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