remyma.springboot
Ansible Spring Boot
Spring BootアプリケーションをLinuxサービスとしてデプロイします。
要件
Spring Bootアプリケーションは、以下の説明に従って完全に実行可能なjarファイルとしてパッケージされている必要があります:
ロール変数
変数名 | デフォルト | 説明 |
---|---|---|
springboot_java_install | true | このロールでJavaをインストールしたい場合はtrue。既にJavaがインストールされている場合はfalseを使用してください。 |
springboot_src_file | 必須またはspringboot_src_url を使用。デプロイするSpring Bootのjarのパス。 |
|
springboot_src_url | 必須またはspringboot_src_file を使用。デプロイするSpring BootのjarのURL。 |
|
springboot_application_name | 必須。Springアプリケーション名。デプロイするjar、systemdサービスなどの名前に使用。 | |
springboot_propertyfile_template | オプション。アプリのプロパティを管理するためのテンプレートのパス(例:application.properties、application.yml)。 | |
springboot_configuration_template | オプション。アプリの設定を管理するためのテンプレートのパス(詳細は: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 }} | アプリケーションのjarがデプロイされるフォルダー |
springboot_user | springboot | Spring Bootアプリケーションを実行するLinuxユーザー |
springboot_group | springboot | Spring Bootアプリケーションを実行するLinuxグループ |
サンプルプレイブック
最小のプレイブック:
- hosts: all
vars:
springboot_application_name: spring-boot-sample
springboot_src: tests/spring-boot-sample.jar
roles:
- role: ansible-springboot
アプリケーションの構成やプロパティもデプロイしたい場合:
- 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
ライセンス
BSD
インストール
ansible-galaxy install remyma.springboot
ライセンス
Unknown
ダウンロード
477
所有者