ansible/roles/pi-squeezeserver/tasks/main.yml

40 lines
980 B
YAML

---
- name: Install packages required for squeeze server
apt:
name:
- libsox-fmt-all
- libflac-dev
- libfaad2
- libmad0
- perl-openssl-defaults
- libnet-ssleay-perl
- libio-socket-ssl-perl
- nasm
- build-essential
- iptables-persistent
cache_valid_time: 7200
state: present
- name: copy squeezeserver package
copy: src=logitechmediaserver_8.4.0_arm.deb dest=/tmp
- name: install squeezeserver package
apt: deb=/tmp/logitechmediaserver_8.4.0_arm.deb
- name: Enable sysdweb autostart
systemd: name=logitechmediaserver state=started enabled=yes
- name: Add to sysdweb
include_role:
name: pi-sysdweb
vars:
sysdweb_name: logitechmediaserver
- name: Forward port 80 to 9000
iptables:
table: nat
chain: PREROUTING
in_interface: eth0
protocol: tcp
match: tcp
destination_port: "80"
jump: REDIRECT
to_ports: "9000"
comment: Redirect web traffic to port 9000