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
68535533
Commit
68535533
authored
Jun 25, 2013
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3343 from j2sol/add_host_changed
add_host should not be a changed action
parents
6304b7e7
e1dd83f2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
2 deletions
+1
-2
lib/ansible/runner/action_plugins/add_host.py
+1
-2
No files found.
lib/ansible/runner/action_plugins/add_host.py
View file @
68535533
...
@@ -46,7 +46,7 @@ class ActionModule(object):
...
@@ -46,7 +46,7 @@ class ActionModule(object):
if
not
'hostname'
in
args
and
not
'name'
in
args
:
if
not
'hostname'
in
args
and
not
'name'
in
args
:
raise
ae
(
"'name' is a required argument."
)
raise
ae
(
"'name' is a required argument."
)
result
=
{
'changed'
:
True
}
result
=
{}
# Parse out any hostname:port patterns
# Parse out any hostname:port patterns
new_name
=
args
.
get
(
'name'
,
args
.
get
(
'hostname'
,
None
))
new_name
=
args
.
get
(
'name'
,
args
.
get
(
'hostname'
,
None
))
...
@@ -69,7 +69,6 @@ class ActionModule(object):
...
@@ -69,7 +69,6 @@ class ActionModule(object):
# add the new host to the 'all' group
# add the new host to the 'all' group
allgroup
=
inventory
.
get_group
(
'all'
)
allgroup
=
inventory
.
get_group
(
'all'
)
allgroup
.
add_host
(
new_host
)
allgroup
.
add_host
(
new_host
)
result
[
'changed'
]
=
True
groupnames
=
args
.
get
(
'groupname'
,
args
.
get
(
'groups'
,
''
))
groupnames
=
args
.
get
(
'groupname'
,
args
.
get
(
'groups'
,
''
))
# add it to the group if that was specified
# add it to the group if that was specified
...
...
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