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
bc5a7fce
Commit
bc5a7fce
authored
Jul 17, 2015
by
Brian Coca
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #11616 from halberom/ssh_port
fixes 11607, override ansible_ssh_port in group/host_vars
parents
bb7f310e
d23ab261
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
lib/ansible/inventory/host.py
+4
-2
No files found.
lib/ansible/inventory/host.py
View file @
bc5a7fce
...
@@ -78,8 +78,6 @@ class Host:
...
@@ -78,8 +78,6 @@ class Host:
if
port
and
port
!=
C
.
DEFAULT_REMOTE_PORT
:
if
port
and
port
!=
C
.
DEFAULT_REMOTE_PORT
:
self
.
set_variable
(
'ansible_ssh_port'
,
int
(
port
))
self
.
set_variable
(
'ansible_ssh_port'
,
int
(
port
))
else
:
self
.
set_variable
(
'ansible_ssh_port'
,
C
.
DEFAULT_REMOTE_PORT
)
self
.
_gathered_facts
=
False
self
.
_gathered_facts
=
False
...
@@ -124,6 +122,10 @@ class Host:
...
@@ -124,6 +122,10 @@ class Host:
results
[
'inventory_hostname'
]
=
self
.
name
results
[
'inventory_hostname'
]
=
self
.
name
results
[
'inventory_hostname_short'
]
=
self
.
name
.
split
(
'.'
)[
0
]
results
[
'inventory_hostname_short'
]
=
self
.
name
.
split
(
'.'
)[
0
]
results
[
'ansible_ssh_host'
]
=
self
.
ipv4_address
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'
])
results
[
'group_names'
]
=
sorted
([
g
.
name
for
g
in
groups
if
g
.
name
!=
'all'
])
return
results
return
results
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