Browse Source

+

sys-systemd-and-upstart
Vladimir Smagin 1 year ago
commit
1cd5358027

+ 3
- 0
nginx+php-fpm7.1/ansible.cfg View File

@@ -0,0 +1,3 @@
[defaults]
log_path=ansible.log
nocows = 1

+ 26
- 0
nginx+php-fpm7.1/ansible.log View File

@@ -0,0 +1,26 @@
2018-08-31 01:56:13,120 p=31436 u=vlad | ____________
< PLAY [all] >
------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||


2018-08-31 01:56:13,152 p=31436 u=vlad | ________________________
< TASK [Gathering Facts] >
------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||


2018-08-31 01:56:13,928 p=31436 u=vlad | [ERROR]: User interrupted execution

2018-08-31 02:11:05,663 p=32090 u=vlad | PLAY [all] *******************************************************************************************************************************************************************************************************************************************************************************************************************
2018-08-31 02:11:05,677 p=32090 u=vlad | TASK [Gathering Facts] *******************************************************************************************************************************************************************************************************************************************************************************************************
2018-08-31 02:11:06,848 p=32090 u=vlad | [ERROR]: User interrupted execution


+ 1
- 0
nginx+php-fpm7.1/deploy.retry View File

@@ -0,0 +1 @@
10.0.2.46

+ 3
- 0
nginx+php-fpm7.1/deploy.sh View File

@@ -0,0 +1,3 @@
#!/bin/bash

ansible-playbook deploy.yml -i '10.0.2.46,' -T 30 -k -u root

+ 11
- 0
nginx+php-fpm7.1/deploy.yml View File

@@ -0,0 +1,11 @@
---
- hosts: all
gather_facts: True
vars:
ansible_python_interpreter: /usr/bin/python3
#validate_certs: False

roles:
- preinstall
- php
- nginx

+ 16
- 0
nginx+php-fpm7.1/roles/nginx/tasks/main.yml View File

@@ -0,0 +1,16 @@
---
- name: Add an apt signing key for nginx and repository
apt_key:
url: http://nginx.org/keys/nginx_signing.key
state: present

- apt_repository:
repo: deb http://nginx.org/packages/ubuntu/ {{ ansible_lsb.codename }} nginx
state: present
filename: nginx

- name: Install nginx
apt: name=nginx state=present

- name: Restart nginx
service: name=nginx state=restarted

+ 65
- 0
nginx+php-fpm7.1/roles/php/tasks/main.yml View File

@@ -0,0 +1,65 @@
---
- apt_repository:
validate_certs: False
repo: ppa:ondrej/php
state: present

- name: Install php-fpm and deps
apt: name={{ item }} state=present update_cache=yes
with_items:
- php7.1
- php7.1-fpm
- php7.1-mbstring
- php7.1-xml
- php7.1-curl
- php7.1-pgsql
- php7.1-mysql
- php7.1-gd
- php7.1-zip
- php7.1-opcache
- php7.1-memcached

- ini_file:
path: /etc/php/7.1/fpm/pool.d/www.conf
section: www
option: user
value: www-data
backup: no

- ini_file:
path: /etc/php/7.1/fpm/pool.d/www.conf
section: www
option: group
value: www-data
backup: no

- ini_file:
path: /etc/php/7.1/fpm/php.ini
section: PHP
option: short_open_tag
value: "On"
backup: no

- ini_file:
path: /etc/php/7.1/fpm/php.ini
section: PHP
option: max_execution_time
value: 300
backup: no

- ini_file:
path: /etc/php/7.1/fpm/php.ini
section: PHP
option: max_input_time
value: 300
backup: no

- ini_file:
path: /etc/php/7.1/fpm/php.ini
section: PHP
option: memory_limit
value: 512M
backup: no

- name: Restart php-fpm
service: name=php7.1-fpm state=restarted

+ 12
- 0
nginx+php-fpm7.1/roles/preinstall/tasks/main.yml View File

@@ -0,0 +1,12 @@
---
- name: Ensure packages are installed
apt: name={{ item }} state=present update_cache=yes
with_items:
- python
- mc
- htop
- iotop
- wget
- curl
- set_fact:
ansible_python_interpreter: /usr/bin/python

Loading…
Cancel
Save