| 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'. |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 # adblockplus::host {'node1': | 39 # adblockplus::host {'node1': |
| 40 # ensure => 'present', | 40 # ensure => 'present', |
| 41 # ips => ['10.8.0.1'], | 41 # ips => ['10.8.0.1'], |
| 42 # } | 42 # } |
| 43 # | 43 # |
| 44 # # Explicit realization of /etc/hosts and /etc/ssh/ssh_known_hosts records | 44 # # Explicit realization of /etc/hosts and /etc/ssh/ssh_known_hosts records |
| 45 # realize(Host['node1']) | 45 # realize(Host['node1']) |
| 46 # realize(Sshkey['node1']) | 46 # realize(Sshkey['node1']) |
| 47 # | 47 # |
| 48 # # Global realization, i.e. when creating a node all others can access | 48 # # Global realization, i.e. when creating a node all others can access |
| 49 # realize(Host<|tag == 'adblockplus::host'|>) | 49 # Host<|tag == 'adblockplus::host'|> |
| 50 # realize(Sshkey<|tag == 'adblockplus::host'|>) | 50 # Sshkey<|tag == 'adblockplus::host'|> |
| 51 # | 51 # |
| 52 # # Addressing (meta-) parameters for re-using their values | 52 # # Addressing (meta-) parameters for re-using their values |
| 53 # $fqdn = getparam(Adblockplus::Host['node1'], 'fqdn') | 53 # $fqdn = getparam(Adblockplus::Host['node1'], 'fqdn') |
| 54 # $primary_ip = getparam(Host['node1'], 'ip') | 54 # $primary_ip = getparam(Host['node1'], 'ip') |
| 55 # $key_type = getparam(Sshkey['node1'], 'type') | 55 # $key_type = getparam(Sshkey['node1'], 'type') |
| 56 # | 56 # |
| 57 # # Resources associated with 'absent' hosts are always realized | 57 # # Resources associated with 'absent' hosts are always realized |
| 58 # adblockplus::host {'node0': | 58 # adblockplus::host {'node0': |
| 59 # ensure => 'absent', | 59 # ensure => 'absent', |
| 60 # } | 60 # } |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 | 106 |
| 107 if $ensure == 'absent' { | 107 if $ensure == 'absent' { |
| 108 realize(Host[$title]) | 108 realize(Host[$title]) |
| 109 realize(Sshkey[$title]) | 109 realize(Sshkey[$title]) |
| 110 } | 110 } |
| 111 | 111 |
| 112 if $::role != undef and manifest_exists("adblockplus::host::$::role") { | 112 if $::role != undef and manifest_exists("adblockplus::host::$::role") { |
| 113 ensure_resource("adblockplus::host::$::role", $title, {name => $name}) | 113 ensure_resource("adblockplus::host::$::role", $title, {name => $name}) |
| 114 } | 114 } |
| 115 } | 115 } |
| OLD | NEW |