Skip to content

idiv-biodiversity/ansible-role-screen-switch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible Role: screen-switch

Switch screen on during working hours and standby otherwise.

Requirements

  • Ansible 2+
  • Needs root privileges.
  • Only tested on Raspberry Pi 2 Model B.
  • Only tested with Rasbian Jessie.

Role Variables

A description of available variables is given below, along with default values (see defaults/main.yml):

When to switch on the screen.

screen_switch_on_time: '06:00:00'

When to switch the screen to standby.

screen_switch_standby_time: '21:00:00'

If the screen supports CEC.

screen_switch_cec_supported: true

Dependencies

A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.

Example Playbook

Add to requirements.yml:

---

- src: idiv_biodiversity.screen_switch

...
  • Download:
$ ansible-galaxy install -r requirements.yml

Top-Level Playbook

Write a top-level playbook:

---
- name:
  hosts: pidisplays

  roles:
    role: idiv_biodiversity.screen_switch
    tags:
      - screen-switch
    become: yes

...

Role Dependency

Define the role dependency in meta/main.yml:

---

dependencies:

  - role: idiv_biodiversity.screen_switch
    tags:
      - screen-switch
    become: yes

...

License

MIT

Author Information

This role was created in 2018 by Dirk Sarpe aka dirks at GitHub, administrator at the German Centre for Integrative Biodiversity Research (iDiv).