37 lines
924 B
YAML
37 lines
924 B
YAML
---
|
|
- name: Install dependencies
|
|
ansible.builtin.apt:
|
|
name: [ nodejs, npm, imagemagick, graphicsmagick, ffmpeg ]
|
|
|
|
- name: Clone source
|
|
ansible.builtin.git:
|
|
repo: https://github.com/bitlair/photo-gallery.git
|
|
version: master
|
|
dest: /opt/photo-gallery
|
|
accept_hostkey: yes
|
|
notify: restart photo-gallery
|
|
|
|
- name: Install photo-gallery config file
|
|
ansible.builtin.template:
|
|
src: photo-gallery-config.json
|
|
dest: /opt/photo-gallery/config.json
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
notify: restart photo-gallery
|
|
|
|
- name: Install photo-gallery service file
|
|
ansible.builtin.template:
|
|
src: photo-gallery.service
|
|
dest: /etc/systemd/system/photo-gallery.service
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
notify: restart photo-gallery
|
|
|
|
- name: Start photo-gallery
|
|
ansible.builtin.systemd:
|
|
name: photo-gallery
|
|
state: started
|
|
enabled: yes
|
|
daemon_reload: true
|