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

script plugin should fail when used with async #23729

Closed
fridim opened this issue Apr 19, 2017 · 1 comment · Fixed by #23748 or #23818
Closed

script plugin should fail when used with async #23729

fridim opened this issue Apr 19, 2017 · 1 comment · Fixed by #23748 or #23818
Labels
affects_2.4 This issue/PR affects Ansible v2.4 bug This issue/PR relates to a bug. module This issue/PR relates to a module.

Comments

@fridim
Copy link
Contributor

fridim commented Apr 19, 2017

Before the refactoring of async : c86a17b : using async with script returns an error
After: async param ignored.

see also #20232

ISSUE TYPE
  • Bug Report
COMPONENT NAME

plugins/action/script.py

ANSIBLE VERSION
ansible 2.4.0 (devel a06014663c) last updated 2017/04/18 10:08:09 (GMT +200)
  config file =
  configured module search path = ['/home/fridim/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/fridim/sync/dev/ansible/lib/ansible
  executable location = /home/fridim/sync/dev/ansible/bin/ansible
  python version = 3.6.0 (default, Jan 16 2017, 12:12:55) [GCC 6.3.1 20170109]
CONFIGURATION
OS / ENVIRONMENT
SUMMARY

Using async with script should fail, but it's ignored.

STEPS TO REPRODUCE
- hosts: localhost
  gather_facts: no
  connection: local
  tasks:
    - copy:
        dest: /tmp/script.sh
        content: |-
          #!/bin/bash
          sleep 200
    - name: bla
      script: /tmp/script.sh
      async: 2
      poll: 1
EXPECTED RESULTS
fatal: [localhost]: FAILED! => {"failed": true, "msg": "async mode is not supported with the script module"}
ACTUAL RESULTS

async ignored

@ansibot ansibot added affects_2.4 This issue/PR affects Ansible v2.4 bug_report module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. labels Apr 19, 2017
fridim added a commit to fridim/ansible that referenced this issue Apr 19, 2017
following refactoring of async : c86a17b

when call to ActionBase.run returns a skipped result,
return directly in ActionModule.run

Restore previous behavior when misuse of async in modules not
supporting async: fail with msg

fixes ansible#23729
@fridim
Copy link
Contributor Author

fridim commented Apr 19, 2017

affects_2.3 as well

@bcoca bcoca removed the needs_triage Needs a first human triage before being processed. label Apr 19, 2017
bcoca added a commit to bcoca/ansible that referenced this issue Apr 19, 2017
bcoca added a commit that referenced this issue Apr 20, 2017
bcoca added a commit that referenced this issue Apr 20, 2017
fridim added a commit to fridim/ansible that referenced this issue Apr 21, 2017
bcoca pushed a commit that referenced this issue Apr 21, 2017
@ansibot ansibot added bug This issue/PR relates to a bug. and removed bug_report labels Mar 7, 2018
@ansible ansible locked and limited conversation to collaborators Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.4 This issue/PR affects Ansible v2.4 bug This issue/PR relates to a bug. module This issue/PR relates to a module.
Projects
None yet
3 participants