Skip to content
This repository was archived by the owner on Oct 30, 2018. It is now read-only.

Commit 1a0b0bc

Browse files
author
Daniele Sluijters
committed
Add first version of the README.
1 parent c73b8b6 commit 1a0b0bc

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

README.rst

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
################
2+
puppetdb-stencil
3+
################
4+
5+
When passed one or more resource types those resources are rendered through templates. The templates are loaded based on a template matching the exact resource type name with a .jinja2 extension or an optionally passed template.
6+
7+
.. code-block:: bash
8+
9+
$ python puppetdb-stencil.py mytype
10+
11+
A more complex example that renders multiple types through a shared template:
12+
13+
.. code-block:: bash
14+
15+
$ python puppetdb-stencil.py nagios_host nagios_hostgroup -t examples/nagios_.jinja2
16+
17+
Template selection
18+
------------------
19+
20+
The jinja2 loader is used to first search in the current directory and then the absolute path. This is done for every template specified. A template name is generated for the current resource type name.
21+
22+
.. code-block:: bash
23+
24+
$ python puppetdb-stencil.py nagios_host -t examples/nagios_.jinja2
25+
26+
This looks in these places:
27+
28+
* ``nagios_host.jinja2``
29+
* ``/nagios_host.jinja2``
30+
* ``examples/nagios_.jinja2``
31+
* ``/examples/nagios_.jinja2``
32+
33+
Installation
34+
------------
35+
36+
This project requires pypuppetdb and Jinja2 to function. On Python 2.6 it additionally requires argparse.
37+
38+
.. code-block:: bash
39+
40+
$ pip install -r requirements.txt

0 commit comments

Comments
 (0)