Add warning when running devel (#67502)

* Add warning when running devel. Addresses #67362

* Add config entry to disable devel warning, so it doesn't impact CI

* Update warning about using devel
pull/67590/head
Matt Martz 4 years ago committed by GitHub
parent 3aae025cce
commit c61c0f7ad5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -88,7 +88,7 @@ Which Ansible version to install is based on your particular needs. You can choo
.. note::
You should only run Ansible from ``devel`` if you are actively developing content for Ansible. This is a rapidly changing source of code and can become unstable at any point.
You should only run Ansible from ``devel`` if you are modifying the Ansible engine, or trying out features under development. This is a rapidly changing source of code and can become unstable at any point.
Ansible creates new releases two to three times a year. Due to this short release cycle,
@ -363,7 +363,7 @@ Running Ansible from source (devel)
.. note::
You should only run Ansible from ``devel`` if you are actively developing content for Ansible. This is a rapidly changing source of code and can become unstable at any point.
You should only run Ansible from ``devel`` if you are modifying the Ansible engine, or trying out features under development. This is a rapidly changing source of code and can become unstable at any point.
Ansible is easy to run from source. You do not need ``root`` permissions
to use it and there is no software to actually install. No daemons

@ -70,6 +70,13 @@ class CLI(with_metaclass(ABCMeta, object)):
self.parser = None
self.callback = callback
if C.DEVEL_WARNING and __version__.endswith('dev0'):
display.warning(
'You are running the development version of Ansible. You should only run Ansible from "devel" if '
'you are modifying the Ansible engine, or trying out features under development. This is a rapidly '
'changing source of code and can become unstable at any point.'
)
@abstractmethod
def run(self):
"""Run the ansible command

@ -1227,6 +1227,14 @@ DEPRECATION_WARNINGS:
ini:
- {key: deprecation_warnings, section: defaults}
type: boolean
DEVEL_WARNING:
nane: Running devel warning
default: True
description: Toggle to control showing warnings related to running devel
env: [{name: ANSIBLE_DEVEL_WARNING}]
ini:
- {key: devel_warning, section: defaults}
type: boolean
DIFF_ALWAYS:
name: Show differences
default: False

@ -71,6 +71,7 @@ def ansible_environment(args, color=True, ansible_config=None):
ANSIBLE_RETRY_FILES_ENABLED='false',
ANSIBLE_CONFIG=ansible_config,
ANSIBLE_LIBRARY='/dev/null',
ANSIBLE_DEVEL_WARNING='false', # Don't show warnings that CI is running devel
PYTHONPATH=get_ansible_python_path(),
PAGER='/bin/cat',
PATH=path,

Loading…
Cancel
Save