Ansible role to install Apache Maven.
---
- hosts: servers
roles:
- codeyourinfra.maven
The default role behavior is to install the latest Maven version. If you want to install a specific version, like the 3.6.0, please set the variables as shown below:
---
- hosts: servers
roles:
- role: codeyourinfra.maven
vars:
use_latest_version: False
maven_version: 3.6.0
The role is dependent of Codeyourinfra's Java 8 Ansible role, once we need Java to run Maven. Java is so installed before the Maven installation.
The build process is performed by Travis CI. During the build, Molecule is used to test the role.
Inside your Python virtual environment, run:
pip install -r requirements.txt
And then:
molecule test
@gustavomcarmo is a contributor of Codeyourinfra. Get on board too! :)