initial commit
This commit is contained in:
commit
e206487577
4 changed files with 54 additions and 0 deletions
28
tasks/main.yml
Normal file
28
tasks/main.yml
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
- name: Create directory if it does not exists
|
||||
become: true
|
||||
file:
|
||||
path: "{{ compose_dir }}/postgres"
|
||||
state: directory
|
||||
mode: 0755
|
||||
|
||||
- name: Place docker-compose file
|
||||
become: true
|
||||
template:
|
||||
src: templates/docker-compose.yml.j2
|
||||
dest: "{{ compose_dir }}/postgres/docker-compose.yml"
|
||||
mode: 0700
|
||||
|
||||
- name: Update and start services
|
||||
become: true
|
||||
docker_compose:
|
||||
project_src: "{{ compose_dir }}/postgres"
|
||||
pull: true
|
||||
state: present
|
||||
remove_orphans: true
|
||||
register: output
|
||||
|
||||
- name: Check all containers are running
|
||||
assert:
|
||||
that:
|
||||
- "output.ansible_facts.postgres.db.state.running": true
|
||||
Loading…
Add table
Add a link
Reference in a new issue