Improve dnsconfig a bit
This commit is contained in:
		
							parent
							
								
									53d9cd1190
								
							
						
					
					
						commit
						6fadc45e24
					
				
					 5 changed files with 20 additions and 9 deletions
				
			
		
							
								
								
									
										7
									
								
								Makefile
									
										
									
									
									
								
							
							
						
						
									
										7
									
								
								Makefile
									
										
									
									
									
								
							|  | @ -23,7 +23,7 @@ PWD := $(shell pwd) | |||
| ./dns/services.json: ./inventory/group_vars/all/all_services.yml | ||||
| 	ansible-playbook \
 | ||||
| 		-e services_json_file=$(PWD)/dns/services.json \
 | ||||
| 		playbooks/create_services_for_dnscontrol.yml | ||||
| 		playbooks/create-services-for-dnscontrol.yml | ||||
| 
 | ||||
| ./dns/dkim-ses.json: .FORCE | ||||
| 	tofu output --json aws_ses_dkim \
 | ||||
|  | @ -50,9 +50,12 @@ dns: output-dns | |||
| dns-check: output-dns | ||||
| 	dnscontrol check-creds ovh | ||||
| 
 | ||||
| all: | ||||
| tofu-dns: | ||||
| 	$(MAKE) tofu | ||||
| 	$(MAKE) dns | ||||
| 
 | ||||
| all: | ||||
| 	$(MAKE) tofu-dns | ||||
| 	@printf "\n=====\n\n" | ||||
| 	ansible-playbook ./playbooks/stop-and-backup-unused.yml -t $(TAGS) | ||||
| 	ansible-playbook ./playbooks/serguzim.net.yml -t $(TAGS) | ||||
|  |  | |||
|  | @ -28,10 +28,18 @@ function collect_services(domain) { | |||
| } | ||||
| 
 | ||||
| function my_host_record(target, host) { | ||||
| 	return [ | ||||
| 		A(target, host.ipv4_address), | ||||
| 		AAAA(target, host.ipv6_address) | ||||
| 	]; | ||||
| 	switch (target) { | ||||
| 		case "db": | ||||
| 			return [ | ||||
| 				A(target, host.ipv4_address_vpn), | ||||
| 				AAAA(target, host.ipv6_address_vpn) | ||||
| 			]; | ||||
| 		default: | ||||
| 			return [ | ||||
| 				A(target, host.ipv4_address), | ||||
| 				AAAA(target, host.ipv6_address) | ||||
| 			]; | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| function verify_amazon_ses(dkims) { | ||||
|  |  | |||
|  | @ -81,10 +81,7 @@ D("serguzim.me", REG_OVH, DnsProvider(DSP_OVH), | |||
| 
 | ||||
| 	NS("acme", services["acme_dns"].resolve_host().fqdn + "."), | ||||
| 
 | ||||
| 	CNAME("db", "node002.vpn.serguzim.net."), | ||||
| 
 | ||||
| 	// Other records
 | ||||
| 	A("loetlabor", "141.23.124.187"), | ||||
| 	A("ls", "62.141.37.39"), | ||||
| 	A("test", "62.141.37.39"), | ||||
| 	CNAME("cloud", "nx45221.your-storageshare.de.") | ||||
|  |  | |||
|  | @ -336,6 +336,9 @@ services = { | |||
| 
 | ||||
|   "postgresql" = { | ||||
|     host = "node002" | ||||
|     dns = [{ | ||||
|       domain = "db.serguzim.me" | ||||
|     }] | ||||
|     backup = [{ | ||||
|       name = "postgresql" | ||||
|       type = "hook" | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue