- hosts: all tasks: - name: Install apache httpd but avoid starting it immediately (state=present is optional) apt: name: apache2 state: present