mirror of https://github.com/ceph/ceph-ansible.git
commit
49cfd6809e
|
@ -16,7 +16,7 @@ dummy:
|
|||
# COMMUNITY VERSION
|
||||
#ceph_stable: true # use ceph stable branch
|
||||
#ceph_stable_key: https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc
|
||||
#ceph_stable_release: giant # ceph stable release
|
||||
#ceph_stable_release: hammer # ceph stable release
|
||||
|
||||
# This option is needed for _both_ stable and dev version, so please always fill the right version
|
||||
# # for supported distros, see http://ceph.com/rpm-{{ ceph_stable_release }}/
|
||||
|
|
|
@ -29,18 +29,18 @@
|
|||
when: ceph_stable_ice
|
||||
|
||||
- name: Add Ceph stable repository
|
||||
command: >
|
||||
rpm -U http://ceph.com/rpm-{{ ceph_stable_release }}/{{ ceph_stable_redhat_distro }}/noarch/ceph-release-1-0.{{ ceph_stable_redhat_distro|replace('rhel', 'el') }}.noarch.rpm
|
||||
creates=/etc/yum.repos.d/ceph.repo
|
||||
yum: name=http://ceph.com/rpm-{{ ceph_stable_release }}/{{ ceph_stable_redhat_distro }}/noarch/ceph-release-1-0.{{ ceph_stable_redhat_distro|replace('rhel', 'el') }}.noarch.rpm
|
||||
register: repo_result
|
||||
when: ceph_stable
|
||||
changed_when: False
|
||||
failed_when: repo_result.rc > 1
|
||||
changed_when: repo_result.rc == 0
|
||||
|
||||
- name: Add Ceph development repository
|
||||
command: >
|
||||
rpm -U http://gitbuilder.ceph.com/ceph-rpm-{{ ceph_dev_redhat_distro }}-x86_64-basic/ref/{{ ceph_dev_branch }}/noarch/ceph-release-1-0.{{ ceph_stable_redhat_distro }}.noarch.rpm
|
||||
creates=/etc/yum.repos.d/ceph.repo
|
||||
yum: name=http://gitbuilder.ceph.com/ceph-rpm-{{ ceph_dev_redhat_distro }}-x86_64-basic/ref/{{ ceph_dev_branch }}/noarch/ceph-release-1-0.{{ ceph_stable_redhat_distro }}.noarch.rpm
|
||||
register: repo_result
|
||||
when: ceph_dev
|
||||
changed_when: False
|
||||
failed_when: repo_result.rc > 1
|
||||
changed_when: repo_result.rc == 0
|
||||
|
||||
- name: Add Inktank Ceph Enterprise repository
|
||||
template: >
|
||||
|
|
|
@ -22,4 +22,5 @@
|
|||
value={{ item.value }}
|
||||
state=present
|
||||
sysctl_file=/etc/sysctl.conf
|
||||
ignoreerrors=yes
|
||||
with_items: os_tuning_params
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
- name: Create RGW directory
|
||||
file: >
|
||||
path=/var/lib/ceph/radosgw/ceph-radosgw.{{ ansible_fqdn }}
|
||||
path=/var/lib/ceph/radosgw/ceph-radosgw.{{ ansible_hostname }}
|
||||
state=directory
|
||||
owner=root
|
||||
group=root
|
||||
|
@ -18,7 +18,7 @@
|
|||
|
||||
- name: Activate RGW with upstart
|
||||
file: >
|
||||
path=/var/lib/ceph/radosgw/ceph-radosgw.{{ ansible_fqdn }}/{{ item }}
|
||||
path=/var/lib/ceph/radosgw/ceph-radosgw.{{ ansible_hostname }}/{{ item }}
|
||||
state=touch
|
||||
owner=root
|
||||
group=root
|
||||
|
|
|
@ -9,6 +9,10 @@
|
|||
|
||||
# /!\ DO NOT FORGET TO CHANGE THE RELEASE VERSION FIRST! /!\
|
||||
|
||||
- hosts: all
|
||||
tasks:
|
||||
- debug: msg="gather facts on all hosts for following reference"
|
||||
|
||||
- hosts: mons
|
||||
serial: 1
|
||||
sudo: True
|
||||
|
@ -52,6 +56,11 @@
|
|||
state=restarted
|
||||
args=mon
|
||||
|
||||
- name: select a running monitor
|
||||
set_fact: mon_host={{ item }}
|
||||
with_items: groups.mons
|
||||
when: item != inventory_hostname
|
||||
|
||||
- name: Waiting for the monitor to join the quorum...
|
||||
shell: >
|
||||
ceph -s | grep monmap | sed 's/.*quorum//' | egrep -sq {{ ansible_hostname }}
|
||||
|
@ -59,7 +68,7 @@
|
|||
until: result.rc == 0
|
||||
retries: 5
|
||||
delay: 10
|
||||
delegate_to: 127.0.0.1
|
||||
delegate_to: "{{ mon_host }}"
|
||||
|
||||
|
||||
- hosts: osds
|
||||
|
@ -69,8 +78,7 @@
|
|||
pre_tasks:
|
||||
- name: Set the noout flag
|
||||
command: ceph osd set noout
|
||||
delegate_to: "{{ item }}"
|
||||
with_items: groups.mons[0]
|
||||
delegate_to: "{{ groups.mons[0] }}"
|
||||
|
||||
roles:
|
||||
- ceph-common
|
||||
|
@ -97,8 +105,8 @@
|
|||
service: >
|
||||
name=ceph
|
||||
state=restarted
|
||||
args=mon
|
||||
when: osdsysvinit.rc == 0 and
|
||||
args=osd
|
||||
when: osdsysvinit.rc == 0
|
||||
|
||||
- name: Waiting for clean PGs...
|
||||
shell: >
|
||||
|
@ -107,12 +115,11 @@
|
|||
until: result.rc == 0
|
||||
retries: 10
|
||||
delay: 10
|
||||
delegate_to: 127.0.0.1
|
||||
delegate_to: "{{ groups.mons[0] }}"
|
||||
|
||||
- name: Unset the noout flag
|
||||
command: ceph osd unset noout
|
||||
delegate_to: "{{ item }}"
|
||||
with_items: groups.mons[0]
|
||||
delegate_to: "{{ groups.mons[0] }}"
|
||||
|
||||
|
||||
- hosts: mdss
|
||||
|
|
Loading…
Reference in New Issue