Add configuration part

This commit is contained in:
Tristan PILAT 2017-04-05 10:29:03 +02:00
parent 6d017e8470
commit 7b9292c247
4 changed files with 39 additions and 0 deletions

View File

@ -8,4 +8,12 @@ Minimal configuration is in `tasks/main.yml`
## Available variables
Main variables are :
* `memcached_logfile`: path of the log file ;
* `memcached_mem`: amount of memory ;
* `memcached_user`: running user ;
* `memcached_bind_interface`: interface to listen to ;
* `memcached_connections`: number of simultaneous incoming connections ;
The full list of variables (with default values) can be found in `defaults/main.yml`.

View File

@ -1 +1,7 @@
---
memcached_logfile: '/var/log/memcached.log'
memcached_mem: 64
memcached_user: 'nobody'
memcached_bind_interface: '0.0.0.0'
memcached_connections: 1024

View File

@ -2,3 +2,22 @@
apt:
name: memcached
state: present
tags:
- memcached
- name: Memcached is configured.
template:
src: memcached.conf.j2
dest: /etc/memcached.conf
mode: "0644"
notify: restart memcached
tags:
- memcached
- name: Memcached is running and enabled on boot.
service:
name: memcached
enabled: yes
state: started
tags:
- memcached

View File

@ -0,0 +1,6 @@
-d
logfile {{ memcached_logfile }}
-m {{ memcached_mem }}
-u {{ memcached_user }}
-l {{ memcached_bind_interface }}
-c {{ memcached_connections }}