Revert "Add systemd module, required by rabbitmq"
[mirror/dsa-puppet.git] / 3rdparty / modules / rabbitmq / lib / facter / erl_ssl_path.rb
1 # Fact to get the ssl path for the erlang distribution in the current
2 # system as described in the RabbitMQ docs [1].
3 #
4 # [1] https://www.rabbitmq.com/clustering-ssl.html
5 Facter.add(:erl_ssl_path) do
6   setcode do
7     if Facter::Util::Resolution.which('erl')
8       data = Facter::Core::Execution.execute("erl -eval 'io:format(\"~p\", [code:lib_dir(ssl, ebin)]),halt().' -noshell")
9       # erl returns the string with quotes, strip them off
10       data.gsub!(%r{\A"|"\Z}, '')
11     end
12   end
13 end