This repository has been archived on 2024-02-10. You can view files and clone it, but cannot push or open issues or pull requests.
cpx-ansible/roles/docker_services/tasks/services/samsapti_dev.yml

27 lines
808 B
YAML
Raw Normal View History

2023-04-20 21:34:25 +00:00
# vim: ft=yaml.ansible
---
- name: Create samsapti.dev volume directories
ansible.builtin.file:
path: "{{ services.samsapti_dev.volume }}/public"
owner: cicd
mode: u=rwx,g=rx,o=rx
state: directory
- name: Deploy samsapti.dev Docker container
community.docker.docker_container:
name: samsapti.dev
state: "{{ 'absent' if stop is defined and stop else 'started' }}"
restart: "{{ stop is undefined or not stop }}"
image: nginx:{{ services.samsapti_dev.version }}
restart_policy: always
networks:
- name: services
aliases:
- samsapti
- name: tor
aliases:
- samsapti
volumes:
- "{{ services.samsapti_dev.volume }}/public:/usr/share/nginx/html:ro"
- "{{ base_volume }}/nginx.conf:/etc/nginx/nginx.conf:ro"