cloudalchemy / ansible-grafana

Platform for analytics and monitoring

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Don't fail if `grafana_cap_net_bind_service` is not set for ports lower than 1024

hasufell opened this issue · comments

- name: Fail if grafana_port is lower than 1024 and grafana_cap_net_bind_service is not true
  fail:
    msg: Trying to use a port lower than 1024 without setting grafana_cap_net_bind_service.
  when:
    - grafana_port | int <= 1024
    - not grafana_cap_net_bind_service

This is overly restrictive. On my machine, setting this capability results in a crash. So instead I'm using

    - name: Allow binding to port 80
      command: /sbin/sysctl -w net.ipv4.ip_unprivileged_port_start=0
      become: yes

And that works fine. Except the playbook now fails, unless I remove the check.

This role has been deprecated in favor of a the grafana-ansible-collection collection.