geerlingguy.memcached
Ansible Role: Memcached
This is an Ansible Role that installs Memcached on RedHat/CentOS or Debian/Ubuntu Linux.
Requirements
There are no special requirements.
Role Variables
Here are the available variables and their default values (check defaults/main.yml
for more details):
memcached_user:
memcache
This is the user that the Memcached program will run as.memcached_port:
11211
memcached_listen_ip:
127.0.0.1
These are the port and IP address (127.0.0.1 means it only listens on the local machine) where Memcached will accept requests.memcached_threads:
4
This is the number of threads that Memcached will use to handle requests.memcached_memory_limit:
64
memcached_max_item_size:
1m
memcached_connections:
1024
These are the limits for Memcached. The maximum memory it can use is 64MB (default), the maximum size of a single item is 1MB, and it can handle up to 1024 simultaneous connections.memcached_log_file:
/var/log/memcached.log
This is where the Memcached log files will be saved.memcached_log_verbosity:
""
By default, Memcached does not log anything. Change this to "-v" for normal logging or "-vv" for debug-level logging.
Dependencies
There are no dependencies.
Example Playbook
- hosts: cache
roles:
- { role: geerlingguy.memcached }
License
This role is licensed under MIT / BSD.
Author Information
This role was created in 2014 by Jeff Geerling, who is also the author of Ansible for DevOps.
Memcached for Linux
ansible-galaxy install geerlingguy.memcached