More cleaning
This commit is contained in:
parent
df91d53821
commit
7de13f449f
1 changed files with 50 additions and 55 deletions
|
@ -53,6 +53,10 @@ package 'php7.0-sqlite3'
|
||||||
package 'memcached'
|
package 'memcached'
|
||||||
package 'php-memcached'
|
package 'php-memcached'
|
||||||
|
|
||||||
|
service 'memcached' do
|
||||||
|
action [:enable, :start]
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# APACHE
|
# APACHE
|
||||||
|
@ -60,11 +64,6 @@ package 'php-memcached'
|
||||||
package 'apache2'
|
package 'apache2'
|
||||||
package 'libapache2-mod-php7.0'
|
package 'libapache2-mod-php7.0'
|
||||||
|
|
||||||
service 'apache2' do
|
|
||||||
supports :status => true
|
|
||||||
action [:enable, :start]
|
|
||||||
end
|
|
||||||
|
|
||||||
template '/etc/apache2/conf-enabled/users.conf' do
|
template '/etc/apache2/conf-enabled/users.conf' do
|
||||||
source 'users.conf'
|
source 'users.conf'
|
||||||
end
|
end
|
||||||
|
@ -85,15 +84,21 @@ execute 'enable_modrewrite' do
|
||||||
creates '/etc/apache2/mods-enabled/rewrite.load'
|
creates '/etc/apache2/mods-enabled/rewrite.load'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
service 'apache2' do
|
||||||
|
supports :start => true, :stop => true, :restart => true, :reload => true, :status => true
|
||||||
|
action [:enable, :reload]
|
||||||
|
end
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# GIT
|
# GIT
|
||||||
#####################################
|
#####################################
|
||||||
package 'python-software-properties'
|
package 'python-software-properties'
|
||||||
|
|
||||||
execute 'add_git_core_ppa' do
|
apt_repository 'git-core' do
|
||||||
user 'root'
|
action :add
|
||||||
command 'add-apt-repository ppa:git-core/ppa && apt-get update'
|
uri 'ppa:git-core/ppa'
|
||||||
creates '/usr/bin/git-lfs'
|
distribution node['lsb']['codename']
|
||||||
|
cache_rebuild true
|
||||||
end
|
end
|
||||||
|
|
||||||
execute 'install_git_repo' do
|
execute 'install_git_repo' do
|
||||||
|
@ -106,7 +111,6 @@ package 'git'
|
||||||
package 'git-lfs'
|
package 'git-lfs'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# COMPOSER
|
# COMPOSER
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -116,6 +120,7 @@ execute 'install_composer' do
|
||||||
creates '/usr/local/bin/composer'
|
creates '/usr/local/bin/composer'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# MYSQL
|
# MYSQL
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -131,19 +136,16 @@ template '/etc/mysql/mariadb.conf.d/50-server.cnf' do
|
||||||
source 'mysql-50-server.cnf'
|
source 'mysql-50-server.cnf'
|
||||||
end
|
end
|
||||||
|
|
||||||
service 'mysql' do
|
directory '/var/run/mysqld' do
|
||||||
supports :start => true, :stop => true, :restart => true, :reload => true, :status => true
|
action :create
|
||||||
action :restart
|
owner 'vagrant'
|
||||||
|
group 'vagrant'
|
||||||
|
mode '0775'
|
||||||
end
|
end
|
||||||
|
|
||||||
bash 'mysql_run_perms' do
|
service 'mysql' do
|
||||||
user 'root'
|
supports :start => true, :stop => true, :restart => true, :reload => true, :status => true
|
||||||
code <<-EOH
|
action [:enable, :reload]
|
||||||
if [ ! -d /var/run/mysqld ]; then
|
|
||||||
mkdir /var/run/mysqld
|
|
||||||
fi
|
|
||||||
chown -R vagrant:vagrant /var/run/mysqld
|
|
||||||
EOH
|
|
||||||
end
|
end
|
||||||
|
|
||||||
execute 'mysql_create_databases' do
|
execute 'mysql_create_databases' do
|
||||||
|
@ -170,32 +172,28 @@ execute 'install_nodejs' do
|
||||||
end
|
end
|
||||||
package 'nodejs'
|
package 'nodejs'
|
||||||
|
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# MAILCATCHER
|
# MAILCATCHER
|
||||||
#####################################
|
#####################################
|
||||||
package 'bundler'
|
package 'bundler'
|
||||||
package 'libsqlite3-dev'
|
package 'libsqlite3-dev'
|
||||||
|
gem_package 'mailcatcher'
|
||||||
|
|
||||||
execute 'install_mailcatcher' do
|
user 'mailcatcher' do
|
||||||
user 'root'
|
comment 'The mailcatcher user'
|
||||||
command 'gem install mailcatcher'
|
system true
|
||||||
creates '/usr/local/bin/mailcatcher'
|
action :create
|
||||||
end
|
end
|
||||||
|
|
||||||
template '/etc/init.d/mailcatcher' do
|
template '/etc/init.d/mailcatcher' do
|
||||||
source 'mailcatcher'
|
source 'mailcatcher'
|
||||||
end
|
end
|
||||||
|
|
||||||
user 'mailcatcher' do
|
file '/etc/init.d/mailcatcher' do
|
||||||
comment 'The mailcatcher user'
|
mode '0755'
|
||||||
system true
|
owner 'root'
|
||||||
action :create
|
group 'root'
|
||||||
end
|
|
||||||
|
|
||||||
execute 'mailcatcher_script_executable' do
|
|
||||||
user 'root'
|
|
||||||
command 'chmod +x /etc/init.d/mailcatcher'
|
|
||||||
not_if 'test -x /etc/init.d/mailcatcher'
|
|
||||||
end
|
end
|
||||||
|
|
||||||
service 'mailcatcher' do
|
service 'mailcatcher' do
|
||||||
|
@ -245,6 +243,7 @@ bash 'install_drupal_console' do
|
||||||
creates '/usr/local/bin/drupal'
|
creates '/usr/local/bin/drupal'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# BROWSER SYNC
|
# BROWSER SYNC
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -254,6 +253,7 @@ execute 'install_browsersync' do
|
||||||
creates '/usr/bin/browser-sync'
|
creates '/usr/bin/browser-sync'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# NPM
|
# NPM
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -263,6 +263,7 @@ execute 'install_gulp' do
|
||||||
creates '/usr/bin/npm'
|
creates '/usr/bin/npm'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# BOWER
|
# BOWER
|
||||||
#####################################
|
#####################################
|
||||||
|
@ -272,41 +273,35 @@ execute 'install_bower' do
|
||||||
creates '/usr/bin/bower'
|
creates '/usr/bin/bower'
|
||||||
end
|
end
|
||||||
|
|
||||||
#####################################
|
|
||||||
# Deployer
|
|
||||||
#####################################
|
|
||||||
bash 'install_deployer' do
|
|
||||||
code <<-EOH
|
|
||||||
/usr/bin/env curl -sLO https://deployer.org/deployer.phar
|
|
||||||
if [ $? -eq 0 ] && [ -f "deployer.phar" ]; then
|
|
||||||
chmod +x deployer.phar
|
|
||||||
mv deployer.phar /usr/local/bin/dep
|
|
||||||
fi
|
|
||||||
EOH
|
|
||||||
creates '/usr/local/bin/dep'
|
|
||||||
end
|
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# REDIS
|
# REDIS
|
||||||
#####################################
|
#####################################
|
||||||
package 'redis-server'
|
package 'redis-server'
|
||||||
service 'redis-server' do
|
service 'redis-server' do
|
||||||
action :stop
|
action [:enable, :start]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# MONGODB
|
# MONGODB
|
||||||
#####################################
|
#####################################
|
||||||
package 'mongodb'
|
package 'mongodb'
|
||||||
service 'mysql' do
|
service 'mysql' do
|
||||||
action :stop
|
action [:enable, :start]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# SUPERVISOR
|
||||||
|
#####################################
|
||||||
|
package 'supervisor'
|
||||||
|
service 'supervisor' do
|
||||||
|
action [:enable, :start]
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# SASS
|
# SASS
|
||||||
#####################################
|
#####################################
|
||||||
execute 'install_sass' do
|
gem_package 'sass'
|
||||||
user 'root'
|
|
||||||
command 'gem install sass'
|
|
||||||
creates '/usr/local/bin/sass'
|
|
||||||
end
|
|
||||||
|
|
Reference in a new issue