mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Copy /lib/systemd/system/mariadb.service to /etc/systemd/system/ then customize; revise 2 symlinks
This commit is contained in:
parent
89d091cbbb
commit
a5eba7eb8d
1 changed files with 30 additions and 7 deletions
|
@ -59,19 +59,42 @@
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
|
|
||||||
- name: Check if /lib/systemd/system/mariadb.service exists
|
|
||||||
stat:
|
|
||||||
path: /lib/systemd/system/mariadb.service
|
|
||||||
register: mariadb_unit_file
|
|
||||||
|
|
||||||
# 2019-07-03: @jvonau @holta doubled the default boot timeout from 90s to 180s
|
# 2019-07-03: @jvonau @holta doubled the default boot timeout from 90s to 180s
|
||||||
# for slow machines like this Ubuntu 18.04.2 VM:
|
# for slow machines like this Ubuntu 18.04.2 VM:
|
||||||
# https://github.com/iiab/iiab/issues/1802
|
# https://github.com/iiab/iiab/issues/1802
|
||||||
# https://mariadb.com/kb/en/library/what-to-do-if-mariadb-doesnt-start/#systemd
|
# https://mariadb.com/kb/en/library/what-to-do-if-mariadb-doesnt-start/#systemd
|
||||||
|
|
||||||
- name: Set systemd boot timeout to 180 seconds for slow machines, in /lib/systemd/system/mariadb.service
|
- name: Check if /lib/systemd/system/mariadb.service exists
|
||||||
lineinfile:
|
stat:
|
||||||
path: /lib/systemd/system/mariadb.service
|
path: /lib/systemd/system/mariadb.service
|
||||||
|
register: mariadb_unit_file
|
||||||
|
|
||||||
|
- name: Copy pkg's /lib/systemd/system/mariadb.service to /etc/systemd/system/ to be customized
|
||||||
|
copy:
|
||||||
|
force: yes
|
||||||
|
src: /lib/systemd/system/mariadb.service
|
||||||
|
dest: /etc/systemd/system/
|
||||||
|
when: mariadb_unit_file.stat.exists
|
||||||
|
|
||||||
|
- name: Symlink /etc/systemd/system/mysql.service -> /etc/systemd/system/mariadb.service
|
||||||
|
file:
|
||||||
|
state: link
|
||||||
|
force: yes
|
||||||
|
src: /etc/systemd/system/mariadb.service
|
||||||
|
path: /etc/systemd/system/mysql.service
|
||||||
|
when: mariadb_unit_file.stat.exists
|
||||||
|
|
||||||
|
- name: Symlink /etc/systemd/system/mysqld.service -> /etc/systemd/system/mariadb.service
|
||||||
|
file:
|
||||||
|
state: link
|
||||||
|
force: yes
|
||||||
|
src: /etc/systemd/system/mariadb.service
|
||||||
|
path: /etc/systemd/system/mysqld.service
|
||||||
|
when: mariadb_unit_file.stat.exists
|
||||||
|
|
||||||
|
- name: Set systemd boot timeout to 180 seconds for slow machines, in /etc/systemd/system/mariadb.service
|
||||||
|
lineinfile:
|
||||||
|
path: /etc/systemd/system/mariadb.service
|
||||||
insertafter: '^\[Service\]$'
|
insertafter: '^\[Service\]$'
|
||||||
regexp: '^TimeoutStartSec='
|
regexp: '^TimeoutStartSec='
|
||||||
line: "TimeoutStartSec=180"
|
line: "TimeoutStartSec=180"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue