first successful test
This commit is contained in:
@ -15,28 +15,28 @@
|
||||
set_fact:
|
||||
cpu_architecture: "{{ cpu_architecture_output.stdout_lines[0] }}"
|
||||
|
||||
- name: Video Capture - Install Packages
|
||||
when: not refresh_special | bool
|
||||
apt:
|
||||
name:
|
||||
- "{{ streamer_packages_items }}"
|
||||
state: present
|
||||
loop: "{{ streamer_packages }}"
|
||||
loop_control:
|
||||
loop_var: streamer_packages_items
|
||||
#- name: Video Capture - Install Packages
|
||||
# when: not refresh_special | bool
|
||||
# apt:
|
||||
# name:
|
||||
# - "{{ streamer_packages_items }}"
|
||||
# state: present
|
||||
# loop: "{{ streamer_packages }}"
|
||||
# loop_control:
|
||||
# loop_var: streamer_packages_items
|
||||
#
|
||||
#- name: Video Capture - SD Card Handler
|
||||
# when: mount_sd | bool
|
||||
# include_tasks: sd_handler.yaml
|
||||
#
|
||||
#- name: Video Capture - Configure MediaMTX
|
||||
# include_tasks: mediamtx.yaml
|
||||
#
|
||||
#- name: Video Capture - Configure Streaming
|
||||
# include_tasks: streamer.yaml
|
||||
|
||||
- name: Video Capture - SD Card Handler
|
||||
when: mount_sd | bool
|
||||
include_tasks: sd_handler.yaml
|
||||
|
||||
- name: Video Capture - Configure MediaMTX
|
||||
include_tasks: mediamtx.yaml
|
||||
|
||||
- name: Video Capture - Configure Streaming
|
||||
include_tasks: streamer.yaml
|
||||
|
||||
#- name: Video Capture - Configure service control
|
||||
# include_tasks: service_control.yaml
|
||||
- name: Video Capture - Configure service control
|
||||
include_tasks: service_control.yaml
|
||||
|
||||
|
||||
...
|
||||
@ -60,6 +60,21 @@
|
||||
dest: /etc/systemd/system/service_control.service
|
||||
mode: 0644
|
||||
|
||||
- name: video_capture - service timeout helper files
|
||||
block:
|
||||
|
||||
- name: video_capture - create service_timeout.sh
|
||||
template:
|
||||
src: service_timeout.sh.j2
|
||||
dest: "{{ service_control_folder }}/service_timeout.sh"
|
||||
mode: 0755
|
||||
|
||||
- name: video_capture - create service_timeout.service
|
||||
template:
|
||||
src: service_timeout.service.j2
|
||||
dest: /etc/systemd/system/service_timeout.service
|
||||
mode: 0644
|
||||
|
||||
# daemon reload
|
||||
- name: video_capture - service_control api - daemon reload
|
||||
systemd:
|
||||
@ -72,6 +87,11 @@
|
||||
state: started
|
||||
enabled: yes
|
||||
|
||||
- name: video_capture - service_control api - enable and start service timeoue api
|
||||
systemd:
|
||||
name: service_timeout.service
|
||||
state: started
|
||||
enabled: yes
|
||||
|
||||
|
||||
###############################################
|
||||
@ -102,24 +122,27 @@
|
||||
owner: root
|
||||
group: root
|
||||
|
||||
# - name: service_control_website - template index.php
|
||||
# template:
|
||||
# src: index-service_control.php.j2
|
||||
# dest: "{{ service_control_web_folder }}/html/index.php"
|
||||
# mode: 0644
|
||||
#- name: service_control_website - template index.php
|
||||
# template:
|
||||
# src: index-service_control.php.j2
|
||||
# dest: "{{ service_control_web_folder }}/html/index.php"
|
||||
# mode: 0644
|
||||
|
||||
###############################################
|
||||
# Start service_control_website
|
||||
###############################################
|
||||
# https://unix.stackexchange.com/questions/265704/start-stop-a-systemd-service-at-specific-times
|
||||
# i can create several conflicting services with various timeouts
|
||||
# https://unix.stackexchange.com/questions/265704/start-stop-a-systemd-service-at-specific-times
|
||||
# i can create several conflicting services with various timeouts
|
||||
|
||||
- name: start service_control_website
|
||||
when: not refresh_special | bool
|
||||
block:
|
||||
|
||||
- name: set container variables
|
||||
set_fact:
|
||||
container_name: "service_control_website"
|
||||
container_http_port: "8081"
|
||||
extra_volumes: ""
|
||||
|
||||
- name: service_control_website - template config
|
||||
template:
|
||||
|
||||
@ -37,7 +37,7 @@
|
||||
# same with video, the lsusb ID is 534d:0021
|
||||
|
||||
- name: video_capture - get video device
|
||||
shell: "v4l2-ctl --list-devices -z {{ lsusb_device_ID }}| grep video | head -n 1"
|
||||
shell: "v4l2-ctl --list-devices -z {{ lsusb_device_ID }} | grep video | head -n 1 | awk '{print $1}'"
|
||||
register: video_ID_0
|
||||
|
||||
- name: video_capture - set video_device
|
||||
|
||||
Reference in New Issue
Block a user