Add removal of keystone service and endpoint
This commit is contained in:
parent
6ea8544ed9
commit
1aae204447
@ -202,11 +202,15 @@ def ensure_endpoint_present(keystone, name, public_url, internal_url,
|
|||||||
def ensure_service_absent(keystone, name, check_mode):
|
def ensure_service_absent(keystone, name, check_mode):
|
||||||
""" Ensure the service is absent"""
|
""" Ensure the service is absent"""
|
||||||
|
|
||||||
raise NotImplementedError()
|
service = get_service(keystone, name)
|
||||||
|
keystone.services.delete(service.id)
|
||||||
|
return True
|
||||||
|
|
||||||
def ensure_endpoint_absent(keystone, name, check_mode):
|
def ensure_endpoint_absent(keystone, name, check_mode):
|
||||||
""" Ensure the service endpoint """
|
""" Ensure the service endpoint """
|
||||||
raise NotImplementedError()
|
endpoint = get_endpoint(keystone, name)
|
||||||
|
keystone.endpoints.delete(endpoint.id)
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
def dispatch(keystone, name, service_type, description, public_url,
|
def dispatch(keystone, name, service_type, description, public_url,
|
||||||
|
@ -1,6 +1,20 @@
|
|||||||
- hosts: [{{ ip }}]
|
- hosts: [{{ ip }}]
|
||||||
sudo: yes
|
sudo: yes
|
||||||
|
vars:
|
||||||
|
ip: {{ip}}
|
||||||
|
port: {{port}}
|
||||||
|
admin_port: {{admin_port}}
|
||||||
tasks:
|
tasks:
|
||||||
- name: keystone service and endpoint
|
- name: remove keystone service and endpoint
|
||||||
#TODO: not implemented in module
|
keystone_service:
|
||||||
pause: seconds=1
|
token: {{admin_token}}
|
||||||
|
name: {{name}}
|
||||||
|
type: {{type}}
|
||||||
|
description: {{description}}
|
||||||
|
publicurl: {{publicurl}}
|
||||||
|
internalurl: {{internalurl}}
|
||||||
|
adminurl: {{adminurl}}
|
||||||
|
region: "RegionOne"
|
||||||
|
state: present
|
||||||
|
endpoint: http://{{keystone_host}}:{{keystone_port}}/v2.0/
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user