Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
supplemental
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
infra
ansible-shared
supplemental
Commits
854c8ed2
Commit
854c8ed2
authored
7 years ago
by
Lars Beckers
Browse files
Options
Downloads
Patches
Plain Diff
add debian-updates role
parent
f9c5a039
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
debian-updates/tasks/main.yml
+62
-0
62 additions, 0 deletions
debian-updates/tasks/main.yml
debian-updates/templates/config.py.j2
+11
-0
11 additions, 0 deletions
debian-updates/templates/config.py.j2
with
73 additions
and
0 deletions
debian-updates/tasks/main.yml
0 → 100644
+
62
−
0
View file @
854c8ed2
---
# file: supplemental/debian-updates/tasks/main.yml
-
name
:
ensure the deploy key is available
copy
:
src
:
"
{{
debupdates_deploy_key
}}"
dest
:
/root/.ssh/debian_updates
owner
:
root
group
:
root
mode
:
0600
tags
:
-
debian-updates
-
name
:
ensure the git is at the current revision
git
:
repo
:
git@git.fsmpi.rwth-aachen.de:larsb/debian-updates.git
dest
:
/opt/debian-updates
key_file
:
/root/.ssh/debian_updates
version
:
HEAD
tags
:
-
debian-updates
-
name
:
ensure the data file exists
copy
:
src
:
/opt/debian-updates/apticron.json.example
dest
:
/opt/debian-updates/apticron.json
mode
:
0644
owner
:
root
group
:
root
remote_src
:
True
force
:
False
tags
:
-
debian-updates
-
name
:
ensure our config is deployed
template
:
src
:
config.py.j2
dest
:
/opt/debian-updates/config.py
mode
:
0644
owner
:
root
group
:
root
tags
:
-
debian-updates
-
name
:
ensure daily notification
file
:
state
:
link
path
:
/etc/cron.daily/debian-update-notifier
src
:
/opt/debian-updates/notify.py
tags
:
-
debian-updates
-
name
:
ensure apticron messages are retrieved
lineinfile
:
line
:
'
{{
apticron_to|regex_replace("@.*$")
}}:"|/opt/debian-updates/receive.py"'
path
:
/etc/aliases
state
:
present
notify
:
-
rebuild alias database
tags
:
-
debian-updates
This diff is collapsed.
Click to expand it.
debian-updates/templates/config.py.j2
0 → 100644
+
11
−
0
View file @
854c8ed2
import datetime
lock_file = '/opt/debian-updates/.json-sync.lock'
report_file = '/opt/debian-updates/apticron.json'
tracker_file = '/opt/debian-updates/security.json'
notify_subject = '{{ (domain|splitext|first).upper() }} daily update report on '+str(datetime.date.today())
notify_from = '{{ debupdates_from }}'
notify_recipient = ['{{ debupdates_to|join("', '") }}']
notify_header = 'Debian Update Notifier/v0.1'
mail_host = 'localhost'
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