mirror of https://github.com/ceph/ceph-ansible.git
Merge pull request #442 from ceph/infernalis-for-rh-storage
Support infernalis for rh storagepull/458/head
commit
e412ac3f66
|
@ -8,12 +8,8 @@
|
||||||
when:
|
when:
|
||||||
socket.rc == 0 and
|
socket.rc == 0 and
|
||||||
ansible_distribution != 'Ubuntu' and
|
ansible_distribution != 'Ubuntu' and
|
||||||
mon_group_name in group_names and
|
mon_group_name in group_names and not
|
||||||
(ceph_stable_release == 'dumpling' or
|
is_ceph_infernalis
|
||||||
ceph_stable_release == 'emperor' or
|
|
||||||
ceph_stable_release == 'firefly' or
|
|
||||||
ceph_stable_release == 'giant' or
|
|
||||||
ceph_stable_release == 'hammer')
|
|
||||||
|
|
||||||
- name: restart ceph mons with systemd
|
- name: restart ceph mons with systemd
|
||||||
service:
|
service:
|
||||||
|
@ -22,12 +18,8 @@
|
||||||
when:
|
when:
|
||||||
socket.rc == 0 and
|
socket.rc == 0 and
|
||||||
ansible_distribution != 'Ubuntu' and
|
ansible_distribution != 'Ubuntu' and
|
||||||
mon_group_name in group_names and not
|
mon_group_name in group_names and
|
||||||
(ceph_stable_release == 'dumpling' or
|
is_ceph_infernalis
|
||||||
ceph_stable_release == 'emperor' or
|
|
||||||
ceph_stable_release == 'firefly' or
|
|
||||||
ceph_stable_release == 'giant' or
|
|
||||||
ceph_stable_release == 'hammer')
|
|
||||||
|
|
||||||
- name: restart ceph mons on ubuntu
|
- name: restart ceph mons on ubuntu
|
||||||
command: restart ceph-mon-all
|
command: restart ceph-mon-all
|
||||||
|
@ -42,11 +34,7 @@
|
||||||
socket.rc == 0 and
|
socket.rc == 0 and
|
||||||
ansible_distribution != 'Ubuntu' and
|
ansible_distribution != 'Ubuntu' and
|
||||||
osd_group_name in group_names and
|
osd_group_name in group_names and
|
||||||
(ceph_stable_release == 'dumpling' or
|
not is_ceph_infernalis
|
||||||
ceph_stable_release == 'emperor' or
|
|
||||||
ceph_stable_release == 'firefly' or
|
|
||||||
ceph_stable_release == 'giant' or
|
|
||||||
ceph_stable_release == 'hammer')
|
|
||||||
|
|
||||||
# This does not just restart OSDs but everything else too. Unfortunately
|
# This does not just restart OSDs but everything else too. Unfortunately
|
||||||
# at this time the ansible role does not have an OSD id list to use
|
# at this time the ansible role does not have an OSD id list to use
|
||||||
|
@ -58,12 +46,8 @@
|
||||||
when:
|
when:
|
||||||
socket.rc == 0 and
|
socket.rc == 0 and
|
||||||
ansible_distribution != 'Ubuntu' and
|
ansible_distribution != 'Ubuntu' and
|
||||||
osd_group_name in group_names and not
|
osd_group_name in group_names and
|
||||||
(ceph_stable_release == 'dumpling' or
|
is_ceph_infernalis
|
||||||
ceph_stable_release == 'emperor' or
|
|
||||||
ceph_stable_release == 'firefly' or
|
|
||||||
ceph_stable_release == 'giant' or
|
|
||||||
ceph_stable_release == 'hammer')
|
|
||||||
|
|
||||||
- name: restart ceph osds on ubuntu
|
- name: restart ceph osds on ubuntu
|
||||||
command: restart ceph-osd-all
|
command: restart ceph-osd-all
|
||||||
|
@ -85,12 +69,8 @@
|
||||||
socket.rc == 0 and
|
socket.rc == 0 and
|
||||||
ansible_distribution != 'Ubuntu' and
|
ansible_distribution != 'Ubuntu' and
|
||||||
mds_group_name in group_names and
|
mds_group_name in group_names and
|
||||||
(ceph_stable_release == 'dumpling' or
|
ceph_stable and
|
||||||
ceph_stable_release == 'emperor' or
|
ceph_stable_release in ceph_stable_releases
|
||||||
ceph_stable_release == 'firefly' or
|
|
||||||
ceph_stable_release == 'giant' or
|
|
||||||
ceph_stable_release == 'hammer')
|
|
||||||
|
|
||||||
|
|
||||||
- name: restart ceph mdss with systemd
|
- name: restart ceph mdss with systemd
|
||||||
service:
|
service:
|
||||||
|
@ -99,12 +79,9 @@
|
||||||
when:
|
when:
|
||||||
socket.rc == 0 and
|
socket.rc == 0 and
|
||||||
ansible_distribution != 'Ubuntu' and
|
ansible_distribution != 'Ubuntu' and
|
||||||
mds_group_name in group_names and not
|
mds_group_name in group_names and
|
||||||
(ceph_stable_release == 'dumpling' or
|
ceph_stable and
|
||||||
ceph_stable_release == 'emperor' or
|
ceph_stable_release not in ceph_stable_releases
|
||||||
ceph_stable_release == 'firefly' or
|
|
||||||
ceph_stable_release == 'giant' or
|
|
||||||
ceph_stable_release == 'hammer')
|
|
||||||
|
|
||||||
- name: restart ceph rgws on ubuntu
|
- name: restart ceph rgws on ubuntu
|
||||||
command: restart ceph-all
|
command: restart ceph-all
|
||||||
|
@ -119,11 +96,7 @@
|
||||||
socketrgw.rc == 0 and
|
socketrgw.rc == 0 and
|
||||||
ansible_distribution != 'Ubuntu' and
|
ansible_distribution != 'Ubuntu' and
|
||||||
rgw_group_name in group_names and
|
rgw_group_name in group_names and
|
||||||
(ceph_stable_release == 'dumpling' or
|
not is_ceph_infernalis
|
||||||
ceph_stable_release == 'emperor' or
|
|
||||||
ceph_stable_release == 'firefly' or
|
|
||||||
ceph_stable_release == 'giant' or
|
|
||||||
ceph_stable_release == 'hammer')
|
|
||||||
|
|
||||||
- name: restart ceph rgws on red hat
|
- name: restart ceph rgws on red hat
|
||||||
command: /etc/init.d/ceph-radosgw restart
|
command: /etc/init.d/ceph-radosgw restart
|
||||||
|
@ -131,11 +104,7 @@
|
||||||
socketrgw.rc == 0 and
|
socketrgw.rc == 0 and
|
||||||
ansible_os_family == 'RedHat' and
|
ansible_os_family == 'RedHat' and
|
||||||
rgw_group_name in group_names and
|
rgw_group_name in group_names and
|
||||||
(ceph_stable_release == 'dumpling' or
|
not is_ceph_infernalis
|
||||||
ceph_stable_release == 'emperor' or
|
|
||||||
ceph_stable_release == 'firefly' or
|
|
||||||
ceph_stable_release == 'giant' or
|
|
||||||
ceph_stable_release == 'hammer')
|
|
||||||
|
|
||||||
- name: restart ceph rgws with systemd
|
- name: restart ceph rgws with systemd
|
||||||
service:
|
service:
|
||||||
|
@ -144,12 +113,8 @@
|
||||||
when:
|
when:
|
||||||
socketrgw.rc == 0 and
|
socketrgw.rc == 0 and
|
||||||
ansible_distribution != 'Ubuntu' and
|
ansible_distribution != 'Ubuntu' and
|
||||||
rgw_group_name in group_names and not
|
rgw_group_name in group_names and
|
||||||
(ceph_stable_release == 'dumpling' or
|
is_ceph_infernalis
|
||||||
ceph_stable_release == 'emperor' or
|
|
||||||
ceph_stable_release == 'firefly' or
|
|
||||||
ceph_stable_release == 'giant' or
|
|
||||||
ceph_stable_release == 'hammer')
|
|
||||||
|
|
||||||
- name: restart apache2
|
- name: restart apache2
|
||||||
service:
|
service:
|
||||||
|
|
|
@ -63,3 +63,10 @@
|
||||||
- rbd_client_log_path
|
- rbd_client_log_path
|
||||||
- rbd_client_admin_socket_path
|
- rbd_client_admin_socket_path
|
||||||
when: rbd_client_directories
|
when: rbd_client_directories
|
||||||
|
|
||||||
|
- name: get ceph rhcs version
|
||||||
|
shell: rpm -q --qf "%{version}\n" ceph-common | cut -f1,2 -d '.'
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: rh_storage_version
|
||||||
|
when: ceph_stable_rh_storage
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
failed_when: false
|
failed_when: false
|
||||||
register: socketrgw
|
register: socketrgw
|
||||||
|
|
||||||
- name: create a local fetch directory if it doesn't exist
|
- name: create a local fetch directory if it does not exist
|
||||||
local_action: file path={{ fetch_directory }} state=directory
|
local_action: file path={{ fetch_directory }} state=directory
|
||||||
changed_when: false
|
changed_when: false
|
||||||
sudo: false
|
sudo: false
|
||||||
|
@ -107,3 +107,9 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
|
|
||||||
|
# NOTE (leseb): be careful with the following
|
||||||
|
# somehow the YAML syntax using "is_ceph_infernalis: {{"
|
||||||
|
# does NOT work, so we keep this syntax styling...
|
||||||
|
- set_fact:
|
||||||
|
is_ceph_infernalis={{ (ceph_stable and ceph_stable_release not in ceph_stable_releases) or (ceph_stable_rh_storage and (rh_storage_version.stdout | version_compare('0.94', '>'))) }}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
owner: ceph
|
owner: ceph
|
||||||
group: ceph
|
group: ceph
|
||||||
mode: 0755
|
mode: 0755
|
||||||
when: ceph_stable_release not in ceph_stable_releases
|
when: is_ceph_infernalis
|
||||||
|
|
||||||
- name: create bootstrap-mds directory (before infernalis release)
|
- name: create bootstrap-mds directory (before infernalis release)
|
||||||
file:
|
file:
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0755
|
mode: 0755
|
||||||
when: cephx and ceph_stable_release in ceph_stable_releases
|
when: not is_ceph_infernalis
|
||||||
|
|
||||||
- name: copy mds bootstrap key (for or after infernalis release)
|
- name: copy mds bootstrap key (for or after infernalis release)
|
||||||
copy:
|
copy:
|
||||||
|
@ -24,8 +24,7 @@
|
||||||
owner: ceph
|
owner: ceph
|
||||||
group: ceph
|
group: ceph
|
||||||
mode: 0600
|
mode: 0600
|
||||||
when:
|
when: is_ceph_infernalis
|
||||||
cephx and ceph_stable_release not in ceph_stable_releases
|
|
||||||
|
|
||||||
- name: copy mds bootstrap key (before infernalis release)
|
- name: copy mds bootstrap key (before infernalis release)
|
||||||
copy:
|
copy:
|
||||||
|
@ -34,8 +33,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0600
|
mode: 0600
|
||||||
when:
|
when: not is_ceph_infernalis
|
||||||
cephx and ceph_stable_release in ceph_stable_releases
|
|
||||||
|
|
||||||
- name: create mds directory (for or after infernalis release)
|
- name: create mds directory (for or after infernalis release)
|
||||||
file:
|
file:
|
||||||
|
@ -44,8 +42,7 @@
|
||||||
owner: ceph
|
owner: ceph
|
||||||
group: ceph
|
group: ceph
|
||||||
mode: 0755
|
mode: 0755
|
||||||
when:
|
when: is_ceph_infernalis
|
||||||
cephx and ceph_stable_release not in ceph_stable_releases
|
|
||||||
|
|
||||||
- name: create mds directory (before infernalis release)
|
- name: create mds directory (before infernalis release)
|
||||||
file:
|
file:
|
||||||
|
@ -54,8 +51,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0755
|
mode: 0755
|
||||||
when:
|
when: not is_ceph_infernalis
|
||||||
cephx and ceph_stable_release in ceph_stable_releases
|
|
||||||
|
|
||||||
- name: create mds keyring
|
- name: create mds keyring
|
||||||
command: ceph --cluster ceph --name client.bootstrap-mds --keyring /var/lib/ceph/bootstrap-mds/ceph.keyring auth get-or-create mds.{{ ansible_hostname }} osd 'allow rwx' mds 'allow' mon 'allow profile mds' -o /var/lib/ceph/mds/ceph-{{ ansible_hostname }}/keyring
|
command: ceph --cluster ceph --name client.bootstrap-mds --keyring /var/lib/ceph/bootstrap-mds/ceph.keyring auth get-or-create mds.{{ ansible_hostname }} osd 'allow rwx' mds 'allow' mon 'allow profile mds' -o /var/lib/ceph/mds/ceph-{{ ansible_hostname }}/keyring
|
||||||
|
@ -72,7 +68,7 @@
|
||||||
group: ceph
|
group: ceph
|
||||||
when:
|
when:
|
||||||
cephx and
|
cephx and
|
||||||
ceph_stable_release not in ceph_stable_releases
|
is_ceph_infernalis
|
||||||
|
|
||||||
- name: set mds key permissions (before infernalis)
|
- name: set mds key permissions (before infernalis)
|
||||||
file:
|
file:
|
||||||
|
@ -81,7 +77,8 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
when:
|
when:
|
||||||
cephx and ceph_stable_release in ceph_stable_releases
|
cephx and
|
||||||
|
not is_ceph_infernalis
|
||||||
|
|
||||||
- name: activate metadata server with upstart (for or after infernalis release)
|
- name: activate metadata server with upstart (for or after infernalis release)
|
||||||
file:
|
file:
|
||||||
|
@ -96,7 +93,7 @@
|
||||||
changed_when: false
|
changed_when: false
|
||||||
when:
|
when:
|
||||||
ansible_distribution == "Ubuntu" and
|
ansible_distribution == "Ubuntu" and
|
||||||
ceph_stable_release not in ceph_stable_releases
|
is_ceph_infernalis
|
||||||
|
|
||||||
- name: activate metadata server with upstart (before infernalis release)
|
- name: activate metadata server with upstart (before infernalis release)
|
||||||
file:
|
file:
|
||||||
|
@ -110,7 +107,8 @@
|
||||||
- upstart
|
- upstart
|
||||||
changed_when: false
|
changed_when: false
|
||||||
when:
|
when:
|
||||||
ansible_distribution == "Ubuntu" and ceph_stable_release in ceph_stable_releases
|
ansible_distribution == "Ubuntu" and
|
||||||
|
not is_ceph_infernalis
|
||||||
|
|
||||||
- name: activate metadata server with sysvinit (for or after infernalis release)
|
- name: activate metadata server with sysvinit (for or after infernalis release)
|
||||||
file:
|
file:
|
||||||
|
@ -125,7 +123,7 @@
|
||||||
changed_when: false
|
changed_when: false
|
||||||
when:
|
when:
|
||||||
ansible_distribution != "Ubuntu" and
|
ansible_distribution != "Ubuntu" and
|
||||||
ceph_stable_release not in ceph_stable_releases
|
is_ceph_infernalis
|
||||||
|
|
||||||
- name: activate metadata server with sysvinit (before infernalis release)
|
- name: activate metadata server with sysvinit (before infernalis release)
|
||||||
file:
|
file:
|
||||||
|
@ -139,7 +137,8 @@
|
||||||
- sysvinit
|
- sysvinit
|
||||||
changed_when: false
|
changed_when: false
|
||||||
when:
|
when:
|
||||||
ansible_distribution != "Ubuntu" and ceph_stable_release in ceph_stable_releases
|
ansible_distribution != "Ubuntu" and
|
||||||
|
not is_ceph_infernalis
|
||||||
|
|
||||||
- name: start and add that the metadata service to the init sequence (ubuntu)
|
- name: start and add that the metadata service to the init sequence (ubuntu)
|
||||||
service:
|
service:
|
||||||
|
@ -157,7 +156,9 @@
|
||||||
enabled: yes
|
enabled: yes
|
||||||
args: mds.{{ ansible_hostname }}
|
args: mds.{{ ansible_hostname }}
|
||||||
changed_when: false
|
changed_when: false
|
||||||
when: ansible_distribution != "Ubuntu" and ceph_stable_release in ceph_stable_releases
|
when:
|
||||||
|
ansible_distribution != "Ubuntu" and
|
||||||
|
not is_ceph_infernalis
|
||||||
|
|
||||||
- name: start and add that the metadata service to the init sequence (for or after infernalis)
|
- name: start and add that the metadata service to the init sequence (for or after infernalis)
|
||||||
service:
|
service:
|
||||||
|
@ -165,4 +166,6 @@
|
||||||
state: started
|
state: started
|
||||||
enabled: yes
|
enabled: yes
|
||||||
changed_when: false
|
changed_when: false
|
||||||
when: ansible_distribution != "Ubuntu" and ceph_stable_release not in ceph_stable_releases
|
when:
|
||||||
|
ansible_distribution != "Ubuntu" and
|
||||||
|
is_ceph_infernalis
|
||||||
|
|
|
@ -25,7 +25,15 @@
|
||||||
mode: 0600
|
mode: 0600
|
||||||
owner: ceph
|
owner: ceph
|
||||||
group: ceph
|
group: ceph
|
||||||
when: ceph_stable_release not in ceph_stable_releases
|
when: is_ceph_infernalis
|
||||||
|
|
||||||
|
- name: set initial monitor key permissions (before infernalis release)
|
||||||
|
file:
|
||||||
|
path: /var/lib/ceph/tmp/keyring.mon.{{ ansible_hostname }}
|
||||||
|
mode: 0600
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
when: not is_ceph_infernalis
|
||||||
|
|
||||||
- name: create monitor directory (for or after infernalis release)
|
- name: create monitor directory (for or after infernalis release)
|
||||||
file:
|
file:
|
||||||
|
@ -34,15 +42,7 @@
|
||||||
owner: ceph
|
owner: ceph
|
||||||
group: ceph
|
group: ceph
|
||||||
mode: 0755
|
mode: 0755
|
||||||
when: ceph_stable_release not in ceph_stable_releases
|
when: is_ceph_infernalis
|
||||||
|
|
||||||
- name: set initial monitor key permissions (before infernalis release)
|
|
||||||
file:
|
|
||||||
path: /var/lib/ceph/tmp/keyring.mon.{{ ansible_hostname }}
|
|
||||||
mode: 0600
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
when: ceph_stable_release in ceph_stable_releases
|
|
||||||
|
|
||||||
- name: create monitor directory (before infernalis release)
|
- name: create monitor directory (before infernalis release)
|
||||||
file:
|
file:
|
||||||
|
@ -51,16 +51,16 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0755
|
mode: 0755
|
||||||
when: ceph_stable_release in ceph_stable_releases
|
when: not is_ceph_infernalis
|
||||||
|
|
||||||
- name: ceph monitor mkfs (for or after infernalis release)
|
- name: ceph monitor mkfs (for or after infernalis release)
|
||||||
command: ceph-mon --setuser ceph --setgroup ceph --mkfs -i {{ ansible_hostname }} --fsid {{ fsid }} --keyring /var/lib/ceph/tmp/keyring.mon.{{ ansible_hostname }}
|
command: ceph-mon --setuser ceph --setgroup ceph --mkfs -i {{ ansible_hostname }} --fsid {{ fsid }} --keyring /var/lib/ceph/tmp/keyring.mon.{{ ansible_hostname }}
|
||||||
args:
|
args:
|
||||||
creates: /var/lib/ceph/mon/ceph-{{ ansible_hostname }}/keyring
|
creates: /var/lib/ceph/mon/ceph-{{ ansible_hostname }}/keyring
|
||||||
when: ceph_stable_release not in ceph_stable_releases
|
when: is_ceph_infernalis
|
||||||
|
|
||||||
- name: ceph monitor mkfs (before infernalis release)
|
- name: ceph monitor mkfs (before infernalis release)
|
||||||
command: ceph-mon --mkfs -i {{ ansible_hostname }} --fsid {{ fsid }} --keyring /var/lib/ceph/tmp/keyring.mon.{{ ansible_hostname }}
|
command: ceph-mon --mkfs -i {{ ansible_hostname }} --fsid {{ fsid }} --keyring /var/lib/ceph/tmp/keyring.mon.{{ ansible_hostname }}
|
||||||
args:
|
args:
|
||||||
creates: /var/lib/ceph/mon/ceph-{{ ansible_hostname }}/keyring
|
creates: /var/lib/ceph/mon/ceph-{{ ansible_hostname }}/keyring
|
||||||
when: ceph_stable_release in ceph_stable_releases
|
when: not is_ceph_infernalis
|
||||||
|
|
|
@ -6,13 +6,13 @@
|
||||||
owner: ceph
|
owner: ceph
|
||||||
group: ceph
|
group: ceph
|
||||||
mode: 0600
|
mode: 0600
|
||||||
|
changed_when: false
|
||||||
with_items:
|
with_items:
|
||||||
- done
|
- done
|
||||||
- upstart
|
- upstart
|
||||||
when:
|
when:
|
||||||
ansible_distribution == "Ubuntu" and ceph_stable_release not in ceph_stable_releases
|
ansible_distribution == "Ubuntu" and
|
||||||
|
is_ceph_infernalis
|
||||||
changed_when: false
|
|
||||||
|
|
||||||
- name: activate monitor with upstart before infernalis release
|
- name: activate monitor with upstart before infernalis release
|
||||||
file:
|
file:
|
||||||
|
@ -21,13 +21,13 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0600
|
mode: 0600
|
||||||
|
changed_when: false
|
||||||
with_items:
|
with_items:
|
||||||
- done
|
- done
|
||||||
- upstart
|
- upstart
|
||||||
when:
|
when:
|
||||||
ansible_distribution == "Ubuntu" and
|
ansible_distribution == "Ubuntu" and
|
||||||
ceph_stable_release in ceph_stable_releases
|
not is_ceph_infernalis
|
||||||
changed_when: false
|
|
||||||
|
|
||||||
- name: start and add that the monitor service to the init sequence (ubuntu)
|
- name: start and add that the monitor service to the init sequence (ubuntu)
|
||||||
service:
|
service:
|
||||||
|
@ -44,7 +44,7 @@
|
||||||
changed_when: false
|
changed_when: false
|
||||||
when:
|
when:
|
||||||
ansible_distribution != "Ubuntu" and
|
ansible_distribution != "Ubuntu" and
|
||||||
ceph_stable_release in ceph_stable_releases
|
not is_ceph_infernalis
|
||||||
|
|
||||||
- name: start and add that the monitor service to the init sequence (for or after infernalis)
|
- name: start and add that the monitor service to the init sequence (for or after infernalis)
|
||||||
service:
|
service:
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
changed_when: false
|
changed_when: false
|
||||||
when:
|
when:
|
||||||
ansible_distribution != "Ubuntu" and
|
ansible_distribution != "Ubuntu" and
|
||||||
ceph_stable_release not in ceph_stable_releases
|
is_ceph_infernalis
|
||||||
|
|
||||||
- name: collect admin and bootstrap keys
|
- name: collect admin and bootstrap keys
|
||||||
command: ceph-create-keys --id {{ ansible_hostname }}
|
command: ceph-create-keys --id {{ ansible_hostname }}
|
||||||
|
|
|
@ -29,23 +29,14 @@
|
||||||
state: started
|
state: started
|
||||||
enabled: yes
|
enabled: yes
|
||||||
when:
|
when:
|
||||||
ansible_distribution == "Ubuntu" or
|
ansible_distribution != "Ubuntu" and
|
||||||
(ceph_stable_release == 'dumpling' or
|
not is_ceph_infernalis
|
||||||
ceph_stable_release == 'emperor' or
|
|
||||||
ceph_stable_release == 'firefly' or
|
|
||||||
ceph_stable_release == 'giant' or
|
|
||||||
ceph_stable_release == 'hammer')
|
|
||||||
|
|
||||||
- name: start and add that the osd service(s) to the init sequence (on or after infernalis)
|
- name: start and add that the osd service(s) to the init sequence (for or after infernalis)
|
||||||
service:
|
service:
|
||||||
name: ceph.target
|
name: ceph.target
|
||||||
state: started
|
state: started
|
||||||
enabled: yes
|
enabled: yes
|
||||||
when:
|
when:
|
||||||
ansible_distribution != "Ubuntu" and not
|
ansible_distribution != "Ubuntu" and
|
||||||
(ceph_stable_release == 'dumpling' or
|
is_ceph_infernalis
|
||||||
ceph_stable_release == 'emperor' or
|
|
||||||
ceph_stable_release == 'firefly' or
|
|
||||||
ceph_stable_release == 'giant' or
|
|
||||||
ceph_stable_release == 'hammer')
|
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,9 @@
|
||||||
owner: ceph
|
owner: ceph
|
||||||
group: ceph
|
group: ceph
|
||||||
mode: 0755
|
mode: 0755
|
||||||
when: cephx and ceph_stable_release not in ceph_stable_releases
|
when:
|
||||||
|
cephx and
|
||||||
|
is_ceph_infernalis
|
||||||
|
|
||||||
- name: create bootstrap-osd directory (before infernalis release)
|
- name: create bootstrap-osd directory (before infernalis release)
|
||||||
file:
|
file:
|
||||||
|
@ -27,7 +29,9 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0755
|
mode: 0755
|
||||||
when: cephx and ceph_stable_release in ceph_stable_releases
|
when:
|
||||||
|
cephx and
|
||||||
|
not is_ceph_infernalis
|
||||||
|
|
||||||
- name: copy osd bootstrap key (for or after infernalis release)
|
- name: copy osd bootstrap key (for or after infernalis release)
|
||||||
copy:
|
copy:
|
||||||
|
@ -36,7 +40,9 @@
|
||||||
owner: ceph
|
owner: ceph
|
||||||
group: ceph
|
group: ceph
|
||||||
mode: 0600
|
mode: 0600
|
||||||
when: cephx and ceph_stable_release not in ceph_stable_releases
|
when:
|
||||||
|
cephx and
|
||||||
|
is_ceph_infernalis
|
||||||
|
|
||||||
- name: copy osd bootstrap key (before infernalis release)
|
- name: copy osd bootstrap key (before infernalis release)
|
||||||
copy:
|
copy:
|
||||||
|
@ -45,4 +51,6 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 600
|
mode: 600
|
||||||
when: cephx and ceph_stable_release in ceph_stable_releases
|
when:
|
||||||
|
cephx and
|
||||||
|
not is_ceph_infernalis
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
with_items:
|
with_items:
|
||||||
- /var/lib/ceph/bootstrap-rgw
|
- /var/lib/ceph/bootstrap-rgw
|
||||||
- /var/lib/ceph/radosgw/ceph-rgw.{{ ansible_hostname }}
|
- /var/lib/ceph/radosgw/ceph-rgw.{{ ansible_hostname }}
|
||||||
when: ceph_stable_release not in ceph_stable_releases
|
when: is_ceph_infernalis
|
||||||
|
|
||||||
- name: create rados gateway directories (before infernalis release)
|
- name: create rados gateway directories (before infernalis release)
|
||||||
file:
|
file:
|
||||||
|
@ -21,7 +21,7 @@
|
||||||
with_items:
|
with_items:
|
||||||
- /var/lib/ceph/bootstrap-rgw
|
- /var/lib/ceph/bootstrap-rgw
|
||||||
- /var/lib/ceph/radosgw/ceph-rgw.{{ ansible_hostname }}
|
- /var/lib/ceph/radosgw/ceph-rgw.{{ ansible_hostname }}
|
||||||
when: ceph_stable_release in ceph_stable_releases
|
when: not is_ceph_infernalis
|
||||||
|
|
||||||
- name: copy rados gateway bootstrap key (for or after infernalis release)
|
- name: copy rados gateway bootstrap key (for or after infernalis release)
|
||||||
copy:
|
copy:
|
||||||
|
@ -30,7 +30,9 @@
|
||||||
owner: ceph
|
owner: ceph
|
||||||
group: ceph
|
group: ceph
|
||||||
mode: 0600
|
mode: 0600
|
||||||
when: cephx and ceph_stable_release not in ceph_stable_releases
|
when:
|
||||||
|
cephx and
|
||||||
|
is_ceph_infernalis
|
||||||
|
|
||||||
- name: copy rados gateway bootstrap key (before infernalis release)
|
- name: copy rados gateway bootstrap key (before infernalis release)
|
||||||
copy:
|
copy:
|
||||||
|
@ -39,7 +41,9 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0600
|
mode: 0600
|
||||||
when: cephx and ceph_stable_release in ceph_stable_releases
|
when:
|
||||||
|
cephx and
|
||||||
|
not is_ceph_infernalis
|
||||||
|
|
||||||
- name: create rados gateway keyring
|
- name: create rados gateway keyring
|
||||||
command: ceph --cluster ceph --name client.bootstrap-rgw --keyring /var/lib/ceph/bootstrap-rgw/ceph.keyring auth get-or-create client.rgw.{{ ansible_hostname }} osd 'allow rwx' mon 'allow rw' -o /var/lib/ceph/radosgw/ceph-rgw.{{ ansible_hostname }}/keyring
|
command: ceph --cluster ceph --name client.bootstrap-rgw --keyring /var/lib/ceph/bootstrap-rgw/ceph.keyring auth get-or-create client.rgw.{{ ansible_hostname }} osd 'allow rwx' mon 'allow rw' -o /var/lib/ceph/radosgw/ceph-rgw.{{ ansible_hostname }}/keyring
|
||||||
|
@ -54,7 +58,9 @@
|
||||||
mode: 0600
|
mode: 0600
|
||||||
owner: ceph
|
owner: ceph
|
||||||
group: ceph
|
group: ceph
|
||||||
when: cephx and ceph_stable_release not in ceph_stable_releases
|
when:
|
||||||
|
cephx and
|
||||||
|
is_ceph_infernalis
|
||||||
|
|
||||||
- name: set rados gateway key permissions (before infernalis release)
|
- name: set rados gateway key permissions (before infernalis release)
|
||||||
file:
|
file:
|
||||||
|
@ -62,7 +68,9 @@
|
||||||
mode: 0600
|
mode: 0600
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
when: cephx and ceph_stable_release in ceph_stable_releases
|
when:
|
||||||
|
cephx and
|
||||||
|
not is_ceph_infernalis
|
||||||
|
|
||||||
- name: activate rados gateway with upstart (for or after infernalis release)
|
- name: activate rados gateway with upstart (for or after infernalis release)
|
||||||
file:
|
file:
|
||||||
|
@ -76,7 +84,8 @@
|
||||||
- upstart
|
- upstart
|
||||||
changed_when: false
|
changed_when: false
|
||||||
when:
|
when:
|
||||||
ansible_distribution == "Ubuntu" and ceph_stable_release not in ceph_stable_releases
|
ansible_distribution == "Ubuntu" and
|
||||||
|
is_ceph_infernalis
|
||||||
|
|
||||||
- name: activate rados gateway with upstart (before infernalis release)
|
- name: activate rados gateway with upstart (before infernalis release)
|
||||||
file:
|
file:
|
||||||
|
@ -90,7 +99,8 @@
|
||||||
- upstart
|
- upstart
|
||||||
changed_when: false
|
changed_when: false
|
||||||
when:
|
when:
|
||||||
ansible_distribution == "Ubuntu" and ceph_stable_release in ceph_stable_releases
|
ansible_distribution == "Ubuntu" and
|
||||||
|
not is_ceph_infernalis
|
||||||
|
|
||||||
- name: activate rados gateway with sysvinit (for or after infernalis release)
|
- name: activate rados gateway with sysvinit (for or after infernalis release)
|
||||||
file:
|
file:
|
||||||
|
@ -104,7 +114,8 @@
|
||||||
- sysvinit
|
- sysvinit
|
||||||
changed_when: false
|
changed_when: false
|
||||||
when:
|
when:
|
||||||
ansible_distribution != "Ubuntu" and ceph_stable_release not in ceph_stable_releases
|
ansible_distribution != "Ubuntu" and
|
||||||
|
is_ceph_infernalis
|
||||||
|
|
||||||
- name: activate rados gateway with sysvinit (before infernalis release)
|
- name: activate rados gateway with sysvinit (before infernalis release)
|
||||||
file:
|
file:
|
||||||
|
@ -118,7 +129,8 @@
|
||||||
- sysvinit
|
- sysvinit
|
||||||
changed_when: false
|
changed_when: false
|
||||||
when:
|
when:
|
||||||
ansible_distribution != "Ubuntu" and ceph_stable_release in ceph_stable_releases
|
ansible_distribution != "Ubuntu" and
|
||||||
|
not is_ceph_infernalis
|
||||||
|
|
||||||
- name: generate rados gateway sudoers file
|
- name: generate rados gateway sudoers file
|
||||||
template:
|
template:
|
||||||
|
|
|
@ -29,21 +29,15 @@
|
||||||
name: ceph-radosgw
|
name: ceph-radosgw
|
||||||
state: started
|
state: started
|
||||||
enabled: yes
|
enabled: yes
|
||||||
when: ansible_os_family == 'RedHat' and
|
when:
|
||||||
(ceph_stable_release == 'dumpling' or
|
ansible_os_family == 'RedHat' and
|
||||||
ceph_stable_release == 'emperor' or
|
not is_ceph_infernalis
|
||||||
ceph_stable_release == 'firefly' or
|
|
||||||
ceph_stable_release == 'giant' or
|
|
||||||
ceph_stable_release == 'hammer')
|
|
||||||
|
|
||||||
- name: start rgw on red hat (after infernalis)
|
- name: start rgw on red hat (after infernalis)
|
||||||
service:
|
service:
|
||||||
name: ceph-radosgw@{{ ansible_hostname }}
|
name: ceph-radosgw@{{ ansible_hostname }}
|
||||||
state: started
|
state: started
|
||||||
enabled: yes
|
enabled: yes
|
||||||
when: ansible_os_family == 'RedHat' and not
|
when:
|
||||||
(ceph_stable_release == 'dumpling' or
|
ansible_os_family == 'RedHat' and
|
||||||
ceph_stable_release == 'emperor' or
|
is_ceph_infernalis
|
||||||
ceph_stable_release == 'firefly' or
|
|
||||||
ceph_stable_release == 'giant' or
|
|
||||||
ceph_stable_release == 'hammer')
|
|
||||||
|
|
Loading…
Reference in New Issue