Make resource universal

This commit is contained in:
Łukasz Oleś 2015-06-26 21:05:13 +00:00
parent f1619d3dd7
commit 6235ed82df
3 changed files with 31 additions and 27 deletions

View File

@ -1,9 +1,5 @@
- hosts: [{{ ip }}]
sudo: yes
vars:
ip: {{ip}}
port: {{port}}
admin_port: {{admin_port}}
tasks:
- name: keystone service and endpoint
keystone_service:
@ -16,4 +12,4 @@
adminurl: {{adminurl}}
region: "RegionOne"
state: present
endpoint: http://{{keystone_host}}:{{keystone_port}}/v2.0/
endpoint: http://{{keystone_host}}:{{keystone_admin_port}}/v2.0/

View File

@ -5,36 +5,39 @@ input:
keystone_host:
schema: str!
value:
keystone_port:
keystone_admin_port:
schema: int!
value:
admin_token:
schema: str!
value:
port:
schema: int!
value:
admin_port:
schema: int!
value:
type:
schema: str!
value: identity
description:
schema: str!
value: OpenStack Identity Service
name:
schema: str!
public_ip:
schema: str!
public_port:
schema: int!
publicurl:
schema: str!
value: http://{{ip}}:{{port}}/v2.0
value: http://{{public_ip}}:{{public_port}}/v2.0
internal_ip:
schema: str!
internal_port:
schema: int!
internalurl:
schema: str!
value: http://{{ip}}:{{port}}/v2.0
admin_ip:
schema: str!
admin_port:
schema: int!
adminurl:
schema: str!
value: http://{{ip}}:{{admin_port}}/v2.0
adminurl:
schema: str!
value:
ip:
schema: str!
value:

View File

@ -5,7 +5,7 @@ resources:
from: resources/keystone_tenant
values:
tenant_name: admin
keystone_port: '{{keystone_port}}'
keystone_port: '{{keystone_admin_port}}'
keystone_host: '{{keystone_ip}}'
admin_token: '{{admin_token}}'
ip: '{{ip}}'
@ -18,7 +18,7 @@ resources:
user_name: 'admin'
user_password: 'admin'
tenant_name: 'admin_tenant::tenant_name'
keystone_port: '{{keystone_port}}'
keystone_port: '{{keystone_admin_port}}'
keystone_host: '{{keystone_ip}}'
admin_token: '{{admin_token}}'
ip: '{{ip}}'
@ -29,15 +29,20 @@ resources:
from: resources/keystone_service_endpoint
values:
{% raw %}
adminurl: 'http://{{keystone_ip}}:{{admin_port}}/v2.0'
internalurl: 'http://{{keystone_ip}}:{{port}}/v2.0'
publicurl: 'http://{{keystone_ip}}:{{port}}/v2.0'
adminurl: 'http://{{admin_ip}}:{{admin_port}}/v2.0'
internalurl: 'http://{{internal_ip}}:{{internal_port}}/v2.0'
publicurl: 'http://{{public_ip}}:{{public_port}}/v2.0'
{% endraw %}
description: 'OpenStack Identity Service'
type: 'identity'
admin_port: '{{keystone_port}}'
port: '{{keystone_admin_port}}'
keystone_port: '{{keystone_port}}'
name: 'keystone'
admin_port: '{{keystone_admin_port}}'
public_port: '{{keystone_port}}'
internal_port: '{{keystone_port}}'
admin_ip: '{{ip}}'
public_ip: '{{ip}}'
internal_ip: '{{ip}}'
keystone_admin_port: '{{keystone_admin_port}}'
keystone_host: '{{keystone_ip}}'
admin_token: '{{admin_token}}'
ip: '{{ip}}'
@ -48,7 +53,7 @@ resources:
from: resources/keystone_tenant
values:
tenant_name: services
keystone_port: '{{keystone_port}}'
keystone_port: '{{keystone_admin_port}}'
keystone_host: '{{keystone_ip}}'
admin_token: '{{admin_token}}'
ip: '{{ip}}'