Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
network
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
infra
ansible-shared
network
Commits
2e5c8af4
Commit
2e5c8af4
authored
7 years ago
by
Robin Sonnabend
Browse files
Options
Downloads
Patches
Plain Diff
Silence mrtg warnings
parent
179e7e64
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
mrtg/files/tmpfiles.conf
+1
-0
1 addition, 0 deletions
mrtg/files/tmpfiles.conf
mrtg/handlers/main.yml
+5
-0
5 additions, 0 deletions
mrtg/handlers/main.yml
mrtg/tasks/main.yml
+11
-0
11 additions, 0 deletions
mrtg/tasks/main.yml
mrtg/tasks/weathermap.yml
+7
-0
7 additions, 0 deletions
mrtg/tasks/weathermap.yml
with
24 additions
and
0 deletions
mrtg/files/tmpfiles.conf
0 → 100644
+
1
−
0
View file @
2e5c8af4
d
/
run
/
lock
/
mrtg
0755
mrtg
mrtg
- -
This diff is collapsed.
Click to expand it.
mrtg/handlers/main.yml
0 → 100644
+
5
−
0
View file @
2e5c8af4
---
# file: shared-roles/network/mrtg/handlers/main.yml
-
name
:
create tmpfiles
shell
:
systemd-tmpfiles --create
This diff is collapsed.
Click to expand it.
mrtg/tasks/main.yml
+
11
−
0
View file @
2e5c8af4
...
@@ -27,6 +27,17 @@
...
@@ -27,6 +27,17 @@
file
:
path=/etc/mrtg.cfg group=mrtg
file
:
path=/etc/mrtg.cfg group=mrtg
tags
:
mrtg
tags
:
mrtg
-
name
:
ensure the mrtg user can get the lock
copy
:
src
:
tmpfiles.conf
dest
:
/etc/tmpfiles.d/10-mrtg.conf
owner
:
root
group
:
root
mode
:
0644
notify
:
-
create tmpfiles
tags
:
mrtg
-
name
:
create an index HTML page
-
name
:
create an index HTML page
command
:
"
indexmaker
--output
/var/www/mrtg/index.html
--title='Traffic
of
{{domain}}'
--columns=3
--pagetop='{%
for
switch
in
mrtg_switches
%}<a
href=
\"
index-{{switch['router']}}.html
\"
><b>{{switch['router']}}</b>.{{domain}}</a>
{%
endfor
%}
{%
if
use_weathermap
%}<a
href=
\"
weathermap.png
\"
>Weathermap</a>{%endif
%}'
/etc/mrtg.cfg"
command
:
"
indexmaker
--output
/var/www/mrtg/index.html
--title='Traffic
of
{{domain}}'
--columns=3
--pagetop='{%
for
switch
in
mrtg_switches
%}<a
href=
\"
index-{{switch['router']}}.html
\"
><b>{{switch['router']}}</b>.{{domain}}</a>
{%
endfor
%}
{%
if
use_weathermap
%}<a
href=
\"
weathermap.png
\"
>Weathermap</a>{%endif
%}'
/etc/mrtg.cfg"
become
:
yes
become
:
yes
...
...
This diff is collapsed.
Click to expand it.
mrtg/tasks/weathermap.yml
+
7
−
0
View file @
2e5c8af4
...
@@ -37,6 +37,13 @@
...
@@ -37,6 +37,13 @@
dest
:
/opt/
dest
:
/opt/
tags
:
weathermap
tags
:
weathermap
-
name
:
silence the weathermap rrdtool warning
lineinfile
:
path
:
/opt/weathermap/weathermap
regexp
:
'
\$rrdtool=\"[^"]*\";'
line
:
'
$rrdtool="/usr/sbin/nologin";'
tags
:
weathermap
-
name
:
create the weathermap config
-
name
:
create the weathermap config
script
:
"
makeweather.py
{{weathermap_placement_strategy}}"
script
:
"
makeweather.py
{{weathermap_placement_strategy}}"
tags
:
weathermap
tags
:
weathermap
...
...
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
register
or
sign in
to comment