Created
December 16, 2011 00:41
-
-
Save dodizzle/1483794 to your computer and use it in GitHub Desktop.
nested has key for chef recipe
This file contains hidden or 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
| if node.has_key? "filesystem" | |
| if node["filesystem"].has_key? "/dev/sda6" | |
| if node["filesystem"]["/dev/sda6"].has_key? "mount" | |
| if node['filesystem']['/dev/sda6']['mount'] == '/srv' | |
| execute "foo" do | |
| command "touch /tmp/nested_keys_exist!" | |
| action :run | |
| end | |
| end | |
| end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment