-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(manager): add support for host/group/role template files
This expands the support for inventory defined template (`templates/*.tpl`) files to also expose inventory templates that have been defined in the group, role, and host components to the module during templating
- Loading branch information
Showing
7 changed files
with
26 additions
and
8 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,3 @@ | ||
{{- define "group_template" }} | ||
This part of the template was defined among the common template files in the "default" group of the test inventory. | ||
{{- end }} |
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,3 @@ | ||
{{- define "host_template" }} | ||
This part of the template was defined among the common template files for the host {{ .Mango.Metadata.Hostname | quote }}. | ||
{{- end }} |
3 changes: 3 additions & 0 deletions
3
test/mockup/inventory/hosts/testbox-ubuntu/templates/host.tpl
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,3 @@ | ||
{{- define "group_template" }} | ||
This part of the template was defined among the common template files for the host {{ .Mango.Metadata.Hostname | quote }}. | ||
{{- end }} |
6 changes: 4 additions & 2 deletions
6
test/mockup/inventory/modules/test-template/templates/foo.tpl
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,3 @@ | ||
{{- define "role_template" }} | ||
This part of the template was defined among the common template files in the "common" role of the test inventory. | ||
{{- end }} |