Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Arch Linux
infrastructure
Commits
1735bba6
Commit
1735bba6
authored
May 29, 2016
by
Sven-Hendrik Haase
Browse files
Add dbscripts role
parent
40074b4c
Changes
10
Hide whitespace changes
Inline
Side-by-side
playbooks/orion.yml
View file @
1735bba6
...
...
@@ -10,3 +10,4 @@
-
ssh_keys
-
{
role
:
borg-client
,
backup_host
:
"
borg@vostok.archlinux.org"
,
backup_dir
:
"
/backup/orion"
}
-
archusers
-
dbscripts
roles/dbscripts/files/cleanup.service
0 → 100644
View file @
1735bba6
[Unit]
Description
=
Cleanup
[Service]
Type
=
oneshot
User
=
cleanup
ExecStart
=
/usr/bin/bash -c '/srv/repos/svn-community/dbscripts/cron-jobs/ftpdir-cleanup 2>&1 | /srv/repos/svn-community/dbscripts/cron-jobs/devlist-mailer "Community Cleanup" "arch-notifications@archlinux.org"'
ExecStart
=
/usr/bin/bash -c '/srv/repos/svn-packages/dbscripts/cron-jobs/ftpdir-cleanup 2>&1 | /srv/repos/svn-packages/dbscripts/cron-jobs/devlist-mailer "Packages Cleanup" "arch-notifications@archlinux.org"'
roles/dbscripts/files/cleanup.timer
0 → 100644
View file @
1735bba6
[Unit]
Description=Cleanup
[Timer]
OnBootSec=15min
OnUnitActiveSec=3h
[Install]
WantedBy=timers.target
roles/dbscripts/files/integrity-check.service
0 → 100644
View file @
1735bba6
[Unit]
Description
=
Integrity Check
[Service]
Type
=
oneshot
User
=
svn-packages
ExecStart
=
/srv/repos/svn-packages/dbscripts/cron-jobs/integrity-check arch-notifications@archlinux.org,arch-dev-public@archlinux.org
roles/dbscripts/files/integrity-check.timer
0 → 100644
View file @
1735bba6
[Unit]
Description=Integrity Check
[Timer]
OnCalendar=weekly
Persistent=true
[Install]
WantedBy=timers.target
roles/dbscripts/files/lastsync.service
0 → 100644
View file @
1735bba6
[Unit]
Description
=
lastsync
[Service]
Type
=
oneshot
User
=
ftp
ExecStart
=
/usr/bin/bash -c "date '+\%s\' > /srv/ftp/lastsync"
roles/dbscripts/files/lastsync.timer
0 → 100644
View file @
1735bba6
[Unit]
Description=lastsync
[Timer]
OnBootSec=1min
OnUnitActiveSec=1min
[Install]
WantedBy=timers.target
roles/dbscripts/files/sourceballs.service
0 → 100644
View file @
1735bba6
[Unit]
Description
=
Sourceballs
[Service]
Type
=
oneshot
User
=
sourceballs
ExecStart
=
/usr/bin/bash -c '/srv/repos/svn-community/dbscripts/cron-jobs/sourceballs 2>&1 | /srv/repos/svn-community/dbscripts/cron-jobs/devlist-mailer "Community Sourceballs" "arch-notifications@archlinux.org"'
ExecStart
=
/usr/bin/bash -c '/srv/repos/svn-packages/dbscripts/cron-jobs/sourceballs 2>&1 | /srv/repos/svn-packages/dbscripts/cron-jobs/devlist-mailer "Packages Sourceballs" "arch-notifications@archlinux.org"'
ExecStart
=
/usr/bin/find /home/sourceballs/sources -type f -mtime +7 -delete
roles/dbscripts/files/sourceballs.timer
0 → 100644
View file @
1735bba6
[Unit]
Description=Sourceballs
[Timer]
OnBootSec=15min
OnUnitActiveSec=8h
[Install]
WantedBy=timers.target
roles/dbscripts/tasks/main.yml
0 → 100644
View file @
1735bba6
---
-
name
:
install svn and git
pacman
:
name=git,subversion state=present
-
name
:
create dbscripts users
user
:
name="{{ item }}" shell=/sbin/nologin
with_items
:
-
svn-packages
-
svn-community
-
sourceballs
-
cleanup
-
name
:
create dbscripts paths
file
:
path="{{ item }}" state=directory
with_items
:
-
/srv/repos/svn-community
-
/srv/repos/svn-packages
-
file
:
path="/srv/repos/svn-community/package-cleanup" state=directory owner=svn-community group=tu mode=0775
-
acl
:
name=/srv/repos/svn-community/package-cleanup entry="user:cleanup:rwx" state=present
-
acl
:
name=/srv/repos/svn-community/package-cleanup entry="default:user::rwx" state=present
-
acl
:
name=/srv/repos/svn-community/package-cleanup entry="default:user:cleanup:rwx" state=present
-
acl
:
name=/srv/repos/svn-community/package-cleanup entry="default:group::rwx" state=present
-
acl
:
name=/srv/repos/svn-community/package-cleanup entry="default:other::r-x" state=present
-
file
:
path="/srv/repos/svn-packages/package-cleanup" state=directory owner=svn-packages group=dev mode=0775
-
acl
:
name=/srv/repos/svn-packages/package-cleanup entry="user:cleanup:rwx" state=present
-
acl
:
name=/srv/repos/svn-packages/package-cleanup entry="default:user::rwx" state=present
-
acl
:
name=/srv/repos/svn-packages/package-cleanup entry="default:user:cleanup:rwx" state=present
-
acl
:
name=/srv/repos/svn-packages/package-cleanup entry="default:group::rwx" state=present
-
acl
:
name=/srv/repos/svn-packages/package-cleanup entry="default:other::r-x" state=present
-
file
:
path="/srv/repos/svn-community/source-cleanup" state=directory owner=sourceballs group=svn-community mode=0755
-
file
:
path="/srv/repos/svn-packages/source-cleanup" state=directory owner=sourceballs group=svn-packages mode=0755
-
file
:
path="/srv/repos/svn-community/svn" state=directory owner=svn-community group=svn-community mode=0755
-
acl
:
name=/srv/repos/svn-community/svn entry="default:user::rwx" state=present
-
acl
:
name=/srv/repos/svn-community/svn entry="default:group::r-x" state=present
-
acl
:
name=/srv/repos/svn-community/svn entry="default:other::r-x" state=present
-
file
:
path="/srv/repos/svn-packages/svn" state=directory owner=svn-packages group=svn-packages mode=0755
-
acl
:
name=/srv/repos/svn-packages/svn entry="default:user::rwx" state=present
-
acl
:
name=/srv/repos/svn-packages/svn entry="default:group::r-x" state=present
-
acl
:
name=/srv/repos/svn-packages/svn entry="default:other::r-x" state=present
-
file
:
path="/srv/repos/svn-community/tmp" state=directory owner=svn-community group=tu mode=1775
-
acl
:
name=/srv/repos/svn-community/tmp entry="user:sourceballs:rwx" state=present
-
file
:
path="/srv/repos/svn-packages/tmp" state=directory owner=svn-packages group=dev mode=1775
-
acl
:
name=/srv/repos/svn-packages/tmp entry="user:sourceballs:rwx" state=present
-
name
:
clone dbscripts git repo
git
:
dest=/srv/repos/{{ item }}/dbscripts repo=git://git.archlinux.org/dbscripts.git
with_items
:
-
svn-community
-
svn-packages
-
name
:
make /srv/svn
file
:
path=/srv/svn state=directory
-
name
:
symlink /srv/svn/community to /srv/repos/svn-community/svn
file
:
path=/srv/svn/community src=/srv/repos/svn-community/svn state=link
-
name
:
symlink /srv/svn/packages to /srv/repos/svn-packages/svn
file
:
path=/srv/svn/packages src=/srv/repos/svn-packages/svn state=link
-
name
:
symlink /community to /srv/repos/svn-community/dbscripts
file
:
path=/community src=/srv/repos/svn-community/dbscripts state=link
-
name
:
symlink /packages to /srv/repos/svn-packages/dbscripts
file
:
path=/packages src=/srv/repos/svn-packages state=link
-
name
:
install systemd timers
copy
:
src={{ item }} dest=/etc/systemd/system/{{ item }} owner=root group=root mode=644
with_items
:
-
cleanup.timer
-
cleanup.service
-
sourceballs.timer
-
sourceballs.service
-
integrity-check.timer
-
integrity-check.service
-
lastsync.timer
-
lastsync.service
-
name
:
activatre systemd timers
service
:
name={{ item }} enabled=yes state=started
with_items
:
-
cleanup.timer
-
sourceballs.timer
-
integrity-check.timer
-
lastsync.timer
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment