AnarchoTechNYC / ansible-role-icecast

:globe_with_meridians::radio: Spin up an Icecast streaming server in any number of flexible configurations.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Anarcho-Tech NYC: Icecast Build Status

An Ansible role for installing an Icecast server. Notably, this role has been tested with Raspbian on Raspberry Pi hardware. This role's purpose is to make it simple to install an Icecast (Internet radio) server in any of a number of flexible configurations, such as authenticated relays.

Configuring Icecast

To configure your Icecast server instance, use any number of variables that map nearly one-to-one to the configuration directives described in Icecast's Config File documentation page. Configuration directive groups are their own dictionaries, and directives that can accept more than one value are specified as a list.

Some examples may prove helpful:

  1. Simple Icecast server with default for all values except some user-supplied passwords and the server's public-facing hostname:
    icecast_hostname: radio.example.com
    icecast_admin_password: ChangeMe
    icecast_source_password: ChangeMe
    This configuration will bring up your Icecast server on its default port 8000. You can then broadcast through it by setting up a source client to send your stream to it using the password ChangeMe (which, obviously, you should change).
  2. Simple Icecast server bound to the local host only and listening on the alternative HTTP port:
    icecast_listen_sockets:
        - port: 8080
          bind_address: 127.0.0.1
    Note that icecast_listen_sockets is a list, meaning you can open multiple sockets. If a socket doesn't include the bind_address key, it will default to all interfaces (0.0.0.0).
  3. Simple Icecast server with custom server metadata and a higher number of listeners (clients) and broadcasters (sources) allowed to connect:
    icecast_location: Somewhere in Cyberspace
    icecast_admin_email: dj@radio.example.org
    icecast_default_stream: /the_alternative
    icecast_limits_clients: 9000
    icecast_limits_sources: 10

See the comments in the defaults/main.yaml file for additional details.

Testing

Use Molecule to run the tests. (You'll also need to install Docker, as tests are run in Docker containers.) Here's how to install Molecule into a virtual environment.

# Molecule is written in Python, so you'll also need Python.
python -m venv venv                      # Create your virtual environment.
source venv/bin/activate                 # Activate it.
pip install molecule ansible-lint docker # Install testing tools.

# Then, you can run the tests:
molecule test

# When you're done, deactivate your virtual environment.
deactivate

About

:globe_with_meridians::radio: Spin up an Icecast streaming server in any number of flexible configurations.


Languages

Language:HTML 100.0%