Auto-fix yaml rules
In order to reduce divergance with ansible-lint rules, we apply auto-fixing of violations. In current patch we replace all kind of truthy variables with `true` or `false` values to align with recommendations along with alignment of used quotes. Change-Id: I5f7e27158a4bf8f4bf14d4a5e32cc9204441da02
This commit is contained in:
parent
77995baef7
commit
3add3ee734
1
.gitignore
vendored
1
.gitignore
vendored
@ -48,6 +48,7 @@ logs/*
|
|||||||
.tox
|
.tox
|
||||||
*.egg-info
|
*.egg-info
|
||||||
.eggs
|
.eggs
|
||||||
|
.ansible
|
||||||
|
|
||||||
# Generated by pbr while building docs
|
# Generated by pbr while building docs
|
||||||
######################################
|
######################################
|
||||||
|
@ -183,11 +183,11 @@ galera_init_overrides: {}
|
|||||||
|
|
||||||
# This is only applied if the ansible_facts['pkg_mgr'] is 'apt'
|
# This is only applied if the ansible_facts['pkg_mgr'] is 'apt'
|
||||||
galera_distro_package_pins:
|
galera_distro_package_pins:
|
||||||
- package: '*'
|
- package: "*"
|
||||||
release: MariaDB
|
release: MariaDB
|
||||||
priority: 999
|
priority: 999
|
||||||
- package: 'mariadb-*'
|
- package: "mariadb-*"
|
||||||
version: '1:{{ galera_major_version }}.{{ galera_minor_version }}*'
|
version: "1:{{ galera_major_version }}.{{ galera_minor_version }}*"
|
||||||
priority: 1001
|
priority: 1001
|
||||||
|
|
||||||
# Galera Server SSL functionality.
|
# Galera Server SSL functionality.
|
||||||
@ -197,7 +197,7 @@ galera_pki_dir: "{{ openstack_pki_dir | default('/etc/pki/galera-ca') }}"
|
|||||||
|
|
||||||
# Create a certificate authority if one does not already exist
|
# Create a certificate authority if one does not already exist
|
||||||
galera_pki_create_ca: "{{ openstack_pki_authorities is not defined | bool }}"
|
galera_pki_create_ca: "{{ openstack_pki_authorities is not defined | bool }}"
|
||||||
galera_pki_regen_ca: ''
|
galera_pki_regen_ca: ""
|
||||||
|
|
||||||
galera_pki_authorities:
|
galera_pki_authorities:
|
||||||
- name: "MariaDBRoot"
|
- name: "MariaDBRoot"
|
||||||
@ -241,7 +241,7 @@ galera_pki_intermediate_cert_path: >-
|
|||||||
{{
|
{{
|
||||||
galera_pki_dir ~ '/roots/' ~ galera_pki_intermediate_cert_name ~ '/certs/' ~ galera_pki_intermediate_cert_name ~ '.crt'
|
galera_pki_dir ~ '/roots/' ~ galera_pki_intermediate_cert_name ~ '/certs/' ~ galera_pki_intermediate_cert_name ~ '.crt'
|
||||||
}}
|
}}
|
||||||
galera_pki_regen_cert: ''
|
galera_pki_regen_cert: ""
|
||||||
galera_pki_certificates:
|
galera_pki_certificates:
|
||||||
- name: "galera_{{ ansible_facts['hostname'] }}"
|
- name: "galera_{{ ansible_facts['hostname'] }}"
|
||||||
provider: ownca
|
provider: ownca
|
||||||
@ -289,7 +289,6 @@ galera_pki_install_certificates:
|
|||||||
group: "root"
|
group: "root"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
|
|
||||||
|
|
||||||
# MariaDB 10.1+ ships with 'PrivateDevices=True' in the systemd unit file. This
|
# MariaDB 10.1+ ships with 'PrivateDevices=True' in the systemd unit file. This
|
||||||
# provides some additional security, but it causes problems with systemd 219.
|
# provides some additional security, but it causes problems with systemd 219.
|
||||||
# While the security enhancements are helpful on bare metal hosts with multiple
|
# While the security enhancements are helpful on bare metal hosts with multiple
|
||||||
@ -346,7 +345,7 @@ galera_mariadb_backups_user: galera_mariadb_backup
|
|||||||
galera_mariadb_backups_suffix: "{{ inventory_hostname }}"
|
galera_mariadb_backups_suffix: "{{ inventory_hostname }}"
|
||||||
galera_mariadb_backups_cnf_file: "/etc/mysql/mariabackup.cnf"
|
galera_mariadb_backups_cnf_file: "/etc/mysql/mariabackup.cnf"
|
||||||
galera_mariadb_backups_nodes: ["{{ galera_cluster_members[0] }}"]
|
galera_mariadb_backups_nodes: ["{{ galera_cluster_members[0] }}"]
|
||||||
galera_mariadb_backups_compress: False
|
galera_mariadb_backups_compress: false
|
||||||
galera_mariadb_backups_compressor: gzip
|
galera_mariadb_backups_compressor: gzip
|
||||||
|
|
||||||
galera_mariadb_encryption_enabled: false
|
galera_mariadb_encryption_enabled: false
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
service:
|
service:
|
||||||
name: "{{ galera_mariadb_service_name }}"
|
name: "{{ galera_mariadb_service_name }}"
|
||||||
state: stopped
|
state: stopped
|
||||||
enabled: yes
|
enabled: true
|
||||||
changed_when: true
|
changed_when: true
|
||||||
listen:
|
listen:
|
||||||
- Restart all mysql
|
- Restart all mysql
|
||||||
@ -78,7 +78,7 @@
|
|||||||
service:
|
service:
|
||||||
name: "{{ galera_mariadb_service_name }}"
|
name: "{{ galera_mariadb_service_name }}"
|
||||||
state: "{{ (not hostvars[item]['galera_cluster_ready'] | bool or galera_force_bootstrap | bool) | ternary('started', 'restarted') }}"
|
state: "{{ (not hostvars[item]['galera_cluster_ready'] | bool or galera_force_bootstrap | bool) | ternary('started', 'restarted') }}"
|
||||||
enabled: yes
|
enabled: true
|
||||||
environment:
|
environment:
|
||||||
MYSQLD_STARTUP_TIMEOUT: 180
|
MYSQLD_STARTUP_TIMEOUT: 180
|
||||||
register: galera_restart
|
register: galera_restart
|
||||||
|
@ -14,12 +14,12 @@ platforms:
|
|||||||
privileged: true
|
privileged: true
|
||||||
pre_build_image: true
|
pre_build_image: true
|
||||||
docker_networks:
|
docker_networks:
|
||||||
- name: 'galera'
|
- name: "galera"
|
||||||
ipam_config:
|
ipam_config:
|
||||||
- subnet: '10.1.0.0/24'
|
- subnet: "10.1.0.0/24"
|
||||||
networks:
|
networks:
|
||||||
- name: "galera"
|
- name: "galera"
|
||||||
ipv4_address: '10.1.0.2'
|
ipv4_address: "10.1.0.2"
|
||||||
- name: galera02
|
- name: galera02
|
||||||
groups:
|
groups:
|
||||||
- galera_all
|
- galera_all
|
||||||
@ -28,12 +28,12 @@ platforms:
|
|||||||
privileged: true
|
privileged: true
|
||||||
pre_build_image: true
|
pre_build_image: true
|
||||||
docker_networks:
|
docker_networks:
|
||||||
- name: 'galera'
|
- name: "galera"
|
||||||
ipam_config:
|
ipam_config:
|
||||||
- subnet: '10.1.0.0/24'
|
- subnet: "10.1.0.0/24"
|
||||||
networks:
|
networks:
|
||||||
- name: "galera"
|
- name: "galera"
|
||||||
ipv4_address: '10.1.0.3'
|
ipv4_address: "10.1.0.3"
|
||||||
- name: galera03
|
- name: galera03
|
||||||
groups:
|
groups:
|
||||||
- galera_all
|
- galera_all
|
||||||
@ -42,12 +42,12 @@ platforms:
|
|||||||
privileged: true
|
privileged: true
|
||||||
pre_build_image: true
|
pre_build_image: true
|
||||||
docker_networks:
|
docker_networks:
|
||||||
- name: 'galera'
|
- name: "galera"
|
||||||
ipam_config:
|
ipam_config:
|
||||||
- subnet: '10.1.0.0/24'
|
- subnet: "10.1.0.0/24"
|
||||||
networks:
|
networks:
|
||||||
- name: "galera"
|
- name: "galera"
|
||||||
ipv4_address: '10.1.0.4'
|
ipv4_address: "10.1.0.4"
|
||||||
provisioner:
|
provisioner:
|
||||||
name: ansible
|
name: ansible
|
||||||
inventory:
|
inventory:
|
||||||
|
@ -70,7 +70,7 @@
|
|||||||
|
|
||||||
- name: Update apt repositories when config is changed
|
- name: Update apt repositories when config is changed
|
||||||
apt:
|
apt:
|
||||||
update_cache: yes
|
update_cache: true
|
||||||
when: (apt_repo_removed is changed) or (deb822_repos is changed)
|
when: (apt_repo_removed is changed) or (deb822_repos is changed)
|
||||||
|
|
||||||
- name: Preseed galera password(s)
|
- name: Preseed galera password(s)
|
||||||
@ -80,14 +80,14 @@
|
|||||||
value: "{{ item.value }}"
|
value: "{{ item.value }}"
|
||||||
vtype: "{{ item.vtype }}"
|
vtype: "{{ item.vtype }}"
|
||||||
with_items: "{{ galera_debconf_items }}"
|
with_items: "{{ galera_debconf_items }}"
|
||||||
no_log: yes
|
no_log: true
|
||||||
|
|
||||||
- name: Install galera role remote packages (apt)
|
- name: Install galera role remote packages (apt)
|
||||||
apt:
|
apt:
|
||||||
name: "{{ galera_packages_list }}"
|
name: "{{ galera_packages_list }}"
|
||||||
state: "{{ galera_package_state }}"
|
state: "{{ galera_package_state }}"
|
||||||
policy_rc_d: 101
|
policy_rc_d: 101
|
||||||
update_cache: yes
|
update_cache: true
|
||||||
cache_valid_time: "{{ cache_timeout }}"
|
cache_valid_time: "{{ cache_timeout }}"
|
||||||
register: install_remote_apt_packages
|
register: install_remote_apt_packages
|
||||||
until: install_remote_apt_packages is success
|
until: install_remote_apt_packages is success
|
||||||
|
@ -43,9 +43,9 @@
|
|||||||
- name: Stat /etc/my.cnf.d
|
- name: Stat /etc/my.cnf.d
|
||||||
stat:
|
stat:
|
||||||
path: /etc/my.cnf.d
|
path: /etc/my.cnf.d
|
||||||
get_attributes: no
|
get_attributes: false
|
||||||
get_checksum: no
|
get_checksum: false
|
||||||
get_mime: no
|
get_mime: false
|
||||||
register: mycnfd_stat
|
register: mycnfd_stat
|
||||||
|
|
||||||
- name: Destroy my.cnf.d dir if is dir
|
- name: Destroy my.cnf.d dir if is dir
|
||||||
@ -70,7 +70,7 @@
|
|||||||
with_items:
|
with_items:
|
||||||
- path: "/etc/mysql"
|
- path: "/etc/mysql"
|
||||||
state: "directory"
|
state: "directory"
|
||||||
mode: '0755'
|
mode: "0755"
|
||||||
- path: "/etc/mysql/conf.d"
|
- path: "/etc/mysql/conf.d"
|
||||||
state: "directory"
|
state: "directory"
|
||||||
- src: "/usr/lib64/galera"
|
- src: "/usr/lib64/galera"
|
||||||
@ -90,7 +90,7 @@
|
|||||||
copy:
|
copy:
|
||||||
src: "gpg/{{ item.key | basename }}"
|
src: "gpg/{{ item.key | basename }}"
|
||||||
dest: "{{ item.key }}"
|
dest: "{{ item.key }}"
|
||||||
mode: '0644'
|
mode: "0644"
|
||||||
with_items: "{{ galera_gpg_keys }}"
|
with_items: "{{ galera_gpg_keys }}"
|
||||||
when:
|
when:
|
||||||
- galera_install_method == 'external_repo'
|
- galera_install_method == 'external_repo'
|
||||||
@ -101,8 +101,8 @@
|
|||||||
description: "{{ galera_repo.description }}"
|
description: "{{ galera_repo.description }}"
|
||||||
baseurl: "{{ galera_repo.baseurl }}"
|
baseurl: "{{ galera_repo.baseurl }}"
|
||||||
gpgkey: "{{ galera_repo.gpgkey | default(omit) }}"
|
gpgkey: "{{ galera_repo.gpgkey | default(omit) }}"
|
||||||
gpgcheck: yes
|
gpgcheck: true
|
||||||
enabled: yes
|
enabled: true
|
||||||
module_hotfixes: true
|
module_hotfixes: true
|
||||||
priority: 25
|
priority: 25
|
||||||
state: "{{ galera_repo.state | default(omit) }}"
|
state: "{{ galera_repo.state | default(omit) }}"
|
||||||
|
@ -42,10 +42,10 @@
|
|||||||
--defaults-file={{ galera_mariadb_backups_cnf_file }}
|
--defaults-file={{ galera_mariadb_backups_cnf_file }}
|
||||||
--compress={{ galera_mariadb_backups_compress }} --compressor={{ galera_mariadb_backups_compressor }}
|
--compress={{ galera_mariadb_backups_compress }} --compressor={{ galera_mariadb_backups_compressor }}
|
||||||
environment:
|
environment:
|
||||||
UMASK: '0640'
|
UMASK: "0640"
|
||||||
UMASK_DIR: '0750'
|
UMASK_DIR: "0750"
|
||||||
program_sandboxing:
|
program_sandboxing:
|
||||||
RuntimeDirectory: 'mariabackup-galera'
|
RuntimeDirectory: "mariabackup-galera"
|
||||||
timer:
|
timer:
|
||||||
state: "started"
|
state: "started"
|
||||||
options:
|
options:
|
||||||
@ -71,10 +71,10 @@
|
|||||||
--defaults-file={{ galera_mariadb_backups_cnf_file }}
|
--defaults-file={{ galera_mariadb_backups_cnf_file }}
|
||||||
--compress={{ galera_mariadb_backups_compress }} --compressor={{ galera_mariadb_backups_compressor }}
|
--compress={{ galera_mariadb_backups_compress }} --compressor={{ galera_mariadb_backups_compressor }}
|
||||||
environment:
|
environment:
|
||||||
UMASK: '0640'
|
UMASK: "0640"
|
||||||
UMASK_DIR: '0750'
|
UMASK_DIR: "0750"
|
||||||
program_sandboxing:
|
program_sandboxing:
|
||||||
RuntimeDirectory: 'mariabackup-galera'
|
RuntimeDirectory: "mariabackup-galera"
|
||||||
timer:
|
timer:
|
||||||
state: "started"
|
state: "started"
|
||||||
options:
|
options:
|
||||||
@ -93,7 +93,7 @@
|
|||||||
password: "{{ galera_mariadb_backups_password }}"
|
password: "{{ galera_mariadb_backups_password }}"
|
||||||
host: "%"
|
host: "%"
|
||||||
priv: "*.*:RELOAD,PROCESS,LOCK TABLES,REPLICATION CLIENT"
|
priv: "*.*:RELOAD,PROCESS,LOCK TABLES,REPLICATION CLIENT"
|
||||||
append_privs: yes
|
append_privs: true
|
||||||
login_unix_socket: "{{ galera_unix_socket }}"
|
login_unix_socket: "{{ galera_unix_socket }}"
|
||||||
check_hostname: false
|
check_hostname: false
|
||||||
no_log: true
|
no_log: true
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
mode: "{{ item.mode | default('0644') }}"
|
mode: "{{ item.mode | default('0644') }}"
|
||||||
config_overrides: "{{ item.config_overrides }}"
|
config_overrides: "{{ item.config_overrides }}"
|
||||||
config_type: "{{ item.config_type }}"
|
config_type: "{{ item.config_type }}"
|
||||||
ignore_none_type: False
|
ignore_none_type: false
|
||||||
when: item.condition | default(True)
|
when: item.condition | default(True)
|
||||||
with_items:
|
with_items:
|
||||||
- src: encryption.cnf.j2
|
- src: encryption.cnf.j2
|
||||||
@ -54,7 +54,7 @@
|
|||||||
delegate_to: "localhost"
|
delegate_to: "localhost"
|
||||||
run_once: true
|
run_once: true
|
||||||
|
|
||||||
- name: Create encryption keys if the user does not specify them and put them on the deploy host # noqa: no-changed-when risky-shell-pipe
|
- name: Create encryption keys if the user does not specify them and put them on the deploy host # noqa: no-changed-when risky-shell-pipe
|
||||||
shell: "for i in {1..2}; do echo \"$i;$(openssl rand -hex 32)\"; done | tee {{ galera_db_encryption_tmp_dir }}/mysql_encryption_keys > /dev/null"
|
shell: "for i in {1..2}; do echo \"$i;$(openssl rand -hex 32)\"; done | tee {{ galera_db_encryption_tmp_dir }}/mysql_encryption_keys > /dev/null"
|
||||||
delegate_to: "localhost"
|
delegate_to: "localhost"
|
||||||
run_once: true
|
run_once: true
|
||||||
@ -92,7 +92,7 @@
|
|||||||
owner: mysql
|
owner: mysql
|
||||||
group: mysql
|
group: mysql
|
||||||
mode: "0600"
|
mode: "0600"
|
||||||
force: false # only copy the file if it does not exist
|
force: false # only copy the file if it does not exist
|
||||||
notify: Restart all mysql
|
notify: Restart all mysql
|
||||||
|
|
||||||
- name: Copy password to file to servers
|
- name: Copy password to file to servers
|
||||||
|
@ -20,13 +20,13 @@
|
|||||||
systemd_tempd_prefix: openstack
|
systemd_tempd_prefix: openstack
|
||||||
systemd_services:
|
systemd_services:
|
||||||
- service_name: "{{ galera_mariadb_service_name }}"
|
- service_name: "{{ galera_mariadb_service_name }}"
|
||||||
systemd_overrides_only: True
|
systemd_overrides_only: true
|
||||||
systemd_overrides: "{{ galera_init_defaults | combine(galera_init_overrides, recursive=True) }}"
|
systemd_overrides: "{{ galera_init_defaults | combine(galera_init_overrides, recursive=True) }}"
|
||||||
- service_name: "mariadbcheck@"
|
- service_name: "mariadbcheck@"
|
||||||
service_type: "oneshot"
|
service_type: "oneshot"
|
||||||
execstarts: "-/usr/local/bin/clustercheck"
|
execstarts: "-/usr/local/bin/clustercheck"
|
||||||
enabled: False
|
enabled: false
|
||||||
load: False
|
load: false
|
||||||
standard_output: "socket"
|
standard_output: "socket"
|
||||||
after_targets: []
|
after_targets: []
|
||||||
sockets:
|
sockets:
|
||||||
@ -116,7 +116,7 @@
|
|||||||
mode: "{{ item.mode | default('0644') }}"
|
mode: "{{ item.mode | default('0644') }}"
|
||||||
config_overrides: "{{ item.config_overrides }}"
|
config_overrides: "{{ item.config_overrides }}"
|
||||||
config_type: "{{ item.config_type }}"
|
config_type: "{{ item.config_type }}"
|
||||||
ignore_none_type: False
|
ignore_none_type: false
|
||||||
when: item.condition | default(True)
|
when: item.condition | default(True)
|
||||||
with_items:
|
with_items:
|
||||||
- src: my.cnf.j2
|
- src: my.cnf.j2
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
command: /usr/bin/mariadb-upgrade --check-if-upgrade-is-needed
|
command: /usr/bin/mariadb-upgrade --check-if-upgrade-is-needed
|
||||||
register: galera_upgrade_check
|
register: galera_upgrade_check
|
||||||
failed_when: galera_upgrade_check.rc == 0
|
failed_when: galera_upgrade_check.rc == 0
|
||||||
changed_when: False
|
changed_when: false
|
||||||
rescue:
|
rescue:
|
||||||
- name: Run MySQL Upgrade
|
- name: Run MySQL Upgrade
|
||||||
command: /usr/bin/mariadb-upgrade
|
command: /usr/bin/mariadb-upgrade
|
||||||
@ -46,4 +46,4 @@
|
|||||||
until: galera_users is success
|
until: galera_users is success
|
||||||
retries: 3
|
retries: 3
|
||||||
delay: 10
|
delay: 10
|
||||||
no_log: True
|
no_log: true
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
cache_timeout: 600
|
cache_timeout: 600
|
||||||
|
|
||||||
# Default private device setting
|
# Default private device setting
|
||||||
_galera_disable_privatedevices: yes
|
_galera_disable_privatedevices: true
|
||||||
|
|
||||||
galera_server_required_distro_packages:
|
galera_server_required_distro_packages:
|
||||||
- apt-transport-https
|
- apt-transport-https
|
||||||
@ -49,7 +49,7 @@ _galera_architecture_mapping:
|
|||||||
# the preseed task and the service startup control used when installing
|
# the preseed task and the service startup control used when installing
|
||||||
# mariadb-galera-server and galera.
|
# mariadb-galera-server and galera.
|
||||||
galera_server_mariadb_distro_packages:
|
galera_server_mariadb_distro_packages:
|
||||||
- findutils # "find" is used by wsrep_sst_mariabackup script
|
- findutils # "find" is used by wsrep_sst_mariabackup script
|
||||||
- libmariadb-dev
|
- libmariadb-dev
|
||||||
- mariadb-client
|
- mariadb-client
|
||||||
- mariadb-backup
|
- mariadb-backup
|
||||||
|
@ -12,8 +12,6 @@
|
|||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
|
||||||
galera_init_defaults:
|
galera_init_defaults:
|
||||||
Service:
|
Service:
|
||||||
LimitNOFILE: "{{ galera_file_limits }}"
|
LimitNOFILE: "{{ galera_file_limits }}"
|
||||||
@ -40,12 +38,12 @@ _galera_base_users:
|
|||||||
priv: "*.*:ALL,GRANT"
|
priv: "*.*:ALL,GRANT"
|
||||||
state: present
|
state: present
|
||||||
- name: "{{ galera_monitoring_user }}"
|
- name: "{{ galera_monitoring_user }}"
|
||||||
host: '%'
|
host: "%"
|
||||||
password: "{{ galera_monitoring_user_password }}"
|
password: "{{ galera_monitoring_user_password }}"
|
||||||
priv: "*.*:USAGE"
|
priv: "*.*:USAGE"
|
||||||
state: present
|
state: present
|
||||||
- name: "{{ galera_monitoring_user }}"
|
- name: "{{ galera_monitoring_user }}"
|
||||||
host: 'localhost'
|
host: "localhost"
|
||||||
password: "{{ galera_monitoring_user_password }}"
|
password: "{{ galera_monitoring_user_password }}"
|
||||||
priv: "*.*:USAGE"
|
priv: "*.*:USAGE"
|
||||||
state: present
|
state: present
|
||||||
|
@ -22,10 +22,10 @@ _galera_gpg_keys:
|
|||||||
# This provides some additional security, but it causes problems with creating
|
# This provides some additional security, but it causes problems with creating
|
||||||
# mount namespaces on CentOS 7 with systemd 219. Setting the following variable
|
# mount namespaces on CentOS 7 with systemd 219. Setting the following variable
|
||||||
# to 'yes' will disable the PrivateDevices
|
# to 'yes' will disable the PrivateDevices
|
||||||
_galera_disable_privatedevices: yes
|
_galera_disable_privatedevices: true
|
||||||
|
|
||||||
galera_server_required_distro_packages:
|
galera_server_required_distro_packages:
|
||||||
- findutils # "find" is used by wsrep_sst_mariabackup script
|
- findutils # "find" is used by wsrep_sst_mariabackup script
|
||||||
- gnupg2
|
- gnupg2
|
||||||
- libaio
|
- libaio
|
||||||
- libstdc++
|
- libstdc++
|
||||||
|
Loading…
x
Reference in New Issue
Block a user