mirror of
				https://github.com/kevinveenbirkenbach/computer-playbook.git
				synced 2025-11-03 19:58:14 +00:00 
			
		
		
		
	Optimized nginx CSP (prop. leads to problems due to too high restrictions for some roles) and implemented health check for mailer
This commit is contained in:
		
							
								
								
									
										27
									
								
								roles/health-msmtp/tasks/main.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								roles/health-msmtp/tasks/main.yml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,27 @@
 | 
			
		||||
- name: "create {{ health_msmtp_folder }}"
 | 
			
		||||
  file:
 | 
			
		||||
    path: "{{ health_msmtp_folder }}"
 | 
			
		||||
    state: directory
 | 
			
		||||
    mode: 0755
 | 
			
		||||
 | 
			
		||||
- name: create health-msmtp.sh
 | 
			
		||||
  template:
 | 
			
		||||
    src:  health-msmtp.sh.j2
 | 
			
		||||
    dest: "{{ health_msmtp_folder }}health-msmtp.sh"
 | 
			
		||||
    mode: '0755'
 | 
			
		||||
 | 
			
		||||
- name: create health-msmtp.cymais.service
 | 
			
		||||
  template:
 | 
			
		||||
    src: health-msmtp.service.j2
 | 
			
		||||
    dest: /etc/systemd/system/health-msmtp.cymais.service
 | 
			
		||||
  notify: reload health-msmtp.cymais.service
 | 
			
		||||
 | 
			
		||||
- name: set service_name to the name of the current role
 | 
			
		||||
  set_fact:
 | 
			
		||||
    service_name: "{{ role_name }}"
 | 
			
		||||
 | 
			
		||||
- name: include role for systemd-timer for {{ service_name }}
 | 
			
		||||
  include_role:
 | 
			
		||||
    name: systemd-timer
 | 
			
		||||
  vars:
 | 
			
		||||
    on_calendar: "{{ on_calendar_health_msmtp }}"
 | 
			
		||||
		Reference in New Issue
	
	Block a user