From 04af56007938aa6d9e93d157511a6c9c33f90b53 Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Apr 21 2019 08:35:41 +0000 Subject: countdown.o.o: initial setup and rendering Setup everything needed for countdown.o.o (directory layout, packages, git clone, rendering cronjob etc.) Note that you'll need to run zypper in krb5 manually and resolve the conflict with krb5-mini. --- diff --git a/salt/profile/countdown/countdown.sls b/salt/profile/countdown/countdown.sls new file mode 100644 index 0000000..aa59f01 --- /dev/null +++ b/salt/profile/countdown/countdown.sls @@ -0,0 +1,49 @@ +countdown_packages: + pkg.installed: + - pkgs: + - adobe-sourcesanspro-fonts + - git + - google-opensans-fonts + - inkscape + - optipng + - rsync + +countdown: + user.present: + - fullname: countdown.o.o + - home: /srv/www/countdown.opensuse.org + +{% set countdown_dirs = ['/srv/www/countdown.opensuse.org', '/srv/www/countdown.opensuse.org/output', '/srv/www/countdown.opensuse.org/public'] %} + +{% for dir in countdown_dirs %} +{{ dir }}: + file.directory: + - user: countdown +{% endfor %} + +/etc/cron.d/countdown.opensuse.org: + file.managed: + - contents: + - '0 * * * * countdown /srv/www/countdown.opensuse.org/svg/cron.sh -G -E && rsync -a --delete-after /srv/www/countdown.opensuse.org/output/ /srv/www/countdown.opensuse.org/public/' + +cron: + service.running: + - enable: True + +countdown_git: + git.latest: + - name: https://github.com/openSUSE/countdown.o.o.git + - target: /srv/www/countdown.opensuse.org/git + - user: countdown + - force_reset: True + - require: + - pkg: countdown_packages + +# TODO (after Leap 15 release?): change path in countdown.o.o cron.sh and get rid of these symlinks +/home/counter.opensuse.org: + file.symlink: + - target: /srv/www/countdown.opensuse.org + +/srv/www/countdown.opensuse.org/svg: + file.symlink: + - target: /srv/www/countdown.opensuse.org/git diff --git a/salt/profile/countdown/init.sls b/salt/profile/countdown/init.sls new file mode 100644 index 0000000..820cab4 --- /dev/null +++ b/salt/profile/countdown/init.sls @@ -0,0 +1,2 @@ +include: + - profile.countdown.countdown