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
d5f20e6b
Commit
d5f20e6b
authored
Sep 26, 2013
by
James Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Optionally display Skipping [host] messages.
parent
0ee236bf
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
0 deletions
+7
-0
examples/ansible.cfg
+5
-0
lib/ansible/callbacks.py
+1
-0
lib/ansible/constants.py
+1
-0
No files found.
examples/ansible.cfg
View file @
d5f20e6b
...
@@ -72,6 +72,11 @@ timeout = 10
...
@@ -72,6 +72,11 @@ timeout = 10
# replacing {file}, {host} and {uid} and strftime codes with proper values.
# replacing {file}, {host} and {uid} and strftime codes with proper values.
ansible_managed = Ansible managed: {file} modified on %Y-%m-%d %H:%M:%S by {uid} on {host}
ansible_managed = Ansible managed: {file} modified on %Y-%m-%d %H:%M:%S by {uid} on {host}
# by default, ansible-playbook will display "Skipping [host]" if it determines a task
# should not be run on a host. Set this to "no" if you don't want to see these "Skipping"
# messages.
# display_skipped_hosts: yes
# by default (as of 1.3), Ansible will raise errors when attempting to dereference
# by default (as of 1.3), Ansible will raise errors when attempting to dereference
# Jinja2 variables that are not set in templates or action lines. Uncomment this line
# Jinja2 variables that are not set in templates or action lines. Uncomment this line
# to revert the behavior to pre-1.3.
# to revert the behavior to pre-1.3.
...
...
lib/ansible/callbacks.py
View file @
d5f20e6b
...
@@ -519,6 +519,7 @@ class PlaybookRunnerCallbacks(DefaultRunnerCallbacks):
...
@@ -519,6 +519,7 @@ class PlaybookRunnerCallbacks(DefaultRunnerCallbacks):
super
(
PlaybookRunnerCallbacks
,
self
)
.
on_error
(
host
,
err
)
super
(
PlaybookRunnerCallbacks
,
self
)
.
on_error
(
host
,
err
)
def
on_skipped
(
self
,
host
,
item
=
None
):
def
on_skipped
(
self
,
host
,
item
=
None
):
if
constants
.
DISPLAY_SKIPPED_HOSTS
:
msg
=
''
msg
=
''
if
item
:
if
item
:
msg
=
"skipping: [
%
s] => (item=
%
s)"
%
(
host
,
item
)
msg
=
"skipping: [
%
s] => (item=
%
s)"
%
(
host
,
item
)
...
...
lib/ansible/constants.py
View file @
d5f20e6b
...
@@ -130,6 +130,7 @@ DEFAULT_LOG_PATH = shell_expand_path(get_config(p, DEFAULTS, 'log_
...
@@ -130,6 +130,7 @@ DEFAULT_LOG_PATH = shell_expand_path(get_config(p, DEFAULTS, 'log_
ANSIBLE_NOCOLOR
=
get_config
(
p
,
DEFAULTS
,
'nocolor'
,
'ANSIBLE_NOCOLOR'
,
None
,
boolean
=
True
)
ANSIBLE_NOCOLOR
=
get_config
(
p
,
DEFAULTS
,
'nocolor'
,
'ANSIBLE_NOCOLOR'
,
None
,
boolean
=
True
)
ANSIBLE_NOCOWS
=
get_config
(
p
,
DEFAULTS
,
'nocows'
,
'ANSIBLE_NOCOWS'
,
None
,
boolean
=
True
)
ANSIBLE_NOCOWS
=
get_config
(
p
,
DEFAULTS
,
'nocows'
,
'ANSIBLE_NOCOWS'
,
None
,
boolean
=
True
)
DISPLAY_SKIPPED_HOSTS
=
get_config
(
p
,
DEFAULTS
,
'display_skipped_hosts'
,
'DISPLAY_SKIPPED_HOSTS'
,
True
,
boolean
=
True
)
ANSIBLE_SSH_ARGS
=
get_config
(
p
,
'ssh_connection'
,
'ssh_args'
,
'ANSIBLE_SSH_ARGS'
,
None
)
ANSIBLE_SSH_ARGS
=
get_config
(
p
,
'ssh_connection'
,
'ssh_args'
,
'ANSIBLE_SSH_ARGS'
,
None
)
ANSIBLE_SSH_CONTROL_PATH
=
get_config
(
p
,
'ssh_connection'
,
'control_path'
,
'ANSIBLE_SSH_CONTROL_PATH'
,
"
%(directory)
s/ansible-ssh-
%%
h-
%%
p-
%%
r"
)
ANSIBLE_SSH_CONTROL_PATH
=
get_config
(
p
,
'ssh_connection'
,
'control_path'
,
'ANSIBLE_SSH_CONTROL_PATH'
,
"
%(directory)
s/ansible-ssh-
%%
h-
%%
p-
%%
r"
)
PARAMIKO_RECORD_HOST_KEYS
=
get_config
(
p
,
'paramiko_connection'
,
'record_host_keys'
,
'ANSIBLE_PARAMIKO_RECORD_HOST_KEYS'
,
True
,
boolean
=
True
)
PARAMIKO_RECORD_HOST_KEYS
=
get_config
(
p
,
'paramiko_connection'
,
'record_host_keys'
,
'ANSIBLE_PARAMIKO_RECORD_HOST_KEYS'
,
True
,
boolean
=
True
)
...
...
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