Scott Baker | 58e88a8 | 2016-11-18 13:39:09 -0800 | [diff] [blame] | 1 | --- |
| 2 | # Common ONOS setup |
| 3 | |
| 4 | - name: Pull docker image for ONOS |
| 5 | become: yes |
| 6 | command: "docker pull {{ onos_docker_image }}" |
| 7 | tags: |
| 8 | - skip_ansible_lint # Should replace with http://docs.ansible.com/ansible/docker_module.html, when replacements are stable |
| 9 | |
| 10 | - name: Create dest directory |
Jonathan Hart | 2a3c01e | 2017-01-13 17:32:27 -0800 | [diff] [blame] | 11 | file: |
| 12 | path: "{{ onos_fabric_dest }}" |
| 13 | state: directory |
Scott Baker | 58e88a8 | 2016-11-18 13:39:09 -0800 | [diff] [blame] | 14 | |
| 15 | - name: Create templated ONOS files |
| 16 | template: |
| 17 | src: "{{ item }}.j2" |
| 18 | dest: "{{ onos_fabric_dest }}/{{ item }}" |
| 19 | with_items: |
Jonathan Hart | 2a3c01e | 2017-01-13 17:32:27 -0800 | [diff] [blame] | 20 | - docker-compose.yml |
Scott Baker | 58e88a8 | 2016-11-18 13:39:09 -0800 | [diff] [blame] | 21 | |
| 22 | # Note: we do not rebuild onos container for the fabric |
| 23 | |
| 24 | - name: Start ONOS |
| 25 | command: chdir="{{ onos_fabric_dest }}" docker-compose up -d |
| 26 | tags: |
| 27 | - skip_ansible_lint |
| 28 | |