Files
sf_databuffer/operation-tools/install_imageapi.yml

37 lines
1.0 KiB
YAML

- hosts: imageapi
become: true
gather_facts: no
vars:
imageapi_version: 0.0.0.000
tasks:
- name: mkdir deployment directory
file:
path: /opt/imageapi/{{imageapi_version}}/lib
owner: daqusr
group: daq
state: directory
- name: deploy jar
get_url:
url: https://artifacts.psi.ch/artifactory/libs-snapshots-local/ch/psi/daq/imageapi/{{imageapi_version}}/imageapi-{{imageapi_version}}-all.jar
dest: /opt/imageapi/{{imageapi_version}}/lib
owner: daqusr
group: daq
- template:
src: templates/imageapi.service.j2
dest: /etc/systemd/system/imageapi.service
- name: mkdir etc
file:
path: /etc/imageapi
group: daq
state: directory
- template:
src: templates/imageapi.application.properties
dest: /etc/imageapi/application.properties
- name: reload systemd daemon
systemd:
daemon_reload: yes
- name: enable service
systemd:
name: imageapi
enabled: yes