remyma.springboot

Ansible Spring Boot

Build Status

Deploy Spring Boot applications as Linux services.

Requirements

Your Spring Boot application must be packaged as a fully executable JAR file, as explained here:

https://docs.spring.io/spring-boot/docs/current/reference/html/deployment-install.html#deployment-script-customization-conf-file

Role Variables

Variable Default Description
springboot_java_install true Set to false if Java is already installed.
springboot_src_file Required. Path to the Spring Boot JAR to deploy.
springboot_src_url Required. URL of the Spring Boot JAR to deploy.
springboot_application_name Required. Name of the Spring application.
springboot_propertyfile_template Optional. Path to a template for your app properties (e.g., application.properties, application.yml).
springboot_configuration_template Optional. Path to a template for your app config (see: https://docs.spring.io/spring-boot/docs/current/reference/html/deployment-install.html#deployment-script-customization-when-it-runs).
springboot_deploy_folder /opt/{{ springboot_application_name }} Folder where the application JAR is deployed.
springboot_user springboot Linux user to run the Spring Boot application.
springboot_group springboot Linux group to run the Spring Boot application.

Example Playbook

Minimal playbook:

- hosts: all
  vars:
    springboot_application_name: spring-boot-sample
    springboot_src: tests/spring-boot-sample.jar
  roles:
    - role: ansible-springboot

If you want to also deploy configuration and/or properties for your application:

- hosts: all
  vars:
    springboot_application_name: spring-boot-sample
    springboot_src: spring-boot-sample.jar
    springboot_propertyfile_template: /path/to/your/template/application.yml
    springboot_configuration_template: /path/to/your/template/spring-boot-sample.conf
  roles:
    - role: ansible-springboot

License

BSD

Informazioni sul progetto

Deploy springboot applications

Installa
ansible-galaxy install remyma.springboot
Licenza
Unknown
Download
477
Proprietario