Puppet Class: classroom_legacy::facts

Inherits:
classroom_legacy::params
Defined in:
manifests/facts.pp

Overview

This class writes out some moderately interesting external facts. These are useful for demonstrating structured facts.

Their existence also serves as a marker that initial provisioning has taken place, for the small handful of items that we only want to manage once.

Parameters:

  • coursename (Any)
  • role (Any) (defaults to: $classroom_legacy::params::role)


7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'manifests/facts.pp', line 7

class classroom_legacy::facts (
  $coursename,
  $role = $classroom_legacy::params::role,
) inherits classroom_legacy::params {

  $dot_d = "${classroom_legacy::params::factdir}/facts.d/"

  file { [ $classroom_legacy::params::factdir, $dot_d ]:
    ensure => directory,
  }

  file { "${dot_d}/puppetlabs.txt":
    ensure  => file,
    content => template('classroom_legacy/facts.txt.erb'),
  }
}