1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 11:42:08 +00:00
iiab/roles/azuracast/tasks/install.yml

66 lines
1.9 KiB
YAML
Raw Normal View History

2019-06-13 12:26:26 +00:00
- name: Azuracast - Make Azuracast config directory
file:
path: "{{ azuracast_host_dir }}"
state: directory
- name: Azuracast - Copy over .env template to Azuracast config directory
template:
src: env.j2
dest: "{{ azuracast_host_dir }}/.env"
owner: root
group: root
mode: 0644
- name: Azuracast - Copy over docker-compose.override.yml template to Azuracast config directory
template:
src: docker-compose.override.yml.j2
dest: "{{ azuracast_host_dir }}/docker-compose.override.yml"
owner: root
group: root
mode: 0644
2019-06-13 12:26:26 +00:00
- name: Azuracast - Download docker.sh script
get_url:
url: "{{ docker_sh_url }}"
dest: "{{ azuracast_host_dir }}/"
timeout: "{{ download_timeout }}"
mode: 0755
when: internet_available | bool
2019-06-18 12:16:21 +00:00
- name: Azuracast - Download docker-compose.yml
get_url:
url: "{{ docker_compose_url }}"
dest: "{{ azuracast_host_dir }}/docker-compose.yml"
timeout: "{{ download_timeout }}"
mode: 0755
2019-06-13 12:26:26 +00:00
- name: Azuracast - Make changes to docker.sh script so it runs headless
lineinfile:
path: "{{ azuracast_host_dir }}/docker.sh"
regexp: "^(.*)read reply.*"
line: "\\1reply='Y'"
2019-06-13 12:26:26 +00:00
backrefs: yes
- name: Azuracast - Make docker container directory
file:
path: "{{ docker_container_dir }}"
state: directory
- name: Azuracast - Link docker container directory
file:
src: "{{ docker_container_dir }}"
dest: "/var/lib/docker"
state: link
- name: Change default port number ranges 8xxx:8xxx to Nxxx:Nxxx icecast-stations in docker-compose.yml (N - azuracast_port_range_prefix)
2019-06-18 12:16:21 +00:00
replace:
path: "{{ azuracast_host_dir }}/docker-compose.yml"
regexp: "^( *- \\')8([0-9]{3})\\:8([0-9]{3}\\'.*)$"
replace: "\\g<1>{{ azuracast_port_range_prefix }}\\g<2>:{{ azuracast_port_range_prefix }}\\g<3>"
2019-06-18 12:16:21 +00:00
2019-06-13 12:26:26 +00:00
- name: Azuracast - Run the installer
shell: "/bin/bash docker.sh install"
args:
chdir: "{{ azuracast_host_dir }}"
2019-06-18 12:16:21 +00:00