Use variables
This commit is contained in:
parent
5b4c91091e
commit
57e8aa59fa
|
@ -2,18 +2,21 @@
|
||||||
- hosts: dransible
|
- hosts: dransible
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
|
vars_files:
|
||||||
|
- ../../vars/vars.yml
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Creating project directory
|
- name: Creating project directory
|
||||||
file:
|
file:
|
||||||
path: /var/www/app
|
path: "{{ app_project_root }}"
|
||||||
state: directory
|
state: directory
|
||||||
|
|
||||||
- name: Uploading application
|
- name: Uploading application
|
||||||
synchronize:
|
synchronize:
|
||||||
src: ../../../../
|
src: ../../../../
|
||||||
dest: /var/www/app
|
dest: "{{ app_project_root }}"
|
||||||
|
|
||||||
- name: Installing Composer dependencies
|
- name: Installing Composer dependencies
|
||||||
composer:
|
composer:
|
||||||
command: install
|
command: install
|
||||||
working_dir: /var/www/app
|
working_dir: "{{ app_project_root }}"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
---
|
---
|
||||||
apache_vhosts:
|
apache_vhosts:
|
||||||
- servername: dransible
|
- servername: dransible
|
||||||
documentroot: "/var/www/app/web"
|
documentroot: "{{ app_project_docroot }}"
|
||||||
|
|
||||||
php_packages:
|
php_packages:
|
||||||
- libapache2-mod-php{{ php_default_version_debian }}
|
- libapache2-mod-php{{ php_default_version_debian }}
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
---
|
---
|
||||||
|
app_project_root: /var/www/app
|
||||||
|
app_project_docroot: "{{ app_project_root }}/web"
|
||||||
|
|
||||||
app_db_name: "{{ vault_app_db_name }}"
|
app_db_name: "{{ vault_app_db_name }}"
|
||||||
app_db_user: "{{ vault_app_db_user }}"
|
app_db_user: "{{ vault_app_db_user }}"
|
||||||
app_db_password: "{{ vault_app_db_password }}"
|
app_db_password: "{{ vault_app_db_password }}"
|
||||||
|
|
Loading…
Reference in a new issue