blob: 54a0c818c5caeb3cfbff2cd87e220581e4c4366d [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
Tomáš Levoraa0ad5c12019-03-28 17:45:55 +010012- name: Load nginx server image
Michal Ptacek8d6f28f2018-12-19 12:13:50 +000013 docker_image:
Tomáš Levoraa0ad5c12019-03-28 17:45:55 +010014 name: "{{ nginx_server_image }}"
15 load_path: "{{ infra_images_path }}/{{ nginx_server_image_tar }}"
Michal Ptacek8d6f28f2018-12-19 12:13:50 +000016 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
Tomáš Levoraa0ad5c12019-03-28 17:45:55 +010024- name: Start nginx server container
Michal Ptacek8d6f28f2018-12-19 12:13:50 +000025 docker_container:
Tomáš Levoraa0ad5c12019-03-28 17:45:55 +010026 name: nginx-server
27 image: "{{ nginx_server_image }}"
Michal Ptacek8d6f28f2018-12-19 12:13:50 +000028 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