Skip to content

Commit

Permalink
Update framework config
Browse files Browse the repository at this point in the history
  • Loading branch information
Joris29 committed Nov 28, 2023
1 parent e437d07 commit b410039
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 32 deletions.
19 changes: 2 additions & 17 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -352,24 +352,9 @@ Default value: `{ 'url' => 'jdbc:h2:file:/var/lib/rundeck/data/rundeckdb' }`
Data type: `Hash`

Hash of properties for configuring the [Rundeck Framework](https://docs.rundeck.com/docs/administration/configuration/config-file-reference.html#framework-properties)
This hash will be merged some [defaults](https://github.com/voxpupuli/puppet-rundeck/blob/ffcc77ea943f2ee52257004ec6385ab3a3aa6f91/manifests/config.pp#L8C12-L8C12) # TODO: Update ref

Default value:

```puppet
{
'rdeck.base' => '/var/lib/rundeck',
'framework.server.hostname' => $facts['networking']['hostname'],
'framework.server.name' => $facts['networking']['fqdn'],
'framework.server.port' => '4440',
'framework.server.url' => "http://${facts['networking']['fqdn']}:4440",
'framework.etc.dir' => '/etc/rundeck',
'framework.libext.dir' => '/var/lib/rundeck/libext',
'framework.ssh.keypath' => '/var/lib/rundeck/.ssh/id_rsa',
'framework.ssh.user' => 'rundeck',
'framework.ssh.timeout' => '0',
'rundeck.server.uuid' => fqdn_uuid($facts['networking']['fqdn']),
}
```
Default value: `{}`

##### <a name="-rundeck--gui_config"></a>`gui_config`

Expand Down
16 changes: 15 additions & 1 deletion manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,21 @@
class rundeck::config {
assert_private()

$framework_config = $rundeck::framework_config
$_framework_defaults = {
'rdeck.base' => '/var/lib/rundeck',
'framework.server.hostname' => $facts['networking']['hostname'],
'framework.server.name' => $facts['networking']['fqdn'],
'framework.server.port' => '4440',
'framework.server.url' => "http://${facts['networking']['fqdn']}:4440",
'framework.etc.dir' => '/etc/rundeck',
'framework.libext.dir' => '/var/lib/rundeck/libext',
'framework.ssh.keypath' => '/var/lib/rundeck/.ssh/id_rsa',
'framework.ssh.user' => 'rundeck',
'framework.ssh.timeout' => '0',
'rundeck.server.uuid' => fqdn_uuid($facts['networking']['fqdn']),
}

$framework_config = $_framework_defaults + $rundeck::framework_config

$base_dir = $framework_config['rdeck.base']
$properties_dir = $framework_config['framework.etc.dir']
Expand Down
2 changes: 1 addition & 1 deletion manifests/config/framework.pp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
$_framework_ssl_config = {}
}

$_framework_config = deep_merge($rundeck::config::framework_config, $_framework_ssl_config)
$_framework_config = $rundeck::config::framework_config + $_framework_ssl_config

file { "${rundeck::config::properties_dir}/framework.properties":
ensure => file,
Expand Down
15 changes: 2 additions & 13 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
# Hash of properties for configuring the [Rundeck Database](https://docs.rundeck.com/docs/administration/configuration/database)
# @param framework_config
# Hash of properties for configuring the [Rundeck Framework](https://docs.rundeck.com/docs/administration/configuration/config-file-reference.html#framework-properties)
# This hash will be merged some [defaults](https://github.com/voxpupuli/puppet-rundeck/blob/ffcc77ea943f2ee52257004ec6385ab3a3aa6f91/manifests/config.pp#L8C12-L8C12) # TODO: Update ref
# @param gui_config
# Hash of properties for customizing the [Rundeck GUI](https://docs.rundeck.com/docs/administration/configuration/gui-customization.html)
# @param mail_config
Expand Down Expand Up @@ -190,19 +191,7 @@
},
},
Rundeck::Db_config $database_config = { 'url' => 'jdbc:h2:file:/var/lib/rundeck/data/rundeckdb' },
Hash $framework_config = {
'rdeck.base' => '/var/lib/rundeck',
'framework.server.hostname' => $facts['networking']['hostname'],
'framework.server.name' => $facts['networking']['fqdn'],
'framework.server.port' => '4440',
'framework.server.url' => "http://${facts['networking']['fqdn']}:4440",
'framework.etc.dir' => '/etc/rundeck',
'framework.libext.dir' => '/var/lib/rundeck/libext',
'framework.ssh.keypath' => '/var/lib/rundeck/.ssh/id_rsa',
'framework.ssh.user' => 'rundeck',
'framework.ssh.timeout' => '0',
'rundeck.server.uuid' => fqdn_uuid($facts['networking']['fqdn']),
},
Hash $framework_config = {},
Hash $gui_config = {},
Rundeck::Mail_config $mail_config = {},
Hash $security_config = {},
Expand Down

0 comments on commit b410039

Please sign in to comment.