--- - name: Install package package: name: - awstats state: present - template: src: awstats.conf dest: "/etc/awstats/awstats.{{ item }}.conf" with_items: "{{ vhosts }}" - template: src: logs.conf dest: "/etc/httpd/conf.d/{{ item }}.conf.d/logs.conf" with_items: "{{ vhosts }}" notify: verify config and restart httpd