Michal Zegan | 8aebe61 | 2019-05-27 14:00:13 +0200 | [diff] [blame] | 1 | --- |
| 2 | - name: Add nexus simulation hosts to /etc/hosts |
| 3 | lineinfile: |
| 4 | regexp: "^{{ ansible_default_ipv4.address | regex_escape() }} {{ etc_hosts | join(' ') | regex_escape() }}$" |
| 5 | line: "{{ ansible_default_ipv4.address }} {{ etc_hosts | join(' ') }}" |
| 6 | insertafter: EOF |
| 7 | path: /etc/hosts |
| 8 | unsafe_writes: true |
| 9 | |
| 10 | - name: "Create needed dirs for nexus role" |
| 11 | file: |
| 12 | path: "{{ item }}" |
| 13 | state: directory |
| 14 | mode: "u+rw,g+wx,o+rwx" |
| 15 | recurse: true |
| 16 | loop: |
| 17 | - "{{ app_data_path }}/nexus_data" |
| 18 | - "{{ infra_images_path }}" |
| 19 | - "{{ aux_data_path }}" |
| 20 | |
| 21 | - name: Download and archive nexus docker image for the nexus role to use |
| 22 | delegate_to: localhost |
| 23 | docker_image: |
| 24 | name: "{{ nexus3_image }}" |
| 25 | archive_path: /tmp/nexus.tar |
| 26 | |
| 27 | - name: Download and tag additional (busybox) docker image for the nexus role to populate into |
| 28 | delegate_to: localhost |
| 29 | docker_image: |
| 30 | name: busybox |
| 31 | tag: latest |
Bartek Grzybowski | e45ccdc | 2019-06-13 13:39:17 +0200 | [diff] [blame] | 32 | repository: nexus3.onap.org:10001/busybox |
Michal Zegan | 8aebe61 | 2019-05-27 14:00:13 +0200 | [diff] [blame] | 33 | |
| 34 | - name: Save busybox image |
| 35 | delegate_to: localhost |
| 36 | docker_image: |
Bartek Grzybowski | e45ccdc | 2019-06-13 13:39:17 +0200 | [diff] [blame] | 37 | name: nexus3.onap.org:10001/busybox |
Michal Zegan | 8aebe61 | 2019-05-27 14:00:13 +0200 | [diff] [blame] | 38 | tag: latest |
| 39 | pull: false |
| 40 | archive_path: /tmp/busybox.tar |
| 41 | |
| 42 | - name: Download and tag additional (aaionap/haproxy) docker image for the nexus role to populate into nexus |
| 43 | delegate_to: localhost |
| 44 | docker_image: |
| 45 | name: aaionap/haproxy |
| 46 | tag: 1.2.4 |
Bartek Grzybowski | e45ccdc | 2019-06-13 13:39:17 +0200 | [diff] [blame] | 47 | repository: nexus3.onap.org:10001/aaionap/haproxy |
Michal Zegan | 8aebe61 | 2019-05-27 14:00:13 +0200 | [diff] [blame] | 48 | |
| 49 | - name: Save haproxy image |
| 50 | delegate_to: localhost |
| 51 | docker_image: |
Bartek Grzybowski | e45ccdc | 2019-06-13 13:39:17 +0200 | [diff] [blame] | 52 | name: nexus3.onap.org:10001/aaionap/haproxy |
Michal Zegan | 8aebe61 | 2019-05-27 14:00:13 +0200 | [diff] [blame] | 53 | tag: 1.2.4 |
| 54 | pull: false |
| 55 | archive_path: /tmp/haproxy.tar |
| 56 | |
| 57 | - name: Copy nexus image to node |
| 58 | copy: |
| 59 | src: /tmp/nexus.tar |
| 60 | dest: "{{ infra_images_path }}/{{ nexus3_image_tar }}" |
| 61 | |
| 62 | - name: Copy busybox image to node |
| 63 | copy: |
| 64 | src: /tmp/busybox.tar |
| 65 | dest: "{{ aux_data_path }}/busybox.tar" |
| 66 | |
| 67 | - name: Copy haproxy image to node |
| 68 | copy: |
| 69 | src: /tmp/haproxy.tar |
| 70 | dest: "{{ aux_data_path }}/aaionap-haproxy.tar" |