2019-07-04 03:17:05 +00:00
- name : AzuraCast - Make config directory {{ azuracast_host_dir }}
2019-06-13 12:26:26 +00:00
file :
path : "{{ azuracast_host_dir }}"
state : directory
2019-07-04 03:17:05 +00:00
- name : AzuraCast - Install {{ azuracast_host_dir }}/.env from template
2019-06-13 12:26:26 +00:00
template :
src : env.j2
dest : "{{ azuracast_host_dir }}/.env"
2020-09-22 05:04:06 +00:00
#owner: root
#group: root
2019-06-13 12:26:26 +00:00
mode : 0644
2019-07-04 03:17:05 +00:00
- name : AzuraCast - Install {{ azuracast_host_dir }}/docker-compose.override.yml from template
2019-06-18 06:51:45 +00:00
template :
2019-06-18 09:46:55 +00:00
src : docker-compose.override.yml.j2
dest : "{{ azuracast_host_dir }}/docker-compose.override.yml"
2020-09-22 05:04:06 +00:00
#owner: root
#group: root
2019-06-18 06:51:45 +00:00
mode : 0644
2019-07-04 03:17:05 +00:00
- name : AzuraCast - Download {{ docker_sh_url }} to {{ azuracast_host_dir }}
2019-06-13 12:26:26 +00:00
get_url :
url : "{{ docker_sh_url }}"
dest : "{{ azuracast_host_dir }}/"
timeout : "{{ download_timeout }}"
mode : 0755
2020-10-16 20:46:19 +00:00
when : internet_available
2019-06-13 12:26:26 +00:00
2019-07-04 03:17:05 +00:00
- name : AzuraCast - Download AzuraCast's docker-compose.yml sample from GitHub to {{ azuracast_host_dir }}
2019-06-18 12:16:21 +00:00
get_url :
url : "{{ docker_compose_url }}"
dest : "{{ azuracast_host_dir }}/docker-compose.yml"
timeout : "{{ download_timeout }}"
mode : 0755
2020-10-16 20:46:19 +00:00
when : internet_available
2019-06-18 12:16:21 +00:00
2019-06-23 10:20:49 +00:00
- name : AzuraCast - Make changes to docker.sh script so it runs headless
2019-06-13 12:26:26 +00:00
lineinfile :
path : "{{ azuracast_host_dir }}/docker.sh"
regexp : "^(.*)read reply.*"
2019-06-13 19:40:16 +00:00
line : "\\1reply='Y'"
2019-06-13 12:26:26 +00:00
backrefs : yes
2019-07-04 03:17:05 +00:00
- name : AzuraCast - Make directory {{ docker_container_dir }}
2019-06-13 12:26:26 +00:00
file :
path : "{{ docker_container_dir }}"
state : directory
2019-07-04 03:17:05 +00:00
- name : AzuraCast - Symlink /var/lib/docker -> {{ docker_container_dir }}
2019-06-13 12:26:26 +00:00
file :
src : "{{ docker_container_dir }}"
2019-07-04 03:23:47 +00:00
path : /var/lib/docker
2019-06-13 12:26:26 +00:00
state : link
2019-07-04 03:17:05 +00:00
- name : Change default port number range 8xxx:8xxx to {{ azuracast_port_range_prefix }}xxx:{{ azuracast_port_range_prefix }}xxx icecast-stations in docker-compose.yml
2019-06-18 12:16:21 +00:00
replace :
path : "{{ azuracast_host_dir }}/docker-compose.yml"
2019-06-18 15:11:37 +00:00
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-23 10:20:49 +00:00
- name : AzuraCast - Run the installer
2019-06-13 12:26:26 +00:00
shell : "/bin/bash docker.sh install"
args :
chdir : "{{ azuracast_host_dir }}"
2019-09-14 21:50:19 +00:00
2020-01-30 09:00:00 +00:00
# RECORD AzuraCast AS INSTALLED
- name : "Set 'azuracast_installed: True'"
set_fact :
azuracast_installed : True
2020-01-12 23:15:33 +00:00
- name : "Add 'azuracast_installed: True' to {{ iiab_state_file }}"
2019-09-14 21:50:19 +00:00
lineinfile :
2020-02-04 00:54:04 +00:00
path : "{{ iiab_state_file }}" # /etc/iiab/iiab_state.yml
2019-09-14 21:50:19 +00:00
regexp : '^azuracast_installed'
2019-10-07 17:11:21 +00:00
line: 'azuracast_installed : True '