diff --git a/resources/ansible/roles/app/tasks/main.yml b/resources/ansible/roles/app/tasks/main.yml index 5b81cc12f0..2f42896117 100644 --- a/resources/ansible/roles/app/tasks/main.yml +++ b/resources/ansible/roles/app/tasks/main.yml @@ -1,4 +1,6 @@ --- # application tasks to be customized and to run after the main provision - name: Install global npm packages - shell: . /usr/local/nvm/nvm.sh && npm install -g bower recess + become: yes + become_user: vagrant + shell: export NVM_DIR="$HOME/.nvm" &&. "$NVM_DIR/nvm.sh" && npm install -g bower recess diff --git a/resources/ansible/roles/node/tasks/main.yml b/resources/ansible/roles/node/tasks/main.yml index f9a30ee117..1b52f0a24b 100644 --- a/resources/ansible/roles/node/tasks/main.yml +++ b/resources/ansible/roles/node/tasks/main.yml @@ -1,6 +1,10 @@ --- - name: Install NVM - shell: curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.29.0/install.sh | NVM_DIR=/usr/local/nvm /bin/bash creates=/usr/local/nvm + become: yes + become_user: vagrant + shell: curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.29.0/install.sh | /bin/bash creates=/home/vagrant/.nvm/nvm.sh - name: Install specific nodejs version - shell: . /usr/local/nvm/nvm.sh && nvm install 0.12.0 && nvm alias default 0.12.0 + become: yes + become_user: vagrant + shell: export NVM_DIR="$HOME/.nvm" &&. ~/.nvm/nvm.sh && nvm install 0.12.0 && nvm alias default 0.12.0 diff --git a/resources/ansible/roles/php/tasks/php-fpm.yml b/resources/ansible/roles/php/tasks/php-fpm.yml index adad53e250..dfe2d29b4b 100644 --- a/resources/ansible/roles/php/tasks/php-fpm.yml +++ b/resources/ansible/roles/php/tasks/php-fpm.yml @@ -1,9 +1,11 @@ --- - name: Set permissions on socket - owner lineinfile: "dest=/etc/php5/fpm/pool.d/www.conf state=present regexp='^;?listen.owner' line='listen.owner = www-data'" + notify: restart php5-fpm - name: Set permissions on socket - group lineinfile: "dest=/etc/php5/fpm/pool.d/www.conf state=present regexp='^;?listen.group' line='listen.group = www-data'" + notify: restart php5-fpm - name: Set permissions on socket - mode lineinfile: "dest=/etc/php5/fpm/pool.d/www.conf state=present regexp='^;?listen.mode' line='listen.mode = 0660'" @@ -13,27 +15,34 @@ lineinfile: dest=/etc/php5/fpm/php.ini regexp='date.timezone =' line='date.timezone = {{ server.timezone }}' + notify: restart php5-fpm + - name: enabling opcache lineinfile: dest=/etc/php5/fpm/php.ini regexp=';?opcache.enable=\d' line='opcache.enable=1' + notify: restart php5-fpm - name: Disable PHP cache limiter lineinfile: dest=/etc/php5/fpm/php.ini regexp=';?\s*session.cache_limiter\s*=\s*' line='session.cache_limiter = ""' + notify: restart php5-fpm - name: set post_max_size lineinfile: dest=/etc/php5/fpm/php.ini regexp=';?post_max_size\s*=\s*' line='post_max_size = 2G' + notify: restart php5-fpm - name: set upload_max_filesize lineinfile: dest=/etc/php5/fpm/php.ini regexp=';?upload_max_filesize\s*=\s*' line='upload_max_filesize = 2G' + notify: restart php5-fpm - name: set max_input_vars lineinfile: dest=/etc/php5/fpm/php.ini regexp=';?max_input_vars\s*=\s*' line='max_input_vars = 12000' + notify: restart php5-fpm diff --git a/resources/ansible/roles/server/tasks/main.yml b/resources/ansible/roles/server/tasks/main.yml index 56d8425377..1e35c28879 100644 --- a/resources/ansible/roles/server/tasks/main.yml +++ b/resources/ansible/roles/server/tasks/main.yml @@ -2,7 +2,7 @@ - name: Update apt sudo: yes apt: update_cache=yes - when: server.prevent_update is defined + when: server.prevent_update is not defined - name: Install System Packages sudo: yes diff --git a/resources/ansible/vars/all.yml b/resources/ansible/vars/all.yml index 3d82264479..6e82b2d711 100644 --- a/resources/ansible/vars/all.yml +++ b/resources/ansible/vars/all.yml @@ -45,7 +45,7 @@ elasticsearch: port: '9200' version: '1.7.3' plugins: - - {name: 'elasticsearch/elasticsearch-analysis-icu', version: '2.6.0'} + - {name: 'elasticsearch/elasticsearch-analysis-icu', version: '2.7.0'} php: install: '1' ppa: php5