taskotron-master: try using tmpfiles.d for cleaning dirs

This commit is contained in:
Martin Krizek 2016-05-12 08:43:34 +00:00
parent e3ff30b3ef
commit 25774406c3
4 changed files with 12 additions and 6 deletions

View file

@ -18,3 +18,8 @@
- name: copy tmpwatch cronjob for taskotron artifacts and buildmaster
template: src=taskotron-tmpwatch.cron.j2 dest=/etc/cron.d/taskotron-tmpwatch.cron owner=root group=root mode=0644
when: deployment_type in ['stg', 'prod', 'local']
- name: copy tmpfiles.d for artifacts and buildmaster
template: src=tmpfiles.d.buildmaster.conf.j2 dest=/etc/tmpfiles.d/buildmaster.conf owner=root group=root mode=0644
when: deployment_type in ['dev']

View file

@ -0,0 +1,4 @@
d /srv/taskotron/artifacts 0775 buildmaster buildmaster 120d
d /srv/buildmaster/master/x86_64 0700 buildmaster buildmaster 120d
d /srv/buildmaster/master/i386 0700 buildmaster buildmaster 120d
d /srv/buildmaster/master/all 0700 buildmaster buildmaster 120d

View file

@ -52,12 +52,8 @@
job="wget -O {{ trigger_critpath_file }} {{ trigger_critpath_url }}"
when: deployment_type in ['dev']
- name: create a cronjob to clear distgit cache
cron:
name="clear distgit cache"
special_time=daily
user=fedmsg
job="tmpwatch -vv --dirmtime -m -f 12h {{ trigger_cache_dir }}"
- name: copy tmpfiles.d for trigger distgit cache
template: src=tmpfiles.d.trigger.conf.j2 dest=/etc/tmpfiles.d/trigger.conf owner=root group=root mode=0644
when: deployment_type in ['dev']
- name: start and enable fedmsg-hub service

View file

@ -0,0 +1 @@
d /var/lib/taskotron-trigger/cache 0755 fedmsg fedmsg 12h