summaryrefslogtreecommitdiff
path: root/roles/info-beamer/config/tasks/main.yml
blob: c603d11c8571b9406abae3dc56661c291348f1ac (plain) (blame)
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
---
- name: check if info-beamer base directory is configured
  debug:
    msg: "check if base directory is set"
  failed_when: not info_beamer_base_path

- name: remove existing config directory
  file:
    path: "{{ info_beamer_base_path }}/config"
    state: absent

- name: create new/empty config directory
  file:
    path: "{{ info_beamer_base_path }}/config"
    state: directory

- name: configure video output resolution
  when: info_beamer_hdmi_resolution is defined
  copy:
    content: |
      hdmi_group={{ info_beamer_hdmi_resolution.group }}
      hdmi_mode={{ info_beamer_hdmi_resolution.mode }}
    dest: "{{ info_beamer_base_path }}/config/screen-settings.txt"

- name: configure audio output
  when: info_beamer_audio_target is defined
  copy:
    content: "{{ info_beamer_audio_target }}"
    dest: "{{ info_beamer_base_path }}/config/audio"

- name: configure ssh keys
  when: info_beamer_ssh_keys is defined
  copy:
    content: "{{ info_beamer_ssh_keys | join('\n') }}"
    dest: "{{ info_beamer_base_path }}/config/authorized_keys"

- name: configure wired network interface
  when: info_beamer_network is defined
  copy:
    content: |
      {{ info_beamer_network.address }}
      {{ info_beamer_network.netmask }}
      {{ info_beamer_network.gateway }}
      {{ info_beamer_network.dns }}
    dest: "{{ info_beamer_base_path }}/config/network"

- name: configure wireless network interface
  when: info_beamer_wireless is defined
  copy:
    content: |
      {{ info_beamer_wireless.ssid }}
      {{ info_beamer_wireless.key }}
    dest: "{{ info_beamer_base_path }}/config/wireless"

- name: enable info-beamer feature flags
  loop: "{{ info_beamer_feature_flags | dict2items }}"
  loop_control:
    label: "{{ item.key }}({{ item.value }}"
  when: item.value
  copy:
    content: ""
    dest: "{{ info_beamer_base_path }}/config/{{ item.key }}"

- name: configure scaling governor
  copy:
    content: "{{ info_beamer_scaling_governor }}"
    dest: "{{ info_beamer_base_path }}/config/scaling_governor"

- name: install branding logo
  when: info_beamer_branding_logo is defined
  copy:
    src: "{{ info_beamer_branding_logo }}"
    dest: "{{ info_beamer_base_path }}/config/branding.ppm"

- name: install branding background
  when: info_beamer_branding_background is defined
  copy:
    src: "{{ info_beamer_branding_background }}"
    dest: "{{ info_beamer_base_path }}/config/branding.jpg"

- name: install branding video
  when: info_beamer_branding_video is defined
  copy:
    src: "{{ info_beamer_branding_video }}"
    dest: "{{ info_beamer_base_path }}/config/branding.mp4"

- name: configure device connect key
  when: info_beamer_device_connect_key is defined
  copy:
    content: "{{ info_beamer_device_connect_key }}"
    dest: "{{ info_beamer_base_path }}/config/device-connect-key.txt"