From 2bf8171dcfc7ee22fa2cf18ad054eee7226e69db Mon Sep 17 00:00:00 2001 From: Jonathan Rosser Date: Wed, 24 Oct 2018 17:09:24 +0100 Subject: [PATCH] Change netcat to be a required package Netcat is not a direct dependancy of memcached nor the playbooks in this role, however other OSA roles delegate tasks to the memcached container and run shell commands which use nc. This patch ensures that netcat is explicity installed into the memcached container and we do not rely on it being present in the container base image. Given that the memcached_test_distro_packages variable is no longer used, the associated bits for it are also removed. Change-Id: Id046aa97ed90654f1859e584891fe5228f96aa90 (cherry picked from commit 261db5b8837e078f7880f9fac562b93467384b6d) --- tasks/memcached_install.yml | 2 +- vars/debian.yml | 2 -- vars/main.yml | 26 -------------------------- vars/redhat.yml | 2 -- vars/suse.yml | 2 -- 5 files changed, 1 insertion(+), 33 deletions(-) delete mode 100644 vars/main.yml diff --git a/tasks/memcached_install.yml b/tasks/memcached_install.yml index 9faef8d..0fd3599 100644 --- a/tasks/memcached_install.yml +++ b/tasks/memcached_install.yml @@ -15,7 +15,7 @@ - name: Install distro packages package: - name: "{{ memcached_package_list }}" + name: "{{ memcached_distro_packages }}" state: "{{ memcached_package_state }}" update_cache: "{{ (ansible_pkg_mgr == 'apt') | ternary('yes', omit) }}" cache_valid_time: "{{ (ansible_pkg_mgr == 'apt') | ternary(cache_timeout, omit) }}" diff --git a/vars/debian.yml b/vars/debian.yml index 6cc4a26..422e7bb 100644 --- a/vars/debian.yml +++ b/vars/debian.yml @@ -17,8 +17,6 @@ memcached_user: memcache memcached_distro_packages: - memcached - -memcached_test_distro_packages: - netcat memcached_conf_template: memcached.conf.debian.j2 diff --git a/vars/main.yml b/vars/main.yml deleted file mode 100644 index 79f8a89..0000000 --- a/vars/main.yml +++ /dev/null @@ -1,26 +0,0 @@ ---- -# Copyright 2017, Rackspace US, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# -# Compile a list of the distro packages to install based on -# whether the host is in the host group and the service is -# enabled. -# -memcached_package_list: |- - {% set packages = memcached_distro_packages %} - {% if install_test_packages | bool %} - {% set _ = packages.extend(memcached_test_distro_packages) %} - {% endif %} - {{ packages }} diff --git a/vars/redhat.yml b/vars/redhat.yml index be2d55d..39edb4b 100644 --- a/vars/redhat.yml +++ b/vars/redhat.yml @@ -17,8 +17,6 @@ memcached_user: memcached memcached_distro_packages: - memcached - -memcached_test_distro_packages: - nc memcached_conf_template: memcached.redhat.j2 diff --git a/vars/suse.yml b/vars/suse.yml index 689dded..b8ffd86 100644 --- a/vars/suse.yml +++ b/vars/suse.yml @@ -17,8 +17,6 @@ memcached_user: memcached memcached_distro_packages: - memcached - -memcached_test_distro_packages: - netcat-openbsd memcached_conf_template: memcached.suse.j2