Don't use free-form

This commit is contained in:
flyingscorpio@clevo 2022-12-16 20:07:26 +01:00
parent c7fee32290
commit 223959a68d
2 changed files with 19 additions and 7 deletions

View file

@ -1,6 +1,5 @@
---
skip_list:
- meta-no-info
- no-free-form
# vim: ft=yaml.ansible

View file

@ -17,7 +17,7 @@
- name: Initialize mariadb
become: true
ansible.builtin.command: mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
ansible.builtin.command: "mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql"
register: result
changed_when: "'table already exists!' not in result.stdout"
notify: Start mysqld service
@ -27,21 +27,34 @@
when: "'table already exists!' not in result.stdout"
block:
- name: Set root password
community.mysql.mysql_user: user=root password="" host=localhost
community.mysql.mysql_user:
user: root
password: ""
host: localhost
no_log: true
- name: Remove anonymous user for ansible_fqdn
community.mysql.mysql_user: user="" host={{ ansible_fqdn }} state=absent
community.mysql.mysql_user:
user: ""
host: "{{ ansible_fqdn }}"
state: absent
- name: Remove anonymous user for localhost
community.mysql.mysql_user: user="" state=absent
community.mysql.mysql_user:
user: ""
state: absent
- name: Remove remote root access
community.mysql.mysql_user: user=root password="" host={{ item }}
community.mysql.mysql_user:
user: root
password: ""
host: "{{ item }}"
no_log: true
with_items:
- "::1"
- "127.0.0.1"
- localhost
- name: Remove test database
community.mysql.mysql_db: db=test state=absent
community.mysql.mysql_db:
db: test
state: absent
- name: Stop mysqld service
ansible.builtin.systemd: