ceph-handler: remove iscsigws restart scripts

The iscsigws restart scripts for tcmu-runner and rbd-target-{api,gw}
services only call the systemctl restart command.
We don't really need to copy a shell script to do it when we can use
the ansible service module instead.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit cbe79428e6)
pull/5596/head
Dimitri Savineau 2020-07-21 15:22:26 -04:00 committed by Dimitri Savineau
parent d408c75d76
commit cce042c65b
5 changed files with 9 additions and 36 deletions

View File

@ -3,16 +3,10 @@
set_fact:
_rbd_target_api_handler_called: True
- name: copy rbd-target-api restart script
template:
src: restart_rbd_target_api.sh.j2
dest: /tmp/restart_rbd_target_api.sh
owner: root
group: root
mode: 0750
- name: restart rbd-target-api
command: /usr/bin/env bash /tmp/restart_rbd_target_api.sh
service:
name: rbd-target-api
state: restarted
when:
- ceph_rbd_target_api_stat.get('rc') == 0
- hostvars[item]['_rbd_target_api_handler_called'] | default(False) | bool
@ -29,16 +23,10 @@
set_fact:
_rbd_target_gw_handler_called: True
- name: copy rbd-target-gw restart script
template:
src: restart_rbd_target_gw.sh.j2
dest: /tmp/restart_rbd_target_gw.sh
owner: root
group: root
mode: 0750
- name: restart rbd-target-gw
command: /usr/bin/env bash /tmp/restart_rbd_target_gw.sh
service:
name: rbd-target-gw
state: restarted
when:
- ceph_rbd_target_gw_stat.get('rc') == 0
- hostvars[item]['_rbd_target_gw_handler_called'] | default(False) | bool

View File

@ -3,16 +3,10 @@
set_fact:
_tcmu_runner_handler_called: True
- name: copy tcmu-runner restart script
template:
src: restart_tcmu_runner.sh.j2
dest: /tmp/restart_tcmu_runner.sh
owner: root
group: root
mode: 0750
- name: restart tcmu-runner
command: /usr/bin/env bash /tmp/restart_tcmu_runner.sh
service:
name: tcmu-runner
state: restarted
when:
- ceph_tcmu_runner_stat.get('rc') == 0
- hostvars[item]['_tcmu_runner_handler_called'] | default(False) | bool

View File

@ -1,3 +0,0 @@
#!/bin/bash
systemctl restart rbd-target-api

View File

@ -1,3 +0,0 @@
#!/bin/bash
systemctl restart rbd-target-gw

View File

@ -1,3 +0,0 @@
#!/bin/bash
systemctl restart tcmu-runner