blob: 58cafa395cd6667acc9b4336c0e42db1b63f6724 [file] [log] [blame]
Zack Williamsa2763112017-01-03 11:38:38 -07001---
2# repo/tasks/main.yml
3
4- name: Download and install repo tool
5 become: yes
6 get_url:
7 url: "{{ repo_dl_url }}"
8 checksum: "{{ repo_checksum }}"
9 dest: "/usr/local/bin/repo"
10 owner: root
11 group: root
12 mode: 0755
13
14- name: Create CORD directory
15 file:
Zack Williamsc989f262017-05-11 13:02:59 -070016 dest: "{{ config_cord_dir }}"
Zack Williamsa2763112017-01-03 11:38:38 -070017 state: directory
18
19- name: Init CORD repos (master branch) using repo
20 command: "/usr/local/bin/repo init -u {{ repo_manifest_url }} -b master -g build,onos,orchestration"
21 args:
Zack Williamsc989f262017-05-11 13:02:59 -070022 chdir: "{{ config_cord_dir }}"
23 creates: "{{ config_cord_dir }}/.repo"
Zack Williamsa2763112017-01-03 11:38:38 -070024
25- name: Synchronize CORD repos using repo
26 command: "repo sync"
27 args:
Zack Williamsc989f262017-05-11 13:02:59 -070028 chdir: "{{ config_cord_dir }}"
29 creates: "{{ config_cord_dir }}/build"
Zack Williamsa2763112017-01-03 11:38:38 -070030
31- name: Download specific gerrit changesets using repo
32 command: "/usr/local/bin/repo download {{ item.path }} {{ item.revision }}"
33 args:
Zack Williamsc989f262017-05-11 13:02:59 -070034 chdir: "{{ config_cord_dir }}"
Zack Williamsa2763112017-01-03 11:38:38 -070035 with_items: "{{ gerrit_changesets }}"
36 tags:
37 - skip_ansible_lint # usually won't be run, except during dev
38