From 74af25f09653019dd18b8cfce10106ccf9581bcd Mon Sep 17 00:00:00 2001 From: Paul Lecuq Date: Wed, 4 Jan 2023 23:34:26 +0100 Subject: [PATCH] updated rsync state --- states/rsync/defaults.yaml | 5 +++-- states/rsync/rsyncd.conf.j2 | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/states/rsync/defaults.yaml b/states/rsync/defaults.yaml index e98317e..b828377 100644 --- a/states/rsync/defaults.yaml +++ b/states/rsync/defaults.yaml @@ -3,6 +3,7 @@ rsync: enabled: true config: global: + address: 127.0.0.1 uid: 'root' gid: 'root' use chroot: 'no' @@ -10,7 +11,7 @@ rsync: syslog facility: 4 pid file: '/var/run/rsyncd.pid' sections: - - name: 'tmp' + - name: 'tmppath' settings: - path: '/tmp' + path: '/tmp/tmppath' read only: 'yes' diff --git a/states/rsync/rsyncd.conf.j2 b/states/rsync/rsyncd.conf.j2 index 3edd11f..56ad402 100644 --- a/states/rsync/rsyncd.conf.j2 +++ b/states/rsync/rsyncd.conf.j2 @@ -1,7 +1,8 @@ ## {{ salt['pillar.get']('salt_managed', default='Salt Managed') }} {%- from "rsync/map.jinja" import rsync with context %} -{% for key, value in rsync.config.global.items() %} -{{ key }} = {{ value }} +[global] +{%- for key, value in rsync.config.global.items() %} + {{ key }} = {{ value }} {%- endfor %} {% for section in rsync.config.sections -%} @@ -9,4 +10,4 @@ {%- for key, value in section.settings.items() %} {{ key }} = {{ value }} {%- endfor %} -{%- endfor %} \ No newline at end of file +{%- endfor %}