Update deployment

This commit is contained in:
madereddy
2023-12-11 14:25:52 -05:00
parent 4a17179306
commit 193394b065
2 changed files with 15 additions and 15 deletions
+22
View File
@@ -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