From 67479739140852e886d62880dfad97c6849036d2 Mon Sep 17 00:00:00 2001 From: Ricky Elrod Date: Fri, 25 Aug 2017 22:42:33 +0000 Subject: Fix log names on kojipkgs by making it a template Signed-off-by: Ricky Elrod --- roles/kojipkgs/files/kojipkgs.conf | 132 --------------------------------- roles/kojipkgs/tasks/main.yml | 10 ++- roles/kojipkgs/templates/kojipkgs.conf | 132 +++++++++++++++++++++++++++++++++ 3 files changed, 141 insertions(+), 133 deletions(-) delete mode 100644 roles/kojipkgs/files/kojipkgs.conf create mode 100644 roles/kojipkgs/templates/kojipkgs.conf diff --git a/roles/kojipkgs/files/kojipkgs.conf b/roles/kojipkgs/files/kojipkgs.conf deleted file mode 100644 index 588f6b1f7..000000000 --- a/roles/kojipkgs/files/kojipkgs.conf +++ /dev/null @@ -1,132 +0,0 @@ -ServerName https://kojipkgs.fedoraproject.org -MaxRequestWorkers 512 -ServerLimit 512 - -RequestHeader unset Accept-Encoding early - -CustomLog "| /usr/sbin/rotatelogs /var/log/httpd/kojipkgs01.fedoraproject.org-access.log.%Y-%m-%d 86400" combined -ErrorLog "| /usr/sbin/rotatelogs /var/log/httpd/kojipkgs01.fedoraproject.org-error.log.%Y-%m-%d 86400" - -Alias /atomic /mnt/fedora_koji/koji/atomic - - - Options Indexes FollowSymLinks - IndexOptions NameWidth=* FancyIndexing - FileETag None - Require all granted - - -Alias /atomic-cd /mnt/fedora_koji/koji/atomic-cd - - - Options Indexes FollowSymLinks - IndexOptions NameWidth=* FancyIndexing - FileETag None - Require all granted - - -Alias /packages /mnt/fedora_koji/koji/packages -Alias /toplink/packages /mnt/fedora_koji/koji/packages - - - Options Indexes FollowSymLinks - IndexOptions NameWidth=* FancyIndexing - FileETag None - Require all granted - - -Alias /repos-dist /mnt/fedora_koji/koji/repos-dist - - - Options Indexes FollowSymLinks - IndexOptions NameWidth=* FancyIndexing - FileETag None - Require all granted - - -Alias /repos /mnt/fedora_koji/koji/repos - - - Options Indexes FollowSymLinks - IndexOptions NameWidth=* FancyIndexing - FileETag None - Require all granted - - -Alias /scratch /mnt/fedora_koji/koji/scratch - - - Options Indexes FollowSymLinks - IndexOptions NameWidth=* FancyIndexing - FileETag None - Require all granted - - -Alias /work /mnt/fedora_koji/koji/work - - - Options Indexes FollowSymLinks - IndexOptions NameWidth=* FancyIndexing - FileETag None - Require all granted - - -Alias /mash /mnt/fedora_koji/koji/mash - - - Options Indexes FollowSymLinks - IndexOptions NameWidth=* FancyIndexing - FileETag None - Require all granted - - -Alias /compose /mnt/fedora_koji/koji/compose - - - Options Indexes FollowSymLinks - IndexOptions NameWidth=* FancyIndexing - FileETag None - Require all granted - - -Alias /mass-rebuild "/mnt/fedora_koji/koji/mass-rebuild/" - - - Options Indexes FollowSymLinks - Require all granted - - -Alias /images /mnt/fedora_koji/koji/images - - - Options Indexes FollowSymLinks - IndexOptions NameWidth=* FancyIndexing - FileETag None - Require all granted - - -Alias /rhel /mnt/fedora_koji/rhel - - - Options Indexes FollowSymLinks - IndexOptions NameWidth=* FancyIndexing - FileETag None - Require all granted - - -Alias /pub /pub - - - Options Indexes FollowSymLinks - IndexOptions NameWidth=* FancyIndexing - FileETag None - Require all granted - - -# This IP is sign-bridge01.phx2.fedoraproject.org. -# It needs to be able to sign openh264 packages. -RewriteCond %{HTTP:X-Forwarded-For} !10.5.125.71 -RewriteRule ".*/.*openh264.*.(x86_64|armv7hl|i686|ppc64|ppc64le|aarch64|s390x).rpm$" "https://fedoraproject.org/wiki/non-distributable-rpms" [R=302,L] - -# Set HSTS header via HTTP since it cannot be easily set in squid, which terminates HTTPS -Header always add Strict-Transport-Security "max-age=15768000; includeSubDomains; preload" diff --git a/roles/kojipkgs/tasks/main.yml b/roles/kojipkgs/tasks/main.yml index 57b96a44f..1afcb5a98 100644 --- a/roles/kojipkgs/tasks/main.yml +++ b/roles/kojipkgs/tasks/main.yml @@ -6,13 +6,21 @@ - name: install apache config files for local apache copy: src={{ item }} dest=/etc/httpd/conf.d/{{ item }} owner=root group=root mode=644 with_items: - - kojipkgs.conf - infrastructure.conf notify: - reload httpd tags: - kojipkgs +- name: install apache config templates for local apache + template: src={{ item }} dest=/etc/httpd/conf.d/{{ item }} owner=root group=root mode=644 + with_items: + - kojipkgs.conf + notify: + - reload httpd + tags: + - kojipkgs + - name: make sure httpd listens on port 8080 lineinfile: dest=/etc/httpd/conf/httpd.conf state=present regexp="^Listen 80" line="Listen 8080" notify: diff --git a/roles/kojipkgs/templates/kojipkgs.conf b/roles/kojipkgs/templates/kojipkgs.conf new file mode 100644 index 000000000..434d9adf8 --- /dev/null +++ b/roles/kojipkgs/templates/kojipkgs.conf @@ -0,0 +1,132 @@ +ServerName https://kojipkgs.fedoraproject.org +MaxRequestWorkers 512 +ServerLimit 512 + +RequestHeader unset Accept-Encoding early + +CustomLog "| /usr/sbin/rotatelogs /var/log/httpd/{{inventory_hostname}}-access.log.%Y-%m-%d 86400" combined +ErrorLog "| /usr/sbin/rotatelogs /var/log/httpd/{{inventory_hostname}}-error.log.%Y-%m-%d 86400" + +Alias /atomic /mnt/fedora_koji/koji/atomic + + + Options Indexes FollowSymLinks + IndexOptions NameWidth=* FancyIndexing + FileETag None + Require all granted + + +Alias /atomic-cd /mnt/fedora_koji/koji/atomic-cd + + + Options Indexes FollowSymLinks + IndexOptions NameWidth=* FancyIndexing + FileETag None + Require all granted + + +Alias /packages /mnt/fedora_koji/koji/packages +Alias /toplink/packages /mnt/fedora_koji/koji/packages + + + Options Indexes FollowSymLinks + IndexOptions NameWidth=* FancyIndexing + FileETag None + Require all granted + + +Alias /repos-dist /mnt/fedora_koji/koji/repos-dist + + + Options Indexes FollowSymLinks + IndexOptions NameWidth=* FancyIndexing + FileETag None + Require all granted + + +Alias /repos /mnt/fedora_koji/koji/repos + + + Options Indexes FollowSymLinks + IndexOptions NameWidth=* FancyIndexing + FileETag None + Require all granted + + +Alias /scratch /mnt/fedora_koji/koji/scratch + + + Options Indexes FollowSymLinks + IndexOptions NameWidth=* FancyIndexing + FileETag None + Require all granted + + +Alias /work /mnt/fedora_koji/koji/work + + + Options Indexes FollowSymLinks + IndexOptions NameWidth=* FancyIndexing + FileETag None + Require all granted + + +Alias /mash /mnt/fedora_koji/koji/mash + + + Options Indexes FollowSymLinks + IndexOptions NameWidth=* FancyIndexing + FileETag None + Require all granted + + +Alias /compose /mnt/fedora_koji/koji/compose + + + Options Indexes FollowSymLinks + IndexOptions NameWidth=* FancyIndexing + FileETag None + Require all granted + + +Alias /mass-rebuild "/mnt/fedora_koji/koji/mass-rebuild/" + + + Options Indexes FollowSymLinks + Require all granted + + +Alias /images /mnt/fedora_koji/koji/images + + + Options Indexes FollowSymLinks + IndexOptions NameWidth=* FancyIndexing + FileETag None + Require all granted + + +Alias /rhel /mnt/fedora_koji/rhel + + + Options Indexes FollowSymLinks + IndexOptions NameWidth=* FancyIndexing + FileETag None + Require all granted + + +Alias /pub /pub + + + Options Indexes FollowSymLinks + IndexOptions NameWidth=* FancyIndexing + FileETag None + Require all granted + + +# This IP is sign-bridge01.phx2.fedoraproject.org. +# It needs to be able to sign openh264 packages. +RewriteCond %{HTTP:X-Forwarded-For} !10.5.125.71 +RewriteRule ".*/.*openh264.*.(x86_64|armv7hl|i686|ppc64|ppc64le|aarch64|s390x).rpm$" "https://fedoraproject.org/wiki/non-distributable-rpms" [R=302,L] + +# Set HSTS header via HTTP since it cannot be easily set in squid, which terminates HTTPS +Header always add Strict-Transport-Security "max-age=15768000; includeSubDomains; preload" -- cgit