This repository has been archived by the owner on Apr 6, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathplaybook.yml
71 lines (71 loc) · 2.04 KB
/
playbook.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
- hosts: all
vars:
poltergeist: 2.1.1
rbenv:
env: user
version: master
default_ruby: 2.4.1
rubies:
- version: 2.4.1
roles:
- role: zzet.rbenv
rbenv_users:
- vagrant
tasks:
- name: configure 'Webtatic' repository for PHP 7.1
become: true
yum:
name: https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
state: present
- name: configure PostgresSQL 9.5 repository
become: true
yum:
name: https://download.postgresql.org/pub/repos/yum/9.5/redhat/rhel-7-x86_64/pgdg-centos95-9.5-2.noarch.rpm
state: present
- name: install posgresql 9.5
become: true
yum: name=postgresql95-server state=present
- name: initialize postgresql database
command: /usr/pgsql-9.5/bin/postgresql95-setup initdb
args: {creates: /var/lib/pgsql/9.5/data/postgresql.conf}
become: true
- name: start postgresql daemon
service: name=postgresql-9.5 enabled=true state=started
become: true
- name: install apache2 + PHP
become: true
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present update_cache=yes"
with_items:
- fontconfig
- httpd
- mod_php71w
- npm
- php71w-bcmath
- php71w-fpm
- php71w-cli
- php71w-pgsql
- php71w-mcrypt
- php71w-mysql
- php71w-odbc
- php71w-pear
- php71w-xml
- php71w-xmlrpc
- vim
- name: install phantomjs via npm
command: npm install -g phantomjs-prebuilt
args:
creates: /usr/lib/node_modules/phantomjs/lib/phantom/bin/phantomjs
become: true
- name: start httpd daemon
service: name=httpd enabled=true state=started
become: true
post_tasks:
- name: copy standard bundler files to home directory
copy: src={{ item }} dest=/home/vagrant/
with_fileglob: Gemfile*
- name: install 'bundler' gem
gem: name=bundler state=latest
- name: install bundled gems in home directory
bundler: state=present exclude_groups=production
- name: install bundled gems in source tree
bundler: state=present exclude_groups=production chdir=/vagrant