doc fix
diff --git a/README.rst b/README.rst
index aa8d834..ed5effc 100644
--- a/README.rst
+++ b/README.rst
@@ -3,101 +3,46 @@
reclass formula
===============
-reclass is an “external node classifier” (ENC) as can be used with automation tools, such as Puppet, Salt, and Ansible. It is also a stand-alone tool for merging data sources recursively.
+reclass is an “external node classifier” (ENC) as can be used with automation
+tools, such as Puppet, Salt, and Ansible. It is also a stand-alone tool for
+merging data sources recursively.
+
Sample pillars
==============
Reclass storage with data fetched from git
-.. code-block:: yaml
-
- reclass:
- storage:
- enabled: true
- base_dir: /srv/reclass
- data_source:
- engine: git
- address: git@repo.domain.com:reclass/reclass-project.git
- revision: master
+.. literalinclude:: tests/pillar/storage_git.sls
+ :language: yaml
Reclass storage with local data source
-.. code-block:: yaml
-
- reclass:
- storage:
- enabled: true
- base_dir: /srv/reclass
- data_source:
- engine: local
+.. literalinclude:: tests/pillar/storage_local.sls
+ :language: yaml
Reclass model with single node definition
-.. code-block:: yaml
-
- reclass:
- storage:
- enabled: true
- node:
- service_node01:
- name: svc01
- domain: deployment.local
- classes:
- - cluster.deployment_name.service.role
- params:
- salt_master_host: <<salt-master-ip>>
- linux_system_codename: trusty
- single_address: <<node-ip>>
+.. literalinclude:: tests/pillar/generate_single.sls
+ :language: yaml
Reclass model with multiple node defined
-.. code-block:: yaml
-
- reclass:
- storage:
- enabled: true
- repeat_replace_symbol: '<<count>>'
- node:
- service_node01:
- name: node<<count>>
- domain: deployment.local
- classes:
- - cluster.deployment.service.role
- repeat:
- count: 2
- start: 5
- digits: 2
- params:
- single_address:
- value: 10.0.0.<<count>>
- start: 100
- deploy_address:
- value: part-<<count>>-whole
- start: 5
- digits: 3
- params:
- salt_master_host: <<salt-master-ip>>
- linux_system_codename: trusty
+.. literalinclude:: tests/pillar/generate_multi.sls
+ :language: yaml
Reclass storage with arbitrary class mappings
-.. code-block:: yaml
+.. literalinclude:: tests/pillar/class_mapping.sls
+ :language: yaml
- reclass:
- storage:
- enabled: true
- ...
- class_mappings:
- - target: '\*'
- class: default
External links
==============
* http://reclass.pantsfullofunix.net/index.html
* http://reclass.pantsfullofunix.net/operations.html
-* http://ryandlane.com/blog/2014/12/10/reloading-grains-and-pillars-during-a-saltstack-run/
+
Documentation and Bugs
======================
diff --git a/tests/pillar/class_mapping.sls b/tests/pillar/class_mapping.sls
new file mode 100644
index 0000000..05d74d5
--- /dev/null
+++ b/tests/pillar/class_mapping.sls
@@ -0,0 +1,6 @@
+reclass:
+ storage:
+ enabled: true
+ class_mappings:
+ - target: '\*'
+ class: default
diff --git a/tests/pillar/generate_multi.sls b/tests/pillar/generate_multi.sls
new file mode 100644
index 0000000..d25e2f6
--- /dev/null
+++ b/tests/pillar/generate_multi.sls
@@ -0,0 +1,25 @@
+reclass:
+ storage:
+ enabled: true
+ repeat_replace_symbol: <<count>>
+ node:
+ service_node01:
+ name: node<<count>>
+ domain: deployment.local
+ classes:
+ - cluster.deployment.service.role
+ repeat:
+ count: 2
+ start: 5
+ digits: 2
+ params:
+ single_address:
+ value: 10.0.0.<<count>>
+ start: 100
+ deploy_address:
+ value: part-<<count>>-whole
+ start: 5
+ digits: 3
+ params:
+ salt_master_host: <<salt-master-ip>>
+ linux_system_codename: trusty
diff --git a/tests/pillar/generate_single.sls b/tests/pillar/generate_single.sls
new file mode 100644
index 0000000..a8f5b4e
--- /dev/null
+++ b/tests/pillar/generate_single.sls
@@ -0,0 +1,14 @@
+reclass:
+ storage:
+ enabled: true
+ node:
+ service_node01:
+ name: svc01
+ domain: deployment.local
+ classes:
+ - cluster.deployment_name.service.role
+ params:
+ salt_master_host: <<salt-master-ip>>
+ linux_system_codename: trusty
+ single_address: <<node-ip>>
+
diff --git a/tests/pillar/storage_git.sls b/tests/pillar/storage_git.sls
new file mode 100644
index 0000000..33b989d
--- /dev/null
+++ b/tests/pillar/storage_git.sls
@@ -0,0 +1,8 @@
+reclass:
+ storage:
+ enabled: true
+ base_dir: /srv/reclass
+ data_source:
+ engine: git
+ address: git@repo.domain.com:reclass/reclass-project.git
+ revision: master
diff --git a/tests/pillar/storage_local.sls b/tests/pillar/storage_local.sls
new file mode 100644
index 0000000..8e342a9
--- /dev/null
+++ b/tests/pillar/storage_local.sls
@@ -0,0 +1,6 @@
+reclass:
+ storage:
+ enabled: true
+ base_dir: /srv/reclass
+ data_source:
+ engine: local
diff --git a/tests/pillar/storage_salt.sls b/tests/pillar/storage_salt.sls
deleted file mode 100644
index 51e40df..0000000
--- a/tests/pillar/storage_salt.sls
+++ /dev/null
@@ -1,9 +0,0 @@
-reclass:
- storage:
- enabled: true
- base_dir: /srv/salt/reclass
- output: yaml
- data_source:
- engine: git
- address: git....
- branch: master