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'm trying to get this plugin working for Ubuntu 14.04 trusty.
I suppose my question is, why is chef complaining about /etc/apt/sources.list.d/nginx.list when the docs at nginx tell you to format the etc/apt/sources.list?
This is the code from my recipe:
apt_repository 'nginx' do
uri 'http://nginx.org/packages/ubuntu/'
key 'http://nginx.org/keys/nginx_signing.key'
distribution 'trusty'
deb_src true
action :add
end
apt_package "nginx" do
provider Chef::Provider::Package::Apt
action :install
end
And here is the error message from chef:
* execute[apt-get update] action run[2014-10-31T15:45:40+00:00] ERROR: execute[apt-get update] (/tmp/kitchen/cookbooks/apt/providers/repository.rb line 156) had an error: Expected process to exit with [0], but received '100'
---- Begin output of apt-get update -o Dir::Etc::sourcelist='sources.list.d/nginx.list' -o Dir::Etc::sourceparts='-' -o APT::Get::List-Cleanup='0' ----
STDOUT:
STDERR: E: Malformed line 1 in source list /etc/apt/sources.list.d/nginx.list (dist parse)
E: The list of sources could not be read.
---- End output of apt-get update -o Dir::Etc::sourcelist='sources.list.d/nginx.list' -o Dir::Etc::sourceparts='-' -o APT::Get::List-Cleanup='0' ----
Ran apt-get update -o Dir::Etc::sourcelist='sources.list.d/nginx.list' -o Dir::Etc::sourceparts='-' -o APT::Get::List-Cleanup='0' returned 100; ignore_failure is set, continuing
================================================================================
Error executing action `run` on resource 'execute[apt-get update]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '100'
---- Begin output of apt-get update -o Dir::Etc::sourcelist='sources.list.d/nginx.list' -o Dir::Etc::sourceparts='-' -o APT::Get::List-Cleanup='0' ----
STDOUT:
STDERR: E: Malformed line 1 in source list /etc/apt/sources.list.d/nginx.list (dist parse)
E: The list of sources could not be read.
---- End output of apt-get update -o Dir::Etc::sourcelist='sources.list.d/nginx.list' -o Dir::Etc::sourceparts='-' -o APT::Get::List-Cleanup='0' ----
Ran apt-get update -o Dir::Etc::sourcelist='sources.list.d/nginx.list' -o Dir::Etc::sourceparts='-' -o APT::Get::List-Cleanup='0' returned 100
Resource Declaration:
---------------------
# In /tmp/kitchen/cookbooks/apt/providers/repository.rb
156: execute 'apt-get update' do
157: command "apt-get update -o Dir::Etc::sourcelist='sources.list.d/#{new_resource.name}.list' -o Dir::Etc::sourceparts='-' -o APT::Get::List-Cleanup='0'"
158: ignore_failure true
159: action :nothing
160: notifies :run, 'execute[apt-cache gencaches]', :immediately
161: end
162:
Compiled Resource:
------------------
# Declared in /tmp/kitchen/cookbooks/apt/providers/repository.rb:156:in `block in class_from_file'
execute("apt-get update") do
action [:nothing]
ignore_failure true
retries 0
retry_delay 2
command "apt-get update -o Dir::Etc::sourcelist='sources.list.d/nginx.list' -o Dir::Etc::sourceparts='-' -o APT::Get::List-Cleanup='0'"
backup 5
returns 0
cookbook_name :"touchbistro-rails"
end
Recipe: touchbistro-rails::newrelic_nginx_agent
================================================================================
Error executing action `install` on resource 'apt_package[nginx]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '100'
---- Begin output of apt-cache policy nginx ----
STDOUT:
STDERR: E: Malformed line 1 in source list /etc/apt/sources.list.d/nginx.list (dist parse)
E: The list of sources could not be read.
E: The package lists or status file could not be parsed or opened.
---- End output of apt-cache policy nginx ----
Ran apt-cache policy nginx returned 100
---------------------
# In /tmp/kitchen/cookbooks/touchbistro-rails/recipes/newrelic_nginx_agent.rb
23: apt_package "nginx" do
24: provider Chef::Provider::Package::Apt
25: action :install
27:
Compiled Resource:
------------------
# Declared in /tmp/kitchen/cookbooks/touchbistro-rails/recipes/newrelic_nginx_agent.rb:23:in `from_file'
apt_package("nginx") do
provider Chef::Provider::Package::Apt
action [:install]
retries 0
retry_delay 2
package_name "nginx"
cookbook_name :"touchbistro-rails"
recipe_name "newrelic_nginx_agent"
end
- reload service service[nginx]
* service[nginx] action restart
- restart service service[nginx]
Running handlers:
[2014-10-31T15:45:40+00:00] ERROR: Running exception handlers
Running handlers complete
Chef Client failed. 87 resources updated in 631.862846189 seconds
[2014-10-31T15:45:40+00:00] ERROR: apt_package[nginx] (touchbistro-rails::newrelic_nginx_agent line 23) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '100'
---- Begin output of apt-cache policy nginx ----
STDOUT:
STDERR: E: Malformed line 1 in source list /etc/apt/sources.list.d/nginx.list (dist parse)
E: The list of sources could not be read.
E: The package lists or status file could not be parsed or opened.
---- End output of apt-cache policy nginx ----
Ran apt-cache policy nginx returned 100
[2014-10-31T15:45:40+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
The text was updated successfully, but these errors were encountered:
I'm trying to get this plugin working for Ubuntu 14.04 trusty.
I suppose my question is, why is chef complaining about
/etc/apt/sources.list.d/nginx.list
when the docs at nginx tell you to format theetc/apt/sources.list
?This is the code from my recipe:
And here is the error message from chef:
The text was updated successfully, but these errors were encountered: