--- - yum: name="{{ item }}" state=present with_items: - httpd - name: Start apache service: name=httpd state=started enabled=true - name: Base config for apache template: src=httpd.conf dest=/etc/httpd/conf.d/httpd.conf notify: reload apache - name: Application config for apache template: src={{ apache_config }} dest=/etc/httpd/conf.d/{{ apache_config }} notify: reload apache