From 193394b0651e9f42ca01715212195eac6ab1c62b Mon Sep 17 00:00:00 2001 From: madereddy <49539048+madereddy@users.noreply.github.com> Date: Mon, 11 Dec 2023 14:25:52 -0500 Subject: [PATCH] Update deployment --- inventory.yml | 26 +++++++++---------- playbooks/{first_container.yml => deploy.yml} | 4 +-- 2 files changed, 15 insertions(+), 15 deletions(-) rename playbooks/{first_container.yml => deploy.yml} (85%) diff --git a/inventory.yml b/inventory.yml index df58b8b..68bce95 100644 --- a/inventory.yml +++ b/inventory.yml @@ -1,23 +1,23 @@ all: children: - BareMetal: - hosts: - host1: - ansible_host: 192.168.1.79 - ansible_user: jeet - ansible_ssh_private_key_file: ~/.ssh/id_ed25519 -# host2: -# ansible_host: -# ansible_user: -# ansible_ssh_private_key_file: ~/.ssh/ -# Docker: +# BareMetal: # hosts: # host1: # ansible_host: 192.168.1.79 # ansible_user: jeet # ansible_ssh_private_key_file: ~/.ssh/id_ed25519 -# compose_file_paths: -# - /path/to/docker-compose.yml +# host2: +# ansible_host: +# ansible_user: +# ansible_ssh_private_key_file: ~/.ssh/ + Docker: + hosts: + host1: + ansible_host: 192.168.1.79 + ansible_user: jeet + ansible_ssh_private_key_file: ~/.ssh/id_ed25519 + compose_file_paths: + - /path/to/docker-compose.yml # host2: # ansible_host: # ansible_user: diff --git a/playbooks/first_container.yml b/playbooks/deploy.yml similarity index 85% rename from playbooks/first_container.yml rename to playbooks/deploy.yml index 4354cb2..c1d0453 100644 --- a/playbooks/first_container.yml +++ b/playbooks/deploy.yml @@ -2,12 +2,12 @@ hosts: Docker tasks: - name: Clone repo - command: wget http://192.168.1.157:3000/jeet/OCI_Build.git + 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: ~/docker + chdir: ~/OCI_Build/docker ignore_errors: yes - name: Pause for 30 seconds to allow containers to stabilize