Add configuration part
This commit is contained in:
parent
6d017e8470
commit
7b9292c247
|
@ -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`.
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
6
memcached/templates/memcached.conf.j2
Normal file
6
memcached/templates/memcached.conf.j2
Normal file
|
@ -0,0 +1,6 @@
|
|||
-d
|
||||
logfile {{ memcached_logfile }}
|
||||
-m {{ memcached_mem }}
|
||||
-u {{ memcached_user }}
|
||||
-l {{ memcached_bind_interface }}
|
||||
-c {{ memcached_connections }}
|
Loading…
Reference in a new issue