-
-
Notifications
You must be signed in to change notification settings - Fork 252
/
main.yml
41 lines (33 loc) · 1.19 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
- name: check for a boot config file
stat:
path: /boot/config.txt
register: boot_config_result
- name: save whether boot config file exists
set_fact:
boot_config_exists: "{{ boot_config_result.stat.exists }}"
- name: check if TC358743 settings (HDMI to CSI, such as Voyager series) are enabled
# We could theoretically use the "lineinfile" module to check for the overlay,
# but we're moving away from Ansible, and grep makes the logic easier to read.
command: grep --silent '^dtoverlay=tc358743$' /boot/config.txt
register: tc358743_result
check_mode: no
ignore_errors: yes
changed_when: no
when: boot_config_exists | bool
- name: save whether TC358743 settings are enabled
set_fact:
is_tc358743_enabled: "{{ boot_config_exists and tc358743_result.rc == 0 }}"
- name: print whether TC35843 settings are enabled
debug:
var: is_tc358743_enabled
- name: install Janus
include_tasks: install_janus.yml
- name: install uStreamer Debian package
apt:
deb: "{{ ustreamer_debian_package_path }}"
- name: configure TC358743 HDMI capture chip
import_tasks: provision_tc358743.yml
when: is_tc358743_enabled | bool
- name: install yq
import_tasks: install_yq.yml