diff --git a/sio2/sisr/45-ansible/tpansible/squid.yml b/sio2/sisr/45-ansible/tpansible/squid.yml new file mode 100644 index 0000000..2a4ef7d --- /dev/null +++ b/sio2/sisr/45-ansible/tpansible/squid.yml @@ -0,0 +1,31 @@ +- hosts: adm + vars: + - proxy_port: 8080 + - proxy_mem: 128 + + tasks: + - name: Installation squid + apt: + name: squid + state: present + + - name: Copie squid.conf squid.conf.j2 + template: + src: squid.conf.j2 + dest: /etc/squid/squid.conf + notify: + - restart squid + +# - name: On ajoute http_access allow localnet +# replace: +# path: /etc/squid/squid.conf +# regexp: '^#http_access allow localnet' +# replace: 'http_access allow localnet' +# notify: +# - restart squid + + handlers: + - name: restart squid + service: + name: squid + state: restarted