-
Notifications
You must be signed in to change notification settings - Fork 329
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(environ): ensure environ is loaded by systemd using a drop-in
- Loading branch information
1 parent
24ecc4b
commit 1a82584
Showing
5 changed files
with
50 additions
and
0 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
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
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 %} | ||
{%- if 'environ' in d.pkg.docker and d.pkg.docker.environ and grains.os != 'Windows' %} | ||
{%- from tplroot ~ "/libtofs.jinja" import files_switch with context %} | ||
{%- set sls_environ = tplroot ~ '.software.config.environ' %} | ||
include: | ||
- {{ sls_environ }} | ||
# Use a systemd dropin override to make use of the environ file | ||
docker-software-config-dropin-file: | ||
file.managed: | ||
- name: {{ d.pkg.docker.dropin_file }} | ||
- makedirs: True | ||
- mode: '0755' | ||
- user: {{ d.identity.rootuser }} | ||
- group: {{ d.identity.rootgroup }} | ||
- require: | ||
- sls: {{ sls_environ }} | ||
ini.options_present: | ||
- name: {{ d.pkg.docker.dropin_file }} | ||
- sections: | ||
Service: | ||
EnvironmentFile: {{ d.pkg.docker.environ_file }} | ||
- require: | ||
- file: {{ d.pkg.docker.dropin_file }} | ||
{%- 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 |
---|---|---|
|
@@ -3,4 +3,5 @@ | |
|
||
include: | ||
- .environ | ||
- .dropin | ||
- .daemon |
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