diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-03-21 14:35:04 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-03-21 14:35:04 -0400 |
commit | 38f99b402d3118e2c26ff42d72ddf9b666adac13 (patch) | |
tree | 705d18bed66337192816325facb1733280291ff5 /doc/server | |
parent | a3f2a731bbef5d9c2033eed23432aa7792d47989 (diff) | |
parent | 71d7285c405bd639f1f9f2642ea8fb567b97caec (diff) | |
download | bcfg2-38f99b402d3118e2c26ff42d72ddf9b666adac13.tar.gz bcfg2-38f99b402d3118e2c26ff42d72ddf9b666adac13.tar.bz2 bcfg2-38f99b402d3118e2c26ff42d72ddf9b666adac13.zip |
Merge branch '1.3.2' into maint
Conflicts:
src/lib/Bcfg2/Client/Tools/__init__.py
src/sbin/bcfg2-test
testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIX/Test__init.py
testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIXUsers.py
testsuite/Testsrc/test_code_checks.py
Diffstat (limited to 'doc/server')
-rw-r--r-- | doc/server/plugins/grouping/metadata.txt | 46 |
1 files changed, 41 insertions, 5 deletions
diff --git a/doc/server/plugins/grouping/metadata.txt b/doc/server/plugins/grouping/metadata.txt index a6ed37f8e..f4c5cbcb3 100644 --- a/doc/server/plugins/grouping/metadata.txt +++ b/doc/server/plugins/grouping/metadata.txt @@ -32,7 +32,7 @@ clients.xml =========== The ``clients.xml`` file contains the mappings of Profile Groups -to clients. The file is just a series of *<Client />* tags, each of which +to clients. The file is just a series of ``<Client />`` tags, each of which describe one host. A sample file is below: .. code-block:: xml @@ -43,7 +43,7 @@ describe one host. A sample file is below: <Client profile="kerberos-master" name="kdc.example.com"/> <Client profile="mail-server" name="mail.example.com"/> <Client name='foo' address='10.0.0.1'> - <Alias name='foo-mgmt' address='10.1.0.1'/> + <Alias name='foo-mgmt' address='10.1.0.1'/> </Client> </Clients> @@ -197,9 +197,9 @@ useful results: .. code-block:: xml - <Groups version='3.0' xmlns:xi="http://www.w3.org/2001/XInclude"> - <xi:include href="my-groups.xml" /> - <xi:include href="their-groups.xml" /> + <Groups xmlns:xi="http://www.w3.org/2001/XInclude"> + <xi:include href="my-groups.xml" /> + <xi:include href="their-groups.xml" /> </Groups> Each of the included groups files has the same format. These files are @@ -207,6 +207,42 @@ properly validated by ``bcfg2-lint``. This mechanism is useful for composing group definitions from multiple sources, or setting different permissions in an svn repository. +You can also optionally include a file that may or may not exist with +the ``fallback`` tag: + +.. code-block:: xml + + <Groups xmlns:xi="http://www.w3.org/2001/XInclude"> + <xi:include href="my-groups.xml"/> + <xi:include href="their-groups.xml"><xi:fallback/></xi:include> + </Groups> + +In this case, if ``their-groups.xml`` does not exist, no error will be +raised and everything will work fine. (You can also use ``fallback`` +to include a different file, or explicit content in the case that the +parent include does not exist.) + +Wildcard XInclude +~~~~~~~~~~~~~~~~~ + +.. versionadded:: 1.3.1 + +Bcfg2 supports an extension to XInclude that allows you to use shell +globbing in the hrefs. (Stock XInclude doesn't support this, since +the href is supposed to be a URL.) + +For instance: + + <Groups xmlns:xi="http://www.w3.org/2001/XInclude"> + <xi:include href="groups/*.xml"/> + </Groups> + +This would include all ``*.xml`` files in the ``groups`` subdirectory. + +Note that if a glob finds no files, that is treated the same as if a +single included file does not exist. You should use the ``fallback`` +tag, described above, if a glob may potentially find no files. + Probes ====== |