You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've downloaded your cookbook as-is and ran it on rhel 7, all looks good except the last step that runs PingFederate as a service. Any recommendations on how to fix this issue?
Thanks much!
=========
Error executing action enable on resource 'service[pingfederate]'
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of /bin/systemctl --system enable pingfederate ----
STDOUT:
STDERR: Failed to execute operation: Access denied
---- End output of /bin/systemctl --system enable pingfederate ----
Ran /bin/systemctl --system enable pingfederate returned 1
Resource Declaration:
---------------------
# In /tmp/kitchen/cache/cookbooks/pingfederate/recipes/pingfederate.rb
101: service 'pingfederate' do
102: action [:enable]
103: end
The text was updated successfully, but these errors were encountered:
You just need to setup the service using the systemd resource instead of the service resource. If you want to add it to the cookbook, go for it. Take a look at the "systemd" cookbook: https://github.com/nathwill/chef-systemd
I have used it before for a private cookbook for installing bamboo, and its pretty simple. Here's an example:
systemd_service 'bamboo' do
description 'Atlassian Bamboo'
after %w( network.target syslog.target )
install do
wanted_by 'multi-user.target'
end
service do
exec_start "#{node['jmh_bamboo']['install']['current']}/bin/start-bamboo.sh"
exec_stop "#{node['jmh_bamboo']['install']['current']}/bin/stop-bamboo.sh"
user node['jmh_bamboo']['run_as']
group node['jmh_bamboo']['run_as']
type 'forking'
end
# only_if { ::File.open('/proc/1/comm').gets.chomp == 'systemd' } # systemd
only_if { node['platform_version'].start_with?('7.') } # systemd
end
I've downloaded your cookbook as-is and ran it on rhel 7, all looks good except the last step that runs PingFederate as a service. Any recommendations on how to fix this issue?
Thanks much!
=========
Error executing action
enable
on resource 'service[pingfederate]'The text was updated successfully, but these errors were encountered: