blob: 54a0c818c5caeb3cfbff2cd87e220581e4c4366d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
---
- name: Create configuration directory
file:
path: "{{ app_data_path }}/cfg"
state: directory
- name: Upload configuration to server
template:
src: nginx.conf.j2
dest: "{{ app_data_path }}/cfg/nginx.conf"
- name: Load nginx server image
docker_image:
name: "{{ nginx_server_image }}"
load_path: "{{ infra_images_path }}/{{ nginx_server_image_tar }}"
state: present
timeout: 120
- name: Create nexus network
docker_network:
name: nexus_network
state: present
- name: Start nginx server container
docker_container:
name: nginx-server
image: "{{ nginx_server_image }}"
networks:
- name: nexus_network
ports: "{{ nginx.ports }}"
volumes: "{{ nginx.volumes }}"
state: started
restart_policy: unless-stopped
|