Add LADSPA support for Ansible installations.

This commit is contained in:
Buster "Silver Eagle" Neece 2021-01-21 14:37:21 -06:00
parent fe8bedae40
commit 521feb4296
No known key found for this signature in database
GPG Key ID: 6D9E12FF03411F4E
3 changed files with 158 additions and 143 deletions

View File

@ -1,45 +1,45 @@
#!/usr/bin/env bash
while [[ "$1" =~ ^- && ! "$1" == "--" ]]; do
case $1 in
--dev)
APP_ENV="development"
;;
case $1 in
--dev)
APP_ENV="development"
;;
--full)
UPDATE_REVISION=0
;;
esac
shift
--full)
UPDATE_REVISION=0
;;
esac
shift
done
if [[ "$1" == '--' ]]; then shift; fi
APP_ENV="${APP_ENV:-production}"
UPDATE_REVISION="${UPDATE_REVISION:-58}"
UPDATE_REVISION="${UPDATE_REVISION:-59}"
PKG_OK=$(dpkg-query -W --showformat='${Status}\n' ansible | grep "install ok installed")
echo "Checking for Ansible: $PKG_OK"
if [[ "" == "$PKG_OK" ]]; then
sudo apt-get update
sudo apt-get install -q -y software-properties-common
sudo apt-add-repository ppa:ansible/ansible
sudo apt-get update
sudo apt-get install -q -y ansible python-mysqldb
sudo apt-get update
sudo apt-get install -q -y software-properties-common
sudo apt-add-repository ppa:ansible/ansible
sudo apt-get update
sudo apt-get install -q -y ansible python-mysqldb
else
sudo apt-get update
sudo apt-get install -q -y ansible python-mysqldb
sudo apt-get update
sudo apt-get install -q -y ansible python-mysqldb
fi
echo "Updating AzuraCast (Environment: $APP_ENV, Update revision: $UPDATE_REVISION)"
if [[ ${APP_ENV} == "production" ]]; then
if [[ -d ".git" ]]; then
git reset --hard
git pull
else
echo "You are running a downloaded release build. Any code updates should be applied manually."
fi
if [[ -d ".git" ]]; then
git reset --hard
git pull
else
echo "You are running a downloaded release build. Any code updates should be applied manually."
fi
fi
ansible-playbook util/ansible/update.yml --inventory=util/ansible/hosts --extra-vars "app_env=$APP_ENV update_revision=$UPDATE_REVISION"

View File

@ -1,11 +1,11 @@
---
- name: Install IceCast-KH-AC Dependencies
apt:
name: "{{ packages }}"
state: latest
install_recommends: no
vars:
packages:
- name : Install IceCast-KH-AC Dependencies
apt :
name : "{{ packages }}"
state : latest
install_recommends : no
vars :
packages :
- libxml2
- libxslt1-dev
- libvorbis-dev
@ -13,46 +13,46 @@
- libcurl4-openssl-dev
- pkg-config
- name: Download IceCast-KH-AC Source
get_url:
url: https://github.com/AzuraCast/icecast-kh-ac/archive/2.4.0-kh13-ac2.tar.gz
dest: "{{ app_base }}/servers/icecast2/icecast2.tar.gz"
force: yes
- name : Download IceCast-KH-AC Source
get_url :
url : https://github.com/AzuraCast/icecast-kh-ac/archive/2.4.0-kh13-ac2.tar.gz
dest : "{{ app_base }}/servers/icecast2/icecast2.tar.gz"
force : yes
- name: Extract IceCast-KH-AC Source
unarchive:
src: "{{ app_base }}/servers/icecast2/icecast2.tar.gz"
dest: "{{ app_base }}/servers/icecast2"
remote_src: yes
mode: "u=rwx,g=rx,o=rx"
owner: "azuracast"
group: "www-data"
extra_opts: "--strip-components=1"
- name : Extract IceCast-KH-AC Source
unarchive :
src : "{{ app_base }}/servers/icecast2/icecast2.tar.gz"
dest : "{{ app_base }}/servers/icecast2"
remote_src : yes
mode : "u=rwx,g=rx,o=rx"
owner : "azuracast"
group : "www-data"
extra_opts : "--strip-components=1"
- name: Build IceCast-KH-AC
shell: "cd {{ app_base }}/servers/icecast2 && ./configure && make && make install"
args:
chdir: "{{ app_base }}/servers/icecast2"
- name : Build IceCast-KH-AC
shell : "cd {{ app_base }}/servers/icecast2 && ./configure && make && make install"
args :
chdir : "{{ app_base }}/servers/icecast2"
- name: Clear OPAM directory
file:
path: "{{ app_base }}/.opam"
state: absent
- name : Clear OPAM directory
file :
path : "{{ app_base }}/.opam"
state : absent
- name: Add OPAM/OCaml Repository
apt_repository:
repo: "ppa:avsm/ppa"
update_cache: yes
when:
- name : Add OPAM/OCaml Repository
apt_repository :
repo : "ppa:avsm/ppa"
update_cache : yes
when :
- ansible_distribution_release == 'xenial' or ansible_distribution_release == 'bionic'
- name: Install Liquidsoap Dependencies
apt:
name: "{{ packages }}"
state: latest
install_recommends: no
vars:
packages:
- name : Install Liquidsoap Dependencies
apt :
name : "{{ packages }}"
state : latest
install_recommends : no
vars :
packages :
- opam
- ocaml
- libfaad-dev
@ -71,68 +71,83 @@
- pkg-config
- unzip
- bubblewrap
- ladspa-sdk
- multimedia-audio-plugins
- swh-plugins
- tap-plugins
- name: Initialize OPAM (Bionic)
become_user: azuracast
shell: "opam init -a --disable-sandboxing --bare && opam switch create 4.08.0"
args:
chdir: "{{ app_base }}"
executable: "bash" # Fixes some possible hang issues.
when:
- ansible_distribution_release == 'xenial' or ansible_distribution_release == 'bionic'
- name: Initialize OPAM (Focal)
become_user: azuracast
shell: "opam init --disable-sandboxing -a --bare && opam switch create ocaml-system.4.08.1"
args:
chdir: "{{ app_base }}"
executable: "bash" # Fixes some possible hang issues.
when:
- name : Add Optional LADSPA Plugins (Focal)
apt :
name : "{{ packages }}"
state : latest
install_recommends : no
vars :
packages :
- lsp-plugins-ladspa
when :
- ansible_distribution_release == 'focal'
- name: Build and Install Liquidsoap and Dependencies
become_user: azuracast
shell: "opam install -y samplerate.0.1.4 taglib.0.3.3 mad.0.4.5 faad.0.4.0 fdkaac.0.3.1 lame.0.3.3 vorbis.0.7.1 cry.0.6.1 flac.0.1.5 opus.0.1.3 duppy.0.8.0 ssl liquidsoap.1.4.2"
args:
chdir: "{{ app_base }}"
register: install_result
async: 3600
poll: 0
- name: Check on Liquidsoap Installation
become_user: azuracast
async_status:
jid: "{{ install_result.ansible_job_id }}"
register: check_result
until: check_result.finished
retries: 60
delay: 60
- name: Link Liquidsoap binary (Xenial/Bionic)
file:
src: "{{ app_base }}/.opam/4.08.0/bin/liquidsoap"
dest: /usr/local/bin/liquidsoap
state: link
force: yes
when:
- name : Initialize OPAM (Bionic)
become_user : azuracast
shell : "opam init -a --disable-sandboxing --bare && opam switch create 4.08.0"
args :
chdir : "{{ app_base }}"
executable : "bash" # Fixes some possible hang issues.
when :
- ansible_distribution_release == 'xenial' or ansible_distribution_release == 'bionic'
- name: Link Liquidsoap binary (Focal)
file:
src: "{{ app_base }}/.opam/ocaml-system.4.08.1/bin/liquidsoap"
dest: /usr/local/bin/liquidsoap
state: link
force: yes
when:
- name : Initialize OPAM (Focal)
become_user : azuracast
shell : "opam init --disable-sandboxing -a --bare && opam switch create ocaml-system.4.08.1"
args :
chdir : "{{ app_base }}"
executable : "bash" # Fixes some possible hang issues.
when :
- ansible_distribution_release == 'focal'
- name: Add Audiowaveform PPA
apt_repository:
repo: "ppa:chris-needham/ppa"
update_cache: yes
- name : Build and Install Liquidsoap and Dependencies
become_user : azuracast
shell : "opam install -y ladspa.0.1.5 samplerate.0.1.4 taglib.0.3.3 mad.0.4.5 faad.0.4.0 fdkaac.0.3.1 lame.0.3.3 vorbis.0.7.1 cry.0.6.1 flac.0.1.5 opus.0.1.3 duppy.0.8.0 ssl liquidsoap.1.4.2"
args :
chdir : "{{ app_base }}"
register : install_result
async : 3600
poll : 0
- name: Install Audiowaveform
apt:
name: audiowaveform
state: latest
install_recommends: no
- name : Check on Liquidsoap Installation
become_user : azuracast
async_status :
jid : "{{ install_result.ansible_job_id }}"
register : check_result
until : check_result.finished
retries : 60
delay : 60
- name : Link Liquidsoap binary (Xenial/Bionic)
file :
src : "{{ app_base }}/.opam/4.08.0/bin/liquidsoap"
dest : /usr/local/bin/liquidsoap
state : link
force : yes
when :
- ansible_distribution_release == 'xenial' or ansible_distribution_release == 'bionic'
- name : Link Liquidsoap binary (Focal)
file :
src : "{{ app_base }}/.opam/ocaml-system.4.08.1/bin/liquidsoap"
dest : /usr/local/bin/liquidsoap
state : link
force : yes
when :
- ansible_distribution_release == 'focal'
- name : Add Audiowaveform PPA
apt_repository :
repo : "ppa:chris-needham/ppa"
update_cache : yes
- name : Install Audiowaveform
apt :
name : audiowaveform
state : latest
install_recommends : no

View File

@ -1,29 +1,29 @@
---
- hosts: all
become: true
vars:
util_base: "{{ playbook_dir | dirname }}"
www_base: "{{ util_base | dirname }}"
app_base: "{{ www_base | dirname }}"
tmp_base: "{{ app_base }}/www_tmp"
app_env: "production"
update_mode: true
update_revision: 1
- hosts : all
become : true
vars :
util_base : "{{ playbook_dir | dirname }}"
www_base : "{{ util_base | dirname }}"
app_base : "{{ www_base | dirname }}"
tmp_base : "{{ app_base }}/www_tmp"
app_env : "production"
update_mode : true
update_revision : 1
roles:
roles :
- init
- azuracast-config
- { role: azuracast-radio, when: update_revision|int < 53 }
- { role: supervisord, when: update_revision|int < 13 }
- { role: mariadb, when: update_revision|int < 15 }
- { role: nginx, when: update_revision|int < 55 }
- { role: redis, when: update_revision|int < 57 }
- { role: php, when: update_revision|int < 50 }
- { role : azuracast-radio, when : update_revision|int < 59 }
- { role : supervisord, when : update_revision|int < 13 }
- { role : mariadb, when : update_revision|int < 15 }
- { role : nginx, when : update_revision|int < 55 }
- { role : redis, when : update_revision|int < 57 }
- { role : php, when : update_revision|int < 50 }
- composer
- { role: influxdb, when: update_revision|int < 58 }
- { role: ufw, when: update_revision|int < 12 }
- { role: dbip, when: update_revision|int < 51 }
- { role: services, when: update_revision|int < 13 }
- { role: azuracast-cron, when: update_revision|int < 48 }
- { role : influxdb, when : update_revision|int < 58 }
- { role : ufw, when : update_revision|int < 12 }
- { role : dbip, when : update_revision|int < 51 }
- { role : services, when : update_revision|int < 13 }
- { role : azuracast-cron, when : update_revision|int < 48 }
- azuracast-build
- azuracast-setup