feature ci/cd cleaning

This commit is contained in:
2026-03-01 19:13:21 +03:00
parent 236f5d041b
commit 395abdc569
2 changed files with 29 additions and 10 deletions

View File

@@ -3,10 +3,18 @@
vars:
env_file: $(pwd)/.env
tasks:
- name: Install wget
apt:
name: wget
state: present
update_cache: yes
- name: Install Docker
shell: curl -fsSL https://get.docker.com | sh
args:
creates: /usr/bin/docker
- name: Ensure /opt/infra exists
file:
path: /opt/infra
@@ -14,6 +22,7 @@
owner: root
group: root
mode: '0755'
- name: Copy .env to remote
copy:
src: "{{ env_file }}"
@@ -22,15 +31,18 @@
group: root
mode: '0600'
- name: Download nginx
shell: wget -O /opt/infra/nginx.yaml "{{ URL for docker-compose nginx }}"
args:
creates: /opt/infra/nginx.yaml
- name: Download node-docker.yaml
shell: wget -O /opt/infra/node-docker.yaml "{{ gitea_instance_url }}"
args:
creates: /opt/infra/node-docker.yaml
# - name: Start docker compose via module
# community.docker.docker_compose_v2:
# project_src: /opt/infra
# files:
# - node-docker.yaml
# state: present
# restarted: true
- name: Start docker compose
- name: Start node-docker
shell: docker-compose -f /opt/infra/node-docker.yaml up -d
- name: Start nginx
shell: docker-compose -f /opt/infra/nginx.yaml up -d