Compare commits
3 Commits
v5.6.5
...
libertacas
Author | SHA1 | Date | |
---|---|---|---|
2d5e549872 | |||
b9b2e42ad2 | |||
![]() |
d5cfeb0d80 |
38
Gemfile.lock
38
Gemfile.lock
@ -1,20 +1,20 @@
|
||||
GIT
|
||||
remote: https://gitlab.com/saltstack-formulas/infrastructure/inspec
|
||||
revision: da3b324893676451fbe419cb11dff91372a9bb9e
|
||||
revision: aaef842906a5666f0fc0b4f186b4dd3498f5b28c
|
||||
branch: ssf
|
||||
specs:
|
||||
inspec (5.18.9)
|
||||
inspec (5.18.15)
|
||||
cookstyle
|
||||
faraday_middleware (>= 0.12.2, < 1.1)
|
||||
inspec-core (= 5.18.9)
|
||||
inspec-core (= 5.18.15)
|
||||
mongo (= 2.13.2)
|
||||
progress_bar (~> 1.3.3)
|
||||
rake
|
||||
train (~> 3.0)
|
||||
train (~> 3.10)
|
||||
train-aws (~> 0.2)
|
||||
train-habitat (~> 0.1)
|
||||
train-winrm (~> 0.2)
|
||||
inspec-core (5.18.9)
|
||||
inspec-core (5.18.15)
|
||||
addressable (~> 2.4)
|
||||
chef-telemetry (~> 1.0, >= 1.0.8)
|
||||
faraday (>= 0.9.0, < 1.5)
|
||||
@ -34,7 +34,7 @@ GIT
|
||||
sslshake (~> 1.2)
|
||||
thor (>= 0.20, < 2.0)
|
||||
tomlrb (>= 1.2, < 2.1)
|
||||
train-core (~> 3.0)
|
||||
train-core (~> 3.10)
|
||||
tty-prompt (~> 0.17)
|
||||
tty-table (~> 0.10)
|
||||
|
||||
@ -49,7 +49,7 @@ GIT
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
activesupport (7.0.3)
|
||||
activesupport (7.0.3.1)
|
||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||
i18n (>= 1.6, < 2)
|
||||
minitest (>= 5.1)
|
||||
@ -58,7 +58,7 @@ GEM
|
||||
public_suffix (>= 2.0.2, < 5.0)
|
||||
ast (2.4.2)
|
||||
aws-eventstream (1.2.0)
|
||||
aws-partitions (1.602.0)
|
||||
aws-partitions (1.607.0)
|
||||
aws-sdk-alexaforbusiness (1.56.0)
|
||||
aws-sdk-core (~> 3, >= 3.127.0)
|
||||
aws-sigv4 (~> 1.1)
|
||||
@ -74,7 +74,7 @@ GEM
|
||||
aws-sdk-applicationautoscaling (1.51.0)
|
||||
aws-sdk-core (~> 3, >= 3.112.0)
|
||||
aws-sigv4 (~> 1.1)
|
||||
aws-sdk-athena (1.54.0)
|
||||
aws-sdk-athena (1.55.0)
|
||||
aws-sdk-core (~> 3, >= 3.127.0)
|
||||
aws-sigv4 (~> 1.1)
|
||||
aws-sdk-autoscaling (1.63.0)
|
||||
@ -86,7 +86,7 @@ GEM
|
||||
aws-sdk-budgets (1.50.0)
|
||||
aws-sdk-core (~> 3, >= 3.127.0)
|
||||
aws-sigv4 (~> 1.1)
|
||||
aws-sdk-cloudformation (1.69.0)
|
||||
aws-sdk-cloudformation (1.70.0)
|
||||
aws-sdk-core (~> 3, >= 3.127.0)
|
||||
aws-sigv4 (~> 1.1)
|
||||
aws-sdk-cloudfront (1.65.0)
|
||||
@ -125,7 +125,7 @@ GEM
|
||||
aws-sdk-cognitoidentityprovider (1.53.0)
|
||||
aws-sdk-core (~> 3, >= 3.112.0)
|
||||
aws-sigv4 (~> 1.1)
|
||||
aws-sdk-configservice (1.77.0)
|
||||
aws-sdk-configservice (1.79.0)
|
||||
aws-sdk-core (~> 3, >= 3.127.0)
|
||||
aws-sigv4 (~> 1.1)
|
||||
aws-sdk-core (3.131.2)
|
||||
@ -142,7 +142,7 @@ GEM
|
||||
aws-sdk-dynamodb (1.75.0)
|
||||
aws-sdk-core (~> 3, >= 3.127.0)
|
||||
aws-sigv4 (~> 1.1)
|
||||
aws-sdk-ec2 (1.320.0)
|
||||
aws-sdk-ec2 (1.322.0)
|
||||
aws-sdk-core (~> 3, >= 3.127.0)
|
||||
aws-sigv4 (~> 1.1)
|
||||
aws-sdk-ecr (1.56.0)
|
||||
@ -211,7 +211,7 @@ GEM
|
||||
aws-sdk-networkfirewall (1.17.0)
|
||||
aws-sdk-core (~> 3, >= 3.127.0)
|
||||
aws-sigv4 (~> 1.1)
|
||||
aws-sdk-networkmanager (1.23.0)
|
||||
aws-sdk-networkmanager (1.24.0)
|
||||
aws-sdk-core (~> 3, >= 3.127.0)
|
||||
aws-sigv4 (~> 1.1)
|
||||
aws-sdk-organizations (1.59.0)
|
||||
@ -220,10 +220,10 @@ GEM
|
||||
aws-sdk-ram (1.26.0)
|
||||
aws-sdk-core (~> 3, >= 3.112.0)
|
||||
aws-sigv4 (~> 1.1)
|
||||
aws-sdk-rds (1.146.0)
|
||||
aws-sdk-rds (1.148.0)
|
||||
aws-sdk-core (~> 3, >= 3.127.0)
|
||||
aws-sigv4 (~> 1.1)
|
||||
aws-sdk-redshift (1.83.0)
|
||||
aws-sdk-redshift (1.84.0)
|
||||
aws-sdk-core (~> 3, >= 3.127.0)
|
||||
aws-sigv4 (~> 1.1)
|
||||
aws-sdk-route53 (1.63.0)
|
||||
@ -375,7 +375,7 @@ GEM
|
||||
http-cookie (1.0.5)
|
||||
domain_name (~> 0.5)
|
||||
httpclient (2.8.3)
|
||||
i18n (1.10.0)
|
||||
i18n (1.12.0)
|
||||
concurrent-ruby (~> 1.0)
|
||||
inifile (3.0.0)
|
||||
jmespath (1.6.1)
|
||||
@ -400,7 +400,7 @@ GEM
|
||||
memoist (0.16.2)
|
||||
method_source (1.0.0)
|
||||
mini_mime (1.1.2)
|
||||
minitest (5.16.1)
|
||||
minitest (5.16.2)
|
||||
mixlib-config (3.0.27)
|
||||
tomlrb
|
||||
mixlib-install (3.12.19)
|
||||
@ -479,7 +479,7 @@ GEM
|
||||
rubocop-ast (>= 1.15.1, < 2.0)
|
||||
ruby-progressbar (~> 1.7)
|
||||
unicode-display_width (>= 1.4.0, < 3.0)
|
||||
rubocop-ast (1.18.0)
|
||||
rubocop-ast (1.19.1)
|
||||
parser (>= 3.1.1.0)
|
||||
ruby-progressbar (1.11.0)
|
||||
ruby2_keywords (0.0.5)
|
||||
@ -497,7 +497,7 @@ GEM
|
||||
unicode-display_width (>= 1.5, < 3.0)
|
||||
unicode_utils (~> 1.4)
|
||||
strings-ansi (0.2.0)
|
||||
test-kitchen (3.3.0)
|
||||
test-kitchen (3.3.1)
|
||||
bcrypt_pbkdf (~> 1.0)
|
||||
chef-utils (>= 16.4.35)
|
||||
ed25519 (~> 1.2)
|
||||
|
@ -19,8 +19,8 @@ if File.file?(bundle_binstub)
|
||||
load(bundle_binstub)
|
||||
else
|
||||
abort(
|
||||
'Your `bin/bundle` was not generated by Bundler, '\
|
||||
'so this binstub cannot run. Replace `bin/bundle` by running '\
|
||||
'Your `bin/bundle` was not generated by Bundler, ' \
|
||||
'so this binstub cannot run. Replace `bin/bundle` by running ' \
|
||||
'`bundle binstubs bundler --force`, then run this command again.'
|
||||
)
|
||||
end
|
||||
|
@ -40,15 +40,19 @@ prometheus-config-file-{{ name }}-file-managed:
|
||||
- template: jinja
|
||||
{%- if grains.os != 'Windows' %}
|
||||
- mode: 644
|
||||
{%- if p.manage_user_group %}
|
||||
- user: {{ name }}
|
||||
- group: {{ name }}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
- context:
|
||||
config: {{ p.pkg.component[name]['config']|json }}
|
||||
- require:
|
||||
- file: prometheus-config-file-etc-file-directory
|
||||
{%- if p.manage_user_group %}
|
||||
- user: prometheus-config-users-install-{{ name }}-user-present
|
||||
- group: prometheus-config-users-install-{{ name }}-group-present
|
||||
{%- endif %}
|
||||
- watch_in:
|
||||
- service: prometheus-service-running-{{ name }}
|
||||
|
||||
@ -71,15 +75,19 @@ prometheus-config-file-{{ ef }}-file-managed:
|
||||
- template: jinja
|
||||
{%- if grains.os != 'Windows' %}
|
||||
- mode: 644
|
||||
{%- if p.manage_user_group %}
|
||||
- user: {{ component }}
|
||||
- group: {{ component }}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
- context:
|
||||
config: {{ p.extra_files[ef]['config'] }}
|
||||
- require:
|
||||
- file: prometheus-config-file-etc-file-directory
|
||||
{%- if p.manage_user_group %}
|
||||
- user: prometheus-config-users-install-{{ component }}-user-present
|
||||
- group: prometheus-config-users-install-{{ component }}-group-present
|
||||
{%- endif %}
|
||||
- watch_in:
|
||||
- service: prometheus-service-running-{{ component }}
|
||||
|
||||
|
@ -24,9 +24,11 @@ prometheus-service-args-{{ name }}-data-dir:
|
||||
- makedirs: True
|
||||
- watch_in:
|
||||
- service: prometheus-service-running-{{ name }}
|
||||
{%- if p.manage_user_group %}
|
||||
- require:
|
||||
- user: prometheus-config-users-install-{{ name }}-user-present
|
||||
- group: prometheus-config-users-install-{{ name }}-group-present
|
||||
{%- endif %}
|
||||
|
||||
{%- endif %}
|
||||
{% endif %}
|
||||
|
@ -4,6 +4,7 @@
|
||||
{%- set tplroot = tpldir.split('/')[0] %}
|
||||
{%- from tplroot ~ "/map.jinja" import prometheus as p with context %}
|
||||
|
||||
{%- if p.manage_user_group or p.pkg.use_upstream_archive %}
|
||||
{%- for name in p.wanted.component %}
|
||||
|
||||
prometheus-config-users-install-{{ name }}-group-present:
|
||||
@ -29,3 +30,4 @@ prometheus-config-users-install-{{ name }}-user-present:
|
||||
{%- endif %}
|
||||
|
||||
{%- endfor %}
|
||||
{%- endif %}
|
||||
|
@ -23,6 +23,8 @@ prometheus:
|
||||
tmp: /tmp/prometheus
|
||||
var: /var/lib/prometheus
|
||||
|
||||
manage_user_group: true
|
||||
|
||||
pkg:
|
||||
uri: https://github.com/prometheus
|
||||
use_upstream_repo: false
|
||||
|
@ -22,9 +22,11 @@ prometheus-exporters-{{ name }}-collector-textfile-dir:
|
||||
- group: {{ name }}
|
||||
{%- endif %}
|
||||
- makedirs: True
|
||||
{%- if p.manage_user_group %}
|
||||
- require:
|
||||
- user: prometheus-config-users-install-{{ name }}-user-present
|
||||
- group: prometheus-config-users-install-{{ name }}-group-present
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
|
||||
{%- for k, v in p.get('exporters', {}).get(name, {}).get('textfile_collectors', {}).items() %}
|
||||
|
@ -2,7 +2,7 @@
|
||||
# File managed by Salt at <{{ source }}>.
|
||||
# Your changes may be overwritten.
|
||||
########################################################################
|
||||
# Set the command-line arguments to pass to the server.%}"
|
||||
# Set the command-line arguments to pass to the server."
|
||||
{{ arg_name }}="{{ args }}"
|
||||
|
||||
|
||||
|
@ -219,7 +219,66 @@ RedHat:
|
||||
sslcacert: /etc/pki/tls/certs/ca-bundle.crt
|
||||
metadata_expire: 300
|
||||
|
||||
Suse: {}
|
||||
Suse:
|
||||
manage_user_group: false
|
||||
pkg:
|
||||
use_upstream_repo: false
|
||||
use_upstream_package: false
|
||||
use_upstream_archive: false
|
||||
component:
|
||||
alertmanager:
|
||||
name: golang-github-prometheus-alertmanager
|
||||
service:
|
||||
name: prometheus-alertmanager
|
||||
environ_file: /etc/sysconfig/prometheus-alertmanager
|
||||
args:
|
||||
config.file: /etc/prometheus/alertmanager.yml
|
||||
config_file: /etc/prometheus/alertmanager.yml
|
||||
prometheus:
|
||||
name: golang-github-prometheus-prometheus
|
||||
service:
|
||||
name: prometheus
|
||||
environ_file: /etc/sysconfig/prometheus
|
||||
environ:
|
||||
environ_arg_name: ARGS
|
||||
config_file: /etc/prometheus/prometheus.yml
|
||||
blackbox_exporter:
|
||||
name: prometheus-blackbox_exporter
|
||||
config_file: /etc/prometheus/blackbox.yml
|
||||
service:
|
||||
name: prometheus-blackbox_exporter
|
||||
hacluster_exporter:
|
||||
name: prometheus-ha_cluster_exporter
|
||||
environ_file: /etc/sysconfig/prometheus-ha_cluster_exporter
|
||||
environ:
|
||||
environ_arg_name: ARGS
|
||||
service:
|
||||
name: prometheus-ha_cluster_exporter
|
||||
node_exporter:
|
||||
name: golang-github-prometheus-node_exporter
|
||||
service:
|
||||
name: prometheus-node_exporter
|
||||
environ_file: /etc/sysconfig/prometheus-node_exporter
|
||||
environ:
|
||||
environ_arg_name: ARGS
|
||||
postgres_exporter:
|
||||
name: prometheus-postgres_exporter
|
||||
service:
|
||||
name: prometheus-postgres_exporter
|
||||
environ_file: /etc/sysconfig/prometheus-postgres_exporter
|
||||
environ:
|
||||
environ_arg_name: POSTGRES_EXPORTER_PARAMS
|
||||
saptune_exporter:
|
||||
name: prometheus-saptune_exporter
|
||||
service:
|
||||
name: prometheus-saptune_exporter
|
||||
webhook_snmp:
|
||||
name: prometheus-webhook-snmp
|
||||
service:
|
||||
name: prometheus-webhook-snmp
|
||||
environ_file: /etc/default/prometheus-webhook-snmp
|
||||
environ:
|
||||
environ_arg_name: PROMETHEUS_WEBHOOK_SNMP_OPTIONS
|
||||
|
||||
Gentoo:
|
||||
pkg:
|
||||
|
@ -30,9 +30,11 @@ prometheus-service-args-{{ name }}-data-dir:
|
||||
- makedirs: True
|
||||
- watch_in:
|
||||
- service: prometheus-service-running-{{ name }}
|
||||
{%- if p.manage_user_group %}
|
||||
- require:
|
||||
- user: prometheus-config-users-install-{{ name }}-user-present
|
||||
- group: prometheus-config-users-install-{{ name }}-group-present
|
||||
{%- endif %}
|
||||
|
||||
{%- endif %}
|
||||
{%- if grains.os_family == 'FreeBSD' %}
|
||||
|
@ -97,6 +97,8 @@ class SystemResource < Inspec.resource(1)
|
||||
# rubocop:disable Metrics/MethodLength,Metrics/CyclomaticComplexity
|
||||
def build_platform_codename
|
||||
case build_platform_finger
|
||||
when 'ubuntu-22.04'
|
||||
'jammy'
|
||||
when 'ubuntu-20.04'
|
||||
'focal'
|
||||
when 'ubuntu-18.04'
|
||||
|
@ -13,6 +13,12 @@ prometheus:
|
||||
- alertmanager
|
||||
- node_exporter
|
||||
- blackbox_exporter
|
||||
{%- if grains.os == 'SUSE' %}
|
||||
- hacluster_exporter
|
||||
- postgres_exporter
|
||||
- saptune_exporter
|
||||
- webhook_snmp
|
||||
{%- endif %}
|
||||
|
||||
exporters:
|
||||
node_exporter:
|
||||
@ -31,7 +37,7 @@ prometheus:
|
||||
|
||||
pkg:
|
||||
# yamllint disable-line rule:braces rule:commas
|
||||
use_upstream_repo: {{ false if grains.os_family|lower in ('debian',) else true }}
|
||||
use_upstream_repo: {{ false if grains.os_family|lower in ('debian','suse',) else true }}
|
||||
use_upstream_archive: false
|
||||
|
||||
clientlibs:
|
||||
|
Loading…
x
Reference in New Issue
Block a user