Skip to content

Commit

Permalink
Remove php5 php-fpm config if present
Browse files Browse the repository at this point in the history
  • Loading branch information
phavekes committed Jul 7, 2020
1 parent 9915aeb commit b0fc3d1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 0 additions & 2 deletions roles/app/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,15 +167,13 @@
vars: { component_name: ssp, vhost_name: "{{ ssp_vhost_name }}" }
when: "inventory_hostname in groups['dev']"


# Because nginx will restart with an invalid config without service detecting this, so we test the config first
- name: Test nginx config
command: /sbin/nginx -t
register: nginx_test
changed_when: False
failed_when: nginx_test.rc > 0


- name: Start and enable nginx & php-fpm & smtp services
service: name={{item}} state=started enabled=true
with_items:
Expand Down
7 changes: 7 additions & 0 deletions roles/app/tasks/php72-vhost-symfony4-flex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@
notify:
- restart nginx

- name: Remove php5 php-fpm config if present
file:
path: '/etc/php-fpm.d/{{ vhost_name }}.conf'
state: absent
notify:
- restart php-fpm

# Put fpm config
- name: Put php72-php-fpm config
template: src='php72-fpm-pool.conf.j2' dest='/etc/opt/remi/php72/php-fpm.d/{{ vhost_name }}.conf'
Expand Down
6 changes: 6 additions & 0 deletions roles/app/tasks/php72-vhost-symfony4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@
notify:
- restart nginx

- name: Remove php5 php-fpm config if present
file:
path: '/etc/php-fpm.d/{{ vhost_name }}.conf'
state: absent
notify:
- restart php-fpm

# Put fpm config
- name: Put php72-php-fpm config
Expand Down

0 comments on commit b0fc3d1

Please sign in to comment.