blob: 9d37b8e64508ff6c1f41e6f1b6336957df02c806 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
.. -*- mode: rst -*-
.. _server-plugins-structures-defaults:
==========
Defaults
==========
The Defaults plugin can be used to populate default attributes for
entries. Defaults is *not* a Generator plugin, so it does not
actually bind an entry; Defaults are applied after an entry has been
bound, and only populate attributes that are not yet set.
Like :ref:`server-plugins-generators-rules`, Defaults supports regular
expressions in the name attribute.
For instance, to make all Service entries use the ``systemd`` tool
on Fedora 15 and the ``chkconfig`` tool on Fedora 14, you could do::
<Defaults priority="0">
<Group name="fedora-15">
<Service name=".*" type="systemd"/>
</Group>
<Group name="fedora-14">
<Service name=".*" type="chkconfig"/>
</Group>
</Defaults>
If you were to specify a ``type`` attribute for a Service entry in
Rules (or a ``type`` attribute for a BoundService entry in Bundler),
that would take precendence over the default.
Like :ref:`server-plugins-generators-rules`, Defaults can also replace
``%{name}`` in attributes with the real name of the entry. To enable this,
add the following setting to ``bcfg2.conf``::
[defaults]
replace_name = yes
|