From 9eb7f0ee65ff05d688ac834b9ce7696b3f337635 Mon Sep 17 00:00:00 2001 From: madereddy <49539048+madereddy@users.noreply.github.com> Date: Mon, 11 Dec 2023 15:17:58 -0500 Subject: [PATCH] Add become --- inventory.yml | 2 -- playbooks/clean.yml | 7 ++++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/inventory.yml b/inventory.yml index 68bce95..b5638ec 100644 --- a/inventory.yml +++ b/inventory.yml @@ -16,8 +16,6 @@ all: 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/clean.yml b/playbooks/clean.yml index 47f61c8..67a0e06 100644 --- a/playbooks/clean.yml +++ b/playbooks/clean.yml @@ -1,15 +1,16 @@ - name: Clean OCI Stack hosts: Docker + become: yes tasks: - name: Stop containers using Docker Compose ansible.builtin.command: cmd: docker compose down - chdir: ~/OCI_Build/docker + chdir: /home/jeet/OCI_Build/docker ignore_errors: yes - name: Remove build folder ansible.builtin.file: state: absent - path: ~/OCI_Build/ - force: true + path: /home/jeet/OCI_Build/ + force: true \ No newline at end of file