--- - name: install apache2 and related packages apt: name: - apache2 - ssl-cert # snakeoil cert used for optional tls bootstrapping - name: start and enable apache2 service: name: apache2 state: started enabled: yes