Michal Ptacek | 8d6f28f | 2018-12-19 12:13:50 +0000 | [diff] [blame] | 1 | --- |
| 2 | - name: Create configuration directory |
| 3 | file: |
| 4 | path: "{{ app_data_path }}/cfg" |
| 5 | state: directory |
| 6 | |
| 7 | - name: Upload configuration to server |
| 8 | template: |
| 9 | src: nginx.conf.j2 |
| 10 | dest: "{{ app_data_path }}/cfg/nginx.conf" |
| 11 | |
Tomáš Levora | a0ad5c1 | 2019-03-28 17:45:55 +0100 | [diff] [blame] | 12 | - name: Load nginx server image |
Michal Ptacek | 8d6f28f | 2018-12-19 12:13:50 +0000 | [diff] [blame] | 13 | docker_image: |
Tomáš Levora | a0ad5c1 | 2019-03-28 17:45:55 +0100 | [diff] [blame] | 14 | name: "{{ nginx_server_image }}" |
| 15 | load_path: "{{ infra_images_path }}/{{ nginx_server_image_tar }}" |
Michal Ptacek | 8d6f28f | 2018-12-19 12:13:50 +0000 | [diff] [blame] | 16 | state: present |
| 17 | timeout: 120 |
| 18 | |
Samuli Silvius | 427850b | 2019-03-03 13:24:55 +0200 | [diff] [blame] | 19 | - name: Create nexus network |
| 20 | docker_network: |
| 21 | name: nexus_network |
| 22 | state: present |
| 23 | |
Tomáš Levora | a0ad5c1 | 2019-03-28 17:45:55 +0100 | [diff] [blame] | 24 | - name: Start nginx server container |
Michal Ptacek | 8d6f28f | 2018-12-19 12:13:50 +0000 | [diff] [blame] | 25 | docker_container: |
Tomáš Levora | a0ad5c1 | 2019-03-28 17:45:55 +0100 | [diff] [blame] | 26 | name: nginx-server |
| 27 | image: "{{ nginx_server_image }}" |
Michal Ptacek | 8d6f28f | 2018-12-19 12:13:50 +0000 | [diff] [blame] | 28 | networks: |
| 29 | - name: nexus_network |
Samuli Silvius | 427850b | 2019-03-03 13:24:55 +0200 | [diff] [blame] | 30 | ports: "{{ nginx.ports }}" |
| 31 | volumes: "{{ nginx.volumes }}" |
Michal Ptacek | 8d6f28f | 2018-12-19 12:13:50 +0000 | [diff] [blame] | 32 | state: started |
| 33 | restart_policy: unless-stopped |