OLD | NEW |
1 # == Type: adblockplus::host | 1 # == Type: adblockplus::host |
2 # | 2 # |
3 # Manage host information for any node within the Adblock Plus infrastructure. | 3 # Manage host information for any node within the Adblock Plus infrastructure. |
4 # | 4 # |
5 # === Parameters: | 5 # === Parameters: |
6 # | 6 # |
7 # [*ensure*] | 7 # [*ensure*] |
8 # Whether to ensure any host-related resources being 'present' or 'absent'. | 8 # Whether to ensure any host-related resources being 'present' or 'absent'. |
9 # Note that implicit realization of embedded resources only takes place if | 9 # Note that implicit realization of embedded resources only takes place if |
10 # $ensure is 'absent'. | 10 # $ensure is 'absent'. |
11 # | 11 # |
12 # [*fqdn*] | 12 # [*fqdn*] |
13 # The fully qualified domain name associated with the host. See the examples | 13 # The fully qualified domain name associated with the host. See the examples |
14 # section below on how this piece of information is supposed to be re-used. | 14 # section below on how this piece of information is supposed to be re-used. |
15 # | 15 # |
16 # [*groups*] | 16 # [*groups*] |
17 # A list of logical groups the host is associated with, i.e. for direct or | 17 # A list of logical groups the host is associated with, i.e. for direct or |
18 # indirect translation into nagios_hostgroup names or similar. This parameter | 18 # indirect translation into nagios_hostgroup names or similar. This parameter |
19 # is considered meta-information and not processed by type adblockplus::host. | 19 # is considered meta-information and not processed by type adblockplus::host. |
20 # | 20 # |
21 # [*ips*] | 21 # [*ips*] |
22 # A list of one or more IPv4 and IPv6 addresses associated with the host, | 22 # A list of one or more IPv4 and IPv6 addresses associated with the host, |
23 # the first one of which is considered the primary IP address, and each of | 23 # the first one of which is considered the primary IP address, and each of |
24 # which is included as $alias in the (virtual) Sshkey[$title] resource. | 24 # which is included as $alias in the (virtual) Sshkey[$title] resource. |
25 # | 25 # |
| 26 # [*os*] |
| 27 # Indicates the host's operating system. Recognized values include i.e. |
| 28 # "ubuntu-precise" and "debian-jessie". |
| 29 # |
26 # [*public_key*] | 30 # [*public_key*] |
27 # The host's public (SSH) key, i.e "ssh-rsa AA.... host1.example.com", for | 31 # The host's public (SSH) key, i.e "ssh-rsa AA.... host1.example.com", for |
28 # use with the (virual) Sshkey[$title] resource. Note that this implies the | 32 # use with the (virual) Sshkey[$title] resource. Note that this implies the |
29 # default public key of the host being used, namely the first one offered | 33 # default public key of the host being used, namely the first one offered |
30 # during the SSL handshake. | 34 # during the SSL handshake. |
31 # | 35 # |
32 # [*role*] | 36 # [*role*] |
33 # The name of the host's primary role, if any. This parameter is considered | 37 # The name of the host's primary role, if any. This parameter is considered |
34 # meta-information and not processed by type adblockplus::host. | 38 # meta-information and not processed by type adblockplus::host. |
35 # | 39 # |
(...skipping 21 matching lines...) Expand all Loading... |
57 # # Resources associated with 'absent' hosts are always realized | 61 # # Resources associated with 'absent' hosts are always realized |
58 # adblockplus::host {'node0': | 62 # adblockplus::host {'node0': |
59 # ensure => 'absent', | 63 # ensure => 'absent', |
60 # } | 64 # } |
61 # | 65 # |
62 define adblockplus::host ( | 66 define adblockplus::host ( |
63 $ensure = 'present', | 67 $ensure = 'present', |
64 $fqdn = "$name.$adblockplus::authority", | 68 $fqdn = "$name.$adblockplus::authority", |
65 $groups = [], | 69 $groups = [], |
66 $ips = [], | 70 $ips = [], |
| 71 $os = undef, |
67 $public_key = undef, | 72 $public_key = undef, |
68 $role = undef, | 73 $role = undef, |
69 ) { | 74 ) { |
70 | 75 |
71 include adblockplus | 76 include adblockplus |
72 include stdlib | 77 include stdlib |
73 | 78 |
74 case $public_key { | 79 case $public_key { |
75 | 80 |
76 undef: { | 81 undef: { |
(...skipping 29 matching lines...) Expand all Loading... |
106 | 111 |
107 if $ensure == 'absent' { | 112 if $ensure == 'absent' { |
108 realize(Host[$title]) | 113 realize(Host[$title]) |
109 realize(Sshkey[$title]) | 114 realize(Sshkey[$title]) |
110 } | 115 } |
111 | 116 |
112 if $::role != undef and manifest_exists("adblockplus::host::$::role") { | 117 if $::role != undef and manifest_exists("adblockplus::host::$::role") { |
113 ensure_resource("adblockplus::host::$::role", $title, {name => $name}) | 118 ensure_resource("adblockplus::host::$::role", $title, {name => $name}) |
114 } | 119 } |
115 } | 120 } |
OLD | NEW |