From f9927d4b0415ab1027bfd234e1cd093ddd019172 Mon Sep 17 00:00:00 2001 From: "johan.largy" Date: Thu, 13 Oct 2022 08:48:23 +0200 Subject: [PATCH] script squid --- sio2/sisr2/40-Ansible/squid.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 sio2/sisr2/40-Ansible/squid.yml diff --git a/sio2/sisr2/40-Ansible/squid.yml b/sio2/sisr2/40-Ansible/squid.yml new file mode 100644 index 0000000..e8f7b0d --- /dev/null +++ b/sio2/sisr2/40-Ansible/squid.yml @@ -0,0 +1,32 @@ +--- +- hosts: infra + vars: + - proxy_port: 8080 + - proxy_mem: 128 + - localnet: "192.168.0.0/24" + tasks: + - name: Installation squid + apt: + name: squid + state: present + + - name: generation du fichier de conf squid.conf a partir de la template squid.conf.j2 + template: + src: squid.conf.j2 + dest: /etc/squid/squid.conf + mode: 0644 + backup: true + notify: restart squid + + handlers: + - name: restart squid + service: + name: squid + state: restarted + + + + # - name: recup fichier de conf squid.conf + # fetch: + # src: /etc/squid/squid.conf + # dest: squid.conf.j2