mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-31 02:03:20 -04:00 
			
		
		
		
	Almost 100% mechanical change, except the fact that import/import.md is moved to import/README.md No content changes. Signed-off-by: Miek Gieben <miek@miek.nl>
		
			
				
	
	
		
			104 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			Groff
		
	
	
	
	
	
			
		
		
	
	
			104 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			Groff
		
	
	
	
	
	
| .\" generated with Ronn/v0.7.3
 | |
| .\" http://github.com/rtomayko/ronn/tree/0.7.3
 | |
| .
 | |
| .TH "COREDNS\-IMPORT" "7" "January 2019" "CoreDNS" "CoreDNS plugins"
 | |
| .
 | |
| .SH "NAME"
 | |
| \fIimport\fR \- include files or reference snippets from a Corefile\.
 | |
| .
 | |
| .SH "DESCRIPTION"
 | |
| The \fIimport\fR plugin can be used to incude files into the main configuration\. Another use it to reference predefined snippets\. Both can help to avoid some duplication\.
 | |
| .
 | |
| .P
 | |
| This is a unique directive in that \fIimport\fR can appear outside of a server block\. In other words, it can appear at the top of a Corefile where an address would normally be\.
 | |
| .
 | |
| .SH "SYNTAX"
 | |
| .
 | |
| .nf
 | |
| 
 | |
| import PATTERN
 | |
| .
 | |
| .fi
 | |
| .
 | |
| .IP "\(bu" 4
 | |
| \fBPATTERN\fR is the file, glob pattern (\fB*\fR) or snippet to include\. Its contents will replace this line, as if that file\'s contents appeared here to begin with\.
 | |
| .
 | |
| .IP "" 0
 | |
| .
 | |
| .SH "FILES"
 | |
| You can use \fIimport\fR to include a file or files\. This file\'s location is relative to the Corefile\'s location\. It is an error if a specific file cannot be found, but an empty glob pattern is not an error\.
 | |
| .
 | |
| .SH "SNIPPETS"
 | |
| You can define snippets to be reused later in your Corefile by defining a block with a single\-token label surrounded by parentheses:
 | |
| .
 | |
| .IP "" 4
 | |
| .
 | |
| .nf
 | |
| 
 | |
| (mysnippet) {
 | |
|     \.\.\.
 | |
| }
 | |
| .
 | |
| .fi
 | |
| .
 | |
| .IP "" 0
 | |
| .
 | |
| .P
 | |
| Then you can invoke the snippet with \fIimport\fR:
 | |
| .
 | |
| .IP "" 4
 | |
| .
 | |
| .nf
 | |
| 
 | |
| import mysnippet
 | |
| .
 | |
| .fi
 | |
| .
 | |
| .IP "" 0
 | |
| .
 | |
| .SH "EXAMPLES"
 | |
| Import a shared configuration:
 | |
| .
 | |
| .IP "" 4
 | |
| .
 | |
| .nf
 | |
| 
 | |
| \&\. {
 | |
|    import config/common\.conf
 | |
| }
 | |
| .
 | |
| .fi
 | |
| .
 | |
| .IP "" 0
 | |
| .
 | |
| .P
 | |
| Where \fBconfig/common\.conf\fR contains:
 | |
| .
 | |
| .IP "" 4
 | |
| .
 | |
| .nf
 | |
| 
 | |
| prometheus
 | |
| errors
 | |
| log
 | |
| .
 | |
| .fi
 | |
| .
 | |
| .IP "" 0
 | |
| .
 | |
| .P
 | |
| This imports files found in the zones directory:
 | |
| .
 | |
| .IP "" 4
 | |
| .
 | |
| .nf
 | |
| 
 | |
| import \.\./zones/*
 | |
| .
 | |
| .fi
 | |
| .
 | |
| .IP "" 0
 | |
| .
 | |
| .SH "ALSO SEE"
 | |
| See corefile(5)\.
 |