Skip to content

Instantly share code, notes, and snippets.

@neidiom
Created April 3, 2018 18:52
Show Gist options
  • Select an option

  • Save neidiom/331e730a1bc1930e87c70c3b28732b29 to your computer and use it in GitHub Desktop.

Select an option

Save neidiom/331e730a1bc1930e87c70c3b28732b29 to your computer and use it in GitHub Desktop.

Revisions

  1. neidiom created this gist Apr 3, 2018.
    19 changes: 19 additions & 0 deletions chef_create_sites_dirs.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    www_dir = '/var/www'
    domain = 'nomimono.domain.com'
    sajts = ['sajt99','sajt98','sajt97']

    sajts.each do |sajt|
    directory www_dir do
    owner 'www-data'
    group 'www-data'
    mode '0755'
    action :create
    end
    directory "#{www_dir}/#{sajt}.#{domain}/web" do
    owner 'www-data'
    group 'www-data'
    mode '0755'
    action :create
    recursive true
    end
    end