--- - name: ensure required packages are installed apt: name={{ item }} update_cache=yes with_items: - nginx - php5-curl - php5-fpm notify: - restart php5-fpm - restart nginx - name: Remove default nginx configuration file: path=/etc/nginx/sites-enabled/default state=absent - name: Configure nginx copy: src=files/nginx.conf dest=/etc/nginx/sites-enabled/phpframework_app notify: - restart nginx - name: Create includes directory file: path=/etc/nginx/includes state=directory - name: Configure fastcgi params copy: src=files/fastcgi_params.inc dest=/etc/nginx/includes/fastcgi_params.inc notify: - restart nginx - name: fpm config action: template src='templates/fpm-pool.conf' dest='/etc/php5/fpm/pool.d/www.conf' notify: - restart php5-fpm