Add become
This commit is contained in:
@@ -16,8 +16,6 @@ all:
|
|||||||
ansible_host: 192.168.1.79
|
ansible_host: 192.168.1.79
|
||||||
ansible_user: jeet
|
ansible_user: jeet
|
||||||
ansible_ssh_private_key_file: ~/.ssh/id_ed25519
|
ansible_ssh_private_key_file: ~/.ssh/id_ed25519
|
||||||
compose_file_paths:
|
|
||||||
- /path/to/docker-compose.yml
|
|
||||||
# host2:
|
# host2:
|
||||||
# ansible_host: <ip>
|
# ansible_host: <ip>
|
||||||
# ansible_user: <user>
|
# ansible_user: <user>
|
||||||
|
|||||||
+3
-2
@@ -1,15 +1,16 @@
|
|||||||
- name: Clean OCI Stack
|
- name: Clean OCI Stack
|
||||||
hosts: Docker
|
hosts: Docker
|
||||||
|
become: yes
|
||||||
tasks:
|
tasks:
|
||||||
|
|
||||||
- name: Stop containers using Docker Compose
|
- name: Stop containers using Docker Compose
|
||||||
ansible.builtin.command:
|
ansible.builtin.command:
|
||||||
cmd: docker compose down
|
cmd: docker compose down
|
||||||
chdir: ~/OCI_Build/docker
|
chdir: /home/jeet/OCI_Build/docker
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
|
|
||||||
- name: Remove build folder
|
- name: Remove build folder
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
state: absent
|
state: absent
|
||||||
path: ~/OCI_Build/
|
path: /home/jeet/OCI_Build/
|
||||||
force: true
|
force: true
|
||||||
Reference in New Issue
Block a user