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

group_vars: host_vars: warn for non-yaml files in dirs #18128

Closed
wants to merge 2 commits into from
Closed

group_vars: host_vars: warn for non-yaml files in dirs #18128

wants to merge 2 commits into from

Conversation

resmo
Copy link
Contributor

@resmo resmo commented Oct 20, 2016

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

host_vars, group_vars

ANSIBLE VERSION
devel, 2.2, 2.1
SUMMARY

fixes #17968
ignore warn for files without a known yaml extension in group_/host_vars if directories like group_vars/group/... are used.

@jhawkesworth
Copy link
Contributor

I don't think the documentation is consistent about using extensions for host_vars / group_vars.
For example here on the best practices page:
http://docs.ansible.com/ansible/playbooks_best_practices.html#variables-and-vaults

This change would mean I would have to change all the files in my group_vars folders.

Perhaps a warning if backup file names, say those containing ~ are found in group vars / host vars would be a practical compromise?

@resmo
Copy link
Contributor Author

resmo commented Oct 20, 2016

I don't see any conflicts with the best practice guide,"...create two files named vars and vault...", that still works as these files have no extension.

But I would say this commit has some potential to break certain setups. A compromise of adding a warning would be an option of course.

@resmo resmo changed the title group_vars: host_vars: fix ignore non-yaml files in dirs group_vars: host_vars: warn for non-yaml files in dirs Oct 20, 2016
@ansibot ansibot added affects_2.3 This issue/PR affects Ansible v2.3 bugfix_pullrequest labels Dec 13, 2016
@ansibot ansibot added 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. and removed 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. labels Dec 16, 2016
@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Jan 2, 2017
@bjolivot
Copy link
Contributor

bot_status

@ansibot
Copy link
Contributor

ansibot commented Feb 27, 2017

waiting_on: ansible
component: None
supported_by: core
changes_requested_by: null
needs_info: False
needs_revision: False
needs_rebase: False
merge_commits: []
mergeable_state: clean
shippable_status: success
maintainer_shipits: False
community_shipits: False
ansible_shipits: False
shipit_actors: None

click here for bot help

@bcoca
Copy link
Member

bcoca commented Feb 27, 2017

this does not seem like the right fix, it seems to compensate for the extension filter being broken, we shoudl fix that instead.

@bcoca bcoca added the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Feb 27, 2017
@ansibot ansibot added the affects_2.4 This issue/PR affects Ansible v2.4 label Mar 23, 2017
@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 Apr 11, 2017
@resmo resmo closed this Jun 15, 2017
@resmo resmo deleted the fix/17968 branch June 15, 2017 06:59
@ansibot ansibot added bug This issue/PR relates to a bug. and removed bugfix_pull_request labels Mar 5, 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.3 This issue/PR affects Ansible v2.3 affects_2.4 This issue/PR affects Ansible v2.4 bug This issue/PR relates to a bug. in progress needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested.
Projects
None yet
6 participants