Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
ae865b94
Commit
ae865b94
authored
Sep 01, 2015
by
James Cammarata
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #12150 from opoplawski/cobbler
Fix setting dns_name in cobbler inventory
parents
a341a8a0
3b17efe5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
contrib/inventory/cobbler.py
+9
-2
No files found.
contrib/inventory/cobbler.py
View file @
ae865b94
...
...
@@ -169,8 +169,15 @@ class CobblerInventory(object):
dns_name
=
host
[
'hostname'
]
#None
ksmeta
=
None
interfaces
=
host
[
'interfaces'
]
if
dns_name
is
None
:
# hostname is often empty for non-static IP hosts
if
dns_name
==
''
:
for
(
iname
,
ivalue
)
in
interfaces
.
iteritems
():
if
ivalue
[
'management'
]
or
not
ivalue
[
'static'
]:
this_dns_name
=
ivalue
.
get
(
'dns_name'
,
None
)
if
this_dns_name
is
not
None
and
this_dns_name
is
not
""
:
dns_name
=
this_dns_name
if
dns_name
==
''
:
continue
status
=
host
[
'status'
]
...
...
Write
Preview
Markdown
is supported
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