mirror of
https://github.com/saltstack-formulas/cron-formula.git
synced 2026-09-21 23:27:40 +02:00
feat(cron.env): add env option in cron-formula
This commit is contained in:
@@ -23,3 +23,16 @@ cron.{{ task }}:
|
||||
{%- endif %}
|
||||
|
||||
{%- endfor %}
|
||||
|
||||
{%- for env, env_options in cron.get('env', {}). items() %}
|
||||
{%- set env_type = env_options.type|d('present') %}
|
||||
|
||||
cron.{{ env }}:
|
||||
cron.env_{{ env_type }}:
|
||||
- name: {{ env_options.name }}
|
||||
{%- if env_type == 'present' %}
|
||||
- value: {{ env_options.value }}
|
||||
{%- endif %}
|
||||
- user: {{ env_options.user|d('root') }}
|
||||
|
||||
{%- endfor %}
|
||||
|
||||
Reference in New Issue
Block a user