Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Anders Blomdell
hostinfo
Commits
2468a959
Commit
2468a959
authored
Jan 30, 2017
by
Anders Blomdell
Browse files
Generate zone files for domains with only mailhost in them
parent
c3f7a419
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/hostinfo/named.py
View file @
2468a959
...
...
@@ -232,6 +232,12 @@ def generate_forward(tree, hosts):
for
c
in
tree
.
_subnet_
.
_cname_
:
result
[
c
.
domain
[
1
]].
add_host
(
c
.
alias
[
0
],
c
.
ttl
[
0
],
'CNAME'
,
c
.
name
[
0
])
pass
# Add mx hosts
for
m
in
tree
.
_host_
.
_interface_
.
_mailhost_
:
# Force generation of domain file even if only mailhost present
result
[
m
.
domain
[
0
]]
pass
# Add numbered hosts
def
add_host
(
domain
,
name
,
ttl
,
address
):
if
address
.
version
==
4
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment