7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
# File 'manifests/browsers/chrome.pp', line 7
class software::browsers::chrome (
$ensure = $software::params::software_ensure,
$url = $software::params::chrome_url,
$channel = $software::params::chrome_channel,
) inherits software::params {
validate_string($ensure)
validate_string($url)
case $::operatingsystem {
'Darwin': {
package { 'GoogleChrome':
ensure => $ensure,
provider => appdmg,
source => $url,
}
}
'Ubuntu': {
validate_string($channel)
$apt_source_ensure = $ensure ? {
'installed' => present,
'latest' => present,
default => $ensure,
}
include '::apt'
apt::source { 'google-chrome':
ensure => $apt_source_ensure,
location => $url,
release => 'stable',
repos => 'main',
key => {
'id' => '4CCA1EAF950CEE4AB83976DCA040830F7FAC5991',
'source' => 'https://dl.google.com/linux/linux_signing_key.pub',
},
architecture => 'amd64',
} ->
package { "google-chrome-${channel}":
ensure => $ensure,
}
}
default: {
fail("The ${name} class is not supported on ${::operatingsystem}.")
}
}
}
|