fpm.yml 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. - name: Install php5-fpm package
  2. apt: pkg=php5-fpm state=installed update_cache=yes
  3. when: with_fpm
  4. - name: Install php5-fpm init script config file
  5. template: src=fpm/default.j2 dest=/etc/default/php5-fpm owner=root group=root mode=0644
  6. notify:
  7. - Restart php5-fpm
  8. when: with_fpm
  9. - name: Install php5-fpm configuration file
  10. template: src=fpm/php-fpm-custom.conf.j2 dest=/etc/php5/fpm/php-fpm-custom.conf owner=root group=root mode=0644
  11. notify:
  12. - Restart php5-fpm
  13. when: with_fpm
  14. - name: Install nginx config files for php5-fpm (fpm servers pool)
  15. template: src=fpm/nginx/fpm-pool.conf.j2 dest=/etc/nginx/conf.d/fpm-pool.conf owner=root group=root mode=0644
  16. notify:
  17. - Reload nginx
  18. when: with_fpm and with_nginx
  19. - name: Install nginx config files for php5-fpm (fpm fastcgi config)
  20. template: src=fpm/nginx/fastcgi_pass_fpm.j2 dest=/etc/nginx/fastcgi_pass_fpm owner=root group=root mode=0644
  21. notify:
  22. - Reload nginx
  23. when: with_fpm and with_nginx
  24. - name: Ensure php5-fpm is running
  25. service: name=php5-fpm state=started
  26. when: with_fpm