I’m experiencing a problem with cookbooks not running in order or at least not running successfully before the next cookbook on the list.
I have the following 3 cookbooks in a role in the following order:
- copies down the encrypted_data_bag_secret file via AWS CLI from an S3 bucket
- sets the local admin password (depends on #1)
- creates a new local account (depends on #1)
If run by itself, #1 works properly and copies the file to c:\chef\
As soon as I add #2 and/or #3 after it (and delete the file created from #1 to force it to rerun), #1 doesn’t copy the file and #2 and #3 fail.
The role has them in the order 1, 2, 3. I also added “include_recipe ‘get_secret’” to both #2 and #3 cookbooks as well as “depends ‘get_secret’” in their metadata.rb files.
Anyone have any ideas? Thanks a lot.