mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #1547 from dagwieers/action-boolean
Bail out if an action is not a string
This commit is contained in:
commit
c9ae19c44c
1 changed files with 4 additions and 0 deletions
|
@ -127,6 +127,10 @@ class Task(object):
|
||||||
|
|
||||||
self.ignore_errors = ds.get('ignore_errors', False)
|
self.ignore_errors = ds.get('ignore_errors', False)
|
||||||
|
|
||||||
|
# action should be a string
|
||||||
|
if not isinstance(self.action, basestring):
|
||||||
|
raise errors.AnsibleError("action is of type '%s' and not a string in task. name: %s" % (type(self.action).__name__, self.name))
|
||||||
|
|
||||||
# notify can be a string or a list, store as a list
|
# notify can be a string or a list, store as a list
|
||||||
if isinstance(self.notify, basestring):
|
if isinstance(self.notify, basestring):
|
||||||
self.notify = [ self.notify ]
|
self.notify = [ self.notify ]
|
||||||
|
|
Loading…
Reference in a new issue