blob: 1ec0adbcfe6ecae41c54480d2d6635a50f36dc07 [file] [log] [blame]
Michal Ptacek8d6f28f2018-12-19 12:13:50 +00001---
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
12- name: Load nginx image
13 docker_image:
14 name: own_nginx
15 load_path: "{{ app_data_path }}/offline_data/docker_images_infra/own_nginx_latest.tar"
16 state: present
17 timeout: 120
18
Samuli Silvius427850b2019-03-03 13:24:55 +020019- name: Create nexus network
20 docker_network:
21 name: nexus_network
22 state: present
23
Michal Ptacek8d6f28f2018-12-19 12:13:50 +000024- name: Start nginx
25 docker_container:
26 name: own_nginx
27 image: own_nginx
28 networks:
29 - name: nexus_network
Samuli Silvius427850b2019-03-03 13:24:55 +020030 ports: "{{ nginx.ports }}"
31 volumes: "{{ nginx.volumes }}"
Michal Ptacek8d6f28f2018-12-19 12:13:50 +000032 state: started
33 restart_policy: unless-stopped