Skip to content

Commit

Permalink
Merge pull request #6 from itcraftsmanpl/fix-debian
Browse files Browse the repository at this point in the history
Fixes for Debian distribution
  • Loading branch information
akondas committed Apr 26, 2016
2 parents 36c8b8a + e3337e6 commit a7c68cf
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
2 changes: 1 addition & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ php_packages:
- php7.0-fpm
- php7.0-mysql
- php7.0-gd
- php7.0-mbstring
# - php7.0-mbstring
- php7.0-mcrypt
php_timezone: Europe/Warsaw
php_upload_max_filesize: "20M"
Expand Down
23 changes: 17 additions & 6 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,31 @@
---
- name: Add PPA Repository
sudo: yes
- name: Add repository for Ubuntu
become: true
apt_repository: repo={{ php_ppa }}
when: ansible_distribution|lower == "ubuntu"

- name: Add repository for Debian
become: true
apt_repository: repo="deb http://packages.dotdeb.org {{ ansible_distribution_release }} all" state=present
when: ansible_distribution|lower == "debian"

- name: Add apt key for Debian
become: true
apt_key: url=https://www.dotdeb.org/dotdeb.gpg state=present
when: ansible_distribution|lower == "debian"

- name: Update apt
sudo: yes
become: yes
apt: update_cache=yes

- name: Install PHP
sudo: yes
become: yes
apt: pkg=php7.0 state=latest

- name: Install PHP Packages
sudo: yes
become: yes
apt: pkg={{ item }} state=latest
with_items: php_packages
with_items: "{{ php_packages }}"
when: php_packages is defined
notify:
- restart php7-fpm
Expand Down

0 comments on commit a7c68cf

Please sign in to comment.