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

Make ansible adhoc work with include_role #56163

Merged
merged 2 commits into from May 8, 2019

Conversation

willthames
Copy link
Contributor

SUMMARY

Fix logic condition so that include_role works
without

ERROR! 'async_val' is not a valid attribute for a IncludeRole

The error appears to be in 'None': line 0, column 0, but may
be elsewhere in the file depending on the exact syntax problem.

(could not open file to display line)
ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

ansible cli

ADDITIONAL INFORMATION

Before

$ ansible -m include_role -a name=test -vv localhost
ansible 2.9.0.dev0
  config file = None
  configured module search path = [u'/Users/will/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/will/src/ansible/lib/ansible
  executable location = /Users/will/src/ansible/bin/ansible
  python version = 2.7.15 (default, Oct  2 2018, 11:47:18) [GCC 4.2.1 Compatible Apple LLVM 10.0.0 (clang-1000.11.45.2)]
No config file found; using defaults
 [WARNING]: No inventory was parsed, only implicit localhost is available

ERROR! 'async_val' is not a valid attribute for a IncludeRole

The error appears to be in 'None': line 0, column 0, but may
be elsewhere in the file depending on the exact syntax problem.

(could not open file to display line)

After

$ ansible -m include_role -a name=test -vv localhost
ansible 2.9.0.dev0
  config file = None
  configured module search path = [u'/Users/will/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/will/src/ansible/lib/ansible
  executable location = /Users/will/src/ansible/bin/ansible
  python version = 2.7.15 (default, Oct  2 2018, 11:47:18) [GCC 4.2.1 Compatible Apple LLVM 10.0.0 (clang-1000.11.45.2)]
No config file found; using defaults
 [WARNING]: No inventory was parsed, only implicit localhost is available

META: ran handlers
localhost | SUCCESS => {
    "changed": false, 
    "include_args": {
        "name": "test"
    }
}
localhost | SUCCESS => {
    "msg": "Hello, world!"
}
META: ran handlers
META: ran handlers

Fix logic condition so that include_role works
without

```
ERROR! 'async_val' is not a valid attribute for a IncludeRole

The error appears to be in 'None': line 0, column 0, but may
be elsewhere in the file depending on the exact syntax problem.

(could not open file to display line)
```
@willthames
Copy link
Contributor Author

Needs backporting onto 2.8

@ansibot ansibot added affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. needs_triage Needs a first human triage before being processed. support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels May 7, 2019
@bcoca
Copy link
Member

bcoca commented May 7, 2019

change looks good, but we should also add test (which i should have done in #49247 or when i actually enabled include_role and would have avoided the break from #46177

@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels May 8, 2019
@bcoca bcoca removed the needs_triage Needs a first human triage before being processed. label May 8, 2019
@bcoca bcoca merged commit cd95843 into ansible:devel May 8, 2019
willthames added a commit to willthames/ansible that referenced this pull request May 23, 2019
* Make ansible adhoc work with include_role

Fix logic condition so that include_role works
without

```
ERROR! 'async_val' is not a valid attribute for a IncludeRole

The error appears to be in 'None': line 0, column 0, but may
be elsewhere in the file depending on the exact syntax problem.

(could not open file to display line)
```

* Add include_role test for adhoc

(cherry picked from commit cd95843)
abadger pushed a commit that referenced this pull request May 24, 2019
* Make ansible adhoc work with include_role

Fix logic condition so that include_role works
without

```
ERROR! 'async_val' is not a valid attribute for a IncludeRole

The error appears to be in 'None': line 0, column 0, but may
be elsewhere in the file depending on the exact syntax problem.

(could not open file to display line)
```

* Add include_role test for adhoc

(cherry picked from commit cd95843)
@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.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants