Closed akhil-naidu closed 3 years ago
hi @akhil-naidu , how about something like
---
- hosts: nodes
roles:
- dokku_bot.ansible_dokku
tasks:
- name: Delete that app
dokku_app:
app: "{{ appTitle }}"
state: absent
tags: delete-app
and ansible-playbook playbook.yml --tags delete-app
?
Wow! it seems like this might work. I was looking at the documentation of ansible-dokku
and forgot about ansible
features.
I will give it a try and will update the status of this issue accordingly.
hi @akhil-naidu , how about something like
--- - hosts: nodes roles: - dokku_bot.ansible_dokku tasks: - name: Delete that app dokku_app: app: "{{ appTitle }}" state: absent tags: delete-app
and
ansible-playbook playbook.yml --tags delete-app
?
With this, now I was able to delete the app in 3 seconds. xD
Presently this is how we can delete an app. Even though ansible provides
shell
andcommand
modules => We cannot use them; because of the inbuild dokku security to re-enter the name of the app,Just to destroy one app, this procedure takes a lot of time. I would like to know a better way of handling
single commands
like:dokku apps:destroy AppName
(requires to manually enter: AppName)dokku git:sync --build AppName https://github.com/path/to/my/repo
(For executing this the second time, we should pass: y/n)