-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
161acc1
commit a9b2fa7
Showing
9 changed files
with
148 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# -*- coding: utf-8 -*- | ||
# vim: ft=sls | ||
|
||
{%- set tplroot = tpldir.split('/')[0] %} | ||
{%- from tplroot ~ "/map.jinja" import data as d with context %} | ||
{%- set formula = d.formula %} | ||
{%- if 'config_file' in d.k3s and d.k3s.config_file %} | ||
{%- set sls_binary_clean = tplroot ~ '.k3s.binary.clean' %} | ||
{%- set sls_script_clean = tplroot ~ '.k3s.script.clean' %} | ||
include: | ||
- {{ sls_binary_clean if d.k3s.pkg.use_upstream_binary else sls_script_clean }} | ||
{{ formula }}-k3s-config-clean: | ||
file.absent: | ||
- names: | ||
- {{ d.k3s.config_file }} | ||
- require: | ||
- sls: {{ sls_binary_clean if d.k3s.pkg.use_upstream_binary else sls_script_clean }} | ||
{%- endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# -*- coding: utf-8 -*- | ||
# vim: ft=sls | ||
|
||
{%- set tplroot = tpldir.split('/')[0] %} | ||
{%- from tplroot ~ "/map.jinja" import data as d with context %} | ||
{%- set formula = d.formula %} | ||
{%- if 'config' in d.k3s and d.k3s.config %} | ||
{%- set sls_binary_install = tplroot ~ '.k3s.binary.install' %} | ||
{%- set sls_package_install = tplroot ~ '.k3s.package.install' %} | ||
{%- from tplroot ~ "/libtofs.jinja" import files_switch with context %} | ||
include: | ||
- {{ sls_binary_install if d.k3s.pkg.use_upstream_binary else sls_package_install }} | ||
{{ formula }}-k3s-config-file-install-file-managed: | ||
file.managed: | ||
- name: {{ d.k3s.config_file }} | ||
- source: {{ files_switch(['config.yml.jinja'], | ||
lookup='k8s-k3s-config-file-install-file-managed' | ||
) | ||
}} | ||
- mode: 644 | ||
- user: {{ d.identity.rootuser }} | ||
- group: {{ d.identity.rootgroup }} | ||
- makedirs: True | ||
- template: jinja | ||
- context: | ||
config: {{ d.k3s.config|json }} | ||
- require: | ||
- sls: {{ sls_binary_install if d.k3s.pkg.use_upstream_binary else sls_package_install }} | ||
{%- endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# -*- coding: utf-8 -*- | ||
# vim: ft=sls | ||
|
||
include: | ||
- .file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters