---
-- hosts: coe-master:coe-minion1:coe-minion2
+- hosts: coe-hosts
vars:
gopath: "{{ ansible_env.HOME }}/go"
coe_path: "{{ gopath }}/src/git.opendaylight.org/gerrit/p/coe.git"
file:
path: "{{ ansible_env.HOME }}/go/bin"
state: directory
- - name: Install glide
- shell: curl https://glide.sh/get | sh
+ - name: Install dep
+ shell: curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
args:
- creates: "{{ gopath }}/bin/glide"
+ creates: "{{ gopath }}/bin/dep"
+ - name: Show gerrit details
+ run_once: true
+ debug:
+ msg:
+ - "Fetch COE git repository https://git.opendaylight.org/gerrit/p/coe.git"
+ - "gerrit_branch {{ gerrit_branch }}"
+ - "gerrit_refspec {{ gerrit_refspec }}"
- name: Fetch COE git repository
git:
- repo: 'https://git.opendaylight.org/gerrit/p/coe.git'
+ repo: "https://git.opendaylight.org/gerrit/p/coe.git"
+ version: "{{ gerrit_branch }}"
+ refspec: "{{ gerrit_refspec }}"
dest: "{{ coe_path }}"
- - name: Fetch odl-cni dependencies with glide
- shell: glide install -v
+ - name: List COE git repository recent patches
+ run_once: true
+ shell: "git --no-pager log --pretty=format:'%h %<(30)%ad %<(30)%cd %<(20,trunc)%an%d %s' -n10"
+ args:
+ chdir: "{{ coe_path }}"
+ register: git_log_output
+ - name: git log header
+ run_once: true
+ debug:
+ msg="Hash Author Date Commit Date Author Subject"
+ - name: git log output
+ run_once: true
+ debug:
+ var=git_log_output.stdout_lines
+ - name: Fetch odl-cni dependencies with dep
+ shell: dep ensure -vendor-only
args:
chdir: "{{ coe_path }}/odlCNIPlugin/odlovs-cni"
creates: "{{ coe_path }}/odlCNIPlugin/odlovs-cni/vendor"
GOPATH: "{{ gopath }}"
GOROOT: /usr/local/go
tasks:
- - name: Fetch watcher dependencies with glide
- shell: glide install -v
+ - name: Fetch watcher dependencies with dep
+ shell: dep ensure -vendor-only
args:
chdir: "{{ coe_path }}/watcher"
creates: "{{ coe_path }}/watcher/vendor"
remote_src: true
become: true
-- hosts: coe-master:coe-minion1:coe-minion2
+- hosts: coe-hosts
tasks:
- name: Set OVS Manager
shell: ovs-vsctl set-manager tcp:{{ manager_ip }}:{{ manager_port }} && touch /tmp/ovs-set-manager
args:
creates: /tmp/watcher.out
-- hosts: coe-minion1:coe-minion2
+- hosts: coe-minions
tasks:
- name: Disable swapfile
shell: swapoff -a