paulbsd-salt/states/bareos/bareos-fd.sls

60 lines
1.3 KiB
Plaintext
Raw Normal View History

2020-07-10 00:58:55 +02:00
---
{%- 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 }}
2020-09-12 17:41:35 +02:00
- skip_verify: true
2020-07-10 00:58:55 +02:00
- 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
2020-09-12 17:41:35 +02:00
- enable: true
2020-07-10 00:58:55 +02:00
- require:
- file: bareos-fd-service-file
2021-08-19 21:15:24 +02:00
{%- endif %}