update recipes for Chef 13
This commit is contained in:
parent
e80a078fae
commit
15d2af9791
|
@ -18,7 +18,7 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
|
||||
class ::Chef::Recipe # rubocop:disable Documentation
|
||||
class ::Chef::Recipe
|
||||
include ::Openstack
|
||||
end
|
||||
|
||||
|
@ -67,7 +67,7 @@ end
|
|||
db_user = node['openstack']['db']['dns']['username']
|
||||
db_pass = get_password 'db', 'designate'
|
||||
|
||||
public_identity_endpoint = identity_uri_transform(public_endpoint 'identity')
|
||||
public_identity_endpoint = identity_uri_transform(public_endpoint('identity'))
|
||||
identity_endpoint = internal_endpoint 'identity'
|
||||
|
||||
bind_services = node['openstack']['bind_service']['all']
|
||||
|
@ -78,7 +78,7 @@ auth_url = auth_uri_transform identity_endpoint.to_s, node['openstack']['dns']['
|
|||
# define attributes that are needed in designate.conf
|
||||
node.default['openstack']['dns']['conf'].tap do |conf|
|
||||
conf['service:api']['api_host'] = bind_address api_bind
|
||||
conf['service:api']['api_port'] = api_bind.port
|
||||
conf['service:api']['api_port'] = api_bind['port']
|
||||
conf['keystone_authtoken']['auth_uri'] = public_identity_endpoint
|
||||
conf['keystone_authtoken']['auth_url'] = auth_url
|
||||
end
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
require 'uri'
|
||||
|
||||
class ::Chef::Recipe # rubocop:disable Documentation
|
||||
class ::Chef::Recipe
|
||||
include ::Openstack
|
||||
end
|
||||
|
||||
|
@ -49,7 +49,7 @@ connection_params = {
|
|||
openstack_username: admin_user,
|
||||
openstack_api_key: admin_pass,
|
||||
openstack_project_name: admin_project,
|
||||
openstack_domain_name: admin_domain
|
||||
openstack_domain_name: admin_domain,
|
||||
}
|
||||
|
||||
# Register DNS Service
|
||||
|
@ -70,6 +70,7 @@ end
|
|||
# Register DNS Internal-Endpoint
|
||||
openstack_endpoint service_type do
|
||||
service_name service_name
|
||||
interface 'internal'
|
||||
url internal_designate_endpoint.to_s
|
||||
region region
|
||||
connection_params connection_params
|
||||
|
@ -82,16 +83,10 @@ end
|
|||
|
||||
# Register Service User
|
||||
openstack_user service_user do
|
||||
role_name service_role
|
||||
project_name service_project_name
|
||||
domain_name service_domain_name
|
||||
password service_pass
|
||||
connection_params connection_params
|
||||
end
|
||||
|
||||
## Grant Service role to Service User for Service Project ##
|
||||
openstack_user service_user do
|
||||
role_name service_role
|
||||
project_name service_project_name
|
||||
connection_params connection_params
|
||||
action :grant_role
|
||||
action [:create, :grant_role]
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue