| |
| # Copyright 2017-present Open Networking Foundation |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| |
| --- |
| - hosts: {{ instance_name }} |
| gather_facts: False |
| connection: ssh |
| user: {{ username }} |
| sudo: yes |
| |
| vars: |
| container_name: {{ container_name }} |
| docker_image: {{ docker_image }} |
| ports: |
| {% for port in ports %} |
| - device: {{ port.device }} |
| xos_network_id: {{ port.xos_network_id }} |
| mac: {{ port.mac|default("") }} |
| ip: {{ port.ip }} |
| snoop_instance_mac: {{ port.snoop_instance_mac }} |
| snoop_instance_id: {{ port.snoop_instance_id }} |
| parent_mac: {{ port.parent_mac|default("") }} |
| s_tag: {{ port.s_tag|default("") }} |
| c_tag: {{ port.c_tag|default("") }} |
| next_hop: {{ port.next_hop|default("") }} |
| bridge: {{ port.bridge }} |
| {% endfor %} |
| volumes: |
| {% for volume in volumes %} |
| - {{ volume }} |
| {% endfor %} |
| |
| tasks: |
| - name: Make sure container is stopped |
| service: name=container-{{ container_name }} state=stopped |
| |