OpenStack heat template syntax

43 views
Skip to first unread message

hce h

unread,
Feb 17, 2015, 7:55:23 PM2/17/15
to ansible...@googlegroups.com
Hi,

I am using OpenStack Heat template to generate vms, does anyone know how to increase numerical index?

According to the heat document, the numerical index can be used in the template:

name: my_server_%index%

How can I add one to the index number like following one (but that is not correct syntax)?

name: my_server_{{ %index% + 1 }}

Thanks.

- j




Brian Coca

unread,
Feb 17, 2015, 9:46:02 PM2/17/15
to ansible...@googlegroups.com
you might want to use with_sequence


--
Brian Coca

hce h

unread,
Feb 18, 2015, 11:32:21 PM2/18/15
to ansible...@googlegroups.com

Could you give an example how to run with_sequence in following heat template? The HOT template syntax is different to ansible template.

heat_HOT.yml:

......
name: my_server_%index%
.......
Reply all
Reply to author
Forward
0 new messages