mirror of
				https://git.lapiole.org/dani/ansible-roles.git
				synced 2025-10-31 10:51:27 +01:00 
			
		
		
		
	Update to 2021-12-01 19:13
This commit is contained in:
		
							
								
								
									
										23
									
								
								roles/memcached_server/tasks/main.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								roles/memcached_server/tasks/main.yml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,23 @@ | ||||
| --- | ||||
|  | ||||
| - name: Install packages | ||||
|   yum: | ||||
|     name: | ||||
|       - memcached | ||||
|       - libmemcached | ||||
|  | ||||
| - name: Deploy configuration | ||||
|   template: src=memcached.j2 dest=/etc/sysconfig/memcached | ||||
|   notify: restart memcached | ||||
|  | ||||
| - name: Handle memcached ports | ||||
|   iptables_raw: | ||||
|     name: memcached_ports | ||||
|     state: "{{ (memcached_src_ip | length > 0) | ternary('present','absent') }}" | ||||
|     rules: | | ||||
|       -A INPUT -m state --state NEW -p tcp --dport {{ memcached_port }} -s {{ memcached_src_ip | join(',') }} -j ACCEPT | ||||
|       -A INPUT -p udp --dport {{ memcached_port }} -s {{ memcached_src_ip | join(',') }} -j ACCEPT | ||||
|   when: iptables_manage | default(True) | ||||
|  | ||||
| - name: Start and enabled the service | ||||
|   service: name=memcached state=started enabled=yes | ||||
		Reference in New Issue
	
	Block a user
	 Daniel Berteaud
					Daniel Berteaud