flymia.speedtest_go
June 15, 2023 ยท View on GitHub
flymia.speedtest_go
This role installs the application speedtest-go, a simple speedtest web app written in Go.
Requirements
- A working GNU/Linux system using systemd (x86_64 and ARM)
Role Variables
spgo_current_version: Current version to download.Default: 1.1.5spgo_download_url: URL of the release.Default: https://github.com/librespeed/speedtest-go/releases/download/v{{ spgo_current_version }}/speedtest-go_{{ spgo_current_version }}_linux_{{ system_architecture }}.tar.gzspgo_username: User and group to run the software with.Default: speedtest-gospgo_group: User and group to run the software with.Default: speedtest-gospgo_configuration_directory: Location of the configuration file.Default: /etc/speedtest-gospgo_installation_directory: Location of the binary.Default: /opt/speedtest-gospgo_binary_location: A soft-link to the following folder will be created.Default: /usr/local/bin/speedtest-backendspgo_enable_service: Enable the service?Default: true
The following variables were provided by the config file of the application and have been translated to Ansible variables. Lookup the config file to see what they actually do:
spgo_config_bind_addressspgo_config_listen_portspgo_config_proxyprotocol_portspgo_config_server_latspgo_config_server_lngspgo_config_api_keyspgo_config_assets_pathspgo_config_statistics_passwordspgo_config_redact_ip_addressesspgo_config_database_typespgo_config_database_hostnamespgo_config_database_namespgo_config_database_usernamespgo_config_database_passwordspgo_config_database_filespgo_config_enable_tlsspgo_config_enable_http2spgo_config_tls_cert_filespgo_config_tls_key_file
Dependencies
None.
Example Playbook
Since it is not a very complex role, the example playbook is fairly easy. I include it here with some modified variables.
- hosts: servers
roles:
- { role: flymia.speedtest_go }
vars:
- spgo_configuration_directory: /srv/speedtest-go
- spgo_installation_directory: /usr/local/bin
- spgo_enable_service: false
License
GPL 3.0