Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
6069ff6e
Commit
6069ff6e
authored
Apr 30, 2014
by
James Cammarata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding a new system_warnings config option to supress warnings
parent
bf7c51ad
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
3 deletions
+34
-3
docsite/rst/intro_configuration.rst
+13
-0
examples/ansible.cfg
+11
-0
lib/ansible/constants.py
+1
-0
lib/ansible/utils/__init__.py
+9
-3
No files found.
docsite/rst/intro_configuration.rst
View file @
6069ff6e
...
...
@@ -477,6 +477,19 @@ playbook. The default is the most logical: 'root'::
sudo_user=root
.. _system_warnings:
system_warnings
===============
.. versionadded:: 1.6
Allows disabling of warnings related to potential issues on the system running ansible itself (not on the managed hosts)::
system_warnings = True
These may include warnings about 3rd party packages or other conditions that should be resolved if possible.
.. _timeout:
timeout
...
...
examples/ansible.cfg
View file @
6069ff6e
...
...
@@ -91,6 +91,17 @@ ansible_managed = Ansible managed: {file} modified on %Y-%m-%d %H:%M:%S by {uid}
# to revert the behavior to pre-1.3.
#error_on_undefined_vars = False
# by default (as of 1.6), Ansible may display warnings based on the configuration of the
# system running ansible itself. This may include warnings about 3rd party packages or
# other conditions that should be resolved if possible.
# to disable these warnings, set the following value to False:
#system_warnings = True
# by default (as of 1.4), Ansible may display deprecation warnings for language
# features that should no longer be used and will be removed in future versions.
# to disable these warnings, set the following value to False:
#deprecation_warnings = True
# set plugin path directories here, separate with colons
action_plugins = /usr/share/ansible_plugins/action_plugins
callback_plugins = /usr/share/ansible_plugins/callback_plugins
...
...
lib/ansible/constants.py
View file @
6069ff6e
...
...
@@ -150,6 +150,7 @@ ANSIBLE_NOCOWS = get_config(p, DEFAULTS, 'nocows', 'ANSIBLE_NOCO
DISPLAY_SKIPPED_HOSTS
=
get_config
(
p
,
DEFAULTS
,
'display_skipped_hosts'
,
'DISPLAY_SKIPPED_HOSTS'
,
True
,
boolean
=
True
)
DEFAULT_UNDEFINED_VAR_BEHAVIOR
=
get_config
(
p
,
DEFAULTS
,
'error_on_undefined_vars'
,
'ANSIBLE_ERROR_ON_UNDEFINED_VARS'
,
True
,
boolean
=
True
)
HOST_KEY_CHECKING
=
get_config
(
p
,
DEFAULTS
,
'host_key_checking'
,
'ANSIBLE_HOST_KEY_CHECKING'
,
True
,
boolean
=
True
)
SYSTEM_WARNINGS
=
get_config
(
p
,
DEFAULTS
,
'system_warnings'
,
'ANSIBLE_SYSTEM_WARNINGS'
,
True
,
boolean
=
True
)
DEPRECATION_WARNINGS
=
get_config
(
p
,
DEFAULTS
,
'deprecation_warnings'
,
'ANSIBLE_DEPRECATION_WARNINGS'
,
True
,
boolean
=
True
)
# CONNECTION RELATED
...
...
lib/ansible/utils/__init__.py
View file @
6069ff6e
...
...
@@ -44,7 +44,6 @@ import getpass
import
sys
import
textwrap
import
json
import
warnings
#import vault
from
vault
import
VaultLib
...
...
@@ -83,8 +82,11 @@ try:
import
keyczar.errors
as
key_errors
from
keyczar.keys
import
AesKey
except
PowmInsecureWarning
:
display
(
"The version of gmp you have installed has a known issue regarding timing vulnerabilities when used with pycrypto. "
+
\
"If possible, you should update it (ie. yum update gmp)."
,
color
=
"purple"
,
stderr
=
True
)
system_warning
(
"The version of gmp you have installed has a known issue regarding "
+
\
"timing vulnerabilities when used with pycrypto. "
+
\
"If possible, you should update it (ie. yum update gmp)."
)
warnings
.
resetwarnings
()
warnings
.
simplefilter
(
"ignore"
)
import
keyczar.errors
as
key_errors
...
...
@@ -1155,6 +1157,10 @@ def warning(msg):
display
(
new_msg
,
color
=
'bright purple'
,
stderr
=
True
)
warns
[
new_msg
]
=
1
def
system_warning
(
msg
):
if
C
.
SYSTEM_WARNINGS
:
warning
(
msg
)
def
combine_vars
(
a
,
b
):
if
C
.
DEFAULT_HASH_BEHAVIOUR
==
"merge"
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment