2019-10-23 17:11:02 +02:00
|
|
|
- name: stop mysql service
|
|
|
|
service:
|
|
|
|
name: mysqld
|
|
|
|
state: stopped
|
|
|
|
listen: cleanup mysql8
|
|
|
|
|
|
|
|
- name: remove repo
|
2019-11-15 23:02:20 +01:00
|
|
|
# yum:
|
|
|
|
# name: mysql80-community-release
|
|
|
|
# state: absent
|
|
|
|
# Work around for a bug in the dnf module. Use the module once that gets fixed.
|
|
|
|
# https://github.com/ansible/ansible/issues/64294
|
|
|
|
command: "{{ ansible_facts.pkg_mgr}} -y erase mysql80-community-release"
|
|
|
|
args:
|
|
|
|
warn: no
|
2019-10-23 17:11:02 +02:00
|
|
|
listen: cleanup mysql8
|
|
|
|
|
|
|
|
- name: remove mysql packages
|
|
|
|
yum:
|
2019-11-15 23:02:20 +01:00
|
|
|
name: '{{ mysql_support_packages | union(mysql_server_packages) | union(mysql_cleanup_packages) }}'
|
2019-10-23 17:11:02 +02:00
|
|
|
state: absent
|
|
|
|
listen: cleanup mysql8
|
|
|
|
|
|
|
|
- name: remove mysql data
|
|
|
|
file:
|
|
|
|
path: "{{ item }}"
|
|
|
|
state: absent
|
|
|
|
loop: "{{ mysql_data_dirs }}"
|
|
|
|
listen: cleanup mysql8
|