2014-11-14 22:14:08 +00:00
|
|
|
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
|
|
|
|
#
|
|
|
|
# This file is part of Ansible
|
|
|
|
#
|
|
|
|
# Ansible is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# Ansible is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
2015-04-13 20:28:01 +00:00
|
|
|
from __future__ import (absolute_import, division, print_function)
|
|
|
|
__metaclass__ = type
|
2014-11-14 22:14:08 +00:00
|
|
|
|
|
|
|
from ansible.plugins.action import ActionBase
|
|
|
|
|
|
|
|
class ActionModule(ActionBase):
|
|
|
|
|
|
|
|
def run(self, tmp=None, task_vars=dict()):
|
|
|
|
|
2015-08-01 03:34:26 +00:00
|
|
|
results = self._execute_module(tmp=tmp, task_vars=task_vars)
|
2014-11-14 22:14:08 +00:00
|
|
|
|
2015-07-17 16:02:26 +00:00
|
|
|
# Remove special fields from the result, which can only be set
|
|
|
|
# internally by the executor engine. We do this only here in
|
|
|
|
# the 'normal' action, as other action plugins may set this.
|
2015-07-17 18:44:05 +00:00
|
|
|
for field in ('ansible_notify',):
|
2015-07-17 16:02:26 +00:00
|
|
|
if field in results:
|
|
|
|
results.pop(field)
|
2014-11-14 22:14:08 +00:00
|
|
|
|
2015-07-17 16:02:26 +00:00
|
|
|
return results
|