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

Inv output templates #72499

Draft
wants to merge 2 commits into
base: devel
Choose a base branch
from
Draft

Inv output templates #72499

wants to merge 2 commits into from

Conversation

bcoca
Copy link
Member

@bcoca bcoca commented Nov 5, 2020

Allow for templatable output so users can expand w/o having to hardcode new options.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

ansible-inventory

@ansibot ansibot added affects_2.11 core_review In order to be merged, this PR must follow the core review workflow. feature This issue/PR relates to a feature request. inventory Inventory category 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 Nov 5, 2020
@ansibot
Copy link
Contributor

ansibot commented Nov 5, 2020

The test ansible-test sanity --test pylint [explain] failed with 5 errors:

lib/ansible/cli/inventory.py:158:25: bad-whitespace: Exactly one space required after assignment                 template =  'yaml.j2'                          ^
lib/ansible/cli/inventory.py:160:25: bad-whitespace: Exactly one space required after assignment                 template =  'toml.j2'                          ^
lib/ansible/cli/inventory.py:162:25: bad-whitespace: Exactly one space required after assignment                 template =  'json.j2'                          ^
lib/ansible/cli/inventory.py:168:21: bad-whitespace: Exactly one space required after assignment             template =  'graph.j2'                      ^
lib/ansible/cli/inventory.py:223:31: bad-whitespace: No space allowed before comma                 for ext in ('' , '.j2'):                                ^

The test ansible-test sanity --test package-data [explain] failed with 8 errors:

lib/ansible/inventory/templates/graph.j2:0:0: File not installed
lib/ansible/inventory/templates/graph.j2:0:0: File was not added to sdist
lib/ansible/inventory/templates/json.j2:0:0: File not installed
lib/ansible/inventory/templates/json.j2:0:0: File was not added to sdist
lib/ansible/inventory/templates/toml.j2:0:0: File not installed
lib/ansible/inventory/templates/toml.j2:0:0: File was not added to sdist
lib/ansible/inventory/templates/yaml.j2:0:0: File not installed
lib/ansible/inventory/templates/yaml.j2:0:0: File was not added to sdist

The test ansible-test sanity --test no-unwanted-files [explain] failed with 4 errors:

lib/ansible/inventory/templates/graph.j2:0:0: extension must be one of: .cs, .ps1, .psm1, .py
lib/ansible/inventory/templates/json.j2:0:0: extension must be one of: .cs, .ps1, .psm1, .py
lib/ansible/inventory/templates/toml.j2:0:0: extension must be one of: .cs, .ps1, .psm1, .py
lib/ansible/inventory/templates/yaml.j2:0:0: extension must be one of: .cs, .ps1, .psm1, .py

The test ansible-test sanity --test pep8 [explain] failed with 11 errors:

lib/ansible/cli/inventory.py:85:9: E265: block comment should start with '# '
lib/ansible/cli/inventory.py:95:9: E265: block comment should start with '# '
lib/ansible/cli/inventory.py:158:27: E222: multiple spaces after operator
lib/ansible/cli/inventory.py:160:27: E222: multiple spaces after operator
lib/ansible/cli/inventory.py:162:27: E222: multiple spaces after operator
lib/ansible/cli/inventory.py:163:17: E265: block comment should start with '# '
lib/ansible/cli/inventory.py:164:17: E265: block comment should start with '# '
lib/ansible/cli/inventory.py:165:17: E265: block comment should start with '# '
lib/ansible/cli/inventory.py:168:23: E222: multiple spaces after operator
lib/ansible/cli/inventory.py:203:66: E231: missing whitespace after ':'
lib/ansible/cli/inventory.py:223:31: E203: whitespace before ','

click here for bot help

@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. labels Nov 5, 2020
@mattclay mattclay removed the needs_triage Needs a first human triage before being processed. label Nov 5, 2020
@samdoran samdoran added the ci_verified Changes made in this PR are causing tests to fail. label Nov 6, 2020
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Nov 14, 2020
@ansibot ansibot added pre_azp This PR was last tested before migration to Azure Pipelines. and removed ci_verified Changes made in this PR are causing tests to fail. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Dec 8, 2020
@ansibot ansibot added the WIP This issue/PR is a work in progress. Nevertheless it was shared for getting input from peers. label Feb 16, 2021
@ansibot ansibot added the needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html label Mar 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects_2.11 feature This issue/PR relates to a feature request. inventory Inventory category needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. pre_azp This PR was last tested before migration to Azure Pipelines. 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. WIP This issue/PR is a work in progress. Nevertheless it was shared for getting input from peers.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants