Remove `elastic_lxc_template_config` mapping

We don't have OS at this moment that have lxc2, so mapping can be dropped
This fil also bring ubuntu focal support, since it has only lxc4.

Change-Id: I486e12555113b9209d8563598ca63e9de4fd1dc7
This commit is contained in:
Dmitriy Rabotyagov 2020-11-12 13:01:03 +02:00
parent b05893ae39
commit 6565d14ae0
2 changed files with 2 additions and 10 deletions

View File

@ -29,14 +29,6 @@
# 6GiB the G1 garbage collector can be enabled.
elastic_g1gc_enabled: true
elastic_lxc_template_config:
3:
aa_profile: lxc.apparmor.profile
mount: lxc.mount.entry
2:
aa_profile: lxc.aa_profile
mount: lxc.mount.entry
# Set the elastic search heap size. If this option is undefined the value will
# be derived automatically using 1/4 of the available RAM for logstash and 1/2
# of the available RAM for elasticsearch. The value is expected to be in MiB.

View File

@ -175,8 +175,8 @@
container_command: |
[[ ! -d "/var/lib/{{ service_name }}" ]] && mkdir -p "/var/lib/{{ service_name }}"
container_config:
- "{{ elastic_lxc_template_config[(lxc_major_version | int)]['mount'] }}=/openstack/{{ inventory_hostname }}/{{ service_name }} var/lib/{{ service_name }} none bind 0 0"
- "{{ elastic_lxc_template_config[(lxc_major_version | int)]['aa_profile'] }}=unconfined"
- "lxc.mount.entry=/openstack/{{ inventory_hostname }}/{{ service_name }} var/lib/{{ service_name }} none bind 0 0"
- "lxc.apparmor.profile=unconfined"
delegate_to: "{{ physical_host }}"
when:
- container_tech | default('lxc') == 'lxc'