Fix vars for testing
This commit is contained in:
parent
e80ca9292f
commit
48ae6e1625
@ -9,5 +9,8 @@ indent_size = 4
|
|||||||
[*.yml]
|
[*.yml]
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
|
|
||||||
|
[Vagrantfile]
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
[Makefile]
|
[Makefile]
|
||||||
indent_style = tab
|
indent_style = tab
|
||||||
|
3
Vagrantfile
vendored
3
Vagrantfile
vendored
@ -18,8 +18,9 @@ Vagrant.configure("2") do |config|
|
|||||||
ansible.galaxy_roles_path = "ansible/galaxy.roles"
|
ansible.galaxy_roles_path = "ansible/galaxy.roles"
|
||||||
ansible.sudo = true
|
ansible.sudo = true
|
||||||
ansible.extra_vars = {
|
ansible.extra_vars = {
|
||||||
from_vagrant: true,
|
|
||||||
deploy_user: "deployer_test",
|
deploy_user: "deployer_test",
|
||||||
|
notes_domain: 'notes.loc',
|
||||||
|
notes_cert_type: 'self-signed',
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -3,16 +3,14 @@
|
|||||||
become: true
|
become: true
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
|
|
||||||
from_vagrant: no
|
|
||||||
deploy_user: deployer
|
deploy_user: deployer
|
||||||
|
|
||||||
apps:
|
# Configuration for "Notes" application
|
||||||
notes:
|
notes_domain: 'notes.anwinged.ru'
|
||||||
name: notes
|
notes_cert_type: 'letsencrypt'
|
||||||
dbname: notes_db
|
notes_dbname: notes_db
|
||||||
dbuser: notes_user
|
notes_dbuser: notes_db
|
||||||
dbpassword: Sf6tp6LKeCyrjVZ2YGKYUd
|
notes_dbpassword: Sf6tp6LKeCyrjVZ2YGKYUd
|
||||||
|
|
||||||
timezone: UTC
|
timezone: UTC
|
||||||
|
|
||||||
@ -40,18 +38,18 @@
|
|||||||
# mysql settings
|
# mysql settings
|
||||||
|
|
||||||
mysql_databases:
|
mysql_databases:
|
||||||
- name: '{{ apps.notes.dbname }}'
|
- name: '{{ notes_dbname }}'
|
||||||
mysql_users:
|
mysql_users:
|
||||||
- name: '{{ apps.notes.dbuser }}'
|
- name: '{{ notes_dbuser }}'
|
||||||
host: '127.0.0.1'
|
host: '127.0.0.1'
|
||||||
password: '{{ apps.notes.dbpassword }}'
|
password: '{{ notes_dbpassword }}'
|
||||||
priv: '{{ apps.notes.dbname }}.*:ALL'
|
priv: '{{ notes_dbname }}.*:ALL'
|
||||||
|
|
||||||
pre_tasks:
|
pre_tasks:
|
||||||
- name: Ensure that PHP PPA is added.
|
- name: Ensure that PHP PPA is added.
|
||||||
apt_repository: repo=ppa:ondrej/php state=present
|
apt_repository: repo=ppa:ondrej/php state=present
|
||||||
- name: Update apt cache
|
- name: Update apt cache
|
||||||
apt: update_cache=yes
|
apt: update_cache=yes cache_valid_time=86400
|
||||||
- name: Install system packages
|
- name: Install system packages
|
||||||
apt: pkg={{ item }} state=latest
|
apt: pkg={{ item }} state=latest
|
||||||
with_items:
|
with_items:
|
||||||
@ -85,19 +83,24 @@
|
|||||||
app_name: notes
|
app_name: notes
|
||||||
app_user: notes_owner
|
app_user: notes_owner
|
||||||
app_user_ssh_keys: ['{{ lookup("file", "av_id_rsa.pub") }}']
|
app_user_ssh_keys: ['{{ lookup("file", "av_id_rsa.pub") }}']
|
||||||
app_domains: ['notes.anwinged.ru']
|
app_domains: ['{{ notes_domain }}']
|
||||||
app_cert: yes
|
app_cert: yes
|
||||||
app_cert_type: 'letsencrypt'
|
app_cert_type: '{{ notes_cert_type }}'
|
||||||
app_cert_email: anwinged@ya.ru
|
app_cert_email: anwinged@ya.ru
|
||||||
|
app_php_connection: '127.0.0.1:9010'
|
||||||
app_envs:
|
app_envs:
|
||||||
NOTES_SECRET_TOKEN: qJqFNP5B9RP2EfqgpTPyZe
|
NOTES_SECRET_TOKEN: qJqFNP5B9RP2EfqgpTPyZe
|
||||||
NOTES_DATABASE_HOST: 127.0.0.1
|
NOTES_DATABASE_HOST: 127.0.0.1
|
||||||
NOTES_DATABASE_PORT: 3306
|
NOTES_DATABASE_PORT: 3306
|
||||||
NOTES_DATABASE_NAME: '{{ apps.notes.dbname }}'
|
NOTES_DATABASE_NAME: '{{ notes_dbname }}'
|
||||||
NOTES_DATABASE_USER: '{{ apps.notes.dbuser }}'
|
NOTES_DATABASE_USER: '{{ notes_dbuser }}'
|
||||||
NOTES_DATABASE_PASSWORD: '{{ apps.notes.dbpassword }}'
|
NOTES_DATABASE_PASSWORD: '{{ notes_dbpassword }}'
|
||||||
NOTES_MAILER_HOST: smtp.timeweb.ru
|
NOTES_MAILER_HOST: smtp.timeweb.ru
|
||||||
NOTES_MAILER_PORT: 25
|
NOTES_MAILER_PORT: 25
|
||||||
NOTES_MAILER_USER: noreply@anwinged.ru
|
NOTES_MAILER_USER: noreply@anwinged.ru
|
||||||
NOTES_MAILER_PASSWORD: C5DkD5gs
|
NOTES_MAILER_PASSWORD: C5DkD5gs
|
||||||
SYMFONY_ENV: prod
|
SYMFONY_ENV: prod
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: Fix php-mysql-package
|
||||||
|
apt: pkg=php7.1-mysql state=latest
|
||||||
|
@ -22,7 +22,7 @@ app_envs: {}
|
|||||||
app_directory: '/var/www/{{ app_name }}'
|
app_directory: '/var/www/{{ app_name }}'
|
||||||
app_domains: ['{{ app_name }}.loc']
|
app_domains: ['{{ app_name }}.loc']
|
||||||
app_web_root: '/var/www/{{ app_name }}/current/web'
|
app_web_root: '/var/www/{{ app_name }}/current/web'
|
||||||
app_web_listen: 'unix:/var/run/php-fpm-{{ app_name }}.sock'
|
app_php_connection: '127.0.0.1:9001'
|
||||||
|
|
||||||
|
|
||||||
# СЕРТИФИКАТ
|
# СЕРТИФИКАТ
|
||||||
@ -36,5 +36,5 @@ app_cert_email: 'name@example.com'
|
|||||||
|
|
||||||
app_php_version: '{{ php_version | default("7.0") }}'
|
app_php_version: '{{ php_version | default("7.0") }}'
|
||||||
app_fpool_name: '{{ app_name }}'
|
app_fpool_name: '{{ app_name }}'
|
||||||
app_fpool_listen: '/var/run/php-fpm-{{ app_name }}.sock'
|
app_fpool_listen: '{{ app_php_connection }}'
|
||||||
app_fpool_slowlog: '/var/www/{{ app_name }}/shared/logs/'
|
app_fpool_slowlog: '/var/www/{{ app_name }}/shared/logs/'
|
||||||
|
@ -19,7 +19,7 @@ server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
location ~ ^/app\.php(/|$) {
|
location ~ ^/app\.php(/|$) {
|
||||||
fastcgi_pass {{ app_web_listen }};
|
fastcgi_pass {{ app_php_connection }};
|
||||||
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
||||||
include fastcgi_params;
|
include fastcgi_params;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user