From b6bf3784e43944b86f721b5eeaa87347c49fa57a Mon Sep 17 00:00:00 2001 From: Matthew Thode Date: Thu, 24 Jan 2019 19:10:44 -0600 Subject: [PATCH] add gentoo support to memcached role Change-Id: I987abf6fc161f09312fbef984552313989ef3c31 --- templates/memcached.gentoo.j2 | 17 +++++++++++++++++ vars/gentoo.yml | 24 ++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 templates/memcached.gentoo.j2 create mode 100644 vars/gentoo.yml diff --git a/templates/memcached.gentoo.j2 b/templates/memcached.gentoo.j2 new file mode 100644 index 0000000..a2cfcb2 --- /dev/null +++ b/templates/memcached.gentoo.j2 @@ -0,0 +1,17 @@ +# {{ ansible_managed }} +{% if debug | bool %} + {% set _verbosity = '-vvv' %} +{% else %} + {% set _verbosity = '-v' %} +{% endif %} + +MEMCACHED_BINARY="/usr/bin/memcached" +PIDBASE="/var/run/memcached/memcached" +MEMUSAGE="{{ memcached_memory }}" +MEMCACHED_RUNAS="{{ memcached_user }}" +MAXCONN="{{ memcached_connections }}" +LISTENON="{{ memcached_listen }}" +PORT="{{ memcached_port }}" +UDPPORT="${PORT}" +MISC_OPTS="-t {{ memcached_threads }} {{ _verbosity }}" + diff --git a/vars/gentoo.yml b/vars/gentoo.yml new file mode 100644 index 0000000..0e2660c --- /dev/null +++ b/vars/gentoo.yml @@ -0,0 +1,24 @@ +--- +# Copyright 2019, Matthew Thode +# +# 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. + +memcached_user: memcached + +memcached_distro_packages: + - net-misc/memcached + - net-analyzer/netcat + +memcached_conf_template: memcached.gentoo.j2 + +memcached_conf_dest: /etc/memcached.conf