--- - name: Basic Setup hosts: ele-calypso roles: - role: apt-repo/base - role: core/base - role: core/sshd/base - role: core/zsh - role: core/ntp - role: core/cpu-microcode - name: Payload Setup hosts: ele-calypso roles: - role: apt-repo/spreadspace - role: streaming/blackmagic/desktopvideo - role: kubernetes/base - role: kubernetes/standalone/base - role: streaming/player - role: nginx/base - role: monitoring/sachet - role: monitoring/prometheus/ca - role: monitoring/prometheus/exporter - role: monitoring/prometheus/server - role: monitoring/prometheus/alertmanager - role: monitoring/grafana - role: nginx/vhost nginx_vhost: name: monitoring template: generic hostnames: - "_" locations: '/grafana/': proxy_pass: "http://127.0.0.1:3000" '/prometheus/': proxy_pass: "http://127.0.0.1:9090" '/alertmanager/': proxy_pass: "http://127.0.0.1:9093" post_tasks: ## TODO: move to network/interfaces when this is done - name: install vlan interfaces loop: "{{ network.vlans | dict2items }}" loop_control: label: "{{ item.key }} ({{ item.value | join(',') }})" copy: dest: "/etc/network/interfaces.d/{{ item.key }}" content: | auto {{ item.key }} iface {{ item.key }} inet manual {% for vlan in item.value %} {% set vlan_ifname = item.key + '.' + (vlan | string) %} {% set vlan_iface = (network.interfaces | selectattr('name', 'eq', vlan_ifname)) %} auto {{ vlan_ifname }} {% if vlan_iface %} iface {{ vlan_ifname }} inet static address {{ (vlan_iface | first).address }} {% else %} iface {{ vlan_ifname }} inet manual {% endif %} {% endfor %}