Created
November 27, 2013 07:45
-
-
Save nvwls/7672039 to your computer and use it in GitHub Desktop.
Executing a resource last
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@vagrant ~]# cat chef/recipes/test.rb | |
execute 'last' do | |
action :nothing | |
command 'true' | |
end | |
ruby_block 'notify' do | |
block do | |
true | |
end | |
notifies :run, 'execute[last]', :delayed | |
end | |
execute 'a' do | |
command 'true' | |
end | |
[root@vagrant ~]# chef-solo | |
Starting Chef Client, version 11.4.4 | |
Compiling Cookbooks... | |
Converging 3 resources | |
Recipe: chef::test | |
* execute[last] action nothing (up to date) | |
* ruby_block[notify] action run | |
- execute the ruby block notify | |
* execute[a] action run | |
- execute true | |
* execute[last] action run | |
- execute true | |
Chef Client finished, 3 resources updated |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment