diff --git a/playbooks/groups/batcave.yml b/playbooks/groups/batcave.yml index 1c2e49305a..9571a5adb6 100644 --- a/playbooks/groups/batcave.yml +++ b/playbooks/groups/batcave.yml @@ -20,6 +20,9 @@ - ansible-server - sudo - collectd/base + - cgit/base + - cgit/clean_lock_cron + - cgit/make_pkgs_list - apache - httpd/mod_ssl - { role: httpd/certificate, name: wildcard-2014.fedorapeople.org, SSLCertificateChainFile: wildcard-2014.fedorapeople.org.intermediate.cert } diff --git a/roles/batcave/tasks/main.yml b/roles/batcave/tasks/main.yml index 5aa6af8525..cdcfec60e8 100644 --- a/roles/batcave/tasks/main.yml +++ b/roles/batcave/tasks/main.yml @@ -67,9 +67,6 @@ # include scripts::fedmsgAnnounceCommits # include scripts::ansible-playbook-check-diff # include scripts::public-db-copy -# -# include cgit::cgit -# include cgit::clean-lock-cron # include ansible_utils::ansible_utils # # include repo2json diff --git a/roles/cgit/base/files/cgitrc.lockbox01 b/roles/cgit/base/files/cgitrc.lockbox01 new file mode 100644 index 0000000000..f6a27db225 --- /dev/null +++ b/roles/cgit/base/files/cgitrc.lockbox01 @@ -0,0 +1,71 @@ +# +# See cgitrc(5) or /usr/share/doc/cgit-*/cgitrc.5.html for details +# + +# Enable caching of up to 1000 output entries +cache-size=1000 + +# Specify some default clone prefixes +clone-prefix=https://infrastructure.fedoraproject.org/infra + +# Specify the css url +css=/cgit-data/cgit.css + +# Show extra links for each repository on the index page +enable-index-links=1 + +# Enable ASCII art commit history graph on the log pages +enable-commit-graph=1 + +# Show number of affected files per commit on the log pages +enable-log-filecount=1 + +# Show number of added/removed lines per commit on the log pages +enable-log-linecount=1 + +# Add a cgit favicon +#favicon=/favicon.ico + +# Use a custom logo +logo=/cgit-data/cgit.png + +# Enable statistics per week, month and quarter +max-stats=quarter + +# Set the title and heading of the repository index page +root-title=Fedora Project Infrastructure public GIT repositories + +# Set a subheading for the repository index page +#root-desc=tracking the foobar development + +# Include some more info about this site on the index page +#root-readme=/var/www/html/about.html + +# Allow download of tar.gz, tar.bz2 and zip-files +snapshots=tar.gz tar.xz zip + +## +## List of common mimetypes +## + +mimetype.gif=image/gif +mimetype.html=text/html +mimetype.jpg=image/jpeg +mimetype.jpeg=image/jpeg +mimetype.pdf=application/pdf +mimetype.png=image/png +mimetype.svg=image/svg+xml + +# Enable syntax highlighting (requires the highlight package) +source-filter=/usr/libexec/cgit/filters/syntax-highlighting.sh +email-filter=lua:/usr/libexec/cgit/filters/email-libravatar-korg.lua + + +## +## List of repositories. +## PS: Any repositories listed when section is unset will not be +## displayed under a section heading +## PPS: This list could be kept in a different file (e.g. '/etc/cgitrepos') +## and included like this: +project-list=/etc/cgit-projects-lockbox01 +scan-path=/srv/web/infra/ diff --git a/roles/cgit/base/tasks/main.yml b/roles/cgit/base/tasks/main.yml index c966ef049a..b5dfa72dfa 100644 --- a/roles/cgit/base/tasks/main.yml +++ b/roles/cgit/base/tasks/main.yml @@ -33,5 +33,9 @@ copy: src=cgitrc.people dest=/etc/cgitrc owner=root mode=0644 when: inventory_hostname.startswith('people') +- name: put cgitrc in place for batcave + copy: src=cgitrc.batcave dest=/etc/cgitrc owner=root mode=0644 + when: inventory_hostname.startswith('batcave') + #- name: install the libravatar filter # copy: src=email-libravatar-korg.lua dest=/usr/libexec/cgit/filters/email-libravatar-korg.lua owner=root group=root mode=0755 diff --git a/roles/cgit/make_pkgs_list/files/cgit-projects-batcave b/roles/cgit/make_pkgs_list/files/cgit-projects-batcave new file mode 100644 index 0000000000..83616055f2 --- /dev/null +++ b/roles/cgit/make_pkgs_list/files/cgit-projects-batcave @@ -0,0 +1,4 @@ +ansible.git +badges.git +dns.git +infra-docs.git diff --git a/roles/cgit/make_pkgs_list/tasks/main.yml b/roles/cgit/make_pkgs_list/tasks/main.yml index fafde2aa17..574a51199f 100644 --- a/roles/cgit/make_pkgs_list/tasks/main.yml +++ b/roles/cgit/make_pkgs_list/tasks/main.yml @@ -12,19 +12,26 @@ - name: install the script copy: src=make-cgit-pkgs-list.sh dest=/usr/local/bin/make-cgit-pkgs-list.sh mode=0755 - when: not inventory_hostname.startswith('people') + when: inventory_hostname.startswith('pkgs') - name: install the script for fedorapeople copy: src=make-people-git.sh dest=/usr/local/bin/make-people-git.sh mode=0755 when: inventory_hostname.startswith('people') +# +# For the batcave we just have a small static list +# +- name: install the file for batcave + copy: src=cgit-projects-batcave dest=/etc/cgit-projects-batcave mode=0644 + when: inventory_hostname.startswith('batcave') + - name: install the cron job cron: > name="make-cgit-pkgs-list" cron_file="ansible-make-cgit-pkgs-list" minute=*/10 user=root job="/usr/local/bin/lock-wrapper make-cgit-pkgs-list '/usr/local/bin/make-cgit-pkgs-list.sh | /usr/local/bin/nag-once make-cgit-pkgs-list 1d 2>&1'" - when: not inventory_hostname.startswith('people') + when: inventory_hostname.startswith('pkgs') - name: install the cron job for fedora people cgit cron: >