Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
salt-formula
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
salt
salt-formula
Commits
ec8241c6
Commit
ec8241c6
authored
8 years ago
by
Elliot Chen
Browse files
Options
Downloads
Patches
Plain Diff
Added minion scheduler configuration
parent
9e7bcd59
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
pillar.example
+7
-0
7 additions, 0 deletions
pillar.example
salt/files/minion.d/f_defaults.conf
+21
-0
21 additions, 0 deletions
salt/files/minion.d/f_defaults.conf
with
28 additions
and
0 deletions
pillar.example
+
7
−
0
View file @
ec8241c6
...
@@ -150,6 +150,13 @@ salt:
...
@@ -150,6 +150,13 @@ salt:
mine_functions:
mine_functions:
network.interface_ip: [eth0]
network.interface_ip: [eth0]
# Define a minion scheduler
schedule:
- highstate:
- function: state.apply
- minutes: 60
- returner: redis
# other 'non-default' config
# other 'non-default' config
auth_keytab: /root/auth.keytab
auth_keytab: /root/auth.keytab
auth_principal: kadmin/admin
auth_principal: kadmin/admin
...
...
This diff is collapsed.
Click to expand it.
salt/files/minion.d/f_defaults.conf
+
21
−
0
View file @
ec8241c6
...
@@ -370,6 +370,27 @@ mine_functions:
...
@@ -370,6 +370,27 @@ mine_functions:
# second on the minion scheduler.
# second on the minion scheduler.
{{
get_config
(
'loop_interval'
,
'1'
) }}
{{
get_config
(
'loop_interval'
,
'1'
) }}
# When using the scheduler at least one schedule needs to be
# defined. The user running the salt master will need read access to the repo.
{%
if
'schedule'
in
cfg_minion
-%}
{%-
do
default_keys
.
append
(
'schedule'
) %}
schedule
:
{%-
for
schedule
in
cfg_minion
[
'schedule'
] %}
{%-
if
schedule
is
iterable
and
schedule
is
not
string
%}
{%-
for
name
,
children
in
schedule
.
items
() %}
{{
name
}}:
{%-
for
child
in
children
%}
{%-
for
key
,
value
in
child
.
items
() %}
{{
key
}}: {{
value
}}
{%-
endfor
-%}
{%-
endfor
-%}
{%-
endfor
-%}
{%-
endif
-%}
{%-
endfor
-%}
{%-
endif
%}
# Some installations choose to start all job returns in a cache or a returner
# Some installations choose to start all job returns in a cache or a returner
# and forgo sending the results back to a master. In this workflow, jobs
# and forgo sending the results back to a master. In this workflow, jobs
# are most often executed with --async from the Salt CLI and then results
# are most often executed with --async from the Salt CLI and then results
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment