entercloudsuite.memcached
Ansible Role: memcached
Installs memcached on Ubuntu 16.04 (Xenial)
Requirements
This role requires Ansible 2.4 or higher.
Role Variables
The role defines its variables in defaults/main.yml
:
Name | Description | Default Value |
---|---|---|
memcache_bind_ip | Memcached network bind ip | 127.0.0.1 |
memcache_port | Memcached network port | 11211 |
memcache_log_file | Memcached log file path | /var/log/memcached.log |
memcache_memory | Memcached RAM in mb to use | 64 |
memcache_user | Memcached process user | memcache |
memcache_debug | Enable/Disable debug logging |
Example Playbook
Run with default vars:
- hosts: all
roles:
- { role: ansible-memcached }
Production Example
- hosts: all
roles:
- role: ansible-memcached
memcache_bind_ip: 0.0.0.0
memcache_memory: 2048
Testing
Tests are performed using Molecule.
Install Molecule or use docker-compose run --rm molecule
to run a local Docker container, based on the enterclousuite/molecule project, from where you can use molecule
.
- Run
molecule create
to start the target Docker container on your local engine. - Use
molecule login
to log in to the running container. - Edit the role files.
- Add other required roles (external) in the molecule/default/requirements.yml file.
- Edit the molecule/default/playbook.yml.
- Define infra tests under the molecule/default/tests folder using the goos verifier.
- When ready, use
molecule converge
to run the Ansible Playbook andmolecule verify
to execute the test suite.
Note that the converge process starts performing a syntax check of the role.
Destroy the Docker container with the commandmolecule destroy
.
To run all the steps with just one command, run molecule test
.
In order to run the role targeting a VM, use the playbook_deploy.yml file for example with the following command: ansible-playbook ansible-memcached/molecule/default/playbook_deploy.yml -i VM_IP_OR_FQDN, -u ubuntu --private-key private.pem
.
License
MIT
Install
ansible-galaxy install entercloudsuite.memcached
License
mit
Downloads
450
Owner