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
22e3c389
Commit
22e3c389
authored
Apr 16, 2013
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use platform.node() for the hostname, leave fqdn calculated the same way
parent
6a005137
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
library/setup
+2
-2
No files found.
library/setup
View file @
22e3c389
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
#
#
# This file is part of Ansible
#
n
This file is part of Ansible
#
#
# Ansible is free software: you can redistribute it and/or modify
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# it under the terms of the GNU General Public License as published by
...
@@ -139,7 +139,7 @@ class Facts(object):
...
@@ -139,7 +139,7 @@ class Facts(object):
self
.
facts
[
'machine'
]
=
platform
.
machine
()
self
.
facts
[
'machine'
]
=
platform
.
machine
()
self
.
facts
[
'python_version'
]
=
platform
.
python_version
()
self
.
facts
[
'python_version'
]
=
platform
.
python_version
()
self
.
facts
[
'fqdn'
]
=
socket
.
getfqdn
()
self
.
facts
[
'fqdn'
]
=
socket
.
getfqdn
()
self
.
facts
[
'hostname'
]
=
self
.
facts
[
'fqdn'
]
.
split
(
'.'
)[
0
]
self
.
facts
[
'hostname'
]
=
platform
.
node
()
self
.
facts
[
'domain'
]
=
'.'
.
join
(
self
.
facts
[
'fqdn'
]
.
split
(
'.'
)[
1
:])
self
.
facts
[
'domain'
]
=
'.'
.
join
(
self
.
facts
[
'fqdn'
]
.
split
(
'.'
)[
1
:])
if
self
.
facts
[
'machine'
]
==
'x86_64'
:
if
self
.
facts
[
'machine'
]
==
'x86_64'
:
self
.
facts
[
'architecture'
]
=
self
.
facts
[
'machine'
]
self
.
facts
[
'architecture'
]
=
self
.
facts
[
'machine'
]
...
...
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