Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GAP Ansible Collection
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GÉANT Orchestration and Automation Team
GAP
GAP Ansible Collection
Commits
faac0025
Commit
faac0025
authored
4 months ago
by
Aleksandr Kurbatov
Browse files
Options
Downloads
Patches
Plain Diff
callback_plugin: difflib: ndiff -> context_diff
parent
2b09d888
No related branches found
No related tags found
1 merge request
!277
Add a custom callback plugin for managing logs
Pipeline
#95537
passed
4 months ago
Stage: linting
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
geant/gap_ansible/plugins/callback_plugins/filtering_syslog.py
+3
-3
3 additions, 3 deletions
.../gap_ansible/plugins/callback_plugins/filtering_syslog.py
with
3 additions
and
3 deletions
geant/gap_ansible/plugins/callback_plugins/filtering_syslog.py
+
3
−
3
View file @
faac0025
...
@@ -43,8 +43,8 @@ class CallbackModule(CallbackBase):
...
@@ -43,8 +43,8 @@ class CallbackModule(CallbackBase):
display
.
display
(
"
DIFF:
"
,
color
=
"
blue
"
)
display
.
display
(
"
DIFF:
"
,
color
=
"
blue
"
)
_before
=
result
.
_result
[
'
diff
'
][
'
before
'
]
_before
=
result
.
_result
[
'
diff
'
][
'
before
'
]
_after
=
result
.
_result
[
'
diff
'
][
'
after
'
]
_after
=
result
.
_result
[
'
diff
'
][
'
after
'
]
for
line
in
difflib
.
n
diff
(
_before
.
splitlines
(),
_after
.
splitlines
())
:
difference
=
difflib
.
context_
diff
(
_before
.
splitlines
(),
_after
.
splitlines
()
,
n
=
10
)
if
line
.
startswith
(
'
+
'
)
or
line
.
startswith
(
'
-
'
)
or
line
.
startswith
(
'
?
'
)
:
for
line
in
difference
:
display
.
display
(
line
)
display
.
display
(
line
)
# Display full result if not ok
# Display full result if not ok
...
...
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment