-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from myii/bug/fix-for-salt-ssh
fix: make necessary modifications to get working on `salt-ssh`
- Loading branch information
Showing
3 changed files
with
25 additions
and
21 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,28 @@ | ||
# -*- coding: utf-8 -*- | ||
# vim: ft=jinja | ||
|
||
{% import_yaml 'logrotate/defaults.yaml' as default_settings %} | ||
{% import_yaml "logrotate/osfamilymap.yaml" as os_family_map %} | ||
{% import_yaml "logrotate/osmap.yaml" as os_map %} | ||
{%- import_yaml "logrotate/defaults.yaml" as default_settings %} | ||
{%- import_yaml "logrotate/osfamilymap.yaml" as osfamilymap %} | ||
{%- import_yaml "logrotate/osmap.yaml" as osmap %} | ||
|
||
{% set osfam = salt['grains.filter_by']( | ||
os_family_map, | ||
grain='os_family', | ||
) or {} %} | ||
{% set os = salt['grains.filter_by']( | ||
os_map, | ||
grain='os', | ||
) or {} %} | ||
|
||
{% do salt['defaults.merge'](default_settings['logrotate'], osfam) %} | ||
{% do salt['defaults.merge'](default_settings['logrotate'], os) %} | ||
|
||
{% set logrotate = salt['pillar.get']( | ||
'logrotate:lookup', | ||
default=default_settings['logrotate'], | ||
merge=True, | ||
) %} | ||
{#- Retrieve the config dict only once #} | ||
{%- set _config = salt['config.get']('logrotate', default={}) %} | ||
{%- set defaults = salt['grains.filter_by']( | ||
default_settings, | ||
default='logrotate', | ||
merge=salt['grains.filter_by']( | ||
osfamilymap, | ||
grain='os_family', | ||
merge=salt['grains.filter_by']( | ||
osmap, | ||
grain='os', | ||
merge=salt['grains.filter_by']( | ||
_config, | ||
default='lookup' | ||
) | ||
) | ||
) | ||
) | ||
%} | ||
|
||
{%- set logrotate = defaults %} |
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