diff --git a/sio2/CYBER/Ansible/squid-j2.yml b/sio2/CYBER/Ansible/squid-j2.yml new file mode 100644 index 0000000..c3af7b4 --- /dev/null +++ b/sio2/CYBER/Ansible/squid-j2.yml @@ -0,0 +1,23 @@ +--- +- name: squid-j2.yml + hosts: infra + vars: + - proxy_port: 8080 + - proxy_mem: 512 + tasks: + - name: 1. assurer que squid est installe + service: + name: squid + state: started + + - name: 2. Copie du squid.conf apres generation dynamique + template: + src: squid.conf.j2 + dest: /etc/squid/squid.conf + notify: restart squid + + handlers: + - name: restart squid + service: + name: squid + state: restarted diff --git a/sio2/CYBER/Ansible/squid.yml b/sio2/CYBER/Ansible/squid.yml new file mode 100644 index 0000000..a99c927 --- /dev/null +++ b/sio2/CYBER/Ansible/squid.yml @@ -0,0 +1,22 @@ +--- +- name: squid.yml + hosts: infra + vars: + proxy_port: 8080 + proxy_mem: 128 + + tasks: + - name: 1. installation de squid + apt: + name: squid + state: latest + + - name: 2. recuperation de squid.conf avec fetch + ansible.builtin.fetch: + src: /etc/squid/squid.conf + dest: ./squid.conf + flat: yes + + + +