fix docker compose
Infrastructure / Check and run Ansbile playbooks (pull_request) Failing after 4m24s
Details
Infrastructure / Check and run Ansbile playbooks (pull_request) Failing after 4m24s
Details
This commit is contained in:
parent
6a900ecbc4
commit
a2debba06a
|
@ -2,23 +2,29 @@
|
|||
hosts: cloud
|
||||
gather_facts: false
|
||||
vars:
|
||||
project_src: /home/debian/cloud
|
||||
module_defaults:
|
||||
community.docker.docker_compose:
|
||||
project_src: "{{ project_src }}"
|
||||
project: cloud
|
||||
tasks:
|
||||
- name: Wait for connection
|
||||
ansible.builtin.wait_for_connection:
|
||||
timeout: 300
|
||||
- name: Get user
|
||||
ansible.builtin.user:
|
||||
name: debian
|
||||
register: user
|
||||
- name: Copy project
|
||||
ansible.builtin.copy:
|
||||
directory_mode: true
|
||||
src: ./cloud
|
||||
src: ./{{ project }}
|
||||
mode: "0744"
|
||||
dest: "{{ project_src }}"
|
||||
- name: Docker compose down
|
||||
community.docker.docker_compose:
|
||||
state: absent
|
||||
- name: Docker compose up
|
||||
community.docker.docker_compose:
|
||||
state: present
|
||||
dest: "{{ user.home }}"
|
||||
- name: Docker compose
|
||||
module_defaults:
|
||||
community.docker.docker_compose:
|
||||
project_src: "{{ user.home }}/{{ project }}"
|
||||
block:
|
||||
- name: Down
|
||||
community.docker.docker_compose:
|
||||
state: absent
|
||||
- name: Up
|
||||
community.docker.docker_compose:
|
||||
state: present
|
||||
|
|
Loading…
Reference in New Issue