blob: b6bd712ff094974f33d6e5b139043ed21655cc0d [file] [log] [blame]
Matteo Scandolo3896c472017-08-01 13:31:42 -07001
2# Copyright 2017-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16
Scott Baker58e88a82016-11-18 13:39:09 -080017---
Zack Williamsc989f262017-05-11 13:02:59 -070018# onos-fabric-install/tasks/main.yml
Scott Baker58e88a82016-11-18 13:39:09 -080019
Zack Williamsc989f262017-05-11 13:02:59 -070020- name: Pull base docker image for ONOS
21 docker_image:
22 name: "{{ onos_docker_image }}"
23
24- name: Create onos-fabric dest directory
Scott Baker58e88a82016-11-18 13:39:09 -080025 become: yes
Jonathan Hart2a3c01e2017-01-13 17:32:27 -080026 file:
Zack Williamsc989f262017-05-11 13:02:59 -070027 path: "{{ head_onos_fabric_dir }}"
Jonathan Hart2a3c01e2017-01-13 17:32:27 -080028 state: directory
Zack Williamsc989f262017-05-11 13:02:59 -070029 owner: "{{ ansible_user_id }}"
30 group: "{{ ansible_user_gid }}"
31 mode: 0755
Scott Baker58e88a82016-11-18 13:39:09 -080032
33- name: Create templated ONOS files
34 template:
35 src: "{{ item }}.j2"
Zack Williamsc989f262017-05-11 13:02:59 -070036 dest: "{{ head_onos_fabric_dir }}/{{ item }}"
Scott Baker58e88a82016-11-18 13:39:09 -080037 with_items:
Jonathan Hart2a3c01e2017-01-13 17:32:27 -080038 - docker-compose.yml
Scott Baker58e88a82016-11-18 13:39:09 -080039
40# Note: we do not rebuild onos container for the fabric
41
Zack Williamsc989f262017-05-11 13:02:59 -070042- name: Start ONOS for fabric
43 docker_service:
Zack Williamsafd04a82017-09-13 10:11:55 -070044 project_name: "onosfabric"
Zack Williamsc989f262017-05-11 13:02:59 -070045 project_src: "{{ head_onos_fabric_dir }}"
Scott Baker58e88a82016-11-18 13:39:09 -080046