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
This commit is contained in:
Jonathan Rosser 2018-10-24 17:09:24 +01:00 committed by Jesse Pretorius
parent b69fafbebd
commit 261db5b883
5 changed files with 1 additions and 33 deletions

View File

@ -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) }}"

View File

@ -17,8 +17,6 @@ memcached_user: memcache
memcached_distro_packages:
- memcached
memcached_test_distro_packages:
- netcat
memcached_conf_template: memcached.conf.debian.j2

View File

@ -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 }}

View File

@ -17,8 +17,6 @@ memcached_user: memcached
memcached_distro_packages:
- memcached
memcached_test_distro_packages:
- nc
memcached_conf_template: memcached.redhat.j2

View File

@ -17,8 +17,6 @@ memcached_user: memcached
memcached_distro_packages:
- memcached
memcached_test_distro_packages:
- netcat-openbsd
memcached_conf_template: memcached.suse.j2