summaryrefslogtreecommitdiff
path: root/test/integration/targets/setup_mysql_db/handlers/main.yml
blob: abcd488ef2336f337ba96b66eb020e80b21fbfae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
- name: stop mysql service
  service:
    name: "{{ mysql_service }}"
    state: stopped
  listen: cleanup mysql

- name: remove mysql packages
  action: '{{ ansible_pkg_mgr }}'
  args:
    name: "{{ item }}"
    state: absent
  loop: "{{ mysql_packages | union(mysql_cleanup_packages) }}"
  listen: cleanup mysql

- name: remove mysql data
  file:
    path: "{{ item }}"
    state: absent
  loop: "{{ mysql_data_dirs }}"
  listen: cleanup mysql

- name: remove pip packages
  pip:
    name: mysql-python
    state: absent