Sha256: 3ea191d12e74b041150d4cf2dca9145d727b7deddecd125a6c02bb7c9a3857d1

Contents?: true

Size: 700 Bytes

Versions: 1

Compression:

Stored size: 700 Bytes

Contents

case "#{node.platform_family}-#{node.platform_version}"
when /rhel-6\.(.*?)/
  template '/etc/init.d/supervisord' do
    user 'root'
    owner 'root'
    group 'root'
    mode '755'
  end
when /rhel-7\.(.*?)/
  pip_path = run_command('which pip', user: 'root').stdout
  template '/etc/systemd/system/supervisord.service' do
    user 'root'
    owner 'root'
    group 'root'
    mode '755'
    variables dir_path: File.dirname(pip_path)
  end

  execute 'systemctl daemon-reload' do
    user 'root'
    action :nothing
    subscribes :run, 'template[/etc/systemd/system/supervisord.service]', :immediately
  end
else
  raise "unsupported platform #{node.platform_family}-#{node.platform_version}"
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
itamae-plugin-recipe-supervisor-0.0.9 lib/itamae/plugin/recipe/supervisor/service.rb