summaryrefslogtreecommitdiffstats
path: root/doc/website-v1/configuration.adoc
blob: fb48c93e1754b3c4575cbada43f1c9eb1b95b3d2 (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
= Configuration =

.Version information
NOTE: This section applies to `crmsh 2.0+` only.


`crm` can be configured using both a system-wide configuration file,
and a per-user configuration file. The values set in the user-local
file take precedence over the system-wide settings.

The global configuration file is usually installed at
`/etc/crm/crm.conf`, and the user-local configuration file at
`~/.config/crm/crm.conf`.


== Upgrading from crm 1.x to 2.x ==

The configuration file format and location changed significantly going
from crm 1.x to 2.x. If `crm` cannot find a user-local configuration
file when starting up, it will look for an old-style configuration
file at `~/.crm.rc`. If this file exists, `crm` will prompt the user
asking if the old-style configuration should be  automatically
converted to a new-style configuration file.


== Format description ==

The `settings` file consists of sections introduced by a `[section]`
header, and followed by `name=value` pairs.

Leading whitespace is stripped from values.

Values can contain format strings referring to other values in the
same section.

Lines starting with `#` or `;` are interpreted as comments.

Values starting with `$` are interpreted as environment variable
references, and the value will be retrieved from the named environment
variable if set.

== Example configuration ==

The example configuration below lists all available options and their
default values.

----------------------
[core]
editor = $EDITOR
pager = $PAGER
user =
skill_level = expert
sort_elements = yes
check_frequency = always
check_mode = strict
wait = no
add_quotes = yes
manage_children = ask
force = no
debug = no
ptest = ptest, crm_simulate
dotty = dotty
dot = dot

[path]
sharedir = /usr/share/crmsh
cache = /var/cache/crm
crm_config = /var/lib/pacemaker/cib
crm_daemon_dir = /usr/lib64/pacemaker
crm_daemon_user = hacluster
ocf_root = /usr/lib/ocf
crm_dtd_dir = /usr/share/pacemaker
pe_state_dir = /var/lib/pacemaker/pengine
heartbeat_dir = /var/lib/heartbeat
hb_delnode = /usr/share/heartbeat/hb_delnode
nagios_plugins = /usr/lib64/nagios/plugins

[color]
style = color
error = red bold
ok = green bold
warn = yellow bold
info = cyan
help_keyword = blue bold underline
help_header = normal bold
help_topic = yellow bold
help_block = cyan
keyword = yellow
identifier = normal
attr_name = cyan
attr_value = red
resource_reference = green
id_reference = green
score = magenta
ticket = magenta
----------------------


== Loading and saving options ==

Options are loaded from the global configuration file first, and the
user-local file second. This means that the user-local options take
precedence over the global configuration.

When changing an option using the `options` sublevel, the
configuration file is written to disk with the new value.

== Syntax highlighting ==

By default, `crm` will try to syntax highlight its output when
connected to a TTY. To disable this behavior, set the configuration
value `style = none` in the `[color]` section.

The available color choices may depend on the terminal used, but
normally include the following:

----
black blue green cyan red magenta yellow white
----

Colors can be combined with styles:

----
bold blink dim reverse underline normal
----

== Setting options from the interactive shell ==

Options can be set directly from the interactive shell using the
`options` sublevel. These options will be written to the per-user
configuration file. Note that changing an option in this way may erase
comments added to the configuration file.