style(whitespace): base on multiples of 2 rather than 4

This commit is contained in:
Imran Iqbal
2019-03-30 23:06:08 +00:00
parent e4185f4add
commit 0eaf78c627
6 changed files with 89 additions and 89 deletions
+30 -30
View File
@@ -7,35 +7,35 @@
{% for task,task_options in cron_settings.tasks.items() %}
cron.{{ task }}:
cron.{{ task_options.type|default('present') }}:
- name: '{{ task_options.name }}'
{% if 'user' in task_options %}
- user: {{ task_options.user|default('root') }}
{% endif %}
{% if 'minute' in task_options %}
- minute: '{{ task_options.minute }}'
{% endif %}
{% if 'hour' in task_options %}
- hour: '{{ task_options.hour }}'
{% endif %}
{% if 'daymonth' in task_options %}
- daymonth: '{{ task_options.daymonth }}'
{% endif %}
{% if 'month' in task_options %}
- month: '{{ task_options.month }}'
{% endif %}
{% if 'dayweek' in task_options %}
- dayweek: '{{ task_options.dayweek }}'
{% endif %}
{% if 'commented' in task_options and task_options.commented %}
- commented: True
{% endif %}
{% if 'special' in task_options %}
- special: '{{ task_options.special }}'
{% endif %}
- identifier: '{{ task }}'
{% if 'comment' in task_options %}
- comment: '{{ task_options.comment }}'
{% endif %}
cron.{{ task_options.type|default('present') }}:
- name: '{{ task_options.name }}'
{% if 'user' in task_options %}
- user: {{ task_options.user|default('root') }}
{% endif %}
{% if 'minute' in task_options %}
- minute: '{{ task_options.minute }}'
{% endif %}
{% if 'hour' in task_options %}
- hour: '{{ task_options.hour }}'
{% endif %}
{% if 'daymonth' in task_options %}
- daymonth: '{{ task_options.daymonth }}'
{% endif %}
{% if 'month' in task_options %}
- month: '{{ task_options.month }}'
{% endif %}
{% if 'dayweek' in task_options %}
- dayweek: '{{ task_options.dayweek }}'
{% endif %}
{% if 'commented' in task_options and task_options.commented %}
- commented: True
{% endif %}
{% if 'special' in task_options %}
- special: '{{ task_options.special }}'
{% endif %}
- identifier: '{{ task }}'
{% if 'comment' in task_options %}
- comment: '{{ task_options.comment }}'
{% endif %}
{% endfor %}
{% endif %}
+3 -3
View File
@@ -2,6 +2,6 @@
# vim: ft=sls
include:
- cron.install
- cron.config
- cron.service
- cron.install
- cron.config
- cron.service
+2 -2
View File
@@ -4,5 +4,5 @@
{% from "cron/map.jinja" import cron_settings with context %}
cron.install:
pkg.installed:
- name: {{ cron_settings.pkg }}
pkg.installed:
- name: {{ cron_settings.pkg }}
+16 -16
View File
@@ -2,23 +2,23 @@
# vim: ft=jinja
{% set os_family_map = salt['grains.filter_by']({
'RedHat': {
'pkg': 'cronie',
'service': 'crond',
},
'Suse': {
'pkg': 'cronie',
'service': 'cron',
},
'Debian': {
'pkg': 'cron',
'service': 'cron',
},
'RedHat': {
'pkg': 'cronie',
'service': 'crond',
},
'Suse': {
'pkg': 'cronie',
'service': 'cron',
},
'Debian': {
'pkg': 'cron',
'service': 'cron',
},
}, grain='os_family', merge=salt['pillar.get']('cron:lookup')) %}
{% set cron_settings = salt['pillar.get'](
'cron',
default=os_family_map,
merge=True
)
'cron',
default=os_family_map,
merge=True
)
%}
+6 -6
View File
@@ -5,11 +5,11 @@
cron.service:
{% if 'enabled' not in cron_settings or ( 'enabled' in cron_settings and cron_settings.enabled ) %}
service.running:
- name: {{ cron_settings.service }}
- enable: True
service.running:
- name: {{ cron_settings.service }}
- enable: True
{% else %}
service.dead:
- name: {{ cron_settings.service }}
- enable: False
service.dead:
- name: {{ cron_settings.service }}
- enable: False
{% endif %}