mirror of https://github.com/ceph/ceph-ansible.git
Merge pull request #947 from font/cephconf
Restrict fact gathering to mons and update ceph.confpull/954/head
commit
96f7f8b74e
|
@ -32,19 +32,19 @@ mon host = {% for host in groups[mon_group_name] %}{{ hostvars[host]['ansible_'
|
||||||
{% if mon_containerized_deployment %}
|
{% if mon_containerized_deployment %}
|
||||||
fsid = {{ fsid }}
|
fsid = {{ fsid }}
|
||||||
{% if groups[mon_group_name] is defined %}
|
{% if groups[mon_group_name] is defined %}
|
||||||
{% for host in groups[mon_group_name] %}
|
mon host = {% for host in groups[mon_group_name] -%}
|
||||||
{% if mon_containerized_deployment %}
|
{% if mon_containerized_deployment %}
|
||||||
{% set interface = ["ansible_",ceph_mon_docker_interface]|join %}
|
{% set interface = ["ansible_",ceph_mon_docker_interface]|join %}
|
||||||
mon_host = {{ hostvars[host][interface]['ipv4']['address'] }}
|
{{ hostvars[host][interface]['ipv4']['address'] }}
|
||||||
{% if not loop.last %},{% endif %}
|
{%- if not loop.last %},{% endif %}
|
||||||
{% elif hostvars[host]['monitor_address'] is defined %}
|
{% elif hostvars[host]['monitor_address'] is defined %}
|
||||||
mon_host = {{ hostvars[host]['monitor_address'] }}
|
{{ hostvars[host]['monitor_address'] }}
|
||||||
{% if not loop.last %},{% endif %}
|
{%- if not loop.last %},{% endif %}
|
||||||
{% elif monitor_address != "0.0.0.0" %}
|
{% elif monitor_address != "0.0.0.0" %}
|
||||||
mon_host = monitor_address
|
monitor_address
|
||||||
{% if not loop.last %},{% endif %}
|
{%- if not loop.last %},{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{%- endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
---
|
---
|
||||||
# Defines deployment design and assigns role to server groups
|
# Defines deployment design and assigns role to server groups
|
||||||
|
|
||||||
- hosts: all
|
- hosts: mons # gather mon facts first before we process ceph-mon serially
|
||||||
tasks: []
|
tasks: []
|
||||||
|
|
||||||
- hosts: mons
|
- hosts: mons
|
||||||
become: True
|
become: True
|
||||||
|
gather_facts: false
|
||||||
roles:
|
roles:
|
||||||
- ceph-mon
|
- ceph-mon
|
||||||
serial: 1 # MUST be '1' WHEN DEPLOYING MONITORS ON DOCKER CONTAINERS
|
serial: 1 # MUST be '1' WHEN DEPLOYING MONITORS ON DOCKER CONTAINERS
|
||||||
|
|
Loading…
Reference in New Issue