Skip to content

Instantly share code, notes, and snippets.

@jcderose
Created November 12, 2015 00:11
Show Gist options
  • Save jcderose/4dfa9864d60dca9851da to your computer and use it in GitHub Desktop.
Save jcderose/4dfa9864d60dca9851da to your computer and use it in GitHub Desktop.
Recipe: ap-ops::default
* directory[/shares/wordpress] action create (up to date)
* bash[Sync WordPress content from S3 bucket] action run
================================================================================
Error executing action `run` on resource 'bash[Sync WordPress content from S3 bucket]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of "bash" "/tmp/chef-script20151111-12049-1jw6sk1" ----
STDOUT: Completed 1 part(s) with ... file(s) remaining
STDERR: Unable to locate credentials
---- End output of "bash" "/tmp/chef-script20151111-12049-1jw6sk1" ----
Ran "bash" "/tmp/chef-script20151111-12049-1jw6sk1" returned 1
Resource Declaration:
---------------------
# In /tmp/kitchen/cache/cookbooks/ap-ops/recipes/default.rb
59: bash 'Sync WordPress content from S3 bucket' do
60: user 'anyperk'
61: cwd '/home/anyperk/'
62: code <<-EOH
63: aws s3 sync --region us-west-1 #{node["wp_share"]["s3_bucket"]}/ #{node["wp_share"]["directory"]}/
64: EOH
65: end
66:
Compiled Resource:
------------------
# Declared in /tmp/kitchen/cache/cookbooks/ap-ops/recipes/default.rb:59:in `from_file'
bash("Sync WordPress content from S3 bucket") do
action "run"
retries 0
retry_delay 2
command "\"bash\" \"/tmp/chef-script20151111-12049-1jw6sk1\""
backup 5
cwd "/home/anyperk/"
returns 0
user "anyperk"
code " aws s3 sync --region us-west-1 s3://anyperk.production.wordpress-content.s3-us-west-1.amazonaws.com/ /shares/wordpress/\n"
interpreter "bash"
cookbook_name "ap-ops"
recipe_name "default"
end
Running handlers:
[2015-11-11T16:02:59-08:00] ERROR: Running exception handlers
Running handlers complete
[2015-11-11T16:02:59-08:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
Chef Client failed. 3 resources updated in 8.909772828 seconds
[2015-11-11T16:02:59-08:00] ERROR: bash[Sync WordPress content from S3 bucket] (ap-ops::default line 59) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of "bash" "/tmp/chef-script20151111-12049-1jw6sk1" ----
STDOUT: Completed 1 part(s) with ... file(s) remaining
STDERR: Unable to locate credentials
---- End output of "bash" "/tmp/chef-script20151111-12049-1jw6sk1" ----
Ran "bash" "/tmp/chef-script20151111-12049-1jw6sk1" returned 1
[2015-11-11T16:02:59-08:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment