-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathubuntu-1804-php-ansible.yml
48 lines (47 loc) · 1.11 KB
/
ubuntu-1804-php-ansible.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
---
- hosts: php
vars:
home: "{{ lookup('env','HOME') }}"
tasks:
- name: Install Official latest PHP
become: true
apt:
name:
- php-cli
- php-common
- php-fpm
- php-curl
- php-mysql
- php-xml
- php-readline
- php-tidy
- php-json
- php-mbstring
- php-gd
- php-opcache
- php-zip
- php-pear
- php-bcmath
- php-tokenizer
- unzip
update_cache: yes
- name: Create bin folder in user's home
file:
path: "{{ home }}/bin"
state: directory
- name: Download composer installer
get_url:
url: https://getcomposer.org/installer
dest: /tmp/installer
tags: composer
- name: Install composer
shell: "cat /tmp/installer | php --install-dir={{ home }}/bin --filename=composer"
tags: composer
- name: Set permissions on composer
file:
path: "{{ home }}/bin/composer"
mode: "+x"
tags: composer
- name: Install prestissimo (composer parallel install plugin)
shell: "{{ home }}/bin/composer global require hirak/prestissimo"
tags: composer