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
ca42d40e
Commit
ca42d40e
authored
9 years ago
by
risca
Browse files
Options
Downloads
Patches
Plain Diff
added support for LXC profiles
parent
3bc5aa3b
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
+17
-0
17 additions, 0 deletions
pillar.example
salt/files/master.d/lxc_profiles.conf
+42
-0
42 additions, 0 deletions
salt/files/master.d/lxc_profiles.conf
with
59 additions
and
0 deletions
pillar.example
+
17
−
0
View file @
ca42d40e
...
@@ -37,6 +37,23 @@ salt:
...
@@ -37,6 +37,23 @@ salt:
ssl_key: /etc/pki/api/certs/server.key
ssl_key: /etc/pki/api/certs/server.key
debug: False
debug: False
disable_ssl: False
disable_ssl: False
# for profile configuration as https://docs.saltstack.com/en/latest/topics/tutorials/lxc.html#tutorial-lxc-profiles
lxc.container_profile:
debian:
template: download
options:
dist: debian
release: jessie
arch: amd64
backing: lvm
vgname: kimsufi
size: 10G
lxc.network_profile:
basic:
eth0:
link: lxcbr0
type: veth
flags: up
## for external auth - LDAP
## for external auth - LDAP
# filter to use for Active Directory LDAP
# filter to use for Active Directory LDAP
auth.ldap.filter: {% raw %}'sAMAccountName={{username}}'{% endraw %}
auth.ldap.filter: {% raw %}'sAMAccountName={{username}}'{% endraw %}
...
...
This diff is collapsed.
Click to expand it.
salt/files/master.d/lxc_profiles.conf
0 → 100644
+
42
−
0
View file @
ca42d40e
# This file managed by Salt, do not edit by hand!!
# Based on salt version 2015.8.7 default config
{%
set
cfg_salt
=
pillar
.
get
(
'salt'
, {}) -%}
{%
set
cfg_master
=
cfg_salt
.
get
(
'master'
, {}) -%}
{%
set
cfg_prof
=
cfg_master
.
get
(
'lxc.container_profile'
, {}) -%}
{%
set
cfg_net
=
cfg_master
.
get
(
'lxc.network_profile'
, {}) -%}
###### Profile configurations #########
#######################################
{%
if
cfg_prof
%}
lxc
.
container_profile
:
{%-
for
prof
in
cfg_prof
%}
{{
prof
}}:
{%-
for
conf
in
cfg_prof
[
prof
] %}
{%-
if
cfg_prof
[
prof
][
conf
]
is
mapping
%}
{{
conf
}}:
{%-
for
opt
in
cfg_prof
[
prof
][
conf
] %}
{{
opt
}}: {{
cfg_prof
[
prof
][
conf
][
opt
] }}
{%-
endfor
%}
{%-
else
%}
{{
conf
}}: {{
cfg_prof
[
prof
][
conf
] }}
{%-
endif
%}
{%-
endfor
%}
{%
endfor
%}
{%-
endif
%}
{%
if
cfg_net
%}
lxc
.
network_profile
:
{%-
for
prof
in
cfg_net
%}
{{
prof
}}:
{%-
for
conf
in
cfg_net
[
prof
] -%}
{%-
if
cfg_net
[
prof
][
conf
]
is
mapping
%}
{{
conf
}}:
{%-
for
opt
in
cfg_net
[
prof
][
conf
] %}
{{
opt
}}: {{
cfg_net
[
prof
][
conf
][
opt
] }}
{%-
endfor
%}
{%-
else
%}
{{
conf
}}: {{
cfg_net
[
prof
][
conf
] }}
{%-
endif
%}
{%-
endfor
%}
{%
endfor
%}
{%-
endif
%}
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