Git Product home page Git Product logo

ansible-role-maven's Introduction

Maven Role

Build Status

This role installs apache maven and makes it available to be used by all users on the system.

Role Depenendencies

This role requires java to be installed - it currently depends on geerlingguy.java and installs OpenJDK 8.

Role Variables

Defaults

All role default variables can be seen in the defaults/main.yml file.

Variables that are of interest to end users are:

maven_user: "root"                  # If maven is being setup to be used by a given user (e.g. jenkins), this will ensure the settings.xml file is put in their home
maven_install_dir: "/usr/local"     # Where should maven be installed into
maven_version: "3.5.2"              # Version of Maven to install - see available versions at https://archive.apache.org/dist/maven/maven-3/

Custom variables

A custom Maven settings file can be used by injecting the complete XML via the maven_settings_file_content variable. If this is not provided, the default settings.xml file is used.

Here is an example of setting up a custom settings file via variable injection:

    - role: ansible-role-maven
      maven_settings_file_content: |
        <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                              http://maven.apache.org/xsd/settings-1.0.0.xsd">
          <interactiveMode>true</interactiveMode>
        </settings>

Role Usage

Ansible Galaxy Requirements.yml

  • Add the following content into the requirements.yml (Ansible Galaxy file). If you need a specific version, add that based on the available tagged versions
---
# from Github with specific tagged version and rename
- src: https://github.com/oldNoakes/ansible-role-maven.git
  name: maven
  version: 1.0.0

# from Galaxy with specific tagged version
- src: oldNoakes.maven
  version : 1.0.0

# from Galaxy 
- src: oldNoakes.maven

Role usage in playbook

  • Use the role in your playbook:
- hosts: servers
  roles:
    - oldNoakes.maven

ansible-role-maven's People

Contributors

oldnoakes avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.