From c8e5e495524d515afa432b75fa06e7cb4032180e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Mon, 9 May 2016 00:41:44 +0200 Subject: [PATCH] ceph-mon: fix monitor startup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Somehow on CentOS 7.2 with Jewel, the service enablement by the Ansible service module does not seem to work properly. Signed-off-by: Sébastien Han --- roles/ceph-mon/tasks/start_monitor.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/roles/ceph-mon/tasks/start_monitor.yml b/roles/ceph-mon/tasks/start_monitor.yml index 7cd13de16..5aca68409 100644 --- a/roles/ceph-mon/tasks/start_monitor.yml +++ b/roles/ceph-mon/tasks/start_monitor.yml @@ -27,18 +27,15 @@ ansible_distribution != "Ubuntu" and is_before_infernalis -- name: enable systemd unit file for mon instance (for or after infernalis) - file: - src: /usr/lib/systemd/system/ceph-mon@.service - dest: /etc/systemd/system/multi-user.target.wants/ceph-mon@{{ monitor_name }}.service - state: link +- name: start and add that the monitor service to the init sequence (for or after infernalis) + command: systemctl enable ceph-mon@{{ monitor_name }} changed_when: false failed_when: false when: use_systemd and is_after_hammer -- name: start and add that the monitor service to the init sequence (for or after infernalis) +- name: start the monitor service (for or after infernalis) service: name: ceph-mon@{{ monitor_name }} state: started