Skip to content

Latest commit

 

History

History
208 lines (121 loc) · 5.01 KB

REFERENCE.md

File metadata and controls

208 lines (121 loc) · 5.01 KB

Reference

Table of Contents

Classes

  • bolt: installs bolt via yumrepo or release package

Defined types

  • bolt::project: creates required files for a bolt project. Will create one oneshot service for each plan

Classes

bolt

installs bolt via yumrepo or release package

Examples

install bolt via puppet-tools-release rpm
include bolt
install bolt via puppet-tools-release which is on a mirror
class { 'bolt':
  base_url => 'https://mirror.corp.internal',
}
manage the yumrepo directly
class { 'bolt':
  use_release_package => false,
}
manage the yumrepo with an internal mirror with odd directory layout
class { 'bolt':
  base_url         => 'https://internal.mirror.corp/keys/',
  yumrepo_base_url => 'https://internal.mirror.corp/puppet/puppet_tools/rhel8/',
}

Parameters

The following parameters are available in the bolt class:

version

Data type: String[1]

desired version for bolt or absent

Default value: 'installed'

base_url

Data type: Stdlib::HTTPSUrl

HTTPS URL to the yumrepo base

Default value: $facts['os']['family'] ? { 'Debian' => 'https://apt.puppet.com/', 'RedHat' => 'https://yum.puppet.com/'

release_package

Data type: String[1]

filename for the release package rpm

Default value: $facts['os']['family'] ? { 'Debian' => "puppet-release-${fact('os.distro.codename')}.deb", 'RedHat' => "puppet-tools-release-el-${facts['os']['release']['major']}.noarch.rpm"

gpgkey

Data type: String[1]

name of the GPG key filename in the repo

Default value: $facts['os']['family'] ? { 'Debian' => 'DEB-GPG-KEY-puppet-20250406', 'RedHat' => 'RPM-GPG-KEY-puppet-20250406'

use_release_package

Data type: Boolean

enable/disable the puppet-tools-release package installation. When disabled, we will configure the repo as yumrepo resource

Default value: $facts['os']['family'] ? { 'Debian' => false, 'RedHat' => true

yumrepo_base_url

Data type: Stdlib::HTTPSUrl

configure the full repo URL, useful when you don't exactly mirror yum.puppet.com

Default value: "${base_url}puppet-tools/el/${facts['os']['release']['major']}/\$basearch"

manage_repo

Data type: Boolean

when true, a repo will be added to install bolt. Useful when you manage repos externally. See also $use_release_package

Default value: true

Defined types

bolt::project

creates required files for a bolt project. Will create one oneshot service for each plan

Examples

create one project and provide plan parameters
bolt::project { 'peadmmig': }
-> file { '/opt/peadmmig/profiles::convert.json':
  owner   => 'peadmmig',
  group   => 'peadmmig',
  content => { 'primary_host' => $facts['networking']['fqdn'] }.stdlib::to_json_pretty,
}

Parameters

The following parameters are available in the bolt::project defined type:

basepath

Data type: Stdlib::Absolutepath

rootdir where the project will be created into

Default value: '/opt/'

project

Data type: String[1]

the name of the project

Default value: $name

owner

Data type: String[1]

the user that will own the files and run the service

Default value: $project

group

Data type: String[1]

the group for all files

Default value: $project

manage_user

Data type: Boolean

if we should create the user+group or not

Default value: true

environment

Data type: String[1]

the desired code environment we will use

Default value: 'peadm'

modulepaths

Data type: Array[Stdlib::Absolutepath]

an array of directories where code lives

Default value: ["/etc/puppetlabs/code/environments/${environment}/modules", "/etc/puppetlabs/code/environments/${environment}/site", '/opt/puppetlabs/puppet/modules']