ceph-ansible/roles/ceph-mds/tasks/docker/start_docker_mds.yml

38 lines
1.2 KiB
YAML

---
# 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
owner: "root"
group: "root"
mode: "0644"
when: ansible_os_family == 'RedHat' or ansible_os_family == 'CoreOS'
- 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
when: ansible_os_family == 'RedHat' or ansible_os_family == 'CoreOS'
- name: enable systemd unit file for mds instance
command: systemctl enable /etc/systemd/system/multi-user.target.wants/ceph-mds@{{ ansible_hostname }}.service
failed_when: false
changed_when: false
when: ansible_os_family == 'RedHat' or ansible_os_family == 'CoreOS'
- name: reload systemd unit files
command: systemctl daemon-reload
changed_when: false
failed_when: false
when: ansible_os_family == 'RedHat' or ansible_os_family == 'CoreOS'
- name: systemd start mds container
service:
name: ceph-mds@{{ ansible_hostname }}
state: started
enabled: yes
changed_when: false