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

Deprecate DISPLAY_SKIPPED_HOSTS in favor of ANSIBLE_ prefix #52967

Closed
jamescassell opened this issue Feb 26, 2019 · 2 comments · Fixed by #54272
Closed

Deprecate DISPLAY_SKIPPED_HOSTS in favor of ANSIBLE_ prefix #52967

jamescassell opened this issue Feb 26, 2019 · 2 comments · Fixed by #54272
Labels
affects_2.7 This issue/PR affects Ansible v2.7 bug This issue/PR relates to a bug. python3 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.

Comments

@jamescassell
Copy link
Contributor

SUMMARY

Most (all?) environment variables that configure ansible are prefixed with ANSIBLE_ which makes it easy to search for these, and unset them as the case requires. A notable exception is DISPLAY_SKIPPED_HOSTS which has been around forever but has not seen much use until recently due to the actionable and skippy stdout_callback plugins being available to implement the functionality.

I propose to deprecate this and any other env vars that don't start w/ ANSIBLE_ and make the ANSIBLE_ version override if both are defined.

Turns out it was in commit d5f20e6 that DISPLAY_SKIPPED_HOSTS was added. At that time, it was the only env var in lib/ansible/constants.py to NOT start with ANSIBLE_

ISSUE TYPE
  • Bug Report
COMPONENT NAME

default callback plugin
skippy
actionable

ANSIBLE VERSION
ansible 2.7.7
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.7.2 (default, Jan 16 2019, 19:49:22) [GCC 8.2.1 20181215 (Red Hat 8.2.1-6)]
CONFIGURATION

OS / ENVIRONMENT

Fedora 29

STEPS TO REPRODUCE
EXPECTED RESULTS

All ansible environment vars start with ANSIBLE_

ACTUAL RESULTS

At least one environment variable doesn't start with ANSIBLE_


@ansibot
Copy link
Contributor

ansibot commented Feb 26, 2019

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibot ansibot added affects_2.7 This issue/PR affects Ansible v2.7 bug This issue/PR relates to a bug. needs_triage Needs a first human triage before being processed. python3 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 Feb 26, 2019
@jamescassell
Copy link
Contributor Author

[14:42] cyberpear> IMO, if ansible is defining a var, it should start w/ ANSIBLE_, but if it's leveraging someone else's var, the name of that var is beyond the scoep
[14:43] bcoca> fine with me
[14:43] felixfontein> (which is not really optimal, since for example some docker TLS related env variables are interpreted differently by ansible, docker-py and docker cli.)
[14:43] nitzmahone> yeah, much less chance of unintentional collision
[14:43] sdoran> Changing that variable name is fine provided we keep the existing one working.
[14:43] bcoca> sdoran: easy to do and even show deprecation
[14:43] sdoran> cyberpear: +1
[14:43] bcoca> config api allows for it
[14:43] sdoran> Sweet. :)
[14:44] bcoca> +0 .. mostly cause its not a priority imho, but fine if someone puts the time in
[14:44] bcoca> anyone against?
[14:44] sivel> Nope
[14:44] sdoran> Nope. PRs welcome.
[14:44] bcoca> motion passes!

@sivel sivel removed the needs_triage Needs a first human triage before being processed. label Feb 26, 2019
t2d added a commit to systemli/ansible-drift that referenced this issue Jul 4, 2019
@ansible ansible locked and limited conversation to collaborators Jul 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.7 This issue/PR affects Ansible v2.7 bug This issue/PR relates to a bug. python3 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 a pull request may close this issue.

3 participants