mirror of
https://github.com/prometheus-community/ansible
synced 2024-11-25 05:10:20 +00:00
Fixup version bumper job
Move role repo discovery to a script to avoid shell escaping issues. * Fix up argument_specs.yml. Signed-off-by: prombot <prometheus-team@googlegroups.com>
This commit is contained in:
parent
3b222a4c25
commit
7522f150ae
21 changed files with 40 additions and 35 deletions
6
.github/scripts/discover_role_repos.sh
vendored
Executable file
6
.github/scripts/discover_role_repos.sh
vendored
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
for defaults_file in roles/*/vars/main.yml ; do
|
||||
role="$(echo "${defaults_file}" | cut -f2 -d'/')"
|
||||
yq eval "[{\"repo\": ._${role}_repo, \"role\": \"${role}\"}]" "${defaults_file}"
|
||||
done | yq -o json -I=0
|
12
.github/workflows/version_bumper.yml
vendored
12
.github/workflows/version_bumper.yml
vendored
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
name: Sync repo files
|
||||
name: Check for new upstream releases
|
||||
on:
|
||||
schedule:
|
||||
- cron: '21 14 * * *'
|
||||
|
@ -20,13 +20,9 @@ jobs:
|
|||
id: discovered-role-repos
|
||||
uses: mikefarah/yq@master
|
||||
with:
|
||||
cmd: |
|
||||
for defaults_file in roles/*/defaults/main.yml ; do
|
||||
role="$(echo "${defaults_file}" | cut -f2 -d'/')"
|
||||
yq eval "[{\"repo\": .${role}_repo, \"role\": \"${role}\"}]" "${defaults_file}"
|
||||
done | yq -o json -I=0
|
||||
cmd: ./.github/scripts/discover_role_repos.sh
|
||||
|
||||
repo_sync:
|
||||
check_for_new_versions:
|
||||
runs-on: ubuntu-latest
|
||||
needs: discover-role-repos
|
||||
permissions:
|
||||
|
@ -43,4 +39,4 @@ jobs:
|
|||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- run: ./version_bumper.sh ${{ matrix.repo }} ${{ matrix.role }}
|
||||
- run: ./.github/scripts/version_bumper.sh ${{ matrix.repo }} ${{ matrix.role }}
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
---
|
||||
alertmanager_version: 0.21.0
|
||||
alertmanager_binary_local_dir: ''
|
||||
alertmanager_repo: "prometheus/alertmanager"
|
||||
alertmanager_binary_url: "https://github.com/{{ alertmanager_repo }}/releases/download/v{{ alertmanager_version }}/\
|
||||
alertmanager_binary_url: "https://github.com/{{ _alertmanager_repo }}/releases/download/v{{ alertmanager_version }}/\
|
||||
alertmanager-{{ alertmanager_version }}.linux-{{ go_arch }}.tar.gz"
|
||||
alertmanager_checksums_url: "https://github.com/{{ alertmanager_repo }}/releases/download/v{{ alertmanager_version }}/sha256sums.txt"
|
||||
alertmanager_checksums_url: "https://github.com/{{ _alertmanager_repo }}/releases/download/v{{ alertmanager_version }}/sha256sums.txt"
|
||||
|
||||
alertmanager_config_dir: /etc/alertmanager
|
||||
alertmanager_db_dir: /var/lib/alertmanager
|
||||
|
|
|
@ -18,10 +18,10 @@ argument_specs:
|
|||
- "This overrides I(alertmanager_version) parameter"
|
||||
alertmanager_binary_url:
|
||||
description: "URL of the alertmanager binaries .tar.gz file"
|
||||
default: "https://github.com/prometheus/alertmanager/releases/download/v{{ alertmanager_version }}/alertmanager-{{ alertmanager_version }}.linux-{{ go_arch }}.tar.gz"
|
||||
default: "https://github.com/{{ _alertmanager_repo }}/releases/download/v{{ alertmanager_version }}/alertmanager-{{ alertmanager_version }}.linux-{{ go_arch }}.tar.gz"
|
||||
alertmanager_checksums_url:
|
||||
description: "URL of the alertmanager checksums file"
|
||||
default: "https://github.com/prometheus/alertmanager/releases/download/v{{ alertmanager_version }}/sha256sums.txt"
|
||||
default: "https://github.com/{{ _alertmanager_repo }}/releases/download/v{{ alertmanager_version }}/sha256sums.txt"
|
||||
alertmanager_web_listen_address:
|
||||
description: "Address on which alertmanager will be listening"
|
||||
default: "0.0.0.0:9093"
|
||||
|
|
|
@ -11,3 +11,4 @@ _alertmanager_binary_install_dir: '/usr/local/bin'
|
|||
|
||||
# The expected location of the amtool configuration file
|
||||
_alertmanager_amtool_config_dir: '/etc/amtool'
|
||||
_alertmanager_repo: "prometheus/alertmanager"
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
---
|
||||
blackbox_exporter_version: 0.18.0
|
||||
blackbox_exporter_repo: "prometheus/blackbox_exporter"
|
||||
blackbox_exporter_binary_url: "https://github.com/{{ blackbox_exporter_repo }}/releases/download/v{{ blackbox_exporter_version }}/\
|
||||
blackbox_exporter_binary_url: "https://github.com/{{ _blackbox_exporter_repo }}/releases/download/v{{ blackbox_exporter_version }}/\
|
||||
blackbox_exporter-{{ blackbox_exporter_version }}.linux-{{ go_arch_map[ansible_architecture] |
|
||||
default(ansible_architecture) }}.tar.gz"
|
||||
|
||||
|
|
|
@ -11,6 +11,9 @@ argument_specs:
|
|||
blackbox_exporter_version:
|
||||
description: "Blackbox exporter package version"
|
||||
default: "0.18.0"
|
||||
blackbox_exporter_binary_url:
|
||||
description: "URL of the blackbox_exporter binaries .tar.gz file"
|
||||
default: "https://github.com/{{ _blackbox_exporter_repo }}/releases/download/v{{ blackbox_exporter_version }}/blackbox_exporter-{{ blackbox_exporter_version }}.linux-{{ go_arch_map[ansible_architecture] | default(ansible_architecture) }}.tar.gz"
|
||||
blackbox_exporter_web_listen_address:
|
||||
description: "Address on which blackbox exporter will be listening"
|
||||
default: "0.0.0.0:9115"
|
||||
|
|
|
@ -5,3 +5,4 @@ go_arch_map:
|
|||
aarch64: 'arm64'
|
||||
armv7l: 'armv7'
|
||||
armv6l: 'armv6'
|
||||
_blackbox_exporter_repo: "prometheus/blackbox_exporter"
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
---
|
||||
node_exporter_version: 1.1.2
|
||||
node_exporter_binary_local_dir: ""
|
||||
node_exporter_repo: "prometheus/node_exporter"
|
||||
node_exporter_binary_url: "https://github.com/{{ node_exporter_repo }}/releases/download/v{{ node_exporter_version }}/\
|
||||
node_exporter_binary_url: "https://github.com/{{ _node_exporter_repo }}/releases/download/v{{ node_exporter_version }}/\
|
||||
node_exporter-{{ node_exporter_version }}.linux-{{ go_arch }}.tar.gz"
|
||||
node_exporter_checksums_url: "https://github.com/{{ node_exporter_repo }}/releases/download/v{{ node_exporter_version }}/sha256sums.txt"
|
||||
node_exporter_checksums_url: "https://github.com/{{ _node_exporter_repo }}/releases/download/v{{ node_exporter_version }}/sha256sums.txt"
|
||||
|
||||
node_exporter_web_listen_address: "0.0.0.0:9100"
|
||||
node_exporter_web_telemetry_path: "/metrics"
|
||||
|
|
|
@ -18,10 +18,10 @@ argument_specs:
|
|||
- "This overrides the I(node_exporter_version) parameter"
|
||||
node_exporter_binary_url:
|
||||
description: "URL of the node exporter binaries .tar.gz file"
|
||||
default: "https://github.com/prometheus/node_exporter/releases/download/v{{ node_exporter_version }}/node_exporter-{{ node_exporter_version }}.linux-{{ go_arch }}.tar.gz"
|
||||
default: "https://github.com/{{ _node_exporter_repo }}/releases/download/v{{ node_exporter_version }}/node_exporter-{{ node_exporter_version }}.linux-{{ go_arch }}.tar.gz"
|
||||
node_exporter_checksums_url:
|
||||
description: "URL of the node exporter checksums file"
|
||||
default: "https://github.com/prometheus/node_exporter/releases/download/v{{ node_exporter_version }}/sha256sums.txt"
|
||||
default: "https://github.com/{{ _node_exporter_repo }}/releases/download/v{{ node_exporter_version }}/sha256sums.txt"
|
||||
node_exporter_web_listen_address:
|
||||
description: "Address on which node exporter will listen"
|
||||
default: "0.0.0.0:9100"
|
||||
|
|
|
@ -7,3 +7,4 @@ go_arch_map:
|
|||
armv6l: 'armv6'
|
||||
|
||||
go_arch: "{{ go_arch_map[ansible_architecture] | default(ansible_architecture) }}"
|
||||
_node_exporter_repo: "prometheus/node_exporter"
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
---
|
||||
prometheus_version: 2.27.0
|
||||
prometheus_binary_local_dir: ''
|
||||
prometheus_repo: "prometheus/prometheus"
|
||||
prometheus_binary_url: "https://github.com/{{ prometheus_repo }}/releases/download/v{{ prometheus_version }}/\
|
||||
prometheus_binary_url: "https://github.com/{{ _prometheus_repo }}/releases/download/v{{ prometheus_version }}/\
|
||||
prometheus-{{ prometheus_version }}.linux-{{ go_arch }}.tar.gz"
|
||||
prometheus_checksums_url: "https://github.com/{{ prometheus_repo }}/releases/download/v{{ prometheus_version }}/sha256sums.txt"
|
||||
prometheus_checksums_url: "https://github.com/{{ _prometheus_repo }}/releases/download/v{{ prometheus_version }}/sha256sums.txt"
|
||||
prometheus_skip_install: false
|
||||
|
||||
prometheus_config_dir: /etc/prometheus
|
||||
|
|
|
@ -24,10 +24,10 @@ argument_specs:
|
|||
- "This overrides I(prometheus_version) parameter"
|
||||
prometheus_binary_url:
|
||||
description: "URL of the prometheus binaries .tar.gz file"
|
||||
default: "https://github.com/prometheus/prometheus/releases/download/v{{ prometheus_version }}/ prometheus-{{ prometheus_version }}.linux-{{ go_arch }}.tar.gz"
|
||||
default: "https://github.com/{{ _prometheus_repo }}/releases/download/v{{ prometheus_version }}/ prometheus-{{ prometheus_version }}.linux-{{ go_arch }}.tar.gz"
|
||||
prometheus_checksums_url:
|
||||
description: URL of the prometheus checksums file
|
||||
default: "https://github.com/prometheus/prometheus/releases/download/v{{ prometheus_version }}/sha256sums.txt"
|
||||
default: "https://github.com/{{ _prometheus_repo }}/releases/download/v{{ prometheus_version }}/sha256sums.txt"
|
||||
prometheus_config_dir:
|
||||
description: "Path to directory with prometheus configuration"
|
||||
default: "/etc/prometheus"
|
||||
|
|
|
@ -12,3 +12,4 @@ _prometheus_binary_install_dir: '/usr/local/bin'
|
|||
_prometheus_selinux_packages: "{{ ['libselinux-python', 'policycoreutils-python']
|
||||
if ansible_python_version is version('3', '<') else
|
||||
['python3-libselinux', 'python3-policycoreutils'] }}"
|
||||
_prometheus_repo: "prometheus/prometheus"
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
---
|
||||
snmp_exporter_version: 0.19.0
|
||||
snmp_exporter_repo: "prometheus/snmp_exporter"
|
||||
snmp_exporter_binary_url: "https://github.com/{{ snmp_exporter_repo }}/releases/download/v{{ snmp_exporter_version }}/\
|
||||
snmp_exporter_binary_url: "https://github.com/{{ _snmp_exporter_repo }}/releases/download/v{{ snmp_exporter_version }}/\
|
||||
snmp_exporter-{{ snmp_exporter_version }}.linux-{{ go_arch_map[ansible_architecture] | default(ansible_architecture) }}.tar.gz"
|
||||
snmp_exporter_checksums_url: "https://github.com/{{ snmp_exporter_repo }}/releases/download/v{{ snmp_exporter_version }}/sha256sums.txt"
|
||||
snmp_exporter_checksums_url: "https://github.com/{{ _snmp_exporter_repo }}/releases/download/v{{ snmp_exporter_version }}/sha256sums.txt"
|
||||
snmp_exporter_web_listen_address: "0.0.0.0:9116"
|
||||
snmp_exporter_log_level: info
|
||||
|
||||
|
|
|
@ -13,10 +13,10 @@ argument_specs:
|
|||
default: "0.19.0"
|
||||
snmp_exporter_binary_url:
|
||||
description: "URL of the snmp exporter binaries .tar.gz file"
|
||||
default: "https://github.com/prometheus/snmp_exporter/releases/download/v{{ snmp_exporter_version }}/snmp_exporter-{{ snmp_exporter_version }}.linux-{{ go_arch_map[ansible_architecture] | default(ansible_architecture) }}.tar.gz"
|
||||
default: "https://github.com/{{ _snmp_exporter_repo }}/releases/download/v{{ snmp_exporter_version }}/snmp_exporter-{{ snmp_exporter_version }}.linux-{{ go_arch_map[ansible_architecture] | default(ansible_architecture) }}.tar.gz"
|
||||
snmp_exporter_checksums_url:
|
||||
description: "URL of the snmp exporter checksums file"
|
||||
default: "https://github.com/prometheus/snmp_exporter/releases/download/v{{ snmp_exporter_version }}/sha256sums.txt"
|
||||
default: "https://github.com/{{ _snmp_exporter_repo }}/releases/download/v{{ snmp_exporter_version }}/sha256sums.txt"
|
||||
snmp_exporter_web_listen_address:
|
||||
description: "Address on which SNMP exporter will be listening"
|
||||
default: "0.0.0.0:9116"
|
||||
|
|
|
@ -5,3 +5,4 @@ go_arch_map:
|
|||
aarch64: 'arm64'
|
||||
armv7l: 'armv7'
|
||||
armv6l: 'armv6'
|
||||
_snmp_exporter_repo: "prometheus/snmp_exporter"
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
---
|
||||
systemd_exporter_version: 0.4.0
|
||||
systemd_exporter_binary_local_dir: ""
|
||||
systemd_exporter_repo: "prometheus-community/systemd_exporter"
|
||||
systemd_exporter_binary_url: "https://github.com/{{ systemd_exporter_repo }}/releases/download/v{{ systemd_exporter_version }}/\
|
||||
systemd_exporter_binary_url: "https://github.com/{{ _systemd_exporter_repo }}/releases/download/v{{ systemd_exporter_version }}/\
|
||||
systemd_exporter-{{ systemd_exporter_version }}.linux-{{ go_arch }}.tar.gz"
|
||||
systemd_exporter_checksums_url: "https://github.com/{{ systemd_exporter_repo }}/releases/download/v{{ systemd_exporter_version }}/sha256sums.txt"
|
||||
systemd_exporter_checksums_url: "https://github.com/{{ _systemd_exporter_repo }}/releases/download/v{{ systemd_exporter_version }}/sha256sums.txt"
|
||||
systemd_exporter_web_listen_address: "0.0.0.0:9558"
|
||||
|
||||
systemd_exporter_enable_restart_count: false
|
||||
|
|
|
@ -18,10 +18,10 @@ argument_specs:
|
|||
- "This overrides I(systemd_exporter_version) parameter"
|
||||
systemd_exporter_binary_url:
|
||||
description: URL of the systemd exporter binaries .tar.gz file"
|
||||
default: "https://github.com/prometheus-community/systemd_exporter/releases/download/v{{ systemd_exporter_version }}/systemd_exporter-{{ systemd_exporter_version }}.linux-{{ go_arch }}.tar.gz"
|
||||
default: "https://github.com/{{ _systemd_exporter_repo }}/releases/download/v{{ systemd_exporter_version }}/systemd_exporter-{{ systemd_exporter_version }}.linux-{{ go_arch }}.tar.gz"
|
||||
systemd_exporter_checksums_url:
|
||||
description: "URL of the systemd exporter checksums file"
|
||||
default: "https://github.com/prometheus-community/systemd_exporter/releases/download/v{{ systemd_exporter_version }}/sha256sums.txt"
|
||||
default: "https://github.com/{{ _systemd_exporter_repo }}/releases/download/v{{ systemd_exporter_version }}/sha256sums.txt"
|
||||
systemd_exporter_web_listen_address:
|
||||
description: Address on which systemd exporter will listen"
|
||||
default: "0.0.0.0:9558"
|
||||
|
|
|
@ -7,3 +7,4 @@ go_arch_map:
|
|||
armv6l: 'armv6'
|
||||
|
||||
go_arch: "{{ go_arch_map[ansible_architecture] | default(ansible_architecture) }}"
|
||||
_systemd_exporter_repo: "prometheus-community/systemd_exporter"
|
||||
|
|
Loading…
Reference in a new issue