ansible_playbook_audiometer/roles/ffmpeg_command/tasks/main.yml
2023-02-21 12:23:34 +01:00

32 lines
802 B
YAML

---
- name: Make sure stream_input_url is set
ansible.builtin.fail:
msg: "Please define stream_input_url"
when: stream_input_url == false
- name: Make sure stream_name is set
ansible.builtin.fail:
msg: "Please define stream_name"
when: stream_name == false
- name: Create systemd service
become: true
ansible.builtin.template:
src: 'templates/audiometer.service.j2'
dest: '/lib/systemd/system/audiometer.service'
mode: 0640
owner: root
group: root
notify: Systemctl restart audiometer.service
# todo: make sure user exist
- name: Create ffmpeg command
become: true
ansible.builtin.template:
src: templates/audiometer.sh.j2
dest: /opt/audiometer.sh
mode: 0655
owner: video
group: video
notify: Systemctl restart audiometer.service