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

schema[playbook]: $[1].order 'inventory' is not one of ['default', 'sorted', 'reverse_sorted', 'reverse_inventory', 'shuffle'] #4163

Closed
RayJin2000 opened this issue May 15, 2024 · 0 comments · Fixed by #4182
Assignees
Labels

Comments

@RayJin2000
Copy link

Summary

If you use 'inventory' as playbook order value you get the following error:

schema[playbook]: $[1].order 'inventory' is not one of ['default', 'sorted', 'reverse_sorted', 'reverse_inventory', 'shuffle']

See: https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_strategies.html#ordering-execution-based-on-inventory

Workaround: use default instead of inventory

Issue Type
  • Bug Report
OS / ENVIRONMENT
ansible-lint --version
ansible-lint 24.2.3 using ansible-core:2.16.6 ansible-compat:4.1.11 ruamel-yaml:0.18.6 ruamel-yaml-clib:0.2.7
STEPS TO REPRODUCE
- name: Test
  hosts: localhost
  order: inventory
  gather_facts: false
 > ansible-lint playbooks/test.yml --fix
WARNING  Listing 1 violation(s) that are fatal
schema[playbook]: $[0].order 'inventory' is not one of ['default', 'sorted', 'reverse_sorted', 'reverse_inventory', 'shuffle']
playbooks/test.yml:1  Returned errors will not include exact line numbers, but they will mention
the schema name being used as a tag, like ``schema[playbook]``,
``schema[tasks]``.

This rule is not skippable and stops further processing of the file.

If incorrect schema was picked, you might want to either:

* move the file to standard location, so its file is detected correctly.
* use ``kinds:`` option in linter config to help it pick correct file type.


Read documentation for instructions on how to ignore specific rule violations.

Modified 1 files.
               Rule Violation Summary                
 count tag              profile rule associated tags 
     1 schema[playbook] basic   core                 

Failed: 1 failure(s), 0 warning(s) on 1 files. Last profile that met the validation criteria was 'min'.
@RayJin2000 RayJin2000 added bug new Triage required labels May 15, 2024
@ssbarnea ssbarnea self-assigned this May 22, 2024
@ssbarnea ssbarnea removed the new Triage required label May 22, 2024
ssbarnea added a commit that referenced this issue May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants