| 
									
										
										
										
											2022-04-19 12:01:03 -05:00
										 |  |  | #!/bin/bash | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-07-23 14:18:32 -05:00
										 |  |  | # Ensure we are in the source directory. | 
					
						
							|  |  |  | cd $(dirname $0)/.. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-04-19 12:01:03 -05:00
										 |  |  | # Arguments | 
					
						
							|  |  |  | inventory="$1" | 
					
						
							|  |  |  | if [ "$inventory" == "-h" ] || [ "$inventory" == "--help" ]; then | 
					
						
							|  |  |  |     echo "Usage: $0 -h # Usage" | 
					
						
							|  |  |  |     echo "       $0    # Run a complete deployment." | 
					
						
							|  |  |  |     exit 0 | 
					
						
							|  |  |  | elif [ -z "$inventory" ]; then | 
					
						
							|  |  |  |     inventory="examples/msn0.yml" | 
					
						
							|  |  |  | fi | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Find the root of the git clone | 
					
						
							|  |  |  | while [ ! -d .git ]; do | 
					
						
							|  |  |  |     cd .. | 
					
						
							|  |  |  |     if [ "$PWD" == '/' ]; then | 
					
						
							| 
									
										
										
										
											2025-04-12 02:59:24 -05:00
										 |  |  |         echo "This needs to be run from the Kapisi checkout" | 
					
						
							| 
									
										
										
										
											2022-04-19 12:01:03 -05:00
										 |  |  |         exit 3 | 
					
						
							|  |  |  |     fi | 
					
						
							|  |  |  | done | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ansible-playbook -i examples/msn0.yml playbooks/deploy.yml | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 |