Files
puppet-openstack/manifests/auth_file.pp
Kristian Øllegaard d35805c0b5 Single quotes around auth file password
In order to make sure passwords containing e.g.
'$'-sign are exported correctly.

Change-Id: Iefe9e9ab8fee5ef68d8edd8308268acac069f5a2
2013-04-30 11:49:51 +02:00

26 lines
727 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'
) {
file { '/root/openrc':
content =>
"
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/
"
}
}