Puppet Class: ipa::client::service::deploy

Defined in:
manifests/client/service/deploy.pp

Overview

NOTE: use this to deploy the exported resource @@ipa::client::service

Parameters:

  • server (Any) (defaults to: '')
  • nametag (Any) (defaults to: '')
  • debug (Any) (defaults to: false)


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
# File 'manifests/client/service/deploy.pp', line 19

class ipa::client::service::deploy(
	$server = '',
	$nametag = '',				# pick a tag to collect...
	$debug = false
) {

	# NOTE: the resource collects by fqdn; one good reason to use the fqdn!
	# sure you can override this by choosing your own $name value, but why?
	$valid_tag = "${nametag}" ? {
		'' => "${::fqdn}",	# if we're smart, this is what is used!
		default => "${nametag}",
	}

	# the host field is also the argument passed to the exported resource,
	# and it is the $valid_host variable that came from the server service
	if "${server}" == '' {
		Ipa::Client::Service <<| host == "${valid_tag}" |>> {
			debug => $debug,
		}
	} else {
		Ipa::Client::Service <<| host == "${valid_tag}" |>> {
			server => "${server}",	# override...
			debug => $debug,
		}
	}
}