Add playbook and roles for Audio Pi
This commit is contained in:
parent
7a869f6330
commit
96ac8de142
21 changed files with 516 additions and 2 deletions
5
playbooks/roles/shairport_sync/handlers/main.yml
Normal file
5
playbooks/roles/shairport_sync/handlers/main.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
- name: Restart shairport-sync service
|
||||
ansible.builtin.systemd:
|
||||
service: shairport-sync
|
||||
state: restarted
|
8
playbooks/roles/shairport_sync/meta/argument_specs.yml
Normal file
8
playbooks/roles/shairport_sync/meta/argument_specs.yml
Normal file
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
argument_specs:
|
||||
main:
|
||||
options:
|
||||
shairport_sync__config:
|
||||
description: shairport-sync config content
|
||||
type: str
|
||||
required: true
|
8
playbooks/roles/shairport_sync/meta/main.yml
Normal file
8
playbooks/roles/shairport_sync/meta/main.yml
Normal file
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
dependencies:
|
||||
- role: distribution_check
|
||||
vars:
|
||||
distribution_check__supported_distributions:
|
||||
- name: Debian
|
||||
versions:
|
||||
- "11"
|
17
playbooks/roles/shairport_sync/tasks/main.yml
Normal file
17
playbooks/roles/shairport_sync/tasks/main.yml
Normal file
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
- name: Ensure shairport-sync is installed
|
||||
ansible.builtin.apt:
|
||||
name: shairport-sync
|
||||
- name: Ensure shairport-sync config is deployed
|
||||
ansible.builtin.copy:
|
||||
content: "{{ shairport_sync__config }}"
|
||||
dest: /etc/shairport-sync.conf
|
||||
mode: 0644
|
||||
owner: root
|
||||
group: root
|
||||
notify: Restart shairport-sync service
|
||||
- name: Ensure shairport-sync service is enabled and started
|
||||
ansible.builtin.systemd:
|
||||
service: shairport-sync
|
||||
state: started
|
||||
enabled: true
|
Loading…
Add table
Add a link
Reference in a new issue