Giter Club home page Giter Club logo

ansible-role-memcached's Introduction

Ansible Role: Memcached

CI

An Ansible Role that installs Memcached on RedHat/CentOS or Debian/Ubuntu Linux.

Requirements

None.

Role Variables

Available variables are listed below, along with default values (see defaults/main.yml):

memcached_user: memcache

The user under which the Memcached daemon will run.

memcached_port: 11211
memcached_listen_ip: 127.0.0.1

The port and IP address (127.0.0.1 for localhost) on which Memcached will listen for requests.

memcached_threads: 4

Number of threads to run.

memcached_memory_limit: 64
memcached_max_item_size: 1m
memcached_connections: 1024

Memcached limits. The maximum amount of RAM memcached will consume (64MB is the default), the memory-limit of a single item and the maximum number of simultaneous connections memcached will handle.

memcached_log_file: /var/log/memcached.log

The location of the memcached log file.

memcached_log_verbosity: ""

Normally memcached does not log anything. Change to "-v" to enable logging or to "-vv" for debug logging.

Dependencies

None.

Example Playbook

- hosts: cache
  roles:
    - { role: geerlingguy.memcached }

License

MIT / BSD

Author Information

This role was created in 2014 by Jeff Geerling, author of Ansible for DevOps.

ansible-role-memcached's People

Contributors

agrrh avatar dboesswetter avatar flavio-fernandes avatar geerlingguy avatar gudata avatar nullfieldio avatar rikvdh avatar thebinary avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ansible-role-memcached's Issues

Log file is not created/written to (EL7)

By default, the log file is set to /var/log/memcached.log but the file is never created or written to. Even when setting the debug level to -vvv the file remains uncreated. I had wondered if this was a permissions issue since the process runs as the memcached user and the /var/log directory is only writable by root, but even after creating the file manually and setting write permission to the memcached user, the file remained empty. It seems that the debug information is instead readable in journalctl.

Memcached service not restarted after install

Steps to reproduce:

  1. Generate a VM (Ubuntu)
  2. Run this role
  3. Memcached runs with old configuration instead of the ansible-provisioned one

The handler r_estart memcached_ doesn't fire after a clean install. That means that - for example - memcached still listens on localhost instead of a specific configured IP-address.

I think this line should be removed from the handler, because it is default behaviour of Ansible to not call a handler if the status is not changed afaik.

when: not memcached_install.changed

Add support for changing chunk size

Chunk size is set in OPTIONS with "I":

-I 16M

So the proposed change would be:

Variable (default size is 1MB = 1M):

memcached_chunk_size: 1M

And in the template (note, it's I not L):

OPTIONS="-I {{ memcached_chunk_size }} -l {{ memcached_listen_ip }} {{ memcached_log_verbosity }} >> {{ memcached_log_file }} 2>&1"

Allow specifying repo on RedHat

Would you be willing to add a variable to allow installing the package from a specific repo. redis role already includes this feature.

Shall I create a pull request for the same?

ubuntu 20.04 memcached service control broken

Ubuntu: 20.04 LTS
role version: 2.2.0

performing any commands via "service" doesnt work correctly on Ubuntu 20.04 LTS

e.g. service memcached stop" doesn't stop the process correctly as output via ps shows the process is still running
"ps aux | grep memcache"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.