--- - block: - name: Install the squid package yum: pkg=squid state=present when: - ansible_distribution_file_variety == "RedHat" - squid_install | bool tags: [ 'squid', 'proxy' ] - block: - name: Install the squid configuration file template: src=squid.conf.j2 dest=/etc/squid/squid.conf notify: Reload squid - name: Ensure that the squid service is running and enabled service: name=squid state=started enabled=yes when: squid_install | bool tags: [ 'squid', 'proxy' ]