Update deployment
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
- name: Build OCI Stack
|
||||
hosts: Docker
|
||||
tasks:
|
||||
- name: Clone repo
|
||||
command: git clone http://192.168.1.157:3000/jeet/OCI_Build.git
|
||||
|
||||
- name: Start container using Docker Compose
|
||||
ansible.builtin.command:
|
||||
cmd: docker compose up -d
|
||||
chdir: ~/OCI_Build/docker
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Pause for 30 seconds to allow containers to stabilize
|
||||
ansible.builtin.pause:
|
||||
seconds: 60
|
||||
|
||||
- name: Check container status
|
||||
ansible.builtin.shell: docker compose ps -q | xargs -n1 docker container inspect --format '{{ "{{" }} .State.Running {{ "}}" }}'
|
||||
args:
|
||||
chdir: ~/firstContainer
|
||||
register: container_status
|
||||
ignore_errors: yes
|
||||
Reference in New Issue
Block a user