Skip to content

Instantly share code, notes, and snippets.

Error executing action `run` on resource 'execute[a2enmod authz_default]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of /usr/sbin/a2enmod authz_default ----
STDOUT:
STDERR: ERROR: Module authz_default does not exist!
@AntelopeSalad
AntelopeSalad / Berskfile
Last active January 1, 2016 22:29
chef-client fails with Exception::CookbookNotFound , and it points to the include_recipe 'nginx-vhosts' line in webserver.rb
site :opscode
metadata
cookbook 'nginx-vhosts', path: '../nginx-vhosts'
+deb http://apt.postgresql.org/pub/repos/apt precise-pgdg main 9.3
Recipe: postgresql::client
* package[postgresql-client-9.1] action install
- install version 9.1.11-1.pgdg12.4+1 of package postgresql-client-9.1
* package[libpq-dev] action install
- install version 9.3.2-1.pgdg12.4+1 of package libpq-dev
apt_repository 'git' do
uri 'http://ppa.launchpad.net/git-core/ppa/ubuntu'
distribution node[:lsb][:codename]
components %w[main]
keyserver 'keyserver.ubuntu.com'
key 'E1DF1F24'
action :add
end
include_recipe 'git'
node.override[:git][:version] = '1.8.5.2'
include_recipe 'git'
node.override[:elasticsearch][:version] = '0.90.9'
include_recipe 'elasticsearch'
include_recipe 'nginx::default'
template "#{node[:nginx][:dir]}/sites-available/#{node[:hostname]}" do
source 'hostname.conf.erb'
mode '0644'
end
nginx_site "#{node[:hostname]}"
node.override[:postgresql][:enable_pgdg_apt] = true
node.override[:postgresql][:version] = "9.3"
node.override[:postgresql][:password] = node[:foo][:database][:password]
include_recipe 'postgresql::server'
chef@cheftests:~$ sudo chef-client
Starting Chef Client, version 11.8.2
resolving cookbooks for run list: ["foo"]
Synchronizing Cookbooks:
- foo
- sshd
- fail2ban
- yum
- yum-epel
- ufw
node.override[:firewall][:rules] = [
{
'http' => {
'port'=> '80'
}
}
]
include_recipe 'ufw'