Skip to content

Commit

Permalink
Merge branch '593-disable-mysql-history-file' into 'master'
Browse files Browse the repository at this point in the history
Resolve "[ITOPS-1000] Disable mysql history file"

Closes #593

See merge request teamwire/devops/platform!501
  • Loading branch information
tw-alexb committed Aug 21, 2023
2 parents 532d1e2 + 910a04c commit 83381ac
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions ansible/roles/db/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,19 @@

- include_tasks: cluster.yml
when: galera_cluster is defined

# ------------------------------------------------------------------------------
# Ensure mysql history is empty and disabled
# ------------------------------------------------------------------------------
- name: Remove mysql history files
ansible.builtin.file:
path: "{{ item }}"
state: absent
with_items:
- "/home/teamwire/.mysql_history"
- "/root/.mysql_history"

- name: Disable mysql history
ansible.builtin.lineinfile:
dest: /etc/environment
line: "export MYSQL_HISTFILE=/dev/null"

0 comments on commit 83381ac

Please sign in to comment.