Verified Commit 29682789 authored by Giancarlo Razzolini's avatar Giancarlo Razzolini
Browse files

roles/archweb: Added missing defaults and also added a rsync service to sync the isos from orion.

parent f9c3e76a
......@@ -4,11 +4,15 @@ archweb_domain: 'www.archlinux.org'
archweb_alternate_domains: ['archlinux.org']
archweb_site: true
archweb_mirrorcheck: false
archweb_mirrorresolv: false
archweb_pgp_import: false
archweb_populate_signoffs: false
archweb_keyring: '/etc/pacman.d/gnupg/pubring.gpg'
archweb_reporead: false
archweb_services: false
archweb_forced_deploy: false
archweb_rsync_iso_origin: 'repos.archlinux.org::kitchensink/iso/'
archweb_rsync_iso_dir: '/srv/ftp/iso/'
archweb_db: 'archweb'
archweb_db_host: 'localhost'
......
......@@ -23,6 +23,10 @@
file: path=/var/log/nginx/{{ archweb_domain }} state=directory owner=http group=log mode=755
when: archweb_site
- name: make rsync iso dir
file: path={{ archweb_rsync_iso_dir }} state=directory owner=archweb group=archweb
when: archweb_site
- name: clone archweb repo
git: repo=git://git.archlinux.org/archweb.git dest="{{ archweb_dir }}"
become: true
......@@ -168,6 +172,18 @@
- daemon reload
when: archweb_site
- name: install archweb rsync iso service
template: src="archweb-rsync_iso.service.j2" dest="/etc/systemd/system/archweb-rsync_iso.service" owner=root group=root mode=0644
notify:
- daemon reload
when: archweb_site
- name: install archweb rsync iso timer
template: src="archweb-rsync_iso.timer.j2" dest="/etc/systemd/system/archweb-rsync_iso.timer" owner=root group=root mode=0644
notify:
- daemon reload
when: archweb_site
- name: deploy archweb
template: src=archweb.ini.j2 dest=/etc/uwsgi/vassals/archweb.ini owner=archweb group=http mode=0644
when: archweb_site
......@@ -183,6 +199,10 @@
service: name="archweb-memcached.service" enabled=yes state=started
when: archweb_site
- name: start and enable archweb rsync iso timer
service: name="archweb-rsync_iso.timer" enabled=yes state=started
when: archweb_site
- name: start and enable archweb reporead service
service: name="archweb-reporead.service" enabled=yes state=started
when: archweb_services or archweb_reporead
......
[Unit]
Description=archweb rsync iso service
After=network.target
[Service]
Type=oneshot
User=archweb
ExecStart=/usr/bin/rsync -rtlHq --delete-delay --delay-updates --safe-links --timeout=600 --contimeout=60 {{ archweb_rsync_iso_origin }} {{ archweb_rsync_iso_dir }}
[Install]
WantedBy=multi-user.target
[Unit]
Description=archweb rsync iso timer
[Timer]
OnUnitActiveSec=1h
OnBootSec=10min
RandomizedDelaySec=5min
[Install]
WantedBy=timers.target
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment