No description
- Shell 100%
| defaults | ||
| files | ||
| meta | ||
| tasks | ||
| .gitignore | ||
| README.md | ||
ansible-roles-lbrenms
This role will deploy a full root-less podman based librenms instance, with supporting database and redis services
- https://www.librenms.org/
- https://docs.librenms.org/Installation/Docker/
- https://github.com/librenms/librenms/
TODO
There are some upstream issues with cron jobs and the scheduler failing to run and or validate in the containerized deployment:
- https://community.librenms.org/t/docker-container-install-scheduler-not-running-and-servername/21835
Task Configuration
Define librenms_url, this will useful in conjunction with a proxy role such as caddy, traefik, or nginx
There are several other values that should be defined and secured vial ansible vault
- librenms_email_password
- librenms_database_password
- librenms_redis_password
- name: Setup proxy and service
hosts: somehost
become: true
roles:
- role: librenms
librenms_url: librenms.somehost.somewhere
librenms_email_host: mail.somehost.somewhere
librenms_email_from: librenms@somehost.somewhere
librenms_email_username: librenms@somehost.somewhere
- role: traefik
traefik_routes:
- name: librenms
host: "{{ librenms_url }}"
srv: "{{ traefik_host_address }}:8000"
- role: firewalld
firewalld_add:
- name: public
services:
- http
- https
forwards:
- port: 80
to: 8080
- port: 443
to: 8443
- port: 514
to: 1514
- port: 162
to: 1162
Deployment and Removal
Sometimes you need to manually stop the running containers to get a clean run when re-deploying Services must be stopped as the respecitve user or another means to aquire the correct user scope for systemd
systemctl --user stop container-caddy.service
systemctl --user stop pod-librenms.service
Deploy
ansible-playbook -i hosts site.yml --tags=firewalld,caddy,librenms --limit=somehost
Remove
ansible-playbook -i hosts site.yml --tags=firewalld,traefik,librenms --extra-vars "container_state=absent firewall_action=remove" --limit=somehost