Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
salt-state
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FFFFM
salt-state
Commits
79d337f4
Commit
79d337f4
authored
5 years ago
by
skorpy
Browse files
Options
Downloads
Patches
Plain Diff
remove sorting of dict
parent
9f126b44
Branches
Branches containing commit
No related tags found
1 merge request
!450
Resolve "python3 fix modules "unorderable types: dict() < dict()""
Pipeline
#21939
passed
5 years ago
Stage: highstate
Changes
2
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
_modules/prometheus.py
+1
-1
1 addition, 1 deletion
_modules/prometheus.py
network/files/interfaces.j2
+3
-3
3 additions, 3 deletions
network/files/interfaces.j2
with
4 additions
and
4 deletions
_modules/prometheus.py
+
1
−
1
View file @
79d337f4
def
prometheus_targets_for_grain
(
key
):
values
=
__salt__
[
'
mine.get
'
](
'
*
'
,
'
grains.items
'
,
tgt_type
=
'
glob
'
).
values
()
return
[
remote_grains
[
key
]
for
remote_grains
in
sorted
(
values
)
if
key
in
remote_grains
]
return
[
remote_grains
[
key
]
for
remote_grains
in
values
if
key
in
remote_grains
]
This diff is collapsed.
Click to expand it.
network/files/interfaces.j2
+
3
−
3
View file @
79d337f4
...
...
@@ -21,7 +21,7 @@ iface lo
{#
# Set up ifaces dict with configured and generated interfaces.
#}
{%- for interface in ifaces
|sort
if interface not in ['lo'] %}
{%- for interface in ifaces if interface not in ['lo'] %}
{%- set config = ifaces.get (interface) %}
{#- Let's go #}
...
...
@@ -42,7 +42,7 @@ iface {{ interface }}
{#- Configure stuff for bonding, bridging, etc.? #}
{%- for feature in ['batman', 'bond', 'bridge', 'vlan', 'vxlan'] if feature in config %}
{%- set feature_config = config.get (feature) %}
{%- for opt in feature_config
|sort
%}
{%- for opt in feature_config %}
{{ opt }} {{ feature_config.get (opt) }}
{%- endfor %}
#
...
...
@@ -54,7 +54,7 @@ iface {{ interface }}
{%- endfor %}
{#- Anything else... #}
{%- for keyword in config
|sort
%}
{%- for keyword in config %}
{%- set argument = config.get (keyword) %}
{%- if argument is none %}
{%- elif keyword.startswith ("_") %}
...
...
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