54 lines
1.4 KiB
YAML
54 lines
1.4 KiB
YAML
|
|
- become: yes
|
||
|
|
hosts: all
|
||
|
|
name: broadcast-install
|
||
|
|
tasks:
|
||
|
|
- name: Make broadcast folders
|
||
|
|
file:
|
||
|
|
path: "{{ item.path }}"
|
||
|
|
state: directory
|
||
|
|
with_items:
|
||
|
|
- { path: /home/ubuntu/icecast }
|
||
|
|
- { path: /home/ubuntu/icecast/logs }
|
||
|
|
- { path: /home/ubuntu/rtsp-simple-server }
|
||
|
|
|
||
|
|
- name: Move icecast folder to server
|
||
|
|
copy:
|
||
|
|
src: "{{ playbook_dir }}/payload/icecast/"
|
||
|
|
dest: /home/ubuntu/icecast
|
||
|
|
owner: ubuntu
|
||
|
|
directory_mode:
|
||
|
|
tags:
|
||
|
|
- dircontent
|
||
|
|
|
||
|
|
- name: Move rtsp-simple-server folder to server
|
||
|
|
copy:
|
||
|
|
src: "{{ playbook_dir }}/payload/rtsp-simple-server/"
|
||
|
|
dest: /home/ubuntu/rtsp-simple-server
|
||
|
|
owner: ubuntu
|
||
|
|
directory_mode:
|
||
|
|
tags:
|
||
|
|
- dircontent
|
||
|
|
|
||
|
|
- name: Change ownership to ubuntu for rtsp-simple-server files
|
||
|
|
file:
|
||
|
|
path: /home/ubuntu/rtsp-simple-server
|
||
|
|
state: directory
|
||
|
|
owner: ubuntu
|
||
|
|
group: ubuntu
|
||
|
|
recurse: yes
|
||
|
|
|
||
|
|
- name: Change ownership to ubuntu for icecast files
|
||
|
|
file:
|
||
|
|
path: /home/ubuntu/icecast
|
||
|
|
state: directory
|
||
|
|
owner: ubuntu
|
||
|
|
group: ubuntu
|
||
|
|
recurse: yes
|
||
|
|
|
||
|
|
- name: Build and Run icecast
|
||
|
|
docker_compose:
|
||
|
|
project_src: /home/ubuntu/icecast/
|
||
|
|
|
||
|
|
- name: Build and Run rtsp-simple-server
|
||
|
|
docker_compose:
|
||
|
|
project_src: /home/ubuntu/rtsp-simple-server/
|