Skip to content

tecris/ansible-maven

Repository files navigation

Maven ansible role

Installation

$ ansible-galaxy install tecris.ansible-maven # latest version

$ ansible-galaxy install tecris.ansible-maven,17.10.28 # specific version

Example Playbook

 - hosts: all
   roles:
     - { role: tecris.ansible-maven, maven_major: 3, maven_version: 3.9.14, maven_home_parent_directory: /opt }

Role Variables

defaults/main.yml

Variable Default Value Description
maven_major 3 MAJOR version
maven_version 3.9.14 Version number
maven_home_parent_directory /opt MAVEN_HOME parent directory
maven_download_url http://www.apache.org/dist/maven/maven-3/3.9.14/binaries/apache-maven-3.9.14-bin.tar.gz If using mirror/proxy (see ansible.builtin.get_url)
maven_download_username see url_username parameter
maven_download_password see url_password parameter

Tests

  • See molecule
  • How to
    • Preliminary tasks
      • Buid molecule docker image
        # git clone https://github.com/tecris/dockerfiles
        # cd dockerfiles/molecule/26.3
        # ./build_image.sh
        
      • Build test image (example for debian 10)
        • Step 1
          # git clone https://github.com/tecris/dockerfiles
          # cd dockerfiles/systemd
          # ./build_images.sh
          
        • Step 2 (add jdk to test image)
          # git clone https://github.com/tecris/ansible-maven
          # cd ansible-maven/dockerfiles
          # ./build_images.sh
          
    • Run molecule test
      # git clone https://github.com/tecris/ansible-maven
      # cd ansible-maven
      # ./run_tests.sh
      

Housekeeping

About

Ansible role to install maven. https://galaxy.ansible.com/ui/standalone/roles/tecris/ansible-maven

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors