Information Technology Reference
In-Depth Information
action :nothing
end
end
Try running kitchen converge against this revised recipe, and note that it reports 0/2 re-
sources updated, which is the result we are looking for: 0 resources updated after running
kitchen converge for the second time without any other changes to the cookbook:
$ kitchen converge
-----> Starting Kitchen (v1.2.2.dev)
-----> Converging <default-centos65>...
...
Converging 3 resources
Recipe: chef-server::default
* remote_file[/tmp/kitchen/cache/chef-server-11.1.4-1.el6.x86_64.rpm]
action create[2014-08-17T23:18:31-07:00] INFO: Processing remote_file[
/tmp/kitchen/cache/chef-server-11.1.4-1.el6.x86_64.rpm] action create
(chef-server::default line 15)
(up to date)
* package[chef-server-11.1.4-1.el6.x86_64.rpm] action install[2014-08
-17T23:18:34-07:00] INFO: Processing package[chef-server-11.1.4-1.el6
.x86_64.rpm] action install (chef-server::default line 19)
(up to date)
* execute[reconfigure-chef-server] action nothing[2014-08-17T23:18:34
-07:00] INFO: Processing execute[reconfigure-chef-server] action
nothing (chef-server::default line 26)
(skipped due to action :nothing)
[2014-08-17T23:18:34-07:00] INFO: Chef Run complete in 2.725841396
seconds
Running handlers:
[2014-08-17T23:18:34-07:00] INFO: Running report handlers
Running handlers complete
[2014-08-17T23:18:34-07:00] INFO: Report handlers complete
Chef Client finished, 0/2 resources updated in 4.347711133 seconds
Finished converging <default-centos65> (0m5.81s).
-----> Kitchen is finished. (0m6.28s)
Always check your recipes to see if they are idempotent before deploying them to produc-
tion. If we had deployed the first version of this recipe in production, given that the chef-
client usually runs on a periodic timer performing Chef runs, all our nodes would have
been reinstalling the Chef Server package and reconfiguring the server every 15 minutes!
Search WWH ::




Custom Search