From ef4622bf8c8678268da916dcf14e91448159c190 Mon Sep 17 00:00:00 2001 From: A Holt Date: Wed, 3 Jul 2019 14:36:42 -0400 Subject: [PATCH] Longer explanation restored, injected by lineinfile into mariadb.service each time, re: MariaDB's 180s timeout for slow boots --- roles/mysql/tasks/main.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/roles/mysql/tasks/main.yml b/roles/mysql/tasks/main.yml index 7f117b6be..85518e106 100644 --- a/roles/mysql/tasks/main.yml +++ b/roles/mysql/tasks/main.yml @@ -106,11 +106,13 @@ path: /etc/systemd/system/mariadb.service insertafter: '^\[Service\]$' regexp: "^TimeoutStartSec=" - line: "TimeoutStartSec=180" - # LINE BELOW WOULD BE NICE...BUT ANSIBLE POLLUTES EACH TIME :( - # Hence Ansible's 'blockinfile', but this pollutes config files in its own - # way. Still, it might be nec in future, so config files are *READABLE* ! - #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" + line: "\n# 2019-07-03: @jvonau @holta doubled MariaDB's default boot timeout 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\n" + # If the line above were to be run repeatedly (never happens here!) Ansible + # would pollute MariaDB's systemd unit file. As multi-line regexp's are + # not allowed (both regexp's should match, for idempotency). If nec, use + # the 1-liner below, or Ansible's 'blockinfile' which pollutes config files + # in its own way...surrounding blocks with marker lines. + # line: "TimeoutStartSec=180" when: mariadb_unit_file.stat.exists