# INSTALL
#########
+#mon_group_name: mons
+#osd_group_name: osds
+#rgw_group_name: rgws
+#mds_group_name: mdss
+
# /!\ EITHER ACTIVE ceph_stable OR ceph_stable_ice OR ceph_dev /!\
# STABLE
# INSTALL #\r
###########\r
\r
+mon_group_name: mons\r
+osd_group_name: osds\r
+rgw_group_name: rgws\r
+mds_group_name: mdss\r
+\r
# /!\ EITHER ACTIVE ceph_stable OR ceph_stable_ice OR ceph_dev /!\\r
\r
# STABLE\r
- name: restart ceph mons
command: service ceph restart mon
- when: socket.rc == 0 and 'mons' in group_names
+ when: socket.rc == 0 and mon_group_name in group_names
- name: restart ceph osds
command: service ceph restart osd
- when: socket.rc == 0 and 'osds' in group_names
+ when: socket.rc == 0 and osd_group_name in group_names
- name: restart ceph osds on ubuntu
command: restart ceph-osd-all
- when: socket.rc == 0 and ansible_distribution == 'Ubuntu' and 'osds' in group_names
+ when: socket.rc == 0 and ansible_distribution == 'Ubuntu' and osd_group_name in group_names
- name: restart ceph mdss
command: service ceph restart mds
- when: socket.rc == 0 and 'mdss' in group_names
+ when: socket.rc == 0 and mds_group_name in group_names
- name: restart ceph rgws
command: /etc/init.d/radosgw restart
- when: socket.rc == 0 and 'rgws' in group_names
+ when: socket.rc == 0 and rgw_group_name in group_names
debug paxos = {{ debug_mon_level }}
debug auth = {{ debug_mon_level }}
{% endif %}
-{% for host in groups['mons'] %}
+{% for host in groups[mon_group_name] %}
{% if hostvars[host]['ansible_hostname'] is defined %}
[mon.{{ hostvars[host]['ansible_hostname'] }}]
host = {{ hostvars[host]['ansible_hostname'] }}
debug mds log = {{ debug_mds_level }}
debug mds migrator = {{ debug_mds_level }}
{% endif %}
-{% for host in groups['mdss'] %}
+{% for host in groups[mds_group_name] %}
{% if hostvars[host]['ansible_hostname'] is defined %}
[mds.{{ hostvars[host]['ansible_hostname'] }}]
host = {{ hostvars[host]['ansible_hostname'] }}
{% endif %}
{% if radosgw %}
-{% for host in groups['rgws'] %}
+{% for host in groups[rgw_group_name] %}
{% if hostvars[host]['ansible_hostname'] is defined %}
[client.radosgw.{{ hostvars[host]['ansible_hostname'] }}]
{% if radosgw_dns_name is defined %}
# GENERAL #\r
###########\r
\r
+rgw_group_name: rgws\r
+\r
# ACTIVATE BOTH FSID AND MONITOR_SECRET VARIABLES FOR NON-VAGRANT DEPLOYMENT\r
fsid: "{{ cluster_uuid.stdout }}"\r
# monitor_secret:\r
ceph auth get-or-create client.radosgw.{{ hostvars[item]['ansible_hostname'] }} osd 'allow rwx' mon 'allow rw' -o /etc/ceph/ceph.client.radosgw.{{ hostvars[item]['ansible_hostname'] }}.keyring
creates=/etc/ceph/ceph.client.radosgw.{{ hostvars[item]['ansible_hostname'] }}.keyring
when: cephx and radosgw
- with_items: groups.rgws
+ with_items: groups[rgw_group_name]
changed_when: False
- name: create Ceph REST API keyring
---\r
# You can override vars by using host or group vars\r
\r
+rgw_group_name: rgws\r
+\r
# Rados Gateway options\r
radosgw_interface: eth1 # the public interface which the radosgw talks to the world with, this variable is used in the haproxy role, this does not need to be set if haproxy is not used.\r
mode http
balance roundrobin
cookie RADOSGWLB insert indirect nocache
-{% for host in groups['rgws'] %}
+{% for host in groups[rgw_group_name] %}
server {{ hostvars[host].ansible_hostname }} {{ hostvars[host]['ansible_' + radosgw_interface ].ipv4.address }}:80 check cookie {{ hostvars[host].ansible_hostname }}
{% endfor %}