
* Fix following warnings: * case statement without a default case * double quoted string containing no variables * indentation of => is not properly aligned * mode should be represented as a 4 digit octal value or symbolic mode * quoted boolean value found * unquoted file mode * variable not enclosed in {} * Fix following errors: * trailing whitespace found * two-space soft tabs not used * Remove quotes around class in include/require statements Change-Id: Ia407416e51c09fb303675863afa68f526a37abcf
28 lines
796 B
Puppet
28 lines
796 B
Puppet
#
|
|
# Creates an auth file that can be used to export
|
|
# environment variables that can be used to authenticate
|
|
# against a keystone server.
|
|
#
|
|
class openstack::auth_file(
|
|
$admin_password,
|
|
$controller_node = '127.0.0.1',
|
|
$keystone_admin_token = 'keystone_admin_token',
|
|
$admin_user = 'admin',
|
|
$admin_tenant = 'admin',
|
|
$use_no_cache = true
|
|
) {
|
|
file { '/root/openrc':
|
|
content =>
|
|
"
|
|
export OS_NO_CACHE=${use_no_cache}
|
|
export OS_TENANT_NAME=${admin_tenant}
|
|
export OS_USERNAME=${admin_user}
|
|
export OS_PASSWORD='${admin_password}'
|
|
export OS_AUTH_URL=\"http://${controller_node}:5000/v2.0/\"
|
|
export OS_AUTH_STRATEGY=keystone
|
|
export SERVICE_TOKEN=${keystone_admin_token}
|
|
export SERVICE_ENDPOINT=http://${controller_node}:35357/v2.0/
|
|
"
|
|
}
|
|
}
|