--- a/dev/provisioning/playbook.yml Mon Jun 15 19:30:32 2015 +0200
+++ b/dev/provisioning/playbook.yml Tue Jun 23 17:01:39 2015 +0200
@@ -16,6 +16,14 @@
- name: set hostname
hostname: name={{site_name}}
+ - name: set hosts IPv4
+ lineinfile:
+ dest: /etc/hosts
+ line: 127.0.0.1 corpus-parole corpus-parole.local
+ - name: set hosts IPv6
+ lineinfile:
+ dest: /etc/hosts
+ line: ::1 corpus-parole corpus-parole.local
- name: ensure correct locale LC_ALL
lineinfile: dest=/etc/sysconfig/i18n regexp=^LC_ALL= line=LC_ALL="en_US.UTF-8"
@@ -95,82 +103,72 @@
- python-psycopg2
- htop
- openssl
- - php
- - php-cli
- - php-fpm
- - php-mbstring
- - php-mcrypt
- - php-curl
- - php-gd
- - php-json
- - php-pgsql
- - php-xml
+ - php56
+ - php56-php-fpm
+ - php56-php-mbstring
+ - php56-php-mcrypt
+ - php56-php-gd
+ - php56-php-pgsql
- java-1.8.0-openjdk
- tomcat6
-#TODO: check php-fpm config in /etc/php5/fpm/...
-
-# - name: Start the services
-# service: name={{item}} state=started enabled=true
-# with_items:
-# - postgres
-# - nginx
-# - tomcat
## php-fpm config
# set fpm user to nginx
-# authoroze /var/log/php-fpm
+# authorize /var/log/php-fpm
- name: copy sysconfig for php-fpm
- copy: src=files/sysconfig_php-fpm dest=/etc/sysconfig/php-fpm
- - name: set /var/log/php-fpm permission
- file: path=/var/log/php-fpm/ state=directory owner=nginx group=nginx
+ copy: src=files/sysconfig_php-fpm dest=/opt/remi/php56/root/etc/sysconfig/php-fpm
+ - name: set /opt/remi/php56/root/var/log/php-fpm permission
+ file: path=/opt/remi/php56/root/var/log/php-fpm/ state=directory owner=nginx group=nginx
- name: set php-fpm listen to socket
lineinfile:
- dest: /etc/php-fpm.d/www.conf
+ dest: /opt/remi/php56/root/etc/php-fpm.d/www.conf
regexp: '^listen\s*='
- line: 'listen = /var/run/php-fpm/php-fpm.sock'
+ line: 'listen = /opt/remi/php56/root/var/run/php-fpm/php-fpm.sock'
state: present
- name: set php-fpm user
lineinfile:
- dest: /etc/php-fpm.d/www.conf
+ dest: /opt/remi/php56/root/etc/php-fpm.d/www.conf
regexp: '^user\s*='
line: 'user = nginx'
state: present
- name: set php-fpm group
lineinfile:
- dest: /etc/php-fpm.d/www.conf
+ dest: /opt/remi/php56/root/etc/php-fpm.d/www.conf
regexp: '^group\s*='
line: 'group = nginx'
state: present
- name: set php-fpm user
lineinfile:
- dest: /etc/php-fpm.d/www.conf
+ dest: /opt/remi/php56/root/etc/php-fpm.d/www.conf
regexp: '^;listen.owner\s*='
line: 'listen.owner = nginx'
state: present
- name: set php-fpm group
lineinfile:
- dest: /etc/php-fpm.d/www.conf
+ dest: /opt/remi/php56/root/etc/php-fpm.d/www.conf
regexp: '^;listen.group\s*='
line: 'listen.group = nginx'
state: present
- name: set php-fpm permission
lineinfile:
- dest: /etc/php-fpm.d/www.conf
+ dest: /opt/remi/php56/root/etc/php-fpm.d/www.conf
regexp: '^;listen.mode\s*='
line: 'listen.mode = 0660'
state: present
+ - name: add link to php56 fpm log
+ file: path=/var/log/php56-php-fpm src=/opt/remi/php56/root/var/log/php-fpm state=link
- name: restart php-fpm
- service: name=php-fpm state=restarted enabled=yes
+ service: name=php56-php-fpm state=restarted enabled=yes
## nginx config
@@ -293,10 +291,10 @@
register: composer_bin
- name: install composer
- shell: curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin
+ shell: curl -sS https://getcomposer.org/installer | scl enable php56 'php -- --install-dir=/usr/local/bin'
when: composer_bin.stat.exists == False
- - name: rename composer
- command: mv /usr/local/bin/composer.phar /usr/local/bin/composer
+ - name: link composer
+ file: path=/usr/local/bin/composer src=/usr/local/bin/composer.phar state=link
when: composer_bin.stat.exists == False
#install node