mirror of
				https://github.com/iiab/iiab.git
				synced 2025-03-09 15:40:17 +00:00 
			
		
		
		
	Calibre playbook now completes offline IF /usr/bin/calibre-uninstall exists
This commit is contained in:
		
							parent
							
								
									380db254fa
								
							
						
					
					
						commit
						2e8597cab6
					
				
					 1 changed files with 7 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -29,11 +29,16 @@
 | 
			
		|||
    path: "{{ downloads_dir }}/calibre-installer.py"
 | 
			
		||||
  register: calib_inst
 | 
			
		||||
 | 
			
		||||
- name: FAIL (force Ansible to exit) IF /opt/iiab/downloads/calibre-installer.py doesn't exist OR Internet connection is missing
 | 
			
		||||
- name: Check if calibre-uninstall exists in /usr/bin
 | 
			
		||||
  stat:
 | 
			
		||||
    path: "/usr/bin/calibre-uninstall"
 | 
			
		||||
  register: calib_uninst
 | 
			
		||||
 | 
			
		||||
- name: FAIL (force Ansible to exit) IF /opt/iiab/downloads/calibre-installer.py doesn't exist OR needed Internet connection is missing
 | 
			
		||||
# meta: end_play
 | 
			
		||||
  fail:
 | 
			
		||||
    msg: "{{ downloads_dir }}/calibre-installer.py and an Internet connection are REQUIRED in order to install Calibre!"
 | 
			
		||||
  when: (not calib_inst.stat.exists) or (not internet_available)
 | 
			
		||||
  when: (not calib_inst.stat.exists) or (not internet_available and not calib_uninst.stat.exists)
 | 
			
		||||
 | 
			
		||||
# INSTALL THE LATEST CALIBRE (calibre-server etc) ON ALL OS'S - RUNS IF /usr/bin/calibre-uninstall DOES NOT ALEADY EXIST
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue