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
|
# File 'manifests/agent.pp', line 15
class distelli::agent (
Sensitive $access_token,
Sensitive $secret_key,
Boolean $install_chocolatey = false,
Optional[String] $endpoint = undef,
Optional[String] $user_home = undef,
Optional[String] $user_shell = undef,
Optional[Sensitive] $user_password = undef,
Optional[Array[String]] $environments = undef,
Optional[String] $version = undef,
){
if $::facts['os']['family'] != 'windows' and $install_chocolatey == true {
warning('distelli::agent - "install_chocolatey" resource attribute was set to True for a non-Windows OS. This will be ignored.')
}
if $::facts['os']['family'] == 'windows' {
require ::distelli::deps::windows
include ::distelli::agent::windows
}
elsif $::facts['os']['family'] == 'Darwin' {
require ::distelli::deps::darwin
include ::distelli::agent::darwin
}
elsif $::facts['kernel'] == 'Linux' {
require ::distelli::deps::nix
include ::distelli::agent::nix
}
else {
fail("${::facts['os']['family']} is not currently supported by the Distelli Module. Please contact support@puppet.com")
}
}
|