Create rsyncd.conf if not present
This commit is contained in:
parent
a4cd959337
commit
8847bc72dc
|
@ -1,11 +1,23 @@
|
||||||
{% from "rsyncd/map.jinja" import rsyncd with context %}
|
{% from "rsyncd/map.jinja" import rsyncd with context %}
|
||||||
|
|
||||||
|
rsyncd_conf_exists:
|
||||||
|
file.managed:
|
||||||
|
- name: {{ rsyncd.configfile }}
|
||||||
|
- contents: |
|
||||||
|
# This file is created by salt as a dummy, use the config state or override manually
|
||||||
|
pid file = /var/run/rsyncd.pid
|
||||||
|
use chroot = yes
|
||||||
|
read only = yes
|
||||||
|
- replace: false
|
||||||
|
|
||||||
rsync:
|
rsync:
|
||||||
pkg.installed:
|
pkg.installed:
|
||||||
- name: {{ rsyncd.pkg }}
|
- name: {{ rsyncd.pkg }}
|
||||||
service.running:
|
service.running:
|
||||||
- name: {{ rsyncd.service }}
|
- name: {{ rsyncd.service }}
|
||||||
- enable: True
|
- enable: True
|
||||||
|
- require:
|
||||||
|
- file: rsyncd_conf_exists
|
||||||
|
|
||||||
{% if grains.os_family == 'Debian' %}
|
{% if grains.os_family == 'Debian' %}
|
||||||
/etc/default/rsync:
|
/etc/default/rsync:
|
||||||
|
|
Loading…
Reference in New Issue