0.0066
This commit is contained in:
@@ -12,8 +12,8 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "${{ secrets.SSH_PRIVATE_KEY }}" > /tmp/id_fin
|
echo "${{ secrets.SSH_PRIVATE_KEY }}" > /tmp/id_fin
|
||||||
chmod 600 /tmp/id_fin
|
chmod 600 /tmp/id_fin
|
||||||
# - name: Install Ansible collection
|
- name: Install Ansible collection
|
||||||
# run: ansible-galaxy collection install community.docker
|
run: ansible-galaxy collection install community.docker
|
||||||
- name: Create inventory
|
- name: Create inventory
|
||||||
run: echo "${{ secrets.INVENTORY }}" > inventory.ini
|
run: echo "${{ secrets.INVENTORY }}" > inventory.ini
|
||||||
- name: Create secrets.yml
|
- name: Create secrets.yml
|
||||||
@@ -29,7 +29,7 @@ jobs:
|
|||||||
sparse-checkout: |
|
sparse-checkout: |
|
||||||
ansible/deploy.yml
|
ansible/deploy.yml
|
||||||
- name: Run Ansible playbook
|
- name: Run Ansible playbook
|
||||||
run: ansible-playbook -i inventory.ini tmp-repo/ansible/deploy.yml -e @secrets.yml
|
run: ansible-playbook -i inventory.ini tmp-repo/ansible/deploy.yml -e @secrets.yml -e env_file="$(pwd)/.env"
|
||||||
env:
|
env:
|
||||||
ANSIBLE_PRIVATE_KEY_FILE: /tmp/id_fin
|
ANSIBLE_PRIVATE_KEY_FILE: /tmp/id_fin
|
||||||
ANSIBLE_HOST_KEY_CHECKING: "False"
|
ANSIBLE_HOST_KEY_CHECKING: "False"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
- hosts: servers
|
- hosts: servers
|
||||||
become: yes
|
become: yes
|
||||||
vars:
|
vars:
|
||||||
env_file: .env
|
env_file: $(pwd)/.env
|
||||||
tasks:
|
tasks:
|
||||||
- name: Install Docker
|
- name: Install Docker
|
||||||
shell: curl -fsSL https://get.docker.com | sh
|
shell: curl -fsSL https://get.docker.com | sh
|
||||||
@@ -26,12 +26,10 @@
|
|||||||
repo: "{{ gitea_instance_url }}"
|
repo: "{{ gitea_instance_url }}"
|
||||||
dest: /opt/infra
|
dest: /opt/infra
|
||||||
|
|
||||||
# - name: Start docker compose via module
|
- name: Start docker compose via module
|
||||||
# community.docker.docker_compose_v2:
|
community.docker.docker_compose_v2:
|
||||||
# project_src: /opt/infra
|
project_src: /opt/infra
|
||||||
# files:
|
files:
|
||||||
# - node-docker.yaml
|
- node-docker.yaml
|
||||||
# state: present
|
state: present
|
||||||
# restarted: true
|
restarted: true
|
||||||
- name: Start docker compose
|
|
||||||
shell: docker-compose -f /opt/infra/node-docker.yaml up -d
|
|
||||||
|
|||||||
Reference in New Issue
Block a user