--- - name: Failsafe - disable Apache if exists systemd: name: apache2 state: stopped enabled: no - name: Install Nginx apt: pkg: - nginx - certbot - python3-certbot-nginx - name: Enable Nginx service systemd: name: nginx daemon_reload: yes enabled: yes state: started