alshabib | cfb8d72 | 2016-06-15 15:17:37 -0700 | [diff] [blame] | 1 | - name: Directories are present |
| 2 | file: |
| 3 | path: "{{ item }}" |
| 4 | state: directory |
| 5 | recurse: yes |
| 6 | with_items: |
| 7 | - /data/registry-mirror/conf |
| 8 | tags: [registry] |
| 9 | |
| 10 | - name: Configuration is copied |
| 11 | copy: |
| 12 | src: mirror-config.yml |
| 13 | dest: /data/registry-mirror/conf/config.yml |
| 14 | tags: [registry] |
| 15 | |
| 16 | - name: Local Docker Registry |
| 17 | become: yes |
| 18 | template: |
| 19 | src: templates/{{ item }}.j2 |
| 20 | dest: /etc/maas/{{ item }} |
| 21 | owner: maas |
| 22 | group: maas |
| 23 | mode: 0644 |
| 24 | with_items: |
| 25 | - registry-compose.yml |
| 26 | tags: [registry] |
| 27 | |
| 28 | - name: Ensure Local Registry Running |
| 29 | become: yes |
| 30 | command: docker-compose -f /etc/maas/{{ item }} up -d |
| 31 | with_items: |
| 32 | - registry-compose.yml |
| 33 | tags: [registry] |