Usage
- Add
depends 'falcon'to your cookbook’s metadata.rb - Use the resources shipped in the cookbook in a recipe, the same way you’d use core Chef resources (file, template, directory, package, etc).
falcon_install 'falcon' do client_id 'LKJSDLFKJSLKDJFKLJ' client_secret 'SDLKFJLKSJDFLKJSDFLK' action :installendTest Cookbooks as Examples
Section titled “Test Cookbooks as Examples”The cookbooks ran under test-kitchen make excellent usage examples.
The test recipes are found at:
test/cookbooks/test/Getting Started
Section titled “Getting Started”Here’s an example of installing/managing the latest Falcon sensor:
falcon_install 'falcon' do client_id 'LKJSDLFKJSLKDJFKLJ' client_secret 'SDLKFJLKSJDFLKJSDFLK' action :installend
falcon_config 'falcon' do cid 'JKLJSDLKFJLKSJDFLKJSDLKFJ-28' notifies :restart, 'falcon_service[falcon]', :delayed action :setend
falcon_service 'falcon' do action [:start, :enable]endYou might not want to install the latest, and instead be interested in N-1 deployment. The falcon_install resource might look like:
falcon_install 'falcon' do client_id 'LKJSDLFKJSLKDJFKLJ' client_secret 'SDLKFJLKSJDFLKJSDFLK' version_decrement: 1 # This number corresponds to N- action :installend
... # falcon_config
... # falcon_serviceYou can pass in certain options to configure the Falcon sensor. Here’s an example of passing in some tags:
... # falcon_install
falcon_config 'falcon' do cid 'JKLJSDLKFJLKSJDFLKJSDLKFJ-28' tags %w(tag1 tag2) notifies :restart, 'falcon_service[falcon]', :delayed action :setend
... # falcon_service