blob: 6fb9a92533657d5618e53798aae20f3ec72ef77b [file] [log] [blame]
Sapan Bhatia7419af02014-12-19 13:24:56 -05001---
2- hosts: 127.0.0.1
Andy Bavier09da2e42015-09-24 14:17:27 -04003 connection: local
Sapan Bhatia7419af02014-12-19 13:24:56 -05004 tasks:
5 - quantum_network:
Tony Mack3ceb16f2015-09-14 00:53:39 +00006 auth_url={{ endpoint }}
Tony Mackc12ee482015-09-30 18:40:16 +00007 login_username={{ admin_user }}
8 login_tenant_name={{ tenant_name }}
9 login_password={{ admin_password }}
Sapan Bhatia100f9972014-12-22 01:43:32 -050010 tenant_name={{ tenant_name }}
Sapan Bhatia100f9972014-12-22 01:43:32 -050011 name={{ name }}
12 {% if delete %}
13 state=absent
14 {% else %}
15 state=present
16 {% endif %}
Tony Mack80c42542015-01-07 12:48:37 -050017 shared=true
Sapan Bhatia78b79e72015-05-09 18:16:24 +020018 {% if not delete %}
Sapan Bhatia7419af02014-12-19 13:24:56 -050019 - quantum_subnet:
Tony Mack3ceb16f2015-09-14 00:53:39 +000020 auth_url={{ endpoint }}
Tony Mackc12ee482015-09-30 18:40:16 +000021 login_username={{ admin_user }}
22 login_tenant_name={{ tenant_name }}
23 login_password={{ admin_password }}
Sapan Bhatia100f9972014-12-22 01:43:32 -050024 tenant_name={{ tenant_name }}
Andy Bavier09da2e42015-09-24 14:17:27 -040025 name={{ subnet_name }}
26 network_name={{ name }}
Sapan Bhatia100f9972014-12-22 01:43:32 -050027 {% if delete %}
28 state=absent
29 {% else %}
Andy Bavier09da2e42015-09-24 14:17:27 -040030 state=present
Scott Baker7ab818f2016-01-04 22:50:28 -080031 {% if use_vtn %}
32 gateway_ip={{ gateway }}
33 {% else %}
Andy Bavier09da2e42015-09-24 14:17:27 -040034 no_gateway=true
Scott Baker7ab818f2016-01-04 22:50:28 -080035 {% endif %}
Scott Baker7ea40ce2015-07-20 17:25:20 -070036 dns_nameservers=8.8.8.8
Tony Mack80c42542015-01-07 12:48:37 -050037 cidr={{ cidr }}
Scott Bakerea77c3e2016-05-25 10:12:31 -070038 {% if start_ip %}
Pingping Linfc9256a2016-03-03 09:52:24 -080039 allocation_pool_start={{ start_ip }}
Scott Bakerea77c3e2016-05-25 10:12:31 -070040 {% endif %}
41 {% if end_ip %}
Pingping Linfc9256a2016-03-03 09:52:24 -080042 allocation_pool_end={{ end_ip }}
Scott Bakerea77c3e2016-05-25 10:12:31 -070043 {% endif %}
Sapan Bhatia100f9972014-12-22 01:43:32 -050044 {% endif %}
Sapan Bhatia78b79e72015-05-09 18:16:24 +020045 {% endif %}