Lint with latest ansible-lint version
This commit is contained in:
parent
73ee37265b
commit
32dba5411d
|
|
@ -4,30 +4,21 @@ repos:
|
||||||
rev: v4.3.0
|
rev: v4.3.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: check-added-large-files
|
- id: check-added-large-files
|
||||||
- id: check-ast
|
|
||||||
- id: check-case-conflict
|
- id: check-case-conflict
|
||||||
- id: check-executables-have-shebangs
|
- id: check-executables-have-shebangs
|
||||||
- id: check-merge-conflict
|
- id: check-merge-conflict
|
||||||
- id: check-yaml
|
- id: check-yaml
|
||||||
name: Check yaml files
|
name: Check yaml files
|
||||||
- id: debug-statements
|
|
||||||
name: Check for Python debug statements
|
|
||||||
- id: trailing-whitespace
|
- id: trailing-whitespace
|
||||||
name: Check trailing whitespace
|
name: Check trailing whitespace
|
||||||
args: [--markdown-linebreak-ext=md]
|
args: [--markdown-linebreak-ext=md]
|
||||||
- repo: https://gitlab.com/pycqa/flake8.git
|
|
||||||
rev: 3.9.2
|
|
||||||
hooks:
|
|
||||||
- id: flake8
|
|
||||||
name: Check python (flake8)
|
|
||||||
args: ["--ignore=E501,E226"]
|
|
||||||
- repo: https://github.com/adrienverge/yamllint.git
|
- repo: https://github.com/adrienverge/yamllint.git
|
||||||
rev: v1.27.1
|
rev: v1.28.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: yamllint
|
- id: yamllint
|
||||||
name: Check yaml files (yamllint)
|
name: Check yaml files (yamllint)
|
||||||
- repo: https://github.com/ansible/ansible-lint.git
|
- repo: https://github.com/ansible/ansible-lint.git
|
||||||
rev: v6.5.1
|
rev: v6.8.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: ansible-lint
|
- id: ansible-lint
|
||||||
name: Check ansible files (ansible-lint)
|
name: Check ansible files (ansible-lint)
|
||||||
|
|
|
||||||
|
|
@ -84,9 +84,7 @@ variables. This permits more flexibility and a very simple
|
||||||
|
|
||||||
By default, some common and standard options are deployed based on the MariaDB
|
By default, some common and standard options are deployed based on the MariaDB
|
||||||
Foundation package. Those default values are only ment as an example and for testing
|
Foundation package. Those default values are only ment as an example and for testing
|
||||||
deployments and you are encouraged to use your own values. This should be
|
deployments and you are encouraged to use your own values.
|
||||||
facilitated by extensive use of `raw` variables (see
|
|
||||||
[`templates/mariadb.cnf.j2`](./templates/mariadb.cnf.j2).
|
|
||||||
|
|
||||||
#### Basic settings
|
#### Basic settings
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
- name: Ensure MariaDB databases are present (or absent)
|
- name: Ensure MariaDB databases are present (or absent)
|
||||||
mysql_db:
|
community.mysql.mysql_db:
|
||||||
name: "{{ item.name }}"
|
name: "{{ item.name }}"
|
||||||
collation: "{{ item.collation | default('utf8_general_ci') }}"
|
collation: "{{ item.collation | default('utf8_general_ci') }}"
|
||||||
encoding: "{{ item.encoding | default('utf8') }}"
|
encoding: "{{ item.encoding | default('utf8') }}"
|
||||||
|
|
|
||||||
|
|
@ -9,39 +9,39 @@
|
||||||
paths:
|
paths:
|
||||||
- "vars"
|
- "vars"
|
||||||
|
|
||||||
- name: include task setup_debian.yml
|
- name: Include task setup_debian.yml
|
||||||
import_tasks: setup_debian.yml
|
ansible.builtin.import_tasks: setup_debian.yml
|
||||||
when: ansible_os_family == "Debian"
|
when: ansible_os_family == "Debian"
|
||||||
|
|
||||||
- name: include task setup_redhat.yml
|
- name: Include task setup_redhat.yml
|
||||||
import_tasks: setup_redhat.yml
|
ansible.builtin.import_tasks: setup_redhat.yml
|
||||||
when: ansible_os_family == "RedHat"
|
when: ansible_os_family == "RedHat"
|
||||||
|
|
||||||
- name: include task configure.yml
|
- name: Include task configure.yml
|
||||||
import_tasks: configure.yml
|
ansible.builtin.import_tasks: configure.yml
|
||||||
|
|
||||||
- name: include task databases.yml
|
- name: Include task databases.yml
|
||||||
import_tasks: databases.yml
|
ansible.builtin.import_tasks: databases.yml
|
||||||
when:
|
when:
|
||||||
- mariadb_databases is defined
|
- mariadb_databases is defined
|
||||||
- mariadb_replication_role != "replica"
|
- mariadb_replication_role != "replica"
|
||||||
|
|
||||||
- name: include task users.yml
|
- name: Include task users.yml
|
||||||
import_tasks: users.yml
|
ansible.builtin.import_tasks: users.yml
|
||||||
when:
|
when:
|
||||||
- mariadb_users is defined
|
- mariadb_users is defined
|
||||||
- mariadb_replication_role != "replica"
|
- mariadb_replication_role != "replica"
|
||||||
|
|
||||||
- name: include task replication_master.yml
|
- name: Include task replication_master.yml
|
||||||
import_tasks: replication_master.yml
|
ansible.builtin.import_tasks: replication_master.yml
|
||||||
when: mariadb_replication_role == "master"
|
when: mariadb_replication_role == "master"
|
||||||
|
|
||||||
- name: include task replication_replica.yml
|
- name: Include task replication_replica.yml
|
||||||
import_tasks: replication_replica.yml
|
ansible.builtin.import_tasks: replication_replica.yml
|
||||||
when:
|
when:
|
||||||
- not ansible_check_mode
|
- not ansible_check_mode
|
||||||
- mariadb_replication_role == "replica"
|
- mariadb_replication_role == "replica"
|
||||||
|
|
||||||
- name: include task backup.yml
|
- name: Include task backup.yml
|
||||||
import_tasks: backup.yml
|
ansible.builtin.import_tasks: backup.yml
|
||||||
when: mariadb_backup_db
|
when: mariadb_backup_db
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
- name: Ensure replication user exists on master
|
- name: Ensure replication user exists on master
|
||||||
mysql_user:
|
community.mysql.mysql_user:
|
||||||
name: "{{ item.name }}"
|
name: "{{ item.name }}"
|
||||||
host: "{{ item.host | default('%') }}"
|
host: "{{ item.host | default('%') }}"
|
||||||
password: "{{ item.password }}"
|
password: "{{ item.password }}"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
- name: Ensure MariaDB users are present (or absent)
|
- name: Ensure MariaDB users are present (or absent)
|
||||||
mysql_user:
|
community.mysql.mysql_user:
|
||||||
name: "{{ item.name }}"
|
name: "{{ item.name }}"
|
||||||
host: "{{ item.host | default('localhost') }}"
|
host: "{{ item.host | default('localhost') }}"
|
||||||
password: "{{ item.password }}"
|
password: "{{ item.password }}"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue