Defined Type: openstack::util::envscript
- Defined in:
- modules/openstack/manifests/util/envscript.pp
Overview
yaml config and convenience script to set credentials for openstack access
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'modules/openstack/manifests/util/envscript.pp', line 2
define openstack::util::envscript(
String $region,
Stdlib::Fqdn $keystone_api_fqdn,
String $os_user,
String $os_password,
Stdlib::Port $keystone_api_port = 25000,
String $keystone_api_interface = 'public',
Optional[Stdlib::Unixpath] $scriptpath = undef,
String $os_db_password = '',
Stdlib::Filemode $yaml_mode = '0440',
Optional[Array[Stdlib::Unixpath]] $clouds_files = undef,
Optional[String] $os_project = undef,
Optional[String] $os_project_domain_id = undef,
Optional[String] $os_user_domain_id = undef,
Optional[String] $os_system_scope = undef,
) {
if $clouds_files {
$clouds_files.each |$clouds_file| {
concat::fragment { "${clouds_file}_${title}":
target => $clouds_file,
content => template('openstack/util/clouds_fragment.yaml.erb'),
}
}
}
file { "/etc/${title}.yaml":
content => template('openstack/util/envscript.yaml.erb'),
mode => $yaml_mode,
owner => 'root',
group => 'root',
}
$script = $scriptpath ? {
undef => "/usr/local/bin/${title}.sh",
default => $scriptpath,
}
file { $script:
content => template('openstack/util/envscript.sh.erb'),
mode => '0555',
owner => 'root',
group => 'root',
}
}
|