tp ansible
This commit is contained in:
parent
d86d83103d
commit
365ac0717a
23
sio2/CYBER/Ansible/squid-j2.yml
Normal file
23
sio2/CYBER/Ansible/squid-j2.yml
Normal file
@ -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
|
22
sio2/CYBER/Ansible/squid.yml
Normal file
22
sio2/CYBER/Ansible/squid.yml
Normal file
@ -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
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user