61 lines
1.4 KiB
YAML
61 lines
1.4 KiB
YAML
---
|
|
- name: Gather instance facts
|
|
setup:
|
|
- block:
|
|
- name: Generate screen-off.service
|
|
template:
|
|
src: screen-off.service
|
|
dest: "/etc/systemd/system/screen-off.service"
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
tags:
|
|
- hdmi-config
|
|
- name: Generate screen-off.timer
|
|
template:
|
|
src: screen-off.timer
|
|
dest: "/etc/systemd/system/screen-off.timer"
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
tags:
|
|
- hdmi-config
|
|
- name: Generate screen-on.service
|
|
template:
|
|
src: screen-on.service
|
|
dest: "/etc/systemd/system/screen-on.service"
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
tags:
|
|
- hdmi-config
|
|
- name: Generate screen-on.timer
|
|
template:
|
|
src: screen-on.timer
|
|
dest: "/etc/systemd/system/screen-on.timer"
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
tags:
|
|
- hdmi-config
|
|
- block:
|
|
- name: Refresh systemd
|
|
systemd:
|
|
daemon_reload: yes
|
|
tags:
|
|
- hdmi-config
|
|
- name: Enable screen-off.timer
|
|
systemd:
|
|
name: screen-off.timer
|
|
state: started
|
|
enabled: yes
|
|
tags:
|
|
- hdmi-config
|
|
- name: Enable screen-on.timer
|
|
systemd:
|
|
name: screen-on.timer
|
|
state: started
|
|
enabled: yes
|
|
tags:
|
|
- hdmi-config
|