-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsimple-playbook.yml
71 lines (61 loc) · 1.9 KB
/
simple-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: "{{ host }}"
user: "{{ user }}"
sudo: yes
vars_prompt:
- name: "host"
prompt: "Please enter hosts"
private: no
default: "localhost"
- name: "user"
prompt: "Please enter user name"
private: no
default: "vagrant"
vars_files:
- config.yml
vars:
connections: "1024"
is_10_up: "'$ansible_distribution_version' >= '10.04'"
is_ubuntu: "'$ansible_distribution' == 'Ubuntu'"
# nginx
connections: "800"
delete_default_vhost: true
nginx_user: www-data
# mysql
bind_address: "127.0.0.1"
key_buffer: "16M"
# php5-fpm
max_children: 5
start_servers: 2
min_spare_servers: 2
max_spare_servers: 4
tasks:
- name: install python-pycurl
apt: name='python-pycurl' update_cache=yes
- name: ensure ondrej/php5 repository is registered
action: apt_repository repo=ppa:ondrej/php5
- name: ensure nginx repository is registered
action: apt_repository repo=ppa:nginx/stable
- name: ensure apt cache is updated
action: apt update_cache=yes
- name: update all packages to the latest version
action: apt upgrade=dist
- name: install utf-8 locale
action: apt name='language-pack-ja' state=installed
- name: setting LANG
shell: export LANG=ja_JP.UTF-8
- name: update-locale
command: update-locale LC_ALL=ja_JP.UTF-8
- include: common/tasks/setup.yml
- include: mariadb/tasks/setup.yml
- include: postgresql/tasks/setup.yml
- include: apache2/tasks/setup.yml
- include: php/tasks/setup.yml
# - include: nginx/tasks/setup.yml
# - include: php-fpm/tasks/setup.yml
handlers:
- include: common/handlers/main.yml
- include: mariadb/handlers/handler.yml
- include: postgresql/handlers/handler.yml
- include: apache2/handlers/handler.yml
# - include: nginx/handlers/handler.yml
# - include: php-fpm/handlers/handler.yml