squid.yml
This commit is contained in:
		
							
								
								
									
										31
									
								
								sio2/sisr/45-ansible/tpansible/squid.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								sio2/sisr/45-ansible/tpansible/squid.yml
									
									
									
									
									
										Normal file
									
								
							@@ -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  
 | 
			
		||||
		Reference in New Issue
	
	Block a user