Merge pull request #1313 from ceph/docker-systemd-units

docker: homogenise systemd file location
pull/1316/head
Sébastien Han 2017-02-16 20:02:13 +01:00 committed by GitHub
commit 95bece97e5
3 changed files with 12 additions and 32 deletions

View File

@ -1,27 +1,20 @@
---
# Use systemd to manage container on Atomic host
- name: generate systemd unit file
become: true
template:
src: "{{ role_path }}/templates/ceph-mds.service.j2"
dest: /var/lib/ceph/ceph-mds@.service
dest: /etc/systemd/system/ceph-mds@.service
owner: "root"
group: "root"
mode: "0644"
- name: link systemd unit file for mds instance
file:
src: /var/lib/ceph/ceph-mds@.service
dest: /etc/systemd/system/multi-user.target.wants/ceph-mds@{{ ansible_hostname }}.service
state: link
- name: enable systemd unit file for mds instance
command: systemctl enable /etc/systemd/system/multi-user.target.wants/ceph-mds@{{ ansible_hostname }}.service
shell: systemctl enable ceph-mds@{{ ansible_hostname }}.service
failed_when: false
changed_when: false
- name: reload systemd unit files
command: systemctl daemon-reload
shell: systemctl daemon-reload
changed_when: false
failed_when: false

View File

@ -1,22 +1,15 @@
---
# Use systemd to manage container on Atomic host and CoreOS
- name: generate systemd unit file
become: true
template:
src: "{{ playbook_dir }}/roles/ceph-nfs/templates/ceph-nfs.service.j2"
dest: /var/lib/nfs/ganesha/ceph-nfs@.service
src: "{{ role_path }}/templates/ceph-nfs.service.j2"
dest: /etc/systemd/system/ceph-nfs@.service
owner: "root"
group: "root"
mode: "0644"
- name: link systemd unit file for NFS instance
file:
src: /var/lib/nfs/ganesha/ceph-nfs@.service
dest: /etc/systemd/system/multi-user.target.wants/ceph-nfs@{{ ansible_hostname }}.service
state: link
- name: enable systemd unit file for NFS instance
shell: systemctl enable /etc/systemd/system/multi-user.target.wants/ceph-nfs@{{ ansible_hostname }}.service
- name: enable systemd unit file for nfs instance
shell: systemctl enable ceph-nfs@{{ ansible_hostname }}.service
failed_when: false
changed_when: false
@ -25,7 +18,7 @@
changed_when: false
failed_when: false
- name: systemd start NFS container
- name: systemd start nfs container
service:
name: ceph-nfs@{{ ansible_hostname }}
state: started
@ -36,3 +29,4 @@
wait_for:
path: "/etc/ceph/{{ cluster }}.conf"
when: is_atomic

View File

@ -1,22 +1,15 @@
---
# Use systemd to manage container on Atomic host
- name: generate systemd unit file
become: true
template:
src: "{{ playbook_dir }}/roles/ceph-rgw/templates/ceph-rgw.service.j2"
dest: /var/lib/ceph/ceph-rgw@.service
src: "{{ role_path }}/templates/ceph-rgw.service.j2"
dest: /etc/systemd/system/ceph-rgw@.service
owner: "root"
group: "root"
mode: "0644"
- name: link systemd unit file for rgw instance
file:
src: /var/lib/ceph/ceph-rgw@.service
dest: /etc/systemd/system/multi-user.target.wants/ceph-rgw@{{ ansible_hostname }}.service
state: link
- name: enable systemd unit file for rgw instance
shell: systemctl enable /etc/systemd/system/multi-user.target.wants/ceph-rgw@{{ ansible_hostname }}.service
shell: systemctl enable ceph-rgw@{{ ansible_hostname }}.service
failed_when: false
changed_when: false