Merge pull request #241 from NikitaStrelkov/provisioning_upgrade

Provisioning upgrade
This commit is contained in:
Dominik Liebler
2016-10-15 07:53:56 +02:00
committed by GitHub
10 changed files with 65 additions and 35 deletions

View File

@@ -1,6 +1,6 @@
---
- hosts: all
sudo: true
become: yes
vars_files:
- vars/all.yml
roles:
@@ -9,3 +9,4 @@
- php
- xdebug
- app
- composer

View File

@@ -1,5 +1,4 @@
---
# application tasks to be customized and to run after the main provision
- name: update file db
sudo: yes
shell: updatedb

View File

@@ -0,0 +1,10 @@
- name: Install Composer
shell: curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer creates=/usr/local/bin/composer
- name: Increase process timeout
shell: composer --global config process-timeout {{ composer.timeout }}
- name: Install packages
shell: composer install --optimize-autoloader --prefer-source
args:
chdir: /vagrant

View File

@@ -1,20 +1,19 @@
---
- name: Update apt
apt: update_cache=yes autoremove=yes
- name: Add ppa Repository
sudo: yes
apt_repository: repo=ppa:ondrej/{{ php.ppa }}
- name: Update apt
sudo: yes
apt: update_cache=yes
- name: Install php7
sudo: yes
apt: pkg=php7.0 state=latest
- name: Install PHP Packages
sudo: yes
apt: pkg={{ item }} state=latest
with_items: php.packages
apt: pkg="{{ item }}" state=latest
with_items: "{{ php.packages }}"
when: php.packages is defined
- include: configure.yml

View File

@@ -1,10 +1,12 @@
---
- name: ensure timezone is set in cli php.ini
lineinfile: dest=/etc/php5/cli/php.ini
regexp='date.timezone ='
line='date.timezone = {{ server.timezone }}'
- name: enabling opcache cli
lineinfile: dest=/etc/php5/cli/php.ini
regexp=';opcache.enable_cli=0'
line='opcache.enable_cli=1'
lineinfile:
dest: /etc/php/7.0/cli/php.ini
regexp: ';?opcache.enable=\d'
line: 'opcache.enable=1'
- name: ensure timezone is set in cli php.ini
lineinfile:
dest: /etc/php/7.0/cli/php.ini
regexp: 'date.timezone ='
line: 'date.timezone = {{ server.timezone }}'

View File

@@ -1,31 +1,25 @@
---
- name: Update apt
sudo: yes
apt: update_cache=yes
- name: Install System Packages
sudo: yes
apt: pkg={{ item }} state=latest
apt: pkg="{{ item }}" state=latest
with_items:
- curl
- wget
- python-software-properties
- name: Install Extra Packages
sudo: yes
apt: pkg={{ item }} state=latest
with_items: server.packages
apt: pkg="{{ item }}" state=latest
with_items: "{{ server.packages }}"
when: server.packages is defined
- name: Configure the timezone
sudo: yes
template: src=timezone.tpl dest=/etc/timezone
- name: More Configure the timezone
sudo: yes
file: src=/usr/share/zoneinfo/{{server.timezone}} dest=/etc/localtime state=link force=yes backup=yes
- name: Set default system language pack
shell: locale-gen {{server.locale}}
sudo: yes

View File

@@ -8,4 +8,10 @@
when: vagrant_local.vm.hostname is defined
- name: Update /etc/hosts
lineinfile: dest=/etc/hosts regexp='^127\.0\.0\.1' line='127.0.0.1 localhost {{ vagrant_local.vm.hostname }}' owner=root group=root mode=0644
lineinfile:
dest: /etc/hosts
regexp: '^127\.0\.0\.1'
line: '127.0.0.1 localhost {{ vagrant_local.vm.hostname }}'
owner: root
group: root
mode: 0644

View File

@@ -1,4 +1,3 @@
---
- name: Install xDebug
sudo: yes
apt: pkg=php5-xdebug state=latest

View File

@@ -1,15 +1,35 @@
---
server:
install: '1'
packages: [vim, htop, iotop, bwm-ng]
packages:
- vim
- htop
- iotop
- bwm-ng
- git
timezone: UTC
locale: en_US.UTF-8
vagrant_local:
install: '1'
vm: { base_box: trusty64, hostname: design-patterns, ip: 192.168.11.2, sharedfolder: ./, enableWindows: '1', useVagrantCloud: '1', syncType: nfs }
vm:
hostname: design-patterns
php:
install: '1'
ppa: php
packages: [php7.0-cli, php7.0-intl, php7.0-mcrypt, php7.0-mysql, php7.0-curl, php7.0-json, php7.0-xml]
packages:
- php7.0-cli
- php7.0-intl
- php7.0-mcrypt
- php7.0-mysql
- php7.0-curl
- php7.0-json
- php7.0-xml
- php7.0-mbstring
xdebug:
install: '1'
composer:
timeout: 2400

10
composer.lock generated
View File

@@ -211,16 +211,16 @@
},
{
"name": "phpdocumentor/reflection-docblock",
"version": "3.1.0",
"version": "3.1.1",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
"reference": "9270140b940ff02e58ec577c237274e92cd40cdd"
"reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/9270140b940ff02e58ec577c237274e92cd40cdd",
"reference": "9270140b940ff02e58ec577c237274e92cd40cdd",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/8331b5efe816ae05461b7ca1e721c01b46bafb3e",
"reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e",
"shasum": ""
},
"require": {
@@ -252,7 +252,7 @@
}
],
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
"time": "2016-06-10 09:48:41"
"time": "2016-09-30 07:12:33"
},
{
"name": "phpdocumentor/type-resolver",