Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

various fixes #457

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,16 @@ The installation directory for Rundeck.
##### `server_web_context`

Web context path to use, such as "/rundeck". `http://host.domain:port/server_web_context`
( Use this for Rundeck versions < 3.3 )

##### `server_web_context33`
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO it will be better to add optional compatibility param which accepts a version (can be SemVer type) and defaults undef . Then do condition when using server_web_context. This will avoid confusion with 2 different params which have same purpose. Eventually old versions will be deprecated and preserving same param will avoid breaking change.


Web context path to use, such as "/rundeck". `http://host.domain:port/server_web_context`
( Use this for Rundeck versions >= 3.3 )

##### `server_address`

The listen address for the Rundeck service.

##### `ssl_enabled`

Expand Down Expand Up @@ -300,6 +310,10 @@ Whether to manage `user` (and enforce `user_id` if set). Defaults to false.

Whether to create the `rundeck_home` directory. Defaults to true.

##### `auth_config`

A dictionary of various auth-related configuration, including the default admin password, ldap, and pam settings.

##### `keystorage_type`

Which keystorage type should be used:
Expand Down
3 changes: 3 additions & 0 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@
$security_config = $rundeck::security_config
$security_role = $rundeck::security_role
$server_web_context = $rundeck::server_web_context
$server_web_context33 = $rundeck::server_web_context33
$server_address = $rundeck::server_address
$service_logs_dir = $rundeck::service_logs_dir
$service_name = $rundeck::service_name
$session_timeout = $rundeck::session_timeout
Expand Down Expand Up @@ -212,6 +214,7 @@
}

create_resources(rundeck::config::project, $projects)
create_resources(rundeck::config::plugin, $plugins)

if versioncmp( $package_ensure, '3.0.0' ) < 0 {
class { 'rundeck::config::global::web':
Expand Down
44 changes: 30 additions & 14 deletions manifests/config/resource_source.pp
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
String $filter_tag = '',
Stdlib::Port $http_proxy_port = $rundeck::params::default_http_proxy_port,
Integer $refresh_interval = $rundeck::params::default_refresh_interval,
Integer $page_results = $rundeck::params::default_page_results,
Optional[String] $puppet_enterprise_host = undef,
Optional[Stdlib::Port] $puppet_enterprise_port = undef,
Optional[Stdlib::Absolutepath] $puppet_enterprise_ssl_dir = undef,
Expand Down Expand Up @@ -324,21 +325,27 @@
value => bool2str($running_only),
require => File[$properties_file],
}
ini_setting { "${name}::resources.source.${number}.config.endpoint":
ensure => present,
path => $properties_file,
section => '',
setting => "resources.source.${number}.config.endpoint",
value => $endpoint_url,
require => File[$properties_file],
# endpoint is an optional field that must be omitted if empty
if ($endpoint_url) {
ini_setting { "${name}::resources.source.${number}.config.endpoint":
ensure => present,
path => $properties_file,
section => '',
setting => "resources.source.${number}.config.endpoint",
value => $endpoint_url,
require => File[$properties_file],
}
}
ini_setting { "${name}::resources.source.${number}.config.assumeRoleArn":
ensure => present,
path => $properties_file,
section => '',
setting => "resources.source.${number}.config.assumeRoleArn",
value => $assume_role_arn,
require => File[$properties_file],
# assumeRoleArn is an optional field that must be omitted if empty
if ($assume_role_arn) {
ini_setting { "${name}::resources.source.${number}.config.assumeRoleArn":
ensure => present,
path => $properties_file,
section => '',
setting => "resources.source.${number}.config.assumeRoleArn",
value => $assume_role_arn,
require => File[$properties_file],
}
}
ini_setting { "${name}::resources.source.${number}.config.filter":
ensure => present,
Expand All @@ -364,6 +371,15 @@
value => $refresh_interval,
require => File[$properties_file],
}
# pageResults is a required field and must be numeric
ini_setting { "${name}::resources.source.${number}.config.pageResults":
ensure => present,
path => $properties_file,
section => '',
setting => "resources.source.${number}.config.pageResults",
value => $page_results,
require => File[$properties_file],
}
}
'puppet-enterprise': {
if ( $puppet_enterprise_mapping_file ) {
Expand Down
10 changes: 10 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,13 @@
# [*server_web_context*]
# Web context path to use, such as "/rundeck". http://host.domain:port/server_web_context
#
# [*server_web_context33*]
# Web context path to use, such as "/rundeck". http://host.domain:port/server_web_context
# Syntax for Rundeck 3.3+
#
# [*server_address*]
# The listen address for the Rundeck service.
#
# [*service_logs_dir*]
# The path to the directory to store logs.
#
Expand Down Expand Up @@ -249,6 +256,7 @@
Boolean $manage_default_api_policy = $rundeck::params::manage_default_api_policy,
Boolean $manage_repo = $rundeck::params::manage_repo,
String $package_ensure = $rundeck::params::package_ensure,
Hash $plugins = $rundeck::params::plugins,
Hash $preauthenticated_config = $rundeck::params::preauthenticated_config,
Hash $projects = $rundeck::params::projects,
String $projects_description = $rundeck::params::projects_default_desc,
Expand All @@ -271,6 +279,8 @@
Hash $security_config = $rundeck::params::security_config,
String $security_role = $rundeck::params::security_role,
Optional[String] $server_web_context = undef,
Optional[String] $server_web_context33 = undef,
Optional[String] $server_address = undef,
Optional[String] $service_config = undef,
Stdlib::Absolutepath $service_logs_dir = $rundeck::params::service_logs_dir,
String $service_name = $rundeck::params::service_name,
Expand Down
2 changes: 2 additions & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@
'apiCookieAccess' => true,
}

$plugins = {}
$projects = {}
$projects_default_org = ''
$projects_default_desc = ''
Expand All @@ -243,6 +244,7 @@
$default_resource_dir = '/'
$default_http_proxy_port = 80
$default_refresh_interval = 30
$default_page_results = 100

$script_args_quoted = true
$script_interpreter = '/bin/bash'
Expand Down
19 changes: 19 additions & 0 deletions templates/aclpolicy.erb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ for:
<%- end -%>
<%- end -%>
<%- end -%>
<%- if policy.key?('by') -%>
by:
<%- policy['by'].each do |by| -%>
<%- if !by['group'].nil? && by['group'] != :undef -%>
Expand All @@ -36,6 +37,24 @@ by:
<%- end -%>
<%- end -%>
<%- end -%>
<%- end -%>
<%- if policy.key?('notBy') -%>
notBy:
<%- policy['notBy'].each do |notBy| -%>
<%- if !notBy['group'].nil? && notBy['group'] != :undef -%>
group:
<%- notBy['group'].each do |group| -%>
- '<%= group %>'
<%- end -%>
<%- end -%>
<%- if !notBy['username'].nil? && notBy['username'] != :undef -%>
username:
<%- notBy['username'].each do |username| -%>
- '<%= username %>'
<%- end -%>
<%- end -%>
<%- end -%>
<%- end -%>
<%- if index != (@acl_policies.length-1) -%>

---
Expand Down
8 changes: 8 additions & 0 deletions templates/profile_overrides.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,18 @@ RDECK_JVM_SETTINGS="<%= @jvm_args %>"
RDECK_JVM_SETTINGS="$RDECK_JVM_SETTINGS -Dserver.web.context=<%= @server_web_context %>"
<%- end -%>

<%- if @server_web_context33 -%>
RDECK_JVM_SETTINGS="$RDECK_JVM_SETTINGS -Dserver.servlet.context-path=<%= @server_web_context33 %>"
<%- end -%>

<%- if !(@kerberos_realms.empty?) -%>
RDECK_JVM_SETTINGS="$RDECK_JVM_SETTINGS -Djava.security.krb5.conf=$RDECK_CONFIG/krb5.conf"
<%- end -%>

<%- if @server_address -%>
RDECK_JVM_SETTINGS="$RDECK_JVM_SETTINGS -Dserver.address=<%= @server_address %>"
<%- end -%>

<% if @java_home %>
JAVA_HOME=<%= @java_home %>
<% end %>
Expand Down