Skip to content

Commit

Permalink
set php alternative path for easy switching between php versions
Browse files Browse the repository at this point in the history
  • Loading branch information
chregu committed May 25, 2016
1 parent f30e1d8 commit 38ff0e4
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 6 deletions.
4 changes: 4 additions & 0 deletions provisioning/roles/php/tasks/main.yml
Expand Up @@ -46,6 +46,10 @@
- include: wheezy-php5.yml
when: "ansible_lsb.major_release|int < 8 and {{ php_version_installed }} > 5.4"

- name: ubuntu-php5 | set alternative
alternatives: name=php path={{ alternatives_php_path }}
sudo: yes

- name: Download php-cs-fixer
shell: curl http://get.sensiolabs.org/php-cs-fixer.phar -o /usr/local/bin/php-cs-fixer && chmod +x /usr/local/bin/php-cs-fixer creates=/usr/local/bin/php-cs-fixer
sudo: yes
5 changes: 0 additions & 5 deletions provisioning/roles/php/tasks/ubuntu-php5.yml

This file was deleted.

1 change: 1 addition & 0 deletions provisioning/roles/php/vars/Debian-7.0.yml
Expand Up @@ -17,3 +17,4 @@ php_pgsql_package: php7.0-pgsql

etc_php_path: /etc/php/7.0/

alternatives_php_path: /usr/bin/php7.0
2 changes: 2 additions & 0 deletions provisioning/roles/php/vars/Debian.yml
Expand Up @@ -15,3 +15,5 @@ php_pgsql_package: php5-pgsql
etc_php_path: /etc/php5/

phpenmod: php5enmod

alternatives_php_path: /usr/bin/php5
2 changes: 2 additions & 0 deletions provisioning/roles/php/vars/Ubuntu-5.6.yml
Expand Up @@ -23,3 +23,5 @@ php_pgsql_package: php5.6-pgsql
etc_php_path: /etc/php/5.6/

phpenmod: phpenmod

alternatives_php_path: /usr/bin/php5.6
2 changes: 2 additions & 0 deletions provisioning/roles/php/vars/Ubuntu-7.0.yml
Expand Up @@ -25,3 +25,5 @@ etc_php_path: /etc/php/7.0/

#php5enmod auf debian
phpenmod: phpenmod

alternatives_php_path: /usr/bin/php7.0
2 changes: 1 addition & 1 deletion provisioning/roles/php/vars/default.yml
Expand Up @@ -16,4 +16,4 @@ etc_php_path: /etc/php5/

phpenmod: php5enmod


alternatives_php_path: /usr/bin/php5

0 comments on commit 38ff0e4

Please sign in to comment.