Skip to content
This repository was archived by the owner on Apr 20, 2018. It is now read-only.

Commit c28e72f

Browse files
author
Liam Bennett
committed
Merge pull request voxpupuli#113 from patcadelina/aws
(voxpupuli#112) Add `aws-ec2` as resource_source to support Rundeck EC2 Nodes Plugin
2 parents 7d358b7 + 4805778 commit c28e72f

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

manifests/config/resource_source.pp

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@
7777
$script_args = '',
7878
$script_args_quoted = $rundeck::params::script_args_quoted,
7979
$script_interpreter = $rundeck::params::script_interpreter,
80+
$mapping_params = '',
81+
$use_default_mapping = true,
82+
$running_only = true,
8083
) {
8184

8285
include rundeck
@@ -93,7 +96,7 @@
9396

9497
validate_string($project_name)
9598
validate_re($number, '[1-9]*')
96-
validate_re($source_type, ['^file$', '^directory$', '^url$', '^script$'])
99+
validate_re($source_type, ['^file$', '^directory$', '^url$', '^script$', '^aws-ec2$'])
97100
validate_bool($include_server_node)
98101
validate_absolute_path($projects_dir)
99102
validate_re($user, '[a-zA-Z0-9]{3,}')
@@ -281,6 +284,32 @@
281284
require => File[$properties_file]
282285
}
283286
}
287+
'aws-ec2': {
288+
ini_setting { "resources.source.${number}.config.mappingParams":
289+
ensure => present,
290+
path => $properties_file,
291+
section => '',
292+
setting => "resources.source.${number}.config.mappingParams",
293+
value => $mapping_params,
294+
require => File[$properties_file],
295+
}
296+
ini_setting { "resources.source.${number}.config.useDefaultMapping":
297+
ensure => present,
298+
path => $properties_file,
299+
section => '',
300+
setting => "resources.source.${number}.config.useDefaultMapping",
301+
value => $use_default_mapping,
302+
require => File[$properties_file],
303+
}
304+
ini_setting { "resources.source.${number}.config.runningOnly":
305+
ensure => present,
306+
path => $properties_file,
307+
section => '',
308+
setting => "resources.source.${number}.config.runningOnly",
309+
value => $running_only,
310+
require => File[$properties_file],
311+
}
312+
}
284313
default: {
285314
err("The rundeck resource model source_type ${source_type} is not supported")
286315
}

0 commit comments

Comments
 (0)