Fix container log bind mount regression
The container bind mount for all logs was being skipped due to a logic bug. This fixes the bug while also maintaining the functionality to omit log bind mounts when the variable `default_bind_mount_logs` is set to "false". Closes-Bug: #1632818 Change-Id: If9433d6280a3940c25fc0af714313d2caa265df6 Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
parent
52d7ae8397
commit
2252d17c40
@ -27,12 +27,6 @@
|
||||
# If extra container configurations are desirable set the
|
||||
# "extra_container_config" list to strings containing the options needed.
|
||||
|
||||
- name: Set default bind mounts
|
||||
set_fact:
|
||||
lxc_default_bind_mounts: []
|
||||
when:
|
||||
- lxc_default_bind_mounts is undefined
|
||||
|
||||
- name: Set default bind mounts (bind var/log)
|
||||
set_fact:
|
||||
lxc_default_bind_mounts: '{{ lxc_default_bind_mounts | default([{"bind_dir_path": "/var/log", "mount_path": "/openstack/log/{{ inventory_hostname }}"}]) }}'
|
||||
@ -45,10 +39,9 @@
|
||||
state: "directory"
|
||||
with_items:
|
||||
- "{{ list_of_bind_mounts | default([]) }}"
|
||||
- "{{ lxc_default_bind_mounts }}"
|
||||
- "{{ lxc_default_bind_mounts | default([]) }}"
|
||||
delegate_to: "{{ physical_host }}"
|
||||
when:
|
||||
- list_of_bind_mounts is defined
|
||||
- not is_metal | bool
|
||||
|
||||
- name: LXC bind mount directories
|
||||
@ -58,11 +51,10 @@
|
||||
[[ ! -d "{{ item['bind_dir_path'] }}" ]] && mkdir -p "{{ item['bind_dir_path'] }}"
|
||||
with_items:
|
||||
- "{{ list_of_bind_mounts | default([]) }}"
|
||||
- "{{ lxc_default_bind_mounts }}"
|
||||
- "{{ lxc_default_bind_mounts | default([]) }}"
|
||||
delegate_to: "{{ physical_host }}"
|
||||
register: _bm
|
||||
when:
|
||||
- list_of_bind_mounts is defined
|
||||
- not is_metal | bool
|
||||
|
||||
- name: Add bind mount configuration to container
|
||||
@ -72,10 +64,9 @@
|
||||
backup: "true"
|
||||
with_items:
|
||||
- "{{ list_of_bind_mounts | default([]) }}"
|
||||
- "{{ lxc_default_bind_mounts }}"
|
||||
- "{{ lxc_default_bind_mounts | default([]) }}"
|
||||
delegate_to: "{{ physical_host }}"
|
||||
when:
|
||||
- list_of_bind_mounts is defined
|
||||
- not is_metal | bool
|
||||
register: _mc
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user