File tree 22 files changed +65
-35
lines changed 22 files changed +65
-35
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,8 @@ Vagrant.configure(2) do |config|
10
10
# See https://github.com/mitchellh/vagrant/issues/5005
11
11
config . ssh . insert_key = false
12
12
13
- config . vm . provision "ansible" do |ansible |
13
+ # Run Ansible from the Vagrant VM
14
+ config . vm . provision "ansible_local" do |ansible |
14
15
ansible . verbose = "vv"
15
16
ansible . playbook = "playbooks/vagrant.yml"
16
17
end
Original file line number Diff line number Diff line change 3
3
with_items :
4
4
- curl
5
5
- git
6
- - python-mysqldb
6
+ - python-mysqldb
7
+ - zip
8
+ - unzip
Original file line number Diff line number Diff line change
1
+ ---
2
+ dependencies :
3
+ - { role: base }
4
+ - { role: mysql }
5
+ - { role: php-fpm }
6
+ - { role: nginx }
Original file line number Diff line number Diff line change 9
9
git : repo=https://github.com/laravel/quickstart-basic
10
10
dest=/vagrant/laravel-quickstart
11
11
update=no
12
+ become : true
13
+ become_user : " {{ www_user }}"
12
14
13
15
- name : Copy across new .env file
14
16
template :
15
- src=laravel/ .env.j2
17
+ src=.env.j2
16
18
dest=/vagrant/laravel-quickstart/.env
17
-
18
- - stat : path=/vagrant/laravel-quickstart/vendor
19
- register : p
19
+ become : true
20
+ become_user : " {{ www_user }}"
20
21
21
22
- name : Install Laravel project dependencies
22
- shell : cd /vagrant/laravel-quickstart && composer install
23
- when : p.stat.isdir is not defined
23
+ shell : cd /vagrant/laravel-quickstart && COMPOSER_PROCESS_TIMEOUT=900 composer install
24
+ become : true
25
+ become_user : " {{ www_user }}"
24
26
25
27
- name : Generate laravel key
26
28
shell : cd /vagrant/laravel-quickstart && php artisan key:generate
29
+ become : true
30
+ become_user : " {{ www_user }}"
27
31
28
32
- name : Execute migrations for the quickstart example
29
33
shell : cd /vagrant/laravel-quickstart && php artisan migrate
34
+ become : true
35
+ become_user : " {{ www_user }}"
30
36
31
37
- name : Copy across new php-fpm pool config for laravel
32
38
template :
33
- src=php-fpm/laravel .conf.j2
39
+ src=php-fpm.conf.j2
34
40
dest=/etc/php/5.6/fpm/pool.d/laravel.conf
35
41
notify :
36
42
- restart php-fpm
37
43
38
44
- name : Copy across new virtual host for laravel
39
45
template :
40
- src=nginx/laravel .conf.j2
46
+ src=nginx.conf.j2
41
47
dest=/etc/nginx/sites-available/laravel.conf
42
48
notify :
43
49
- restart nginx
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ - name : restart nginx
2
+ service : name=nginx state=restarted
Original file line number Diff line number Diff line change 4
4
5
5
- name : Copy across new nginx config
6
6
template :
7
- src=nginx/nginx .conf.j2
7
+ src=nginx.conf.j2
8
8
dest=/etc/nginx/nginx.conf
9
9
notify :
10
10
- restart nginx
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ - name : restart php-fpm
2
+ service : name=php5.6-fpm state=restarted
Original file line number Diff line number Diff line change
1
+ ---
2
+ dependencies :
3
+ - { role: php }
File renamed without changes.
Original file line number Diff line number Diff line change 15
15
- php5.6-intl
16
16
- php5.6-cli
17
17
- php5.6-mcrypt
18
+ - php5.6-mbstring
19
+ - php5.6-dom
18
20
19
21
- name : Enable the MCrypt extension
20
22
shell : phpenmod mcrypt
21
23
22
24
- name : Install composer
23
- shell : curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
25
+ shell : curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
26
+
27
+ - name : Configure composer cache directory to avoid using slow NFS
28
+ shell : composer config --global cache-dir /dev/shm/composer/cache
Original file line number Diff line number Diff line change
1
+ ---
2
+ dependencies :
3
+ - { role: base }
4
+ - { role: mysql }
5
+ - { role: php-fpm }
6
+ - { role: nginx }
Original file line number Diff line number Diff line change 9
9
git : repo=https://github.com/symfony/symfony-standard.git
10
10
dest=/vagrant/symfony-standard
11
11
update=no
12
+ become : true
13
+ become_user : " {{ www_user }}"
12
14
13
15
- name : Copy across new parameters.yml
14
16
template :
15
- src=symfony/symfony_parameters .yml.j2
17
+ src=parameters .yml.j2
16
18
dest=/vagrant/symfony-standard/app/config/parameters.yml
17
-
18
- - stat : path=/vagrant/symfony-standard/vendor
19
- register : p
19
+ become : true
20
+ become_user : " {{ www_user }}"
20
21
21
22
- name : Install Symfony2 project dependencies
22
- shell : cd /vagrant/symfony-standard && composer install
23
- when : p.stat.isdir is not defined
23
+ shell : cd /vagrant/symfony-standard && COMPOSER_PROCESS_TIMEOUT=900 composer install
24
+ become : true
25
+ become_user : " {{ www_user }}"
24
26
25
27
- name : Copy across new php-fpm pool config for symfony
26
28
template :
27
- src=php-fpm/symfony .conf.j2
29
+ src=php-fpm.conf.j2
28
30
dest=/etc/php/5.6/fpm/pool.d/symfony.conf
29
31
notify :
30
32
- restart php-fpm
31
33
32
34
- name : Copy across new virtual host for symfony
33
35
template :
34
- src=nginx/symfony .conf.j2
36
+ src=nginx.conf.j2
35
37
dest=/etc/nginx/sites-available/symfony.conf
36
38
notify :
37
39
- restart nginx
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 5
5
document_root : /vagrant
6
6
www_user : vagrant
7
7
www_group : vagrant
8
- handlers :
9
- - name : restart nginx
10
- service : name=nginx state=restarted
11
- - name : restart php-fpm
12
- service : name=php5.6-fpm state=restarted
13
8
pre_tasks :
14
9
- name : update apt cache
15
- apt : update_cache=yes
16
- tasks :
17
- - include : tasks/ base.yml
18
- - include : tasks/ nginx.yml
19
- - include : tasks/ mysql.yml
20
- - include : tasks/ php.yml
21
- - include : tasks/ php-devtools.yml
22
- - include : tasks/ php-fpm.yml
23
- - include : tasks/ symfony-standard.yml
24
- - include : tasks/ laravel-quickstart.yml
10
+ apt : update_cache=yes cache_valid_time=3600
11
+ roles :
12
+ - base
13
+ - nginx
14
+ - mysql
15
+ - php
16
+ - php-devtools
17
+ - php-fpm
18
+ - symfony-standard
19
+ - laravel-quickstart
You can’t perform that action at this time.
0 commit comments