]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph-mon: fix monitor startup
authorSébastien Han <seb@redhat.com>
Sun, 8 May 2016 22:41:44 +0000 (00:41 +0200)
committerAndrew Schoen <aschoen@redhat.com>
Tue, 10 May 2016 19:21:50 +0000 (14:21 -0500)
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 <seb@redhat.com>
(cherry picked from commit c8e5e495524d515afa432b75fa06e7cb4032180e)

roles/ceph-mon/tasks/start_monitor.yml

index 4383e072abe5bc7448cddb739abfd78985862922..234d141d9aa2981988e6afba017084f39091ae63 100644 (file)
     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