ansible-redis is an Ansible role. The role contains tasks to install Redis server, with optionally the Redmon dashboard.
- Redis
- Redmon dashboard
- Ansible 1.4 or higher
- Debian 7.3 (other deb-based distros should work too)
- Vagrant (optional)
$ git clone git@github.com:ICTO/ansible-redis.git
---
- name: Redis
hosts: redis
roles:
- ansible-redis
Use ansible.host as inventory. Run the playbook only for the remote host redis. Use vagrant as the SSH user to connect to the remote host. -k enables the SSH password prompt.
$ ansible-playbook -k -i ansible.host redis.yml -u vagrant
SSH password:
PLAY [Redis] ******************************************************************
GATHERING FACTS ***************************************************************
ok: [127.0.0.1]
TASK: [ansible-redis | Install Redis server] **********************************
ok: [127.0.0.1]
TASK: [ansible-redis | Bind Redis server to all interfaces] *******************
ok: [127.0.0.1]
TASK: [ansible-redis | Ensure Redis server is running] ************************
ok: [127.0.0.1]
TASK: [ansible-redis | Install Redmon dependencies] ***************************
ok: [127.0.0.1] => (item=git)
ok: [127.0.0.1] => (item=ruby1.9.1)
ok: [127.0.0.1] => (item=ruby1.9.1-dev)
ok: [127.0.0.1] => (item=g++)
TASK: [ansible-redis | Install Redmon gems] ***********************************
ok: [127.0.0.1] => (item=bundler)
ok: [127.0.0.1] => (item=redmon)
TASK: [ansible-redis | Install Redmon init script] ****************************
ok: [127.0.0.1]
TASK: [ansible-redis | Ensure Redis server is running] ************************
ok: [127.0.0.1]
PLAY RECAP ********************************************************************
127.0.0.1 : ok=8 changed=0 unreachable=0 failed=0