22 lines
502 B
YAML
22 lines
502 B
YAML
- name: Clean up the instance
|
|
hosts: hosts
|
|
become: true
|
|
vars_files:
|
|
- vars.yml
|
|
|
|
tasks:
|
|
- name: Stop containers
|
|
ansible.builtin.command: "make -C {{ dest_dir }} fclean"
|
|
when: not ansible_check_mode
|
|
ignore_errors: true
|
|
|
|
- name: Remove app files
|
|
ansible.builtin.file:
|
|
state: absent
|
|
path: "{{ dest_dir }}"
|
|
|
|
- name: Remove schedule to start app at reboot
|
|
ansible.builtin.cron:
|
|
name: "Start app at boot"
|
|
special_time: reboot
|
|
state: absent |