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