mirror of https://github.com/ceph/ceph-ansible.git
ceph-mon: docker fix run on atomic host
fix template issues. Signed-off-by: Sébastien Han <seb@redhat.com>pull/669/head
parent
0784b8c5b1
commit
6c5ac63ecc
|
@ -79,5 +79,6 @@ dummy:
|
|||
#ceph_mon_docker_imagename: daemon
|
||||
#ceph_mon_extra_envs: "MON_NAME={{ ansible_hostname }}" # comma separated variables
|
||||
#ceph_docker_on_openstack: false
|
||||
#mon_docker_privileged: true
|
||||
#mon_docker_privileged: false
|
||||
#mon_docker_net_host: true
|
||||
|
||||
|
|
|
@ -71,4 +71,5 @@ ceph_mon_docker_username: ceph
|
|||
ceph_mon_docker_imagename: daemon
|
||||
ceph_mon_extra_envs: "MON_NAME={{ ansible_hostname }}" # comma separated variables
|
||||
ceph_docker_on_openstack: false
|
||||
mon_docker_privileged: true
|
||||
mon_docker_privileged: false
|
||||
mon_docker_net_host: true
|
||||
|
|
|
@ -41,16 +41,20 @@
|
|||
name: populate-kv-store
|
||||
state: absent
|
||||
image: ceph/daemon
|
||||
when: mon_containerized_deployment_with_kv
|
||||
|
||||
# Use systemd to manage container on Atomic host and CoreOS
|
||||
- name: generate systemd unit file
|
||||
become: true
|
||||
template:
|
||||
src: ../../templates/ceph-mon.service.j2
|
||||
src: ../templates/ceph-mon.service.j2
|
||||
dest: /var/lib/ceph/ceph-mon@.service
|
||||
owner: "root"
|
||||
group: "root"
|
||||
mode: "0644"
|
||||
when:
|
||||
is_atomic or
|
||||
ansible_os_family == 'CoreOS'
|
||||
|
||||
- name: link systemd unit file for mon instance
|
||||
file:
|
||||
|
|
|
@ -14,7 +14,12 @@ ExecStart=/usr/bin/docker run --rm --name %i --net=host \
|
|||
-e KV_TYPE={{kv_type}} \
|
||||
-e KV_IP={{kv_endpoint}}\
|
||||
{% endif -%}
|
||||
{% if mon_docker_privileged -%}
|
||||
--privileged \
|
||||
{% endif -%}
|
||||
{% if mon_docker_net_host -%}
|
||||
--net=host \
|
||||
{% endif -%}
|
||||
-e CEPH_DAEMON=MON \
|
||||
-e MON_IP={{ hostvars[inventory_hostname]['ansible_' + ceph_mon_docker_interface]['ipv4']['address'] }} \
|
||||
-e CEPH_PUBLIC_NETWORK={{ ceph_mon_docker_subnet }} \
|
||||
|
@ -28,4 +33,4 @@ TimeoutStartSec=120
|
|||
TimeoutStopSec=15
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
WantedBy=multi-user.target
|
||||
|
|
Loading…
Reference in New Issue