From 6565d14ae05b13f595d103525846f1a22ca8c5f0 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Thu, 12 Nov 2020 13:01:03 +0200 Subject: [PATCH] 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 --- .../roles/elastic_dependencies/defaults/main.yml | 8 -------- elk_metrics_7x/roles/elastic_dependencies/tasks/main.yml | 4 ++-- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/elk_metrics_7x/roles/elastic_dependencies/defaults/main.yml b/elk_metrics_7x/roles/elastic_dependencies/defaults/main.yml index 1fa2c5c6..9adacfbb 100644 --- a/elk_metrics_7x/roles/elastic_dependencies/defaults/main.yml +++ b/elk_metrics_7x/roles/elastic_dependencies/defaults/main.yml @@ -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. diff --git a/elk_metrics_7x/roles/elastic_dependencies/tasks/main.yml b/elk_metrics_7x/roles/elastic_dependencies/tasks/main.yml index 27eef9a2..1b041e48 100644 --- a/elk_metrics_7x/roles/elastic_dependencies/tasks/main.yml +++ b/elk_metrics_7x/roles/elastic_dependencies/tasks/main.yml @@ -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'