Add comments to templates for serial-ir

This commit is contained in:
Alexander Grothe
2019-01-02 12:08:37 +01:00
parent b3195507fa
commit f253d7c864
7 changed files with 536 additions and 503 deletions

View File

@@ -1,2 +1,4 @@
---
---
# file: roles/serial-ir/defaults/main.yml
serial_ir_device: ttyS0

View File

@@ -1,4 +1,5 @@
---
# file: roles/serial-ir/tasks/main.yml
- name: apt | install setserial
apt:

View File

@@ -1,8 +1,12 @@
#COM1 equivalent, /dev/ttyS0
{{ ansible_managed | comment }}
{% if serial_ir_device == "ttyS0" %}
#COM1 equivalent, /dev/ttyS0
options serial_ir irq=4 io=0x3f8
{% elif serial_ir_device == "ttyS1" %}
#COM2 equivalent, /dev/ttyS1
options serial_ir irq=3 io=0x2f8
{% endif %}
{% if serial_ir_device in ("ttyS0", "ttyS1") %}
install serial_ir setserial /dev/{{serial_ir_device}} uart none; /sbin/modprobe --ignore-install serial_ir
{% endif %}

View File

@@ -1 +1,3 @@
{{ ansible_managed | comment }}
serial_ir

View File

@@ -1,3 +1,5 @@
{{ ansible_managed | comment }}
{% if serial_ir_device == "ttyS0" %}
#COM1 equivalent, /dev/ttyS0
/dev/ttyS0 uart none