|
77 | 77 | $script_args = '',
|
78 | 78 | $script_args_quoted = $rundeck::params::script_args_quoted,
|
79 | 79 | $script_interpreter = $rundeck::params::script_interpreter,
|
| 80 | + $mapping_params = '', |
| 81 | + $use_default_mapping = true, |
| 82 | + $running_only = true, |
80 | 83 | ) {
|
81 | 84 |
|
82 | 85 | include rundeck
|
|
93 | 96 |
|
94 | 97 | validate_string($project_name)
|
95 | 98 | 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$']) |
97 | 100 | validate_bool($include_server_node)
|
98 | 101 | validate_absolute_path($projects_dir)
|
99 | 102 | validate_re($user, '[a-zA-Z0-9]{3,}')
|
|
281 | 284 | require => File[$properties_file]
|
282 | 285 | }
|
283 | 286 | }
|
| 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 | + } |
284 | 313 | default: {
|
285 | 314 | err("The rundeck resource model source_type ${source_type} is not supported")
|
286 | 315 | }
|
|
0 commit comments