updated vector state

This commit is contained in:
Paul 2023-12-06 04:10:43 +01:00
parent 9e82f25dd7
commit 2f62aaf91f
6 changed files with 27 additions and 24 deletions

View File

@ -4,27 +4,27 @@ vector-default:
file.managed:
- name: /etc/default/vector
- source: salt://vector/templates/vector.default.j2
- user: root
- group: root
- user: vector
- group: vector
- mode: 600
- template: jinja
vector-config-dir:
file.directory:
- name: /etc/vector
- user: root
- group: root
- user: vector
- group: vector
- mode: 700
# - watch_in:
# - service: vector-service
- watch_in:
- service: vector-service
vector-config-file:
file.managed:
- name: /etc/vector/vector.conf
- source: salt://vector/templates/vector.toml.j2
- user: root
- group: root
- name: /etc/vector/vector.yaml
- source: salt://vector/templates/vector.yaml.j2
- user: vector
- group: vector
- mode: 600
- template: jinja
# - watch_in:
# - service: vector-service
- watch_in:
- service: vector-service

View File

@ -4,7 +4,7 @@ vector:
install_dir: /usr/local/apps
release_dir: /usr/local/apps/releases
mirror: https://github.com/vectordotdev/vector/releases/download
version: 0.32.1
version: 0.34.1
os: linux
arch: amd64
variant: gnu

View File

@ -2,4 +2,4 @@
include:
- .install
- .config
#- .service
- .service

View File

@ -9,8 +9,8 @@ vector-archive-extract:
- options: >
--strip 2
- if_missing: {{ vector.release_dir }}/vector-{{ vector.version }}/bin/vector
# - watch_in:
# - service: vector-service
- watch_in:
- service: vector-service
vector-binary-symlink:
file.symlink:
@ -19,11 +19,11 @@ vector-binary-symlink:
- force: true
- require:
- archive: vector-archive-extract
# - watch_in:
# - service: vector-service
- watch_in:
- service: vector-service
vector-cleanup:
software.cleanup:
- name: vector
- path: {{ vector.release_dir }}
- version: "v{{ vector.version }}"
- version: "{{ vector.version }}"

View File

@ -9,16 +9,15 @@ Requires=network-online.target
[Service]
User=vector
Group=vector
ExecStartPre=/usr/bin/vector validate
ExecStart=/usr/bin/vector
ExecReload=/usr/bin/vector validate
ExecStartPre=/usr/local/bin/vector validate
ExecStart=/usr/local/bin/vector
ExecReload=/usr/local/bin/vector validate
ExecReload=/bin/kill -HUP $MAINPID
Restart=always
AmbientCapabilities=CAP_NET_BIND_SERVICE
EnvironmentFile=-/etc/default/vector
# Since systemd 229, should be in [Unit] but in order to support systemd <229,
# it is also supported to have it here.
StartLimitInterval=10
StartLimitBurst=5
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,4 @@
{%- from "vector/map.jinja" import vector with context -%}
---
## {{ salt['pillar.get']('salt_managed', default='Salt Managed') }}
{{ vector.config|yaml(False) }}