forked from jdowning/puppet-awscli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.pp
93 lines (90 loc) · 1.99 KB
/
init.pp
1
2
3
4
5
6
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# == Class: awscli
#
# Install awscli
#
# === Parameters
#
# [$version]
# Provides ability to change the version of awscli being installed.
# Default: 'present'
# This variable is required.
#
# [$pkg_dev]
# Provides ability to install a specific Dev package by name.
# Default: See awscli::params Class
# This variable is optional.
#
# [$pkg_pip]
# Provides ability to install a specific PIP package by name.
# Default: See awscli::params Class
# This variable is optional.
#
# [$manage_epel]
# Boolean flag to install the EPEL repositories.
# Default: true
# This variable is optional.
#
# [$install_pkgdeps]
# Boolean flag to install the package dependencies or not
# Default: true
#
# [$install_pip]
# Boolean flag to install pip or not
# Default: true
#
# [$provider]
# One of "pip" or "apt"
#
# [$proxy]
# String proxy variable for use with EPEL module
# Default: undef
#
# [$install_options]
# Array of install options for the awscli Pip package
# Default: undef
#
# === Examples
#
# class { awscli: }
#
# === Authors
#
# Justin Downing <[email protected]>
#
# === Copyright
#
# Copyright 2014 Justin Downing
#
class awscli (
$version = 'present',
$pkg_dev = $awscli::params::pkg_dev,
$pkg_pip = $awscli::params::pkg_pip,
$manage_epel = true,
$install_pkgdeps = true,
$install_pip = true,
$provider = 'pip',
$proxy = $awscli::params::proxy,
$install_options = $awscli::params::install_options,
) inherits awscli::params {
case $provider {
'pip','pip3': {
class { '::awscli::deps':
proxy => $proxy,
}
package { 'awscli':
ensure => $version,
provider => $provider,
install_options => $install_options,
require => [
Package[$pkg_pip],
Class['awscli::deps'],
],
}
}
default: {
package { 'awscli':
ensure => $version,
}
}
}
}