Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tomcat-formula
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
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
tomcat-formula
Commits
d1bb84fd
Unverified
Commit
d1bb84fd
authored
5 years ago
by
Danny Smit
Committed by
Imran Iqbal
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
refactor(map.jinja): use `template-formula` structure & add `debian-10`
parent
43fc17a5
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
tomcat/map.jinja
+32
-18
32 additions, 18 deletions
tomcat/map.jinja
tomcat/osfamilymap.yaml
+0
-4
0 additions, 4 deletions
tomcat/osfamilymap.yaml
tomcat/osfingermap.yaml
+11
-2
11 additions, 2 deletions
tomcat/osfingermap.yaml
with
43 additions
and
24 deletions
tomcat/map.jinja
+
32
−
18
View file @
d1bb84fd
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
# vim: ft=jinja
# vim: ft=jinja
{%
import_yaml
"tomcat/defaults.yaml"
as
defaults
%}
{#- Get the `tplroot` from `tpldir` #}
{%
import_yaml
"tomcat/osmap.yaml"
as
osmap
%}
{%
-
set
tplroot
=
tpldir.split
(
'/'
)[
0
]
%}
{%
import_yaml
"tomcat/codenamemap.yaml"
as
codemap
%}
{#- Start imports as #}
{%
-
import_yaml
tplroot
~
"/defaults.yaml"
as
default_settings
%}
{%
-
import_yaml
tplroot
~
"/osfamilymap.yaml"
as
osfamilymap
%}
{%
-
import_yaml
tplroot
~
"/osfingermap.yaml"
as
osfingermap
%}
{# get the settings for the os_family grain #}
{#- Retrieve the config dict only once #}
{%
set
osfam
=
salt
[
'grains.filter_by'
](
osmap
)
or
{}
%}
{%
-
set
_config
=
salt
[
'config.get'
](
tplroot
,
default
=
{}
)
%}
{# get the settings for the oscodename grain, os_family data will override
oscodename data #}
{%
set
oscode
=
salt
[
'grains.filter_by'
](
codemap
,
grain
=
'oscodename'
,
merge
=
osfam
)
or
{}
%}
{# merge the os family/codename specific data over the defaults #}
{%
-
set
defaults
=
salt
[
'grains.filter_by'
](
{%
do
defaults.tomcat.update
(
oscode
)
%}
default_settings
,
default
=
tplroot
,
merge
=
salt
[
'grains.filter_by'
](
osfamilymap
,
grain
=
'os_family'
,
merge
=
salt
[
'grains.filter_by'
](
osfingermap
,
grain
=
'osfinger'
,
merge
=
salt
[
'grains.filter_by'
](
_config
,
default
=
'lookup'
)
)
)
)
%}
{# merge the pillar:lookup dict into the defaults/os specific dict #}
{%
-
set
config
=
salt
[
'grains.filter_by'
](
{%
set
lookup
=
salt
[
'pillar.get'
](
'tomcat:lookup'
,
{
'defaults'
:
defaults
}
,
default
=
defaults.tomcat
,
default
=
'defaults'
,
merge
=
True
)
%}
merge
=
_config
)
%}
{# merge the actual tomcat pillar into the above combined dict #}
{%
-
set
tomcat
=
config
%}
{%
set
tomcat
=
salt
[
'pillar.get'
](
'tomcat'
,
default
=
lookup
,
merge
=
True
)
%}
This diff is collapsed.
Click to expand it.
tomcat/osmap.yaml
→
tomcat/os
family
map.yaml
+
0
−
4
View file @
d1bb84fd
...
@@ -19,10 +19,6 @@ RedHat:
...
@@ -19,10 +19,6 @@ RedHat:
native_pkg
:
tomcat-native
native_pkg
:
tomcat-native
manager_pkg
:
tomcat-admin-webapps
manager_pkg
:
tomcat-admin-webapps
main_config_template
:
salt://tomcat/files/tomcat-default-CentOS.template
main_config_template
:
salt://tomcat/files/tomcat-default-CentOS.template
CentOS
:
native_pkg
:
tomcat-native
manager_pkg
:
tomcat-admin-webapps
main_config_template
:
salt://tomcat/files/tomcat-default-CentOS.template
openSUSE
:
openSUSE
:
ver
:
8
ver
:
8
native_pkg
:
libtcnative-1-0
native_pkg
:
libtcnative-1-0
...
...
This diff is collapsed.
Click to expand it.
tomcat/
codename
map.yaml
→
tomcat/
osfinger
map.yaml
+
11
−
2
View file @
d1bb84fd
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
# vim: ft=yaml
# vim: ft=yaml
---
---
trusty
:
Ubuntu-14.04
:
ver
:
7
ver
:
7
pkg
:
tomcat7
pkg
:
tomcat7
manager_pkg
:
tomcat7-admin
manager_pkg
:
tomcat7-admin
...
@@ -11,7 +11,7 @@ trusty:
...
@@ -11,7 +11,7 @@ trusty:
service
:
tomcat7
service
:
tomcat7
user
:
tomcat7
user
:
tomcat7
group
:
tomcat7
group
:
tomcat7
wheezy
:
Debian-7
:
pkg
:
tomcat7
pkg
:
tomcat7
manager_pkg
:
tomcat7-admin
manager_pkg
:
tomcat7-admin
conf_dir
:
/etc/tomcat7
conf_dir
:
/etc/tomcat7
...
@@ -20,3 +20,12 @@ wheezy:
...
@@ -20,3 +20,12 @@ wheezy:
service
:
tomcat7
service
:
tomcat7
user
:
tomcat7
user
:
tomcat7
group
:
tomcat7
group
:
tomcat7
Debian-10
:
ver
:
9
pkg
:
tomcat9
manager_pkg
:
tomcat9-admin
conf_dir
:
/etc/tomcat9
main_config
:
/etc/default/tomcat9
service
:
tomcat9
user
:
tomcat
group
:
tomcat
This diff is collapsed.
Click to expand it.
Dennis Ahrens
@ahrensde
mentioned in commit
5b60bfae
·
4 years ago
mentioned in commit
5b60bfae
mentioned in commit 5b60bfae3fb2177baa5e6af4222b24d4c3ceae54
Toggle commit list
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