From 9f40af375ff3bcafccf22050dcf02b1bc315bbf9 Mon Sep 17 00:00:00 2001 From: Tobias Urdin Date: Sat, 2 Nov 2019 13:29:33 +0100 Subject: [PATCH] Use keystone::bootstrap Depends-On: https://review.opendev.org/#/c/692664 Change-Id: Ic445f9c1f87f4d8a88dd139143bd1b9557ba1d92 --- manifests/keystone.pp | 22 ++++++++++++---------- manifests/provision.pp | 6 +++--- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/manifests/keystone.pp b/manifests/keystone.pp index 6883164a5..135d1636b 100644 --- a/manifests/keystone.pp +++ b/manifests/keystone.pp @@ -60,8 +60,6 @@ class openstack_integration::keystone ( } class { 'keystone': database_connection => 'mysql+pymysql://keystone:keystone@127.0.0.1/keystone', - admin_token => 'a_big_token', - admin_password => 'a_big_secret', enabled => true, service_name => 'httpd', default_domain => $default_domain, @@ -101,15 +99,19 @@ class openstack_integration::keystone ( ssl_cert => $::openstack_integration::params::cert_path, workers => 2, } - class { 'keystone::roles::admin': - email => 'test@example.tld', - password => 'a_big_secret', + class { 'keystone::bootstrap': + password => 'a_big_secret', + email => 'test@example.tld', + public_url => $::openstack_integration::config::keystone_auth_uri, + admin_url => $::openstack_integration::config::keystone_admin_uri, } - class { 'keystone::endpoint': - default_domain => $default_domain, - public_url => $::openstack_integration::config::keystone_auth_uri, - admin_url => $::openstack_integration::config::keystone_admin_uri, - version => '', + keystone_tenant { 'openstack': + ensure => 'present', + enabled => true, + } + keystone_user_role { "${::keystone::bootstrap::username}@openstack": + ensure => 'present', + roles => [$::keystone::bootstrap::role_name], } class { 'openstack_extras::auth_file': diff --git a/manifests/provision.pp b/manifests/provision.pp index de4cb725f..96a0fd990 100644 --- a/manifests/provision.pp +++ b/manifests/provision.pp @@ -14,9 +14,9 @@ # Default to true. # class openstack_integration::provision ( - $glance = true, - $nova = true, - $neutron = true, + $glance = true, + $nova = true, + $neutron = true, ){ include openstack_integration::config