Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

async attribute no longer works for include_task #57051

Closed
trulex opened this issue May 28, 2019 · 2 comments
Closed

async attribute no longer works for include_task #57051

trulex opened this issue May 28, 2019 · 2 comments
Labels
affects_2.8 This issue/PR affects Ansible v2.8 bug This issue/PR relates to a bug. module This issue/PR relates to a module. python3 support:core This issue/PR relates to code supported by the Ansible Engineering Team. utilities Utilities category

Comments

@trulex
Copy link

trulex commented May 28, 2019

SUMMARY

Setting async attribute no longer works on include_tasks. Replacing include_tasks with include will fix the issues.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

include_tasks

ANSIBLE VERSION
ansible 2.8.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/darko/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.7.3 (default, Mar 26 2019, 21:43:19) [GCC 8.2.1 20181127]
CONFIGURATION

OS / ENVIRONMENT

Arch Linux

STEPS TO REPRODUCE

ansible-playbook async.yml

async.yml

---
- hosts: localhost
  tasks:
    - name: async task
      include_tasks: "included.yml"
      async: 600
...

included.yml

---
- name: test connection
  ping:
...
EXPECTED RESULTS

Playbook executes without error like in older versions of ansible.

ACTUAL RESULTS
ERROR! 'async' is not a valid attribute for a TaskInclude

The error appears to be in 'async.yml': line 4, column 7, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

  tasks:
    - name: async task
      ^ here

@ansibot
Copy link
Contributor

ansibot commented May 28, 2019

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibot ansibot added affects_2.8 This issue/PR affects Ansible v2.8 bug This issue/PR relates to a bug. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. python3 support:core This issue/PR relates to code supported by the Ansible Engineering Team. utilities Utilities category labels May 28, 2019
@bcoca bcoca removed the needs_triage Needs a first human triage before being processed. label May 28, 2019
@bcoca
Copy link
Member

bcoca commented May 28, 2019

Possible Misunderstanding

Hi!

Thanks very much for your submission to Ansible. It sincerely means a lot to us.

We believe the ticket you have filed is being somewhat misunderstood, as one thing works a little differently than stated.

The async keyword never worked with include_tasks and was silently ignored, in 2.8 we added an explicit error to warn the playbook authors about that fact.

In the future, this might be a topic more well suited for the user list, which you can also post here if you'd like some more help with the above.

Thank you once again for this and your interest in Ansible!

@bcoca bcoca closed this as completed May 28, 2019
@ansible ansible locked and limited conversation to collaborators Aug 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.8 This issue/PR affects Ansible v2.8 bug This issue/PR relates to a bug. module This issue/PR relates to a module. python3 support:core This issue/PR relates to code supported by the Ansible Engineering Team. utilities Utilities category
Projects
None yet
Development

No branches or pull requests

3 participants