Use ansible_service_mgr fact
This patch removes some extra tasks for detecting systemd and uses the `ansible_service_mgr` fact instead. Partial-Bug: #1640125 Change-Id: I1a30b79a759057afb74f24f2239f474b60c1db35
This commit is contained in:
parent
909fe09ef5
commit
714b846aad
@ -16,7 +16,7 @@
|
|||||||
- name: Reload the systemd daemon
|
- name: Reload the systemd daemon
|
||||||
command: "systemctl daemon-reload"
|
command: "systemctl daemon-reload"
|
||||||
when:
|
when:
|
||||||
- pid1_name == "systemd"
|
- ansible_service_mgr == 'systemd'
|
||||||
|
|
||||||
- name: Restart mysql
|
- name: Restart mysql
|
||||||
service:
|
service:
|
||||||
|
@ -88,7 +88,7 @@
|
|||||||
src: "upstart.limits.conf.j2"
|
src: "upstart.limits.conf.j2"
|
||||||
dest: "/etc/security/limits.conf"
|
dest: "/etc/security/limits.conf"
|
||||||
when:
|
when:
|
||||||
- pid1_name != "systemd"
|
- ansible_service_mgr == 'systemd'
|
||||||
notify:
|
notify:
|
||||||
- Restart mysql
|
- Restart mysql
|
||||||
tags:
|
tags:
|
||||||
@ -102,7 +102,7 @@
|
|||||||
owner: "root"
|
owner: "root"
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
when:
|
when:
|
||||||
- pid1_name == "systemd"
|
- ansible_service_mgr == 'systemd'
|
||||||
|
|
||||||
- name: Apply resource limits (systemd)
|
- name: Apply resource limits (systemd)
|
||||||
template:
|
template:
|
||||||
@ -110,7 +110,7 @@
|
|||||||
dest: "/etc/systemd/system/mariadb.service.d/limits.conf"
|
dest: "/etc/systemd/system/mariadb.service.d/limits.conf"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
when:
|
when:
|
||||||
- pid1_name == "systemd"
|
- ansible_service_mgr == 'systemd'
|
||||||
notify:
|
notify:
|
||||||
- Reload the systemd daemon
|
- Reload the systemd daemon
|
||||||
- Restart mysql
|
- Restart mysql
|
||||||
|
@ -36,19 +36,6 @@
|
|||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
- name: Check init system
|
|
||||||
command: cat /proc/1/comm
|
|
||||||
changed_when: false
|
|
||||||
register: _pid1_name
|
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: Set the name of pid1
|
|
||||||
set_fact:
|
|
||||||
pid1_name: "{{ _pid1_name.stdout }}"
|
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- include: galera_upgrade_check.yml
|
- include: galera_upgrade_check.yml
|
||||||
- include: galera_cluster_state.yml
|
- include: galera_cluster_state.yml
|
||||||
- include: galera_pre_install.yml
|
- include: galera_pre_install.yml
|
||||||
|
Loading…
x
Reference in New Issue
Block a user