60 lines
1.3 KiB
Plaintext
60 lines
1.3 KiB
Plaintext
---
|
|
{%- if salt['grains.get']('kernel') == 'Linux' %}
|
|
#bareos-pkg:
|
|
# pkg.purged:
|
|
# - pkgs:
|
|
# - bareos-common
|
|
# - bareos-filedaemon
|
|
# - bareos-bconsole
|
|
|
|
bareos-fd-bin:
|
|
file.managed:
|
|
- name: /usr/sbin/bareos-fd
|
|
- source: https://paulbsd-pub.s3.fr-par.scw.cloud/bareos/static-bareos-fd-{{ salt['grains.get']('osarch')|lower }}
|
|
- skip_verify: true
|
|
- user: root
|
|
- group: root
|
|
- mode: 0755
|
|
|
|
bareos-fd-service-file:
|
|
file.managed:
|
|
- name: /etc/systemd/system/bareos-fd.service
|
|
- source: salt://bareos/bareos-fd.service.j2
|
|
- user: root
|
|
- group: root
|
|
- mode: 0644
|
|
- template: jinja
|
|
- watch_in:
|
|
- service: bareos-fd-service
|
|
- require:
|
|
- file: bareos-fd-bin
|
|
|
|
bareos-fd-config-dir:
|
|
file.directory:
|
|
- name: /etc/bareos
|
|
- user: root
|
|
- group: root
|
|
- mode: 0755
|
|
|
|
bareos-fd-config:
|
|
file.managed:
|
|
- name: /etc/bareos/bareos-fd.conf
|
|
- source: salt://bareos/bareos-fd.conf.j2
|
|
- user: root
|
|
- group: root
|
|
- mode: 0644
|
|
- template: jinja
|
|
- watch_in:
|
|
- service: bareos-fd-service
|
|
- require:
|
|
- file: bareos-fd-bin
|
|
- file: bareos-fd-config-dir
|
|
|
|
bareos-fd-service:
|
|
service.running:
|
|
- name: bareos-fd
|
|
- enable: true
|
|
- require:
|
|
- file: bareos-fd-service-file
|
|
{%- endif %}
|