You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
778 B
30 lines
778 B
8 years ago
|
---
|
||
|
# Include variables and define needed variables.
|
||
|
- name: Include OS-specific variables.
|
||
|
include_vars: "{{ ansible_os_family }}.yml"
|
||
|
|
||
|
- name: Define memcached_user.
|
||
|
set_fact:
|
||
|
memcached_user: "{{ __memcached_user }}"
|
||
|
when: memcached_user is not defined
|
||
|
|
||
|
# Setup/install tasks.
|
||
|
- include: setup-RedHat.yml
|
||
|
when: ansible_os_family == 'RedHat'
|
||
|
|
||
|
- include: setup-Debian.yml
|
||
|
when: ansible_os_family == 'Debian'
|
||
|
|
||
|
# Configure Memcached.
|
||
|
- name: Copy Memcached configuration.
|
||
|
template:
|
||
|
src: memcached-{{ ansible_os_family }}.conf.j2
|
||
|
dest: "{{ memcached_config_file }}"
|
||
|
owner: root
|
||
|
group: root
|
||
|
mode: 0644
|
||
|
notify: restart memcached
|
||
|
|
||
|
- name: Ensure Memcached is started and set to run on startup.
|
||
|
service: name=memcached state=started enabled=yes
|