Skip to content

Commit

Permalink
deploy settings: generate types by default and dont deploy spec dir
Browse files Browse the repository at this point in the history
for a long time r10k supports generating types. It's not required to do
this in a custom posthook. Also r10k has an option to ignore the spec
dir from modules. To provide a good user experience we should enable it.

This was introduced in r10k 3.11: https://github.com/puppetlabs/r10k/blob/main/CHANGELOG.mkd#3110
  • Loading branch information
bastelfreak committed Jul 29, 2023
1 parent 1fa0240 commit b573795
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
11 changes: 3 additions & 8 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* [`r10k::install::puppet_gem`](#r10k--install--puppet_gem): This class links the r10k binary for Puppet FOSS 4.2 and up
* [`r10k::mcollective`](#r10k--mcollective): Install the r10k mcollective agent
* [`r10k::mcollective::application`](#r10k--mcollective--application): Install the r10k mcollective application to a client
* [`r10k::params`](#r10k--params): Reasonable defaults for all classes
* [`r10k::postrun_command`](#r10k--postrun_command): This class will configure r10k to run as part of the masters agent run
* [`r10k::prerun_command`](#r10k--prerun_command): This class will configure r10k to run as part of the masters agent run
* [`r10k::webhook`](#r10k--webhook): Class: r10k::webhook
Expand Down Expand Up @@ -227,7 +226,7 @@ Default value: `$r10k::params::forge_settings`

##### <a name="-r10k--deploy_settings"></a>`deploy_settings`

Data type: `Optional[Hash]`
Data type: `Hash`



Expand Down Expand Up @@ -466,11 +465,11 @@ Default value: `$r10k::params::forge_settings`

##### <a name="-r10k--config--deploy_settings"></a>`deploy_settings`

Data type: `Optional[Hash]`
Data type: `Hash`



Default value: `$r10k::params::deploy_settings`
Default value: `$r10k::deploy_settings`

##### <a name="-r10k--config--postrun"></a>`postrun`

Expand Down Expand Up @@ -769,10 +768,6 @@ Data type: `Any`

Default value: `$r10k::params::mc_service_name`

### <a name="r10k--params"></a>`r10k::params`

Reasonable defaults for all classes

### <a name="r10k--postrun_command"></a>`r10k::postrun_command`

This class will configure r10k to run as part of the masters agent run
Expand Down
2 changes: 1 addition & 1 deletion manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
Stdlib::Absolutepath $configfile_symlink = $r10k::params::configfile_symlink,
Optional[Hash] $git_settings = $r10k::params::git_settings,
Optional[Hash] $forge_settings = $r10k::params::forge_settings,
Optional[Hash] $deploy_settings = $r10k::params::deploy_settings,
Hash $deploy_settings = $r10k::deploy_settings,
Optional[Array[String[1]]] $postrun = $r10k::params::postrun,
$root_user = $r10k::params::root_user,
$root_group = $r10k::params::root_group,
Expand Down
2 changes: 1 addition & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
$configfile_symlink = $r10k::params::configfile_symlink,
Optional[Hash] $git_settings = $r10k::params::git_settings,
Optional[Hash] $forge_settings = $r10k::params::forge_settings,
Optional[Hash] $deploy_settings = $r10k::params::deploy_settings,
Hash $deploy_settings = $r10k::params::deploy_settings,
$root_user = $r10k::params::root_user,
Optional[String[1]] $proxy = $r10k::params::proxy,
Optional[Integer[1]] $pool_size = $r10k::params::pool_size,
Expand Down
2 changes: 1 addition & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
$configfile_symlink = '/etc/r10k.yaml'
$git_settings = undef
$forge_settings = undef
$deploy_settings = undef
$deploy_settings = { 'generate_types' => true, 'exclude_spec' => true, },
# Git configuration
$git_server = $settings::ca_server #lint:ignore:top_scope_facts
$repo_path = '/var/repos'
Expand Down

0 comments on commit b573795

Please sign in to comment.