Made refactoring for notes app (and other)
This commit is contained in:
26
ansible/roles/blocks/php-app/tasks/main.yml
Normal file
26
ansible/roles/blocks/php-app/tasks/main.yml
Normal file
@ -0,0 +1,26 @@
|
||||
---
|
||||
- name: 'Check app requirements for {{ php_app_name }}.'
|
||||
fail:
|
||||
msg: You must set app name.
|
||||
when: not php_app_name
|
||||
|
||||
- name: 'Create web directory for {{ php_app_name }}.'
|
||||
file:
|
||||
state: directory
|
||||
path: '{{ php_app_directory }}'
|
||||
owner: '{{ php_app_user }}'
|
||||
group: '{{ php_app_group }}'
|
||||
recurse: yes
|
||||
notify: restart nginx
|
||||
|
||||
- name: 'Create nginx config for {{ php_app_name }}.'
|
||||
template:
|
||||
src: '{{ php_app_nginx_config }}'
|
||||
dest: '/etc/nginx/sites-enabled/{{ php_app_name }}.conf'
|
||||
notify: restart nginx
|
||||
|
||||
- name: 'Creates php-fpm pool config for {{ php_app_name }}.'
|
||||
template:
|
||||
src: fpm-pool.conf.j2
|
||||
dest: '/etc/php/{{ php_app_php_version }}/fpm/pool.d/{{ php_app_name }}.conf'
|
||||
notify: restart php-fpm
|
Reference in New Issue
Block a user