- name: Create site directories file: path: "/var/www/{{ site_name }}" state: directory mode: '0755' tags: configure_site - name: Deploy site content template: src: site_index.html.j2 dest: "/var/www/{{ site_name }}/index.html" tags: configure_site - name: Configure Nginx for {{ site_name }} template: src: nginx_site.conf.j2 dest: "/etc/nginx/conf.d/{{ site_name }}.conf" tags: configure_site - name: Restart Nginx service: name: nginx state: restarted tags: configure_site