From 5d4c73e197aef33b078b0ed38758ab82cc42dca9 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Wed, 1 May 2019 14:47:50 -0400 Subject: [PATCH] unite poll defaults (#55470) * unite poll defaults and update docs --- changelogs/fragments/align_poll_defaults.yml | 2 ++ docs/docsite/rst/user_guide/playbooks_async.rst | 2 +- lib/ansible/playbook/task.py | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/align_poll_defaults.yml diff --git a/changelogs/fragments/align_poll_defaults.yml b/changelogs/fragments/align_poll_defaults.yml new file mode 100644 index 00000000000..5ab46df984e --- /dev/null +++ b/changelogs/fragments/align_poll_defaults.yml @@ -0,0 +1,2 @@ +bugfixes: + - Use async poll default setting for play tasks also, previouslly in only affected adhoc ansible. diff --git a/docs/docsite/rst/user_guide/playbooks_async.rst b/docs/docsite/rst/user_guide/playbooks_async.rst index b385749e19e..99b4d1e670b 100644 --- a/docs/docsite/rst/user_guide/playbooks_async.rst +++ b/docs/docsite/rst/user_guide/playbooks_async.rst @@ -21,7 +21,7 @@ In this case, however, `async` explicitly sets the timeout you wish to apply to To launch a task asynchronously, specify its maximum runtime and how frequently you would like to poll for status. The default -poll value is 15 seconds if you do not specify a value for `poll`:: +poll value is set by the ``DEFAULT_POLL_INTERVAL`` setting if you do not specify a value for `poll`:: --- diff --git a/lib/ansible/playbook/task.py b/lib/ansible/playbook/task.py index 4854801dc6d..6380b300c7d 100644 --- a/lib/ansible/playbook/task.py +++ b/lib/ansible/playbook/task.py @@ -79,7 +79,7 @@ class Task(Base, Conditional, Taggable, CollectionSearch): _loop = FieldAttribute() _loop_control = FieldAttribute(isa='class', class_type=LoopControl, inherit=False) _notify = FieldAttribute(isa='list') - _poll = FieldAttribute(isa='int', default=10) + _poll = FieldAttribute(isa='int', default=C.DEFAULT_POLL_INTERVAL) _register = FieldAttribute(isa='string', static=True) _retries = FieldAttribute(isa='int', default=3) _until = FieldAttribute(isa='list', default=list)