database_host: "{{ groups['postgres'][0] }}"
data_dir: /data/ghostdata
certs_dir: /data/certs
+ net_name: ghostnet
tasks:
+ - name: create network
+ docker_network: "name={{ net_name }}"
- name: create ghostdata directory
file:
path: "{{ data_dir }}"
image: ghost
volumes:
- "{{ data_dir }}:/var/lib/ghost"
+ networks:
+ - name: "{{ net_name }}"
- name: create certs directory
file:
path: "{{ certs_dir }}"
docker_container:
name: nginx_ghost
image: ansiblebook/nginx-ghost
- links:
- - ghost
+ networks:
+ - name: "{{ net_name }}"
+ links:
+ - ghost
ports:
- "0.0.0.0:80:80"
- "0.0.0.0:443:443"