mirror of https://github.com/ceph/ceph-ansible.git
make group names definable
parent
bd6b8beada
commit
5588ada332
|
@ -8,6 +8,11 @@ dummy:
|
||||||
# INSTALL
|
# 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 /!\
|
# /!\ EITHER ACTIVE ceph_stable OR ceph_stable_ice OR ceph_dev /!\
|
||||||
|
|
||||||
# STABLE
|
# STABLE
|
||||||
|
|
|
@ -5,6 +5,11 @@
|
||||||
# INSTALL #
|
# 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 /!\
|
# /!\ EITHER ACTIVE ceph_stable OR ceph_stable_ice OR ceph_dev /!\
|
||||||
|
|
||||||
# STABLE
|
# STABLE
|
||||||
|
|
|
@ -4,20 +4,20 @@
|
||||||
|
|
||||||
- name: restart ceph mons
|
- name: restart ceph mons
|
||||||
command: service ceph restart mon
|
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
|
- name: restart ceph osds
|
||||||
command: service ceph restart osd
|
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
|
- name: restart ceph osds on ubuntu
|
||||||
command: restart ceph-osd-all
|
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
|
- name: restart ceph mdss
|
||||||
command: service ceph restart mds
|
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
|
- name: restart ceph rgws
|
||||||
command: /etc/init.d/radosgw restart
|
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
|
||||||
|
|
|
@ -76,7 +76,7 @@
|
||||||
debug paxos = {{ debug_mon_level }}
|
debug paxos = {{ debug_mon_level }}
|
||||||
debug auth = {{ debug_mon_level }}
|
debug auth = {{ debug_mon_level }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% for host in groups['mons'] %}
|
{% for host in groups[mon_group_name] %}
|
||||||
{% if hostvars[host]['ansible_hostname'] is defined %}
|
{% if hostvars[host]['ansible_hostname'] is defined %}
|
||||||
[mon.{{ hostvars[host]['ansible_hostname'] }}]
|
[mon.{{ hostvars[host]['ansible_hostname'] }}]
|
||||||
host = {{ hostvars[host]['ansible_hostname'] }}
|
host = {{ hostvars[host]['ansible_hostname'] }}
|
||||||
|
@ -126,7 +126,7 @@
|
||||||
debug mds log = {{ debug_mds_level }}
|
debug mds log = {{ debug_mds_level }}
|
||||||
debug mds migrator = {{ debug_mds_level }}
|
debug mds migrator = {{ debug_mds_level }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% for host in groups['mdss'] %}
|
{% for host in groups[mds_group_name] %}
|
||||||
{% if hostvars[host]['ansible_hostname'] is defined %}
|
{% if hostvars[host]['ansible_hostname'] is defined %}
|
||||||
[mds.{{ hostvars[host]['ansible_hostname'] }}]
|
[mds.{{ hostvars[host]['ansible_hostname'] }}]
|
||||||
host = {{ hostvars[host]['ansible_hostname'] }}
|
host = {{ hostvars[host]['ansible_hostname'] }}
|
||||||
|
@ -135,7 +135,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if radosgw %}
|
{% if radosgw %}
|
||||||
{% for host in groups['rgws'] %}
|
{% for host in groups[rgw_group_name] %}
|
||||||
{% if hostvars[host]['ansible_hostname'] is defined %}
|
{% if hostvars[host]['ansible_hostname'] is defined %}
|
||||||
[client.radosgw.{{ hostvars[host]['ansible_hostname'] }}]
|
[client.radosgw.{{ hostvars[host]['ansible_hostname'] }}]
|
||||||
{% if radosgw_dns_name is defined %}
|
{% if radosgw_dns_name is defined %}
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
# GENERAL #
|
# GENERAL #
|
||||||
###########
|
###########
|
||||||
|
|
||||||
|
rgw_group_name: rgws
|
||||||
|
|
||||||
# ACTIVATE BOTH FSID AND MONITOR_SECRET VARIABLES FOR NON-VAGRANT DEPLOYMENT
|
# ACTIVATE BOTH FSID AND MONITOR_SECRET VARIABLES FOR NON-VAGRANT DEPLOYMENT
|
||||||
fsid: "{{ cluster_uuid.stdout }}"
|
fsid: "{{ cluster_uuid.stdout }}"
|
||||||
# monitor_secret:
|
# monitor_secret:
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
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
|
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
|
creates=/etc/ceph/ceph.client.radosgw.{{ hostvars[item]['ansible_hostname'] }}.keyring
|
||||||
when: cephx and radosgw
|
when: cephx and radosgw
|
||||||
with_items: groups.rgws
|
with_items: groups[rgw_group_name]
|
||||||
changed_when: False
|
changed_when: False
|
||||||
|
|
||||||
- name: create Ceph REST API keyring
|
- name: create Ceph REST API keyring
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
---
|
---
|
||||||
# You can override vars by using host or group vars
|
# You can override vars by using host or group vars
|
||||||
|
|
||||||
|
rgw_group_name: rgws
|
||||||
|
|
||||||
# Rados Gateway options
|
# Rados Gateway options
|
||||||
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.
|
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.
|
||||||
|
|
|
@ -45,7 +45,7 @@ backend rgw
|
||||||
mode http
|
mode http
|
||||||
balance roundrobin
|
balance roundrobin
|
||||||
cookie RADOSGWLB insert indirect nocache
|
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 }}
|
server {{ hostvars[host].ansible_hostname }} {{ hostvars[host]['ansible_' + radosgw_interface ].ipv4.address }}:80 check cookie {{ hostvars[host].ansible_hostname }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue