wemux
wemux
Installs and configures wemux on a host.
Requirements
This role depends on the git role by geerlingguy.
Role Variables
The default role variables in defaults/main.yml
are:
---
# defaults file for wemux
wemux:
install_prefix: /usr/local
host_list: root
Dependencies
You may need to add this to your Ansiblefile
:
#!/usr/bin/env ruby
#^syntax detection
site "https://galaxy.ansible.com/api/v1"
role "geerlingguy.git"
#role "geerlingguy.git" github: "geerlingguy/ansible-role-git"
Example Playbook
To run this playbook with default settings, create a basic playbook like this:
---
# This playbook deploys the wemux role for testing
- hosts: wemux-servers
user: root
roles:
- wemux
To change the default host_list
setting in the wemux.conf
file, or to change the install_prefix
path:
- hosts: servers
roles:
- { role: trinitronx.wemux, wemux: { install_prefix: /opt/, host_list: [ root, foo, myuser ] } }
License
MIT
Testing
This role uses test-kitchen
for integration testing!
To start out, you'll need to install test-kitchen
. The way I recommend to do this is to install ChefDK
which bundles test-kitchen
along with an embedded version of ruby in a known working set of gems. You may
also decide to install ruby and test-kitchen
on your own in which case you should use bundler.
Install via Bundler
Make sure you have a working Ruby and put
gem 'test-kitchen'
gem 'kitchen-vagrant'
gem 'kitchen-sync'
gem 'librarian-ansible'
gem 'kitchen-docker'
gem 'kitchen-ansible', :git => 'git://github.com/trinitronx/kitchen-ansible.git'
in your Gemfile. Then run bundle install
To run integration tests: kitchen test
Install via ChefDK
- Download ChefDK
- Install
kitchen-ansible
gemeval $(/opt/chefdk/bin/chef shell-init $(basename $SHELL)); sudo /opt/chefdk/embedded/bin/gem install kitchen-ansible; sudo /opt/chefdk/embedded/bin/gem librarian-ansible kitchen-docker kitchen-sync
- Checkout this role:
git clone https://github.com/trinitronx/ansible-role-wemux.git trinitronx.wemux && cd trinitronx.wemux
- Run Test Kitchen:
/opt/chefdk/bin/kitchen test
(Alternatively, withkitchen-docker
driver:KITCHEN_YAML=.kitchen.docker.local.yml kitchen test
)
Still Need Help?
Try checking out my other ansible-tdd example repo
Author Information
Original wemux tasks adapted from Jon Doveston's ide role
(c) 2014 Jon Doveston @hatoshi (c) 2014-2018 James Cuzella @trinitronx
ansible-galaxy install trinitronx/ansible-role-wemux