Skip to content

Commit

Permalink
Move commons for deploying monitors into separate playbook
Browse files Browse the repository at this point in the history
Change-Id: I83fe58355577e48d512002ee8c21252e2a10ab1a
  • Loading branch information
9seconds committed Apr 5, 2017
1 parent 1a74f45 commit b09bceb
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 21 deletions.
31 changes: 31 additions & 0 deletions backend/common/decapod_common/playbooks/plays/deploy_mon.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
# Copyright (c) 2017 Mirantis Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.


- hosts: mons
become: true
roles:
- ceph-mon

- hosts: mons
become: true
tasks:
- name: Enable monitors on startup
systemd:
daemon_reload: yes
enabled: yes
state: started
name: "ceph-mon@{{ ansible_hostname }}"
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,4 @@
roles:
- ceph-fetch-keys

- hosts: mons
become: true
roles:
- ceph-mon
- include: "{{ decapod_common_playbooks }}/plays/deploy_mon.yaml"
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@

- include: "{{ decapod_common_playbooks }}/plays/init.yaml"

- hosts: mons
become: True
roles:
- ceph-mon
- include: "{{ decapod_common_playbooks }}/plays/deploy_mon.yaml"

- hosts: agents
become: True
Expand Down Expand Up @@ -64,18 +61,14 @@
roles:
- ceph-iscsi-gw


# Hacks for ceph-ansible setup
# Please check upstream bugs and remove these workarounds after
# proper fixes will be merged

# By default, ceph-ansible do not enable monitors so after restart
# processes won't up.
- hosts: mons
- hosts: all
become: true
tasks:
- name: Enable monitors on startup
command: systemctl enable ceph-mon.service
- name: Enable ceph.target
systemd:
daemon_reload: yes
enabled: yes
name: ceph.target

# By default, ceph-ansible do not enable rgws so after restart
# processes won't up.
Expand All @@ -90,6 +83,3 @@
src: /lib/systemd/system/ceph-radosgw@.service
dest: "/etc/systemd/system/ceph.target.wants/ceph-radosgw@rgw.{{ ansible_hostname }}.service"
state: link

- name: Enable ceph.target
command: systemctl enable ceph.target

0 comments on commit b09bceb

Please sign in to comment.