Silence useless facter errors when calling crm_node
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
This commit is contained in:
parent
6b8f272c53
commit
447cef0ad8
|
@ -4,7 +4,7 @@ require 'facter'
|
|||
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'
|
||||
Facter::Core::Execution.exec 'crm_node -n 2>/dev/null'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue