ansible-roles/mysql/tasks/tmpdir.yml
Mathieu Trossevin 2036db938b
[Cleanup] Cleanup the mysql role
Remove the useless call for `cat` as `grep` take a file as it's second
argument that tell it to search for the pattern in a specific file
instead of whatever is passed to it through stdin.

Name both task defining the position of the config directory for
self-documentation purposes (and please ansible-lint defaults).

Change role description to it's description in the readme instead of the
default description asking for the role to be described.

Don't compare to empty string, an empty string is already false while a
non-empty string is true.
2020-12-23 15:02:20 +01:00

24 lines
514 B
YAML

---
- block:
- name: "Create {{ mysql_custom_tmpdir }}"
file:
path: "{{ mysql_custom_tmpdir }}"
owner: mysql
group: mysql
mode: "0700"
state: directory
tags:
- mysql
- name: Configure tmpdir
ini_file:
dest: "{{ mysql_config_directory }}/{{ mysql_evolinux_custom_file }}"
section: mysqld
option: tmpdir
value: "{{ mysql_custom_tmpdir }}"
notify: "{{ mysql_restart_handler_name }}"
tags:
- mysql
when: mysql_custom_tmpdir