mirror of
				https://github.com/iiab/iiab.git
				synced 2025-03-09 15:40:17 +00:00 
			
		
		
		
	use case for os.localvars
This commit is contained in:
		
							parent
							
								
									d66b56824d
								
							
						
					
					
						commit
						132813c4be
					
				
					 1 changed files with 27 additions and 8 deletions
				
			
		
							
								
								
									
										35
									
								
								runansible
									
										
									
									
									
								
							
							
						
						
									
										35
									
								
								runansible
									
										
									
									
									
								
							|  | @ -8,13 +8,32 @@ fi | |||
| 
 | ||||
| # if vars/local_vars.yml is missing, put a default one in place | ||||
| if [ ! -f ./vars/local_vars.yml ]; then | ||||
| 	OS=`grep ^ID= /etc/*release|cut -d= -f2` | ||||
| 	OS=${OS//\"/} | ||||
|     if [ "$OS" = "centos" ]; then | ||||
| 		cp ./vars/centos.localvars ./vars/local_vars.yml | ||||
|     else | ||||
|     cp ./vars/debian.localvars ./vars/local_vars.yml | ||||
|     fi | ||||
|     OS=`grep ^ID= /etc/*release|cut -d= -f2` | ||||
|     OS=${OS//\"/} | ||||
| 
 | ||||
|     case $OS in | ||||
|         OLPC) | ||||
|         cp ./vars/olpc.localvars ./vars/local_vars.yml | ||||
|         fedora) | ||||
|         cp ./vars/olpc.localvars ./vars/local_vars.yml | ||||
|         ;; | ||||
|         centos) | ||||
|         cp ./vars/centos.localvars ./vars/local_vars.yml | ||||
|         ;; | ||||
|         debian) | ||||
|         cp ./vars/debian.localvars ./vars/local_vars.yml | ||||
|         ;; | ||||
|         ubuntu) | ||||
|         cp ./vars/debian.localvars ./vars/local_vars.yml | ||||
|         ;; | ||||
|         raspbian) | ||||
|         cp ./vars/debian.localvars ./vars/local_vars.yml | ||||
|         ;; | ||||
|         *) | ||||
|         echo "Unknown OS -- no matching os.localvars -- exiting now..." | ||||
|         exit 0 | ||||
|         ;; | ||||
|     esac | ||||
| fi | ||||
| 
 | ||||
| if [ -f /etc/iiab/iiab.env ] | ||||
|  | @ -27,7 +46,7 @@ fi | |||
| 
 | ||||
| if [ ! -f iiab.yml ] | ||||
| then | ||||
|  echo "XSCE Playbook not found." | ||||
|  echo "IIAB Playbook not found." | ||||
|  echo "Please run this command from the top level of the git repo." | ||||
|  echo "Exiting." | ||||
|  exit | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue