2018-03-23 11:24:56 +08:00
|
|
|
---
|
2019-07-04 22:10:00 +08:00
|
|
|
- name: create rbd target log directories
|
|
|
|
file:
|
|
|
|
path: '/var/log/{{ item }}'
|
|
|
|
state: directory
|
|
|
|
with_items:
|
|
|
|
- rbd-target-api
|
|
|
|
- rbd-target-gw
|
|
|
|
|
2018-03-23 11:24:56 +08:00
|
|
|
- name: generate systemd unit files for tcmu-runner, rbd-target-api and rbd-target-gw
|
|
|
|
template:
|
|
|
|
src: "{{ role_path }}/templates/{{ item }}.service.j2"
|
|
|
|
dest: /etc/systemd/system/{{ item }}.service
|
|
|
|
owner: "root"
|
|
|
|
group: "root"
|
|
|
|
mode: "0644"
|
|
|
|
with_items:
|
|
|
|
- tcmu-runner
|
|
|
|
- rbd-target-gw
|
|
|
|
- rbd-target-api
|
2019-04-01 23:46:15 +08:00
|
|
|
notify: restart ceph {{ item }}
|
2018-03-23 11:24:56 +08:00
|
|
|
|
|
|
|
- name: systemd start tcmu-runner, rbd-target-api and rbd-target-gw containers
|
|
|
|
systemd:
|
|
|
|
name: "{{ item }}"
|
|
|
|
state: started
|
|
|
|
enabled: yes
|
2019-03-20 18:35:36 +08:00
|
|
|
masked: no
|
2018-03-23 11:24:56 +08:00
|
|
|
daemon_reload: yes
|
|
|
|
with_items:
|
|
|
|
- tcmu-runner
|
|
|
|
- rbd-target-gw
|
|
|
|
- rbd-target-api
|