Created
August 24, 2012 05:09
-
-
Save schubert/3445649 to your computer and use it in GitHub Desktop.
Chef WTF
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
directory node["application"]["path"] do | |
not_if "test -d #{node['application']['path']}" | |
action :create | |
recursive true | |
owner node["environment"]["user"] | |
group node["environment"]["group"] | |
mode "775" | |
end | |
directory node["application"]["path"] do | |
not_if "test -L #{node['application']['path']}" | |
action :delete | |
end | |
#INFO: Processing directory[/srv/apps] action create (common::default line 33) | |
#INFO: directory[/srv/apps] created directory /srv/apps | |
#INFO: directory[/srv/apps] owner changed to 1000 | |
#INFO: directory[/srv/apps] group changed to 4 | |
#INFO: directory[/srv/apps] mode changed to 775 | |
#DEBUG: Processing directory[/srv/apps] on testing | |
#INFO: Processing directory[/srv/apps] action delete (common::default line 42) | |
#DEBUG: Skipping directory[/srv/apps] due to not_if command `test -d /srv/apps` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment