Skip to content

Commit

Permalink
Merge pull request #934 from spurti-chopra/xenial-power-changes
Browse files Browse the repository at this point in the history
Power Xenial changes for Neo4j and PostgreSQL
  • Loading branch information
meatballhat committed Nov 6, 2017
2 parents 45e4780 + 91a0136 commit d1a73eb
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
6 changes: 6 additions & 0 deletions cookbooks/travis_build_environment/files/default/neo4j.pkla
@@ -0,0 +1,6 @@
[neo4j service]
Identity=unix-user:travis
Action=org.freedesktop.systemd1.manage-units
ResultAny=yes
ResultInactive=yes
ResultActive=yes
8 changes: 8 additions & 0 deletions cookbooks/travis_build_environment/recipes/neo4j.rb
Expand Up @@ -11,6 +11,14 @@
strip_components 1
end

cookbook_file '/etc/polkit-1/localauthority/50-local.d/neo4j.pkla' do
source 'neo4j.pkla'
owner 'root'
group 'root'
mode 0o644
only_if { node['lsb']['codename'] == 'xenial' }
end

template '/etc/init.d/neo4j' do
source 'etc-init.d-neo4j.sh.erb'
owner node['travis_build_environment']['user']
Expand Down
13 changes: 12 additions & 1 deletion cookbooks/travis_postgresql/recipes/ci_server.rb
Expand Up @@ -25,7 +25,7 @@
end

service 'postgresql' do
action :stop
action %i[disable stop]
end

template '/etc/init.d/postgresql' do
Expand All @@ -35,6 +35,17 @@
mode 0o755
end

file '/lib/systemd/system/postgresql.service' do
action :delete
notifies :run, 'execute[systemctl daemon-reload]', :immediately
only_if { node['lsb']['codename'] == 'xenial' }
end

execute 'systemctl daemon-reload' do
action :nothing
only_if { node['lsb']['codename'] == 'xenial' }
end

Array(
[
node['travis_postgresql']['default_version']
Expand Down

0 comments on commit d1a73eb

Please sign in to comment.