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
49a66018
Commit
49a66018
authored
Jul 27, 2015
by
James Cammarata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Further cleanup of internal use of ansible_ssh_host
parent
ee835ff7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
10 deletions
+3
-10
lib/ansible/inventory/host.py
+0
-7
lib/ansible/inventory/ini.py
+3
-3
No files found.
lib/ansible/inventory/host.py
View file @
49a66018
...
...
@@ -121,13 +121,6 @@ class Host:
results
=
combine_vars
(
results
,
self
.
vars
)
results
[
'inventory_hostname'
]
=
self
.
name
results
[
'inventory_hostname_short'
]
=
self
.
name
.
split
(
'.'
)[
0
]
if
'ansible_ssh_host'
not
in
results
:
results
[
'ansible_ssh_host'
]
=
self
.
ipv4_address
if
'ansible_ssh_port'
not
in
results
:
results
[
'ansible_ssh_port'
]
=
C
.
DEFAULT_REMOTE_PORT
results
[
'group_names'
]
=
sorted
([
g
.
name
for
g
in
groups
if
g
.
name
!=
'all'
])
return
results
lib/ansible/inventory/ini.py
View file @
49a66018
...
...
@@ -146,10 +146,10 @@ class InventoryParser(object):
(
k
,
v
)
=
t
.
split
(
"="
,
1
)
except
ValueError
,
e
:
raise
AnsibleError
(
"Invalid ini entry in
%
s:
%
s -
%
s"
%
(
self
.
filename
,
t
,
str
(
e
)))
v
=
self
.
_parse_value
(
v
)
if
k
==
'ansible_ssh_host'
:
host
.
ipv4_address
=
self
.
_parse_value
(
v
)
else
:
host
.
set_variable
(
k
,
self
.
_parse_value
(
v
))
host
.
ipv4_address
=
v
host
.
set_variable
(
k
,
v
)
self
.
groups
[
active_group_name
]
.
add_host
(
host
)
# [southeast:children]
...
...
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