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 - hosts: all
sudo: true become: yes
vars_files: vars_files:
- vars/all.yml - vars/all.yml
roles: roles:
@@ -9,3 +9,4 @@
- php - php
- xdebug - xdebug
- app - app
- composer

View File

@@ -1,5 +1,4 @@
--- ---
# application tasks to be customized and to run after the main provision # application tasks to be customized and to run after the main provision
- name: update file db - name: update file db
sudo: yes
shell: updatedb 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 - name: Add ppa Repository
sudo: yes
apt_repository: repo=ppa:ondrej/{{ php.ppa }} apt_repository: repo=ppa:ondrej/{{ php.ppa }}
- name: Update apt - name: Update apt
sudo: yes
apt: update_cache=yes apt: update_cache=yes
- name: Install php7 - name: Install php7
sudo: yes
apt: pkg=php7.0 state=latest apt: pkg=php7.0 state=latest
- name: Install PHP Packages - name: Install PHP Packages
sudo: yes apt: pkg="{{ item }}" state=latest
apt: pkg={{ item }} state=latest with_items: "{{ php.packages }}"
with_items: php.packages
when: php.packages is defined when: php.packages is defined
- include: configure.yml - 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 - name: enabling opcache cli
lineinfile: dest=/etc/php5/cli/php.ini lineinfile:
regexp=';opcache.enable_cli=0' dest: /etc/php/7.0/cli/php.ini
line='opcache.enable_cli=1' 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 - name: Update apt
sudo: yes
apt: update_cache=yes apt: update_cache=yes
- name: Install System Packages - name: Install System Packages
sudo: yes apt: pkg="{{ item }}" state=latest
apt: pkg={{ item }} state=latest
with_items: with_items:
- curl - curl
- wget - wget
- python-software-properties - python-software-properties
- name: Install Extra Packages - name: Install Extra Packages
sudo: yes apt: pkg="{{ item }}" state=latest
apt: pkg={{ item }} state=latest with_items: "{{ server.packages }}"
with_items: server.packages
when: server.packages is defined when: server.packages is defined
- name: Configure the timezone - name: Configure the timezone
sudo: yes
template: src=timezone.tpl dest=/etc/timezone template: src=timezone.tpl dest=/etc/timezone
- name: More Configure the timezone - name: More Configure the timezone
sudo: yes
file: src=/usr/share/zoneinfo/{{server.timezone}} dest=/etc/localtime state=link force=yes backup=yes file: src=/usr/share/zoneinfo/{{server.timezone}} dest=/etc/localtime state=link force=yes backup=yes
- name: Set default system language pack - name: Set default system language pack
shell: locale-gen {{server.locale}} shell: locale-gen {{server.locale}}
sudo: yes

View File

@@ -8,4 +8,10 @@
when: vagrant_local.vm.hostname is defined when: vagrant_local.vm.hostname is defined
- name: Update /etc/hosts - 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 - name: Install xDebug
sudo: yes
apt: pkg=php5-xdebug state=latest apt: pkg=php5-xdebug state=latest

View File

@@ -1,15 +1,35 @@
--- ---
server: server:
install: '1' install: '1'
packages: [vim, htop, iotop, bwm-ng] packages:
- vim
- htop
- iotop
- bwm-ng
- git
timezone: UTC timezone: UTC
locale: en_US.UTF-8 locale: en_US.UTF-8
vagrant_local: vagrant_local:
install: '1' 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: php:
install: '1' install: '1'
ppa: php 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: xdebug:
install: '1' install: '1'
composer:
timeout: 2400

10
composer.lock generated
View File

@@ -211,16 +211,16 @@
}, },
{ {
"name": "phpdocumentor/reflection-docblock", "name": "phpdocumentor/reflection-docblock",
"version": "3.1.0", "version": "3.1.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
"reference": "9270140b940ff02e58ec577c237274e92cd40cdd" "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/9270140b940ff02e58ec577c237274e92cd40cdd", "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/8331b5efe816ae05461b7ca1e721c01b46bafb3e",
"reference": "9270140b940ff02e58ec577c237274e92cd40cdd", "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e",
"shasum": "" "shasum": ""
}, },
"require": { "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.", "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", "name": "phpdocumentor/type-resolver",