config/puppet-manifests/src/modules/platform/manifests/client.pp
Kevin Smith 1e63b2e45a Generate openrc file in /etc/platform
Create the platform openrc file in /etc/platform, while
leaving existing /etc/nova/openrc file alone for now.
New platform/client.pp file is created and most of the
contents of openstack/client.pp moved there.
openstack/client.pp can be removed once kubernetes is the
default.

Change-Id: Ib6de59da6dfc9f34a24054405b6cda30d0b74ac1
Story: 2002876
Task: 27499
Signed-off-by: Kevin Smith <kevin.smith@windriver.com>
2018-10-17 13:11:56 -04:00

66 lines
1.5 KiB
Puppet

class platform::client::params (
$admin_username,
$identity_auth_url,
$identity_region = 'RegionOne',
$identity_api_version = 3,
$admin_user_domain = 'Default',
$admin_project_domain = 'Default',
$admin_project_name = 'admin',
$keystone_identity_region = 'RegionOne',
) { }
class platform::client
inherits ::platform::client::params {
include ::platform::client::credentials::params
$keyring_file = $::platform::client::credentials::params::keyring_file
file {"/etc/platform/openrc":
ensure => "present",
mode => '0640',
owner => 'root',
group => 'root',
content => template('platform/openrc.admin.erb'),
}
}
class platform::client::credentials::params (
$keyring_base,
$keyring_directory,
$keyring_file,
) { }
class platform::client::credentials
inherits ::platform::client::credentials::params {
Class['::platform::drbd::platform'] ->
file { "${keyring_base}":
ensure => 'directory',
owner => 'root',
group => 'root',
mode => '0755',
} ->
file { "${keyring_directory}":
ensure => 'directory',
owner => 'root',
group => 'root',
mode => '0755',
} ->
file { "${keyring_file}":
ensure => 'file',
owner => 'root',
group => 'root',
mode => '0755',
content => "keyring get CGCS admin"
}
}
class platform::client::bootstrap {
include ::platform::client
include ::platform::client::credentials
}
class platform::client::upgrade {
include ::platform::client
}