mirror of
				https://github.com/borgbase/ansible-role-borgbackup.git
				synced 2025-11-04 01:19:32 +01:00 
			
		
		
		
	Don't fail if cron isn't installed when setting up systemd timer (#147)
* `cron` isn't always installed and is not required when using a systemd timer, so make sure setup doesn't fail when we check if there's already an installed cron timer Signed-off-by: Woomymy <woomy@woomy.be>
This commit is contained in:
		
							parent
							
								
									cbe280e7ff
								
							
						
					
					
						commit
						702299f861
					
				@ -6,11 +6,13 @@
 | 
			
		||||
    state: absent
 | 
			
		||||
  check_mode: true
 | 
			
		||||
  register: cron_file_exists
 | 
			
		||||
  ignore_errors: true
 | 
			
		||||
 | 
			
		||||
- name: Ensure no Borgmatic Cron file exists.
 | 
			
		||||
  ansible.builtin.assert:
 | 
			
		||||
    that:
 | 
			
		||||
      - not cron_file_exists.changed
 | 
			
		||||
      - not cron_file_exists.failed or "Failed to find" in cron_file_exists.msg
 | 
			
		||||
    fail_msg: Found an existing Borgmatic Cron job. Please remove before using Systemd timer.
 | 
			
		||||
 | 
			
		||||
- name: Create borgbackup timer
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user