diff options
author | Sacha Chua <sacha@sachachua.com> | 2022-10-12 20:28:41 -0400 |
---|---|---|
committer | Sacha Chua <sacha@sachachua.com> | 2022-10-12 20:28:41 -0400 |
commit | 28d2d8a0da8b624d0a256ac492afe7605fa8d260 (patch) | |
tree | 13966a255ea5659c0d8749799007e4c6b0e0e52d /pad/tasks/mariadb.yml | |
parent | b0d8ea0d60bcf4626b84d20e99ea2fe93353b825 (diff) | |
download | emacsconf-ansible-28d2d8a0da8b624d0a256ac492afe7605fa8d260.tar.xz emacsconf-ansible-28d2d8a0da8b624d0a256ac492afe7605fa8d260.zip |
Be able to deploy pad to live0
Diffstat (limited to 'pad/tasks/mariadb.yml')
-rw-r--r-- | pad/tasks/mariadb.yml | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/pad/tasks/mariadb.yml b/pad/tasks/mariadb.yml index 7a406c9..8e613b6 100644 --- a/pad/tasks/mariadb.yml +++ b/pad/tasks/mariadb.yml @@ -5,10 +5,30 @@ - mariadb-server - mariadb-client - python3-mysqldb +- name: Ensure anonymous users are not in the database + mysql_user: + name: "" + host: "{{ item }}" + state: absent + with_items: + - localhost + - 127.0.0.1 + - ::1 + - "%" +- name: Ensure mysql is configured to bind only to localhost + ini_file: + dest: /etc/mysql/my.cnf + section: mysqld + option: "bind-address" + value: "127.0.0.1" - name: Start MariaDB service: name: mysql - state: started + state: restarted + enabled: yes + runlevel: + - 3 + - 5 - name: Ensure emacsconf-pad database exists mysql_db: name: "{{ etherpad_database_name }}" |