template-formula/pillar.example

58 lines
1.6 KiB
Text
Raw Normal View History

# -*- coding: utf-8 -*-
# vim: ft=yaml
---
2013-11-03 19:50:58 +01:00
template:
lookup:
master: template-master
# Just for testing purposes
winner: lookup
added_in_lookup: lookup_value
2019-02-06 16:12:02 +01:00
# Using bash package and udev service as an example. This allows us to
# test the template formula itself. You should set these parameters to
# examples that make sense in the contexto of the formula you're writing.
{%- if grains.osfinger == 'CentOS-6' %}
pkg:
name: cronie
service:
name: crond
{%- else %}
pkg:
name: bash
service:
name: systemd-udevd
{%- endif %}
config: /etc/template-formula.conf
tofs:
# The files_switch key serves as a selector for alternative
# directories under the formula files directory. See TOFS pattern
# doc for more info.
# Note: Any value not evaluated by `config.get` will be used literally.
# This can be used to set custom paths, as many levels deep as required.
files_switch:
- any/path/can/be/used/here
- id
- osfinger
- os
2019-02-27 03:52:36 +00:00
- os_family
# All aspects of path/file resolution are customisable using the options below.
# This is unnecessary in most cases; there are sensible defaults.
# path_prefix: template_alt
# dirs:
# files: files_alt
# default: default_alt
# source_files:
# template-config-file-file-managed:
# - 'example_alt.tmpl'
# - 'example_alt.tmpl.jinja'
# For testing purposes
source_files:
template-config-file-file-managed:
- 'example.tmpl.jinja'
# Just for testing purposes
winner: pillar
added_in_pillar: pillar_value