Skip to content

Instantly share code, notes, and snippets.

@logikal
Last active December 15, 2015 09:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save logikal/5242115 to your computer and use it in GitHub Desktop.
Save logikal/5242115 to your computer and use it in GitHub Desktop.
apt-get install in chef without starting service This is horrible. fake the apt-get install into thinking it's runlevel 1, so that it doesn't start the service.
execute "install ejabberd w/o starting it" do
action :run
command "apt-get install -y ejabberd"
creates "/etc/ejabberd"
cwd "/tmp"
environment ({'RUNLEVEL' => '1'}) # STUPID HACK OF FAIL
user "root"
group "root"
timeout 3600
returns 0
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment