icinga2.ssh_client

This commit is contained in:
Keiran Snowden
2023-12-06 00:27:44 -05:00
parent 8ff815ebd3
commit ead5387f27
8 changed files with 117 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
#!/bin/bash
{% set arch = 'arm' salt.grains.get(cpuarch).startswith('arm') else 'amd64' %}
{% set arch = 'arm' if salt.grains.get('cpuarch').startswith('arm') else 'amd64' %}
{% set restic_version = salt.pillar.get("restic:version") %}
URL="https://github.com/restic/restic/releases/download/v{{ restic_version }}/restic_{{ restic_version }}_linux_{{ arch }}.bz2"

View File

@@ -19,6 +19,9 @@ restic-{{ name }}:
- contents: {{ salt.mine.get(minion_id, 'root_id_rsa_pub').get(minion_id, "") | yaml_encode }}
{% endfor %}
bzip2:
pkg.installed: []
{% if salt.pillar.get("restic:client", None) is not none %}
{% if salt.pillar.get("restic:client:install", True)%}
'download restic':
@@ -27,6 +30,8 @@ restic-{{ name }}:
- source: 'salt://restic/files/install.sh'
- template: jinja
- unless: "/bin/restic version | grep 'restic {{ salt.pillar.get("restic:version") }} '"
- require:
- pkg: bzip2
{% endif %}
/etc/logrotate.d/restic-backup: