447cef0ad8
When calling crm_node -n we can drop stderr so that people are not confused about the following error: $ crm_node -n error: Could not connect to cluster (is it running?) $ crm_node -n 2>/dev/null $ Change-Id: Ie774ff5862cf5f28f712e009d271055eb5d646d0
11 lines
287 B
Ruby
11 lines
287 B
Ruby
require 'facter'
|
|
|
|
# Do not call crm_node -n when running inside a container
|
|
if not File.exists?('/.dockerenv') and not File.exists?('/run/.containerenv')
|
|
Facter.add('pacemaker_node_name') do
|
|
setcode do
|
|
Facter::Core::Execution.exec 'crm_node -n 2>/dev/null'
|
|
end
|
|
end
|
|
end
|