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
0c70e898
Commit
0c70e898
authored
Nov 15, 2013
by
Rene Moser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
host: fix bug, alias was not removed
parent
6da2d550
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
library/system/host
+3
-5
No files found.
library/system/host
View file @
0c70e898
...
...
@@ -116,14 +116,12 @@ class Host(object):
# only look at aliases if we found hostname or ip
if
self
.
_hostname_matches
or
self
.
_ip_matches
:
if
self
.
aliases
and
self
.
aliases
==
aliases
:
if
self
.
aliases
==
aliases
:
self
.
_aliases_matches
=
True
break
def
full_entry_exists
(
self
):
if
self
.
aliases
and
not
self
.
_aliases_matches
:
return
False
return
self
.
_ip_matches
and
self
.
_hostname_matches
return
self
.
_ip_matches
and
self
.
_hostname_matches
and
self
.
_aliases_matches
def
entry_exists
(
self
):
return
self
.
_ip_matches
or
self
.
_hostname_matches
...
...
@@ -154,7 +152,7 @@ def main():
state
=
dict
(
default
=
'present'
,
choices
=
[
'present'
,
'absent'
],
type
=
'str'
),
ip
=
dict
(
default
=
None
,
type
=
'str'
),
hostname
=
dict
(
default
=
None
,
type
=
'str'
),
aliases
=
dict
(
default
=
None
,
type
=
'str'
),
aliases
=
dict
(
default
=
''
,
type
=
'str'
),
),
supports_check_mode
=
True
)
...
...
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