- name:delete anonymous MySQL server user for localhost
mysql_user:user="" state="absent"
when:mysql_enabled
- name:remove the MySQL test database
mysql_db:db=test state=absent
when:mysql_enabled
# we had to start mysql in order to configure it, now turn if off if not enabled
- name:Provisioally Disable the MySQL service
service:name={{ mysql_service }}
enabled=no
state=stopped
when:not mysql_enabled
- name:add mysql to service list
ini_file:dest='{{ service_filelist }}'
section=mysql
option='{{ item.option }}'
value='{{ item.value }}'
with_items:
- option:name
value:mysql-database
- option:description
value:'"mySQL is a widely used database service on the Internet which runs on many platforms, and is often offered and available at hosting Internet Service Providers"'