forked from contiv/ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathv2plugin.yml
32 lines (25 loc) · 1.23 KB
/
v2plugin.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
---
# This role contains tasks for starting docker plugin service
- name: create the directories needed for ovs
shell: mkdir -p {{ item }}
with_items:
- "/etc/openvswitch"
- "/var/log/openvswitch"
- name: check if v2plugin has been installed on {{ run_as }} nodes
shell: docker plugin ls | grep -n {{ contiv_v2plugin_image }}
register: v2plugin_installed
ignore_errors: True
- name: install v2plugin on {{ run_as }} nodes
shell: >
/usr/bin/docker plugin install --grant-all-permissions {{contiv_v2plugin_image}} ctrl_ip={{node_addr}} control_url={{node_addr}}:{{netmaster_port}} vxlan_port={{vxlan_port}} iflist={{netplugin_if}} plugin_name={{contiv_v2plugin_image}} cluster_store={{cluster_store}} plugin_role={{run_as}} fwd_mode={{ fwd_mode }}
when: v2plugin_installed|failed
- name: copy v2plugin.sh file
copy: src=v2plugin.sh dest=/usr/bin/v2plugin.sh mode=u=rwx,g=rx,o=rx
- name: copy systemd units for v2plugin
copy: src=v2plugin.service dest=/etc/systemd/system/v2plugin.service
- name: start v2plugin
systemd: name=v2plugin enabled=yes
- name: for v2 plugin, extract netctl binary
shell: tar vxjf {{ contiv_network_dest_file }} netctl contrib/completion/bash/netctl
args:
chdir: /usr/bin/contiv/netplugin