commit 4636e6cfe03569f002ae79cce0bcd84718acd68f Author: Martin Hoefling Date: Fri May 1 23:22:41 2015 +0200 initial commit diff --git a/CHANGELOG.rst b/CHANGELOG.rst new file mode 100644 index 0000000..e4cc4e6 --- /dev/null +++ b/CHANGELOG.rst @@ -0,0 +1,28 @@ +template formula +================ + +0.0.5 (2014-07-28) + +- Fixed broken link to Salt Formula documentation + + +0.0.4 (2014-02-26) + +- Add CHANGELOG.rst + + +0.0.3 (2014-02-17) + +- Add map.jinja +- Use map.jinja content in init.sls + + +0.0.2 (2014-02-16) + +- Better README extension changed from .md to .rst +- Add link to Salt Formula documentation + + +0.0.1 (2013-11-03) + +- Initial version diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..3e21c72 --- /dev/null +++ b/LICENSE @@ -0,0 +1,13 @@ + Copyright (c) 2014 Salt Stack Formulas + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..acd1030 --- /dev/null +++ b/README.rst @@ -0,0 +1,26 @@ +================ +rsyncd-formula +================ + +A formula to install and configure rsync as daemon process. + +.. note:: + + See the full `Salt Formulas installation and usage instructions + `_. + +Available states +================ + +.. contents:: + :local: + +``rsyncd`` +------------ + +Installs the rsync package, and starts the rsyncd service. + +``rsyncd.config`` +------------ + +Configure the rsync daemon by writing an rsync.conf and rsync secrets (optional). diff --git a/pillar.example b/pillar.example new file mode 100644 index 0000000..d034252 --- /dev/null +++ b/pillar.example @@ -0,0 +1,3 @@ +template: + lookup: + master: template-master diff --git a/rsyncd/config.sls b/rsyncd/config.sls new file mode 100644 index 0000000..e69de29 diff --git a/rsyncd/init.sls b/rsyncd/init.sls new file mode 100644 index 0000000..168f466 --- /dev/null +++ b/rsyncd/init.sls @@ -0,0 +1,8 @@ +{% from "template/map.jinja" import template with context %} + +template: + pkg.installed: + - name: {{ template.pkg }} + service.running: + - name: {{ template.service }} + - enable: True diff --git a/rsyncd/map.jinja b/rsyncd/map.jinja new file mode 100644 index 0000000..6275604 --- /dev/null +++ b/rsyncd/map.jinja @@ -0,0 +1,7 @@ +{% set rsync = salt['grains.filter_by']({ + 'Debian': { + 'pkg': 'rsyncd', + 'service': 'rsyncd', + 'config': '/etc/rsyncd.conf', + }, +}, merge=salt['pillar.get']('rsync:lookup')) %}