Last active
October 2, 2019 20:34
-
-
Save eirenik0/a1bde29f3a03e97a9f25833f36979cf4 to your computer and use it in GitHub Desktop.
Ansible role for install Liquidsoap from OPAM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- apt_key: | |
keyserver: keyserver.ubuntu.com | |
id: 20D63CCDDD0F62C2 | |
state: present | |
- apt_repository: | |
repo: deb http://deb.liquidsoap.info/ubuntu disco main | |
state: present | |
filename: liquidsoap.list | |
- name: Install liquidsoap related packages | |
apt: pkg="{{ item }}" state=present | |
loop: | |
- liquidsoap-1.4.0 | |
- gstreamer1.0-tools | |
- gstreamer1.0-plugins-bad |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Install liquidsoap related packages | |
apt: pkg="{{ item }}" state=present | |
loop: | |
- bubblewrap | |
- libpcre3-dev | |
- m4 | |
- libtag1-dev | |
- pkg-config | |
- libgstreamer-plugins-base1.0-dev | |
- libgstreamer1.0-dev | |
- libvo-aacenc-dev | |
- gstreamer1.0-rtsp | |
- gstreamer1.0-plugins-bad-videoparsers | |
- gstreamer1.0-opencv | |
- gstreamer1.0-libav | |
- gstreamer1.0-plugins-good | |
- gstreamer1.0-plugins-ugly | |
- gstreamer1.0-plugins-bad | |
- gstreamer1.0-qt5 | |
- name: Get OPAM instllator | |
get_url: | |
url: https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh | |
dest: /root/opam_intall.sh | |
- name: Install OPAM | |
become: true | |
expect: | |
command: sh /root/opam_intall.sh | |
responses: | |
\w+[/usr/local/bin]: /usr/local/bin | |
- name: Add liquidsoap user | |
user: | |
name: liquidsoap | |
append: yes | |
shell: /sbin/nologin | |
state: present | |
become: true | |
- name: Configure the Liquidsoap user | |
become: true | |
lineinfile: | |
path: /etc/sudoers.d/liquidsoap | |
line: "liquidsoap ALL=(ALL) NOPASSWD:ALL" | |
create: yes | |
- name: Install OCAMP compiler and related | |
shell: 'sudo su -l liquidsoap -s /usr/bin/bash -c " | |
opam init -a -y && | |
opam switch create $OCAML_VERSION && | |
opam update && | |
opam upgrade && | |
opam install -y depext"' | |
environment: | |
OCAML_VERSION: "{{OCAML_VERSION}}" | |
- name: Opam depext | |
shell: 'sudo su -l liquidsoap -s /usr/bin/bash -c "opam depext -y $LIQUIDSOAP_PACKAGES liquidsoap=$LIQUIDSOAP_VERSION"' | |
environment: | |
LIQUIDSOAP_PACKAGES: "{{LIQUIDSOAP_PACKAGES}}" | |
LIQUIDSOAP_VERSION: "{{LIQUIDSOAP_VERSION}}" | |
- name: Opam install | |
shell: 'sudo su -l liquidsoap -s /usr/bin/bash -c "opam install -y $LIQUIDSOAP_PACKAGES liquidsoap=$LIQUIDSOAP_VERSION"' | |
environment: | |
LIQUIDSOAP_PACKAGES: "{{LIQUIDSOAP_PACKAGES}}" | |
LIQUIDSOAP_VERSION: "{{LIQUIDSOAP_VERSION}}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OCAML_VERSION: 4.07.0 | |
LIQUIDSOAP_VERSION: 1.3.7 | |
LIQUIDSOAP_PACKAGES: taglib mad lame vorbis cry samplerate liquidsoap voaacenc ffmpeg gstreamer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment