-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Prevent error return code on void includes
The include statement will return an error code 20 if no data is included. Their is three ways to fix this: - boilerplate jinja2 around each includes - include a dummy file with at least a function that do nothing - a function that does nothing in the included files I chose the third as I found that signaling to the user the effects of its pillar configuration is a good thing. I also refined the jinja2 around the copy-all include to take care of more specific setups where an user could have disabled all dotfiles but is enabling some specifically.
- Loading branch information
seven beep
committed
Oct 2, 2024
1 parent
be5f119
commit 26f0f84
Showing
13 changed files
with
79 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -5,7 +5,20 @@ SPDX-FileCopyrightText: 2024 seven-beep <[email protected]> | |
SPDX-License-Identifier: AGPL-3.0-or-later | ||
#} | ||
|
||
{%- if salt['pillar.get']('qusal:dotfiles:all', default=true) == true -%} | ||
{%- if ( | ||
( salt['pillar.get']('qusal:dotfiles:all', default=true) == true ) | ||
or salt['pillar.get']('qusal:dotfiles:dom0') == true | ||
or salt['pillar.get']('qusal:dotfiles:git') == true | ||
or salt['pillar.get']('qusal:dotfiles:gtk') == true | ||
or salt['pillar.get']('qusal:dotfiles:net') == true | ||
or salt['pillar.get']('qusal:dotfiles:pgp') == true | ||
or salt['pillar.get']('qusal:dotfiles:sh') == true | ||
or salt['pillar.get']('qusal:dotfiles:ssh') == true | ||
or salt['pillar.get']('qusal:dotfiles:vim') == true | ||
or salt['pillar.get']('qusal:dotfiles:x11') == true | ||
or salt['pillar.get']('qusal:dotfiles:xfce') == true | ||
) | ||
-%} | ||
|
||
include: | ||
- .copy-dom0 | ||
|
@@ -20,6 +33,11 @@ include: | |
- .copy-x11 | ||
- .copy-xfce | ||
|
||
{%- else -%} | ||
|
||
"{{ sls }}-is-deactivated": | ||
test.nop | ||
|
||
{%- 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
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
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