1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 11:42:08 +00:00

lineinfile v0.1: TimeoutStartSec=180 for mariadb.service

This commit is contained in:
A Holt 2019-07-03 10:45:11 -04:00 committed by GitHub
parent b2fc20f89b
commit f480a0a4c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -59,10 +59,18 @@
tags: tags:
- download - download
### lineinfile to add 'TimeoutStartSec=180' to /lib/systemd/system/mariadb.service here - name: Check if /lib/systemd/system/mariadb.service exists
# - if file exists! stat:
# - avoid adding it repeatedly! path: /lib/systemd/system/mariadb.service
# - daemon_reload below... register: mariadb_unit_file
- name: Set systemd boot timeout to 180 seconds for slow machines, if TimeoutStartSec not already set in /lib/systemd/system/mariadb.service
lineinfile:
path: /lib/systemd/system/mariadb.service
insertafter: '[Service]'
regexp: TimeoutStartSec
line: '\n# 2019-07-03: @jvonau @holta doubled the default boot timeout from 90s to 180s\n# for slow machines like this Ubuntu 18.04.2 VM:\n# https://github.com/iiab/iiab/issues/1802\n# https://mariadb.com/kb/en/library/what-to-do-if-mariadb-doesnt-start/#systemd\nTimeoutStartSec=180'
when: mariadb_unit_file.stat.exists
# Name of MySQL service varies by OS, so hardcoded in /opt/iiab/iiab/vars/<OS>.yml (formerly in roles/0-init/tasks/main.yml) # Name of MySQL service varies by OS, so hardcoded in /opt/iiab/iiab/vars/<OS>.yml (formerly in roles/0-init/tasks/main.yml)
- name: Enable & Start MySQL systemd service ({{ mysql_service }}) if mysql_enabled - name: Enable & Start MySQL systemd service ({{ mysql_service }}) if mysql_enabled