pellepelster.springboot-role

角色名称

此角色用于配置一个 Spring Boot 应用程序。

要求

Spring Boot 应用程序必须使用 Spring Boot Gradle 插件 构建,并将 executable 选项设置为 true,这样构建会生成一个可执行的 JAR,可以用作服务。

示例 build.gradle

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:1.3.5.RELEASE")
    }
}

apply plugin: 'java'
apply plugin: 'spring-boot'

repositories {
    mavenCentral()
}

dependencies {
    compile("org.springframework.boot:spring-boot-starter-web")
    compile("org.springframework.boot:spring-boot-starter-actuator")
    testCompile("org.springframework.boot:spring-boot-starter-test")
}

springBoot {
    executable = true
}

角色变量

可以用来参数化此角色的变量及其简要说明如下。(有关所有变量,请查看 defaults/main.yml

# 应用程序 ID,用于推导用户名、应用程序安装文件夹等
spring_boot_application_id: "springbootapplication"

# Spring Boot 应用程序监听的 HTTP 端口
spring_boot_http_port: 8080

依赖关系

没有依赖关系。

示例剧本

提供一个如何使用您的角色的示例(例如,作为参数传递的变量)对用户也是很有帮助的:

hosts: localhost
roles:
- { role: ansible-springboot-role, 
    spring_boot_file_source_local: 'example-application.jar' 
  }

许可证

BSD

作者信息

Christian Pelster, pelle@pelle.io, https://github.com/pellepelster/ansible-springboot-role

关于项目

This roles provisions a Spring Boot application

安装
ansible-galaxy install pellepelster.springboot-role
许可证
Unknown
下载
509