[rsylog-client] Added role to send logs to thot using rsyslog
							parent
							
								
									eb3cf3381c
								
							
						
					
					
						commit
						c30b3c1624
					
				
							
								
								
									
										8
									
								
								base.yml
								
								
								
								
							
							
						
						
									
										8
									
								
								base.yml
								
								
								
								
							| 
						 | 
					@ -83,6 +83,14 @@
 | 
				
			||||||
  roles:
 | 
					  roles:
 | 
				
			||||||
    - nullmailer
 | 
					    - nullmailer
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Send logs to thot
 | 
				
			||||||
 | 
					- hosts: server
 | 
				
			||||||
 | 
					  vars:
 | 
				
			||||||
 | 
					    rsyslog:
 | 
				
			||||||
 | 
					      server: thot.adm.crans.org
 | 
				
			||||||
 | 
					  roles:
 | 
				
			||||||
 | 
					    - rsyslog-client
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- hosts: otis.adm.crans.org
 | 
					- hosts: otis.adm.crans.org
 | 
				
			||||||
  roles:
 | 
					  roles:
 | 
				
			||||||
    - ansible
 | 
					    - ansible
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,16 @@
 | 
				
			||||||
 | 
					---
 | 
				
			||||||
 | 
					- name: Deploy quagga debian configuration
 | 
				
			||||||
 | 
					  template:
 | 
				
			||||||
 | 
					    src: rsyslog.d/50-send_relp.conf.j2
 | 
				
			||||||
 | 
					    dest: /etc/rsyslog.d/50-send_relp.conf
 | 
				
			||||||
 | 
					    mode: 0640
 | 
				
			||||||
 | 
					    owner: quagga
 | 
				
			||||||
 | 
					    group: quagga
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- name: Create spool directory
 | 
				
			||||||
 | 
					  file:
 | 
				
			||||||
 | 
					    path: /var/log/spool
 | 
				
			||||||
 | 
					    state: directory
 | 
				
			||||||
 | 
					    mode: '0750'
 | 
				
			||||||
 | 
					    owner: root
 | 
				
			||||||
 | 
					    group: root
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,9 @@
 | 
				
			||||||
 | 
					# {{ ansible_managed }}
 | 
				
			||||||
 | 
					$ModLoad omrelp
 | 
				
			||||||
 | 
					$WorkDirectory /var/log/spool  # default location for work (spool) files
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					$ActionQueueType LinkedList   # use asynchronous processing
 | 
				
			||||||
 | 
					$ActionQueueFileName syslogfwd  # set file name, also enables disk mode
 | 
				
			||||||
 | 
					$ActionResumeRetryCount -1    # infinite retries on insert failure
 | 
				
			||||||
 | 
					$ActionQueueSaveOnShutdown on # save in-memory data if rsyslog shuts down
 | 
				
			||||||
 | 
					*.* :omrelp:{{ rsyslog.server }}:20514;RSYSLOG_ForwardFormat
 | 
				
			||||||
		Loading…
	
		Reference in New Issue