Forge Home

profile_metadata

Allows you to define information about a service within the profile that configures it

899 downloads

899 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 1.0.0 (latest)
released Sep 17th 2021
This version is compatible with:
  • Puppet Enterprise 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x
  • Puppet >= 6.1.0 < 8.0.0
  • , , , , , , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'ploperations-profile_metadata', '1.0.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add ploperations-profile_metadata
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install ploperations-profile_metadata --version 1.0.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

ploperations/profile_metadata — version 1.0.0 Sep 17th 2021

Reference

Table of Contents

Classes

Public Classes

Private Classes

  • profile_metadata: Support defining metadata for a node (e.g profile_metadata::service)
  • profile_metadata::service::motd_blank: Add the blank line after the services in the MOTD

Defined types

Classes

Defined types

profile_metadata::service

Define information about a service. The service's title is automatically added to the MOTD and all the information is added to a structured fact named profile_metadata.

$title: This should always be the name of the enclosing class, which will be available in $title. The only case where this will be different is within defined types.

Examples

A service definition on a Puppet Master included in profile::pe::master
profile_metadata::service { $title:
  human_name        => 'Puppet Master',
  owner_uid         => 'john.doe',
  team              => infracore,
  end_users         => ['notify-infracore@example.com'],
  escalation_period => 'global-workhours',
  downtime_impact   => "Can't make changes to infrastructure",
  doc_urls          => [
    'https://example.com/our-pe-docs',
  ],
}
The resulting fact from the definition above as shown by sudo facter -p profile_metadata on the master
{
  services => [
    {
      class_name => "profile::pe::master",
      doc_urls => [
        "https://example.com/our-pe-docs"
      ],
      downtime_impact => "Can't make changes to infrastructure",
      end_users => [
        "notify-infracore@example.com"
      ],
      escalation_period => "global-workhours",
      human_name => "Puppet Master",
      other_fqdns => [],
      owned => true,
      owner_uid => "john.doe",
      team => "infracore"
    }
  ]
}
The two lines this definition adds to the bottom of the MOTD
Puppet Master
  profile::pe::master owned by team infracore

Parameters

The following parameters are available in the profile_metadata::service defined type:

owner_uid

Data type: Optional[String[1]]

The LDAP uid of the owner of the service. If there are multiple owners, pick one. This may only be set to undef temporarily as all services need to have an owner... even when nobody want it.

Default value: undef

team

Data type: Optional[String[1]]

The team that owns the service. At Puppet, this should generally be infracore, re, qe, or itops. This may only be set to undef temporarily as all services need to owned by a team... even when nobody want it.

Default value: undef

end_users

Data type: Optional[Array[Pattern[/@/], 1]]

An array of email addresses to notify when there are changes to the service that will be visible outside of $team. For example, all@puppet.com is appropriate for JIRA. This may only be set to undef temporarily. If only $team will see the changes then $team's email should be used.

Default value: undef

escalation_period

Data type: String[1]

A description of when we should escalate to $team if the service goes down and the on call person cannot fix it. For example:

  • pdx-workhours
  • 24/7
  • workdays

Default value: 'pdx-workhours'

downtime_impact

Data type: Optional[String[1]]

A description of the impact of downtime, e.g. "Development work will be blocked because their changes cannot be tested and thus cannot be merged." Use multiple lines and markdown as appropriate.

Default value: undef

notes

Data type: Optional[String[1]]

General notes for things not covered elsewhere. Use multiple lines and markdown as appropriate.

Default value: undef

doc_urls

Data type: Array[String[1]]

An array of URLs to documentation (e.g. Confluence).

Default value: []

class_name

Data type: Pattern[/\A([a-z][a-z0-9_]*)?(::[a-z][a-z0-9_]*)*\Z/]

The Puppet class the metadata is associated with

Default value: $title

human_name

Data type: String[1]

a human friendly name for the service. For example, "Internal InfraCore CI".

Default value: $title

other_fqdns

Data type: Array[String[1]]

Other FQDNs that resolve to this host that are used by the service. For example, the $site_alias of a Jenkins master.

Default value: []