Files
Wordpress-Ansible/ansible/playbooks/roles/docker/snake/tasks/main.yaml
sotos 1e1d4913a8
Some checks failed
CI/CD Pipeline / lint (push) Failing after 18s
CI/CD Pipeline / deploy (push) Failing after 42s
update
2025-12-17 10:48:06 +01:00

31 lines
665 B
YAML

---
# Ensure app directory exists
- name: Create app directory
file:
path: "{{ app_dir }}"
state: directory
# Login to private registry
- name: Login to private registry
docker_login:
registry_url: dns.s-martika.com
username: "{{ gitea_user }}"
password: "{{ gitea_token }}"
# Pull latest image
- name: Pull snake-game image
docker_image:
name: "{{ snake_image }}"
source: pull
# Run container
- name: Run snake-game container
docker_container:
name: snake-game
image: "{{ snake_image }}"
state: started
restart_policy: unless-stopped
ports:
- "8080:80" # host port → container port
pull: yes