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 %}