Add template for vdr-addon-acpiwakeup.conf

This commit is contained in:
Alexander Grothe 2017-11-20 11:54:11 +01:00
parent 74159df8ac
commit 115bfe66c9
3 changed files with 54 additions and 20 deletions

View File

@ -3576,18 +3576,38 @@ wakeup_method: "acpiwakeup"
# file roles/wakeup/tasks/main.yml # file roles/wakeup/tasks/main.yml
- name: install and configure vdr-addon-acpiwakeup - name: install and configure vdr-addon-acpiwakeup
block: apt:
- apt: name: vdr-addon-acpiwakeup
name: vdr-addon-acpiwakeup state: present
state: present
- lineinfile:
path: /etc/vdr/vdr-addon-acpiwakeup.conf
regexp: '^ACPI_ENABLED='
line: 'ACPI_ENABLED="yes"'
when: wakeup_method == "acpiwakeup" when: wakeup_method == "acpiwakeup"
- name: expand template for /etc/vdr/vdr-addon-acpiwakeup.conf
template:
src: roles/wakeup/vdr-addon-acpiwakeup.conf.j2
dest: /etc/vdr/vdr-addon-acpiwakeup.conf
#+END_SRC #+END_SRC
*** templates
#+BEGIN_SRC jinja2 :tangle roles/wakeup/templates/vdr-addon-acpiwakeup.conf.j2 :padline no
{{ ansible_managed_file | comment }}
# Activate/deactivate ACPIWakeup with yes/no:
ACPI_ENABLED="{% if wakeup_method == 'acpiwakeup' %}yes{% else %}no{% endif %}"
# How many minutes should the machine wake up before the timer starts:
ACPI_START_AHEAD=5
# If you want your VDR machine to wakeup in regular intervals (i.e. for
# updating EPG data), specify the days of the week and the wakeup time.
#
# Days of the week for regular wakeup (not set=Disabled, 1=Monday...7=Sunday)
# ACPI_REGULAR_DAYS="1 2 3 4 5 6 7"
# Wakeup time
#ACPI_REGULAR_TIME=01:00 # HH:MM
#+END_SRC
** grub-config ** grub-config
*** default variables *** default variables
#+BEGIN_SRC yaml :tangle roles/grub-config/defaults/main.yml :mkdirp yes :padline no #+BEGIN_SRC yaml :tangle roles/grub-config/defaults/main.yml :mkdirp yes :padline no

View File

@ -2,14 +2,12 @@
# file roles/wakeup/tasks/main.yml # file roles/wakeup/tasks/main.yml
- name: install and configure vdr-addon-acpiwakeup - name: install and configure vdr-addon-acpiwakeup
block: apt:
- apt: name: vdr-addon-acpiwakeup
name: vdr-addon-acpiwakeup state: present
state: present
- lineinfile:
path: /etc/vdr/vdr-addon-acpiwakeup.conf
regexp: '^ACPI_ENABLED='
line: 'ACPI_ENABLED="yes"'
when: wakeup_method == "acpiwakeup" when: wakeup_method == "acpiwakeup"
- name: expand template for /etc/vdr/vdr-addon-acpiwakeup.conf
template:
src: roles/wakeup/vdr-addon-acpiwakeup.conf.j2
dest: /etc/vdr/vdr-addon-acpiwakeup.conf

View File

@ -0,0 +1,16 @@
{{ ansible_managed_file | comment }}
# Activate/deactivate ACPIWakeup with yes/no:
ACPI_ENABLED="{% if wakeup_method == 'acpiwakeup' %}yes{% else %}no{% endif %}"
# How many minutes should the machine wake up before the timer starts:
ACPI_START_AHEAD=5
# If you want your VDR machine to wakeup in regular intervals (i.e. for
# updating EPG data), specify the days of the week and the wakeup time.
#
# Days of the week for regular wakeup (not set=Disabled, 1=Monday...7=Sunday)
# ACPI_REGULAR_DAYS="1 2 3 4 5 6 7"
# Wakeup time
#ACPI_REGULAR_TIME=01:00 # HH:MM