Fix pre-commit hooks and move directories
roles/ and inventory/ are now in playbooks/ also fixed issues reported by ansible-lint
This commit is contained in:
		
							parent
							
								
									dc398ddb6e
								
							
						
					
					
						commit
						4104057771
					
				
					 123 changed files with 91 additions and 39 deletions
				
			
		
							
								
								
									
										26
									
								
								playbooks/roles/lego/files/lego.sh
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										26
									
								
								playbooks/roles/lego/files/lego.sh
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,26 @@
 | 
			
		|||
#!/usr/bin/env sh
 | 
			
		||||
 | 
			
		||||
set -a
 | 
			
		||||
. ./service.env
 | 
			
		||||
set +a
 | 
			
		||||
 | 
			
		||||
domain="$1"
 | 
			
		||||
action="run"
 | 
			
		||||
 | 
			
		||||
exisiting_domains=$(docker compose run --rm app list -n)
 | 
			
		||||
 | 
			
		||||
if echo "$exisiting_domains" | grep -q "$domain";
 | 
			
		||||
then
 | 
			
		||||
	action="renew"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
docker compose run --rm app \
 | 
			
		||||
	--domains "$domain" \
 | 
			
		||||
	"$action" \
 | 
			
		||||
	"--$action-hook" "/config/hook.sh"
 | 
			
		||||
 | 
			
		||||
if [ "$?" = "33" ] && [ -x "./hooks/$domain" ];
 | 
			
		||||
then
 | 
			
		||||
	echo "Running hook for $domain"
 | 
			
		||||
	"./hooks/$domain"
 | 
			
		||||
fi
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue