Use yaml based instead of template based format for objects filtering

This commit is contained in:
Evgeniy L 2015-04-22 14:31:17 +03:00
parent b79127a535
commit 55a5e8821f
2 changed files with 8 additions and 4 deletions

View File

@ -16,7 +16,7 @@ input:
- service_name: keystone-admin - service_name: keystone-admin
bind: '*:8080' bind: '*:8080'
backends: backends:
'with_items': '{{ with_tags("service/keystone") }}' 'with_tags': ['service/keystone']
'item': 'item':
'remote_name': '{{ item.name }}' 'remote_name': '{{ item.name }}'
'remote_addr': '{{ item.node.ip }}:{{ item.admin_port }}' 'remote_addr': '{{ item.node.ip }}:{{ item.admin_port }}'
@ -24,7 +24,7 @@ input:
- service_name: keystone-pub - service_name: keystone-pub
bind: '*:8081' bind: '*:8081'
backends: backends:
with_items: '{{ with_tags("service/keystone") }}' with_tags: ["service/keystone"]
item: item:
remote_name: '{{ item.name }}' remote_name: '{{ item.name }}'
remote_addr: '{{ item.node.ip }}:{{ item.public_port }}' remote_addr: '{{ item.node.ip }}:{{ item.public_port }}'

View File

@ -9,8 +9,12 @@ actions:
remove: simple/keystone/remove.yml remove: simple/keystone/remove.yml
input: input:
db_root_password: '{{ first_with_tags("entrypoint/mariadb").root_password }}' db_root_password:
db_host: '{{ first_with_tags("entrypoint/mariadb").node.ip }}' first_with_tags: ["entrypoint/mariadb"]
item: '{{ item.root_password }}'
db_host:
first_with_tags: ["entrypoint/mariadb"]
item: '{{ item.node.ip }}'
admin_port: 35357 admin_port: 35357
public_port: 5000 public_port: 5000
name: keystone-test name: keystone-test