-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(unit): allow to start/stop, enable/disable services
* allow to use lists on keys that can be repeated * add tests to verify unit files contents
- Loading branch information
1 parent
246a3c7
commit 5f7d854
Showing
6 changed files
with
93 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,17 @@ | ||
{% for section, sectioncontent in config.items() -%} | ||
# | ||
# This file managed by Salt, do not edit | ||
# | ||
{% for section, sectioncontent in config.items() %} | ||
{%- if section not in ['enabled', 'status'] %} | ||
[{{ section }}] | ||
{% for key, value in sectioncontent.items() -%} | ||
{%- for key, value in sectioncontent.items() %} | ||
{%- if value is list %} | ||
{%- for v in value %} | ||
{{ key }}={{ v }} | ||
{%- endfor %} | ||
{%- else %} | ||
{{ key }}={{ value }} | ||
{% endfor %} | ||
{%- endif %} | ||
{%- endfor %} | ||
{%- endif %} | ||
{% endfor -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
rsync_test_package: | ||
pkg.installed: | ||
- name: rsync | ||
|
||
rsync_test_file: | ||
file.managed: | ||
- name: /etc/rsyncd.conf | ||
- content: Managed by salt |