Implement creation of user & endpoints for swift

This commit is contained in:
François Charlier 2012-05-15 18:13:03 +02:00 committed by Dan Bode
parent 1413a9ed6e
commit ad081d901b

@ -0,0 +1,44 @@
class swift::keystone::auth(
$auth_name = 'swift',
$password = 'swift_password',
$address = '127.0.0.1',
$port = '8080'
) {
keystone_user { $auth_name:
ensure => present,
password => $password,
}
keystone_user_role { "${auth_name}@services":
ensure => present,
roles => 'admin',
require => Keystone_user[$auth_name]
}
keystone_service { $auth_name:
ensure => present,
type => 'object-store',
description => 'Openstack Object-Store Service',
}
keystone_endpoint { $auth_name:
ensure => present,
region => 'RegionOne',
public_url => "http://${address}:${port}/v1/AUTH_%(tenant_id)s",
admin_url => "http://${address}:${port}/",
internal_url => "http://${address}:${port}/v1/AUTH_%(tenant_id)s",
}
keystone_service { "${auth_name}_s3":
ensure => present,
type => 's3',
description => 'Openstack S3 Service',
}
keystone_endpoint { "${auth_name}_s3":
ensure => present,
region => 'RegionOne',
public_url => "http://${address}:${port}",
admin_url => "http://${address}:${port}",
internal_url => "http://${address}:${port}",
}
}