Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

#replace
Ohai2u tikejhya@web1-prod1!
chef (12.14.89)> node.name.gsub(/.*-/, ”)
=> “prod1″
chef (12.14.89)> node.name.gsub(/-.*/, ”)
=> “web1”
chef (12.14.89)>

#array of packages to install
default[‘dep’][‘packages’] = %w(mysql php-pdo php-ldap php-gd php-pear httpd php-cli php-mysql php-xml php-mbstring php-pecl-memcache php-devel php-common php php-mcrypt php-pecl-apc php-soap vsftpd)

# marking admin value if condition met
node.run_list?(‘role[admin]’) == true ? default[‘admin’] = TRUE : default[‘admin’] = FALSE

# if else
if node[‘admin’]
default[‘php’][‘max_execution_time’] = 30
else
default[‘php’][‘max_execution_time’] = 180
end

# case statement with loop’s
case node.chef_environment
when ‘prod’
default[‘nfs’][‘nfs_mount_point’] = ‘/data/en-UK/media’
when ‘prod2’
default[‘nfs’][‘nfs_mount_point’] = ‘/data/en-UK/media/files’
when ‘prod3’
%w(en-UK de-DE es-ES).each do |sites|
default[“#{sites}”][‘efs_mount_point’] = “/data/#{sites}/media/efs-files”
default[“#{sites}”][‘nfs_mount_point’] = “/data/#{sites}/media/nfs-files”
default[“#{sites}”][‘app_mount_point’] = “/data/#{sites}/media/files”
end