Here is an example of an old playbook & template file I've used in my lab to setup Skyline that may be a useful to you.
Playbook:
---
- name: "Configure the Skyline /opt/CPotelcol/config.yaml file, then stop/start the Skyline service"
gather_facts: no
hosts: gateways
tasks:
- name: "Template Skyline config.yaml file"
template:
src: skyline_fw_config.j2
dest: /opt/CPotelcol/config.yaml
- name: "Stop Skyline"
shell: /opt/CPviewExporter/stop_skyline
- name: "Start Skyline"
shell: /opt/CPviewExporter/start_skyline
Required skyline_fw_config.j2 template file:
- This template assumes you have the {{ hostname }} and {{ skyline_receiver_ip }} variables set in your host_vars or in group_vars for each target gateway.
- This template also assumes the TLS certificate files are already copied to the gateway's filesystem in the correct locations.
receivers:
otlp:
protocols:
grpc:
tls:
client_ca_file: /opt/CPotelcol/certs/collector.crt
cert_file: /opt/CPotelcol/certs/collector.crt
key_file: /opt/CPotelcol/certs/collector.key
exporters:
prometheusremotewrite:
endpoint: "http://{{skyline_receiver_ip}}:9090/api/v1/write"
#tls:
#cert_file: /tmp/mycerts/promexport.crt
#key_file: /tmp/mycerts/promexport.key
#ca_file: /tmp/mycerts/prometheus.crt
external_labels:
instance: {{hostname}}
job: skyline
resource_to_telemetry_conversion:
enabled: true
processors:
batch:
extensions:
health_check:
service:
extensions: [health_check]
pipelines:
metrics:
receivers: [otlp]
processors: [batch]
exporters: [prometheusremotewrite]