echo init

master
omidshj 2025-09-01 15:13:47 +03:30
parent 1a7245b8df
commit 826f4b9928
1 changed files with 27 additions and 0 deletions

27
echo.yml Normal file
View File

@ -0,0 +1,27 @@
- name: Pull and run private GHCR image
hosts: all
become: true
tasks:
- name: Ensure community.docker collection is installed
ansible.builtin.ansible_galaxy_collection:
name: community.docker
- name: Log in to GitHub Container Registry
community.docker.docker_login:
registry_url: ghcr.io
username: "{{ ghcr_username }}"
password: "{{ ghcr_token }}"
- name: Pull image from GHCR
community.docker.docker_image:
name: "{{ image_name }}"
source: pull
- name: Run container from image
community.docker.docker_container:
name: echo
image: "{{ image_name }}"
restart_policy: always
ports:
- "3000:3000"