Skip to content

Commit

Permalink
Merge pull request #1594 from ceph/ipv6_support
Browse files Browse the repository at this point in the history
Common: Add ipv6 support
  • Loading branch information
leseb committed Jul 4, 2017
2 parents f8e97ba + 995c2ec commit 283311d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 2 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
- include: check_mandatory_vars.yml

- include: deploy_monitors.yml
when: not containerized_deployment

Expand Down
13 changes: 12 additions & 1 deletion templates/ceph-mon.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,19 @@ ExecStart=/usr/bin/docker run --rm --name ceph-mon-%i --net=host \
--net=host \
{% endif -%}
-e CEPH_DAEMON=MON \
-e MON_IP={{ hostvars[inventory_hostname]['ansible_default_' + ip_version]['address'] }} \
-e CEPH_PUBLIC_NETWORK={{ ceph_mon_docker_subnet }} \
-e IP_VERSION={{ ip_version[-1:] }} \
{% if monitor_address is defined and monitor_address != '0.0.0.0' %}
{% if ip_version == 'ipv4' -%}
-e MON_IP={{ monitor_address }} \
{% elif ip_version == 'ipv6' -%}
-e MON_IP=[{{ monitor_address }}] \
{% endif -%}
{% elif ip_version == 'ipv4' -%}
-e MON_IP={{ hostvars[inventory_hostname]['ansible_' + ceph_mon_docker_interface][ip_version]['address'] }} \
{% elif ip_version =='ipv6' -%}
-e MON_IP=[{{ hostvars[inventory_hostname]['ansible_' + ceph_mon_docker_interface][ip_version][0]['address'] }}] \
{% endif -%}
{{ ceph_mon_docker_extra_env }} \
{{ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
ExecStopPost=-/usr/bin/docker stop ceph-mon-%i
Expand Down

0 comments on commit 283311d

Please sign in to comment.