Merge pull request #764 from ceph/systemd

Several fixes
pull/765/head
Leseb 2016-05-09 01:00:02 +02:00
commit 1b8d021ef0
5 changed files with 16 additions and 17 deletions

View File

@ -314,6 +314,7 @@ dummy:
## MDS options
#
#mds_use_fqdn: false # if set to true, the MDS name used will be the fqdn in the ceph.conf
#mds_name: "{{ ansible_hostname }}"
## Rados Gateway options
#
@ -392,3 +393,4 @@ dummy:
# by ceph.conf.j2 template. so it should always be defined
#mon_containerized_deployment_with_kv: false

View File

@ -14,4 +14,3 @@ dummy:
#pypy_binary_directory: /opt/bin
#pip_url: https://bootstrap.pypa.io/get-pip.py
#local_temp_directory: /tmp

View File

@ -61,3 +61,12 @@
- set_fact:
is_kraken={{ ceph_version | version_compare('11.0.0', '>=') and ceph_version | version_compare('12.0.0', '<') }}
- set_fact:
mds_name: "{{ ansible_hostname }}"
when: not mds_use_fqdn
- set_fact:
mds_name: "{{ ansible_fqdn }}"
when: mds_use_fqdn

View File

@ -1,12 +1,4 @@
---
- set_fact:
mds_name: "{{ ansible_hostname }}"
when: not mds_use_fqdn
- set_fact:
mds_name: "{{ ansible_fqdn }}"
when: mds_use_fqdn
- name: create bootstrap-mds directory
file:
path: /var/lib/ceph/bootstrap-mds/
@ -76,7 +68,7 @@
- done
- sysvinit
changed_when: false
when: use_systemd
when: not use_systemd
- name: enable systemd unit file for mds instance (for or after infernalis)
file:
@ -103,7 +95,7 @@
args: mds.{{ mds_name }}
changed_when: false
when:
use_systemd and
not use_systemd and
is_before_infernalis
- name: start and add that the metadata service to the init sequence (systemd after hammer)

View File

@ -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