Puppet Class: psick::admin::node

Defined in:
manifests/admin/node.pp

Summary

Manages admin configurations on nodes

Overview

Parameters:

  • ensure (Variant[Boolean,String]) (defaults to: pick($psick::admin::ensure, 'present'))
  • manage (Boolean) (defaults to: $psick::manage)
  • noop_manage (Boolean) (defaults to: $psick::noop_manage)
  • noop_value (Boolean) (defaults to: $psick::noop_value)


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
# File 'manifests/admin/node.pp', line 3

class psick::admin::node (

  Variant[Boolean,String] $ensure        = pick($psick::admin::ensure, 'present'),
  Boolean          $manage               = $psick::manage,
  Boolean          $noop_manage          = $psick::noop_manage,
  Boolean          $noop_value           = $psick::noop_value,
) {
  if $manage {
    if $noop_manage {
      noop($noop_value)
    }
    include psick::admin

    if $psick::admin::keyshare_method == 'storeconfigs' {
      @@sshkey { "admin_${facts['networking']['fqdn']}_rsa":
        ensure       => $ensure,
        host_aliases => [$facts['networking']['fqdn'], $facts['networking']['hostname'], $facts['networking']['ip']],
        type         => 'ssh-rsa',
        key          => $facts['ssh']['rsa']['key'],
        tag          => "admin_node_${psick::admin::master}_rsa",
      }
      # Authorize master host ssh key for remote connection
      Ssh_authorized_key <<| tag == "admin_master_${psick::admin::master}" |>>
    }
  }
}