- name: Install Nginx zypper: name: nginx state: present - name: Ensure Nginx is enabled and started systemd: name: nginx enabled: yes state: started - name: Create directory for error pages file: path: /var/www/errors state: directory owner: nginx group: nginx mode: '0755' - name: Deploy custom error page template: src: site_down.html.j2 dest: /var/www/errors/site_down.html mode: '0644' - name: Deploy Proxy Configuration template: src: proxy.conf.j2 dest: /etc/nginx/conf.d/proxy.conf - name: Reload Nginx systemd: name: nginx state: reloaded