Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add region attribute to s3_file provider #191

Merged
merged 4 commits into from Jan 26, 2016
Merged

Conversation

zl4bv
Copy link
Contributor

@zl4bv zl4bv commented Jan 13, 2016

This is basically PR #149 with the merge conflict fixed.

Pinging @TaopaiC @ubiquitousthey @miketheman

@zl4bv
Copy link
Contributor Author

zl4bv commented Jan 14, 2016

RuntimeError
------------
Property content of file[/etc/chef/ohai/hints/ec2.json] cannot be passed a block! If you meant to create a resource named content instead, you'll need to first rename the property.

Could I get some help resolving this error please? Not sure why it thinks it is being passed a block or why the error occurs given that file was not changed in this PR.

@tas50
Copy link
Contributor

tas50 commented Jan 20, 2016

The error was introduced in a nightly build of ChefDK which is used in Travis. I fixed it up on master.

@zl4bv
Copy link
Contributor Author

zl4bv commented Jan 20, 2016

Ah thanks @tas50 - that would explain it! Have resolved the merge conflicts and the build is now passing.

@tas50
Copy link
Contributor

tas50 commented Jan 25, 2016

@zl4bv Can you rebase this against master and document it in the readme so others can use it? Thanks

@zl4bv
Copy link
Contributor Author

zl4bv commented Jan 26, 2016

@tas50 Rebased and documentation added.

Minimally tested with kitchen-docker against the existing test cookbook in the repo:

       Starting Chef Client, version 12.6.0
       Creating a new client identity for s3-file-ubuntu-1404 using the validator key.
       resolving cookbooks for run list: ["aws_test::s3_file"]
       Synchronizing Cookbooks:
         - ohai (2.0.4)
         - aws (2.8.0)
         - aws_test (0.0.1)
       Compiling Cookbooks...
       Recipe: aws::default
         * chef_gem[aws-sdk] action install
           - install version ~> 2.2 of package aws-sdk
         Converging 2 resources
         * chef_gem[aws-sdk] action install (up to date)
       Recipe: aws_test::s3_file
         * aws_s3_file[/tmp/an_file] action create[2016-01-26T07:51:17+00:00] WARN: /tmp/kitchen/cache/cookbooks/aws/providers/s3_file.rb:41:in `block in do_s3_file': property group is declared in both remote_file[/tmp/an_file] and #<#<Class:0x00000001ceb188>:0x0000000c6e12c8>. Use new_resource.group instead. At /tmp/kitchen/cache/cookbooks/aws/providers/s3_file.rb:41:in `block in do_s3_file'

           * remote_file[/tmp/an_file] action create
             - create new file /tmp/an_file


       Running handlers:
       Running handlers complete
       Chef Client finished, 3/4 resources updated in 15 seconds
       Finished converging <s3-file-ubuntu-1404> (0m38.87s).
-----> Setting up <s3-file-ubuntu-1404>...
$$$$$$ Running legacy setup for 'Docker' Driver
       Finished setting up <s3-file-ubuntu-1404> (0m0.00s).
-----> Verifying <s3-file-ubuntu-1404>...
$$$$$$ Running legacy verify for 'Docker' Driver
       Preparing files for transfer
       Transferring files to <s3-file-ubuntu-1404>
       Finished verifying <s3-file-ubuntu-1404> (0m0.00s).
       Finished testing <s3-file-ubuntu-1404> (0m39.37s).

tas50 added a commit that referenced this pull request Jan 26, 2016
Pull region from s3_file attribute
@tas50 tas50 merged commit 146f264 into sous-chefs:master Jan 26, 2016
@tas50 tas50 changed the title Pull region from s3_file attribute Add region attribute to s3_file provider Jan 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants