2015-01-21 01:43:47 +08:00
|
|
|
---
|
2017-07-05 21:47:48 +08:00
|
|
|
- name: ensure systemd service override directory exists
|
|
|
|
file:
|
|
|
|
state: directory
|
2017-10-23 21:07:23 +08:00
|
|
|
path: "/etc/systemd/system/ceph-radosgw@.service.d/"
|
2019-04-01 23:46:15 +08:00
|
|
|
when: ceph_rgw_systemd_overrides is defined
|
2017-07-05 21:47:48 +08:00
|
|
|
|
|
|
|
- name: add ceph-rgw systemd service overrides
|
|
|
|
config_template:
|
|
|
|
src: "ceph-rgw.service.d-overrides.j2"
|
2017-08-30 00:24:52 +08:00
|
|
|
dest: "/etc/systemd/system/ceph-radosgw@.service.d/ceph-radosgw-systemd-overrides.conf"
|
2017-07-05 21:47:48 +08:00
|
|
|
config_overrides: "{{ ceph_rgw_systemd_overrides | default({}) }}"
|
|
|
|
config_type: "ini"
|
2019-04-01 23:46:15 +08:00
|
|
|
when: ceph_rgw_systemd_overrides is defined
|
2017-07-05 21:47:48 +08:00
|
|
|
|
2018-11-09 08:56:57 +08:00
|
|
|
- name: start rgw instance
|
2015-11-21 05:34:29 +08:00
|
|
|
service:
|
2018-11-09 08:56:57 +08:00
|
|
|
name: ceph-radosgw@rgw.{{ ansible_hostname }}.{{ item.instance_name }}
|
2015-11-21 05:34:29 +08:00
|
|
|
state: started
|
|
|
|
enabled: yes
|
2019-03-20 18:35:36 +08:00
|
|
|
masked: no
|
2018-11-09 08:56:57 +08:00
|
|
|
with_items: "{{ rgw_instances }}"
|
2021-01-15 00:52:39 +08:00
|
|
|
when:
|
|
|
|
- not rgw_multisite | bool or
|
|
|
|
((rgw_multisite | bool and item.rgw_zonesecondary | default(rgw_zonesecondary) | bool and deploy_secondary_zones | default(True)) or
|
|
|
|
(rgw_multisite | bool and item.rgw_zonemaster | default(rgw_zonemaster)))
|
2018-08-29 18:56:16 +08:00
|
|
|
|
|
|
|
- name: enable the ceph-radosgw.target service
|
|
|
|
systemd:
|
|
|
|
name: ceph-radosgw.target
|
|
|
|
enabled: yes
|
|
|
|
masked: no
|