diff --git a/roles/wheelhost/defaults/main.yml b/roles/wheelhost/defaults/main.yml new file mode 100644 index 0000000..d6a30d9 --- /dev/null +++ b/roles/wheelhost/defaults/main.yml @@ -0,0 +1 @@ +wheelhost_store_dir: /srv/www/wheelhost diff --git a/roles/wheelhost/tasks/main.yml b/roles/wheelhost/tasks/main.yml index 350b80f..63c854c 100644 --- a/roles/wheelhost/tasks/main.yml +++ b/roles/wheelhost/tasks/main.yml @@ -7,15 +7,15 @@ - name: ensure wheel storage directory exists file: - path=/var/lib/wheels - owner=root - group=root - mode=0775 - state=directory + path: '{{ wheelhost_store_dir }}' + owner: root + group: root + mode: ug=rwx,g=rx + state: directory - name: ensure jenkins can write to the wheel storage directory acl: - path: /var/lib/wheels + path: '{{ wheelhost_store_dir }}' etype: user entity: jenkins permissions: rwx @@ -26,9 +26,9 @@ - current - name: ensure apache is configured to serve wheel directory - copy: - src=wheels.httpd.conf - dest=/etc/httpd/conf.d/wheels.conf - mode=0644 + template: + src: wheels.httpd.conf.j2 + dest: /etc/httpd/conf.d/wheels.conf + mode: u=rw,go=r notify: - reload httpd diff --git a/roles/wheelhost/templates/wheels.httpd.conf.j2 b/roles/wheelhost/templates/wheels.httpd.conf.j2 new file mode 100644 index 0000000..e52a5ce --- /dev/null +++ b/roles/wheelhost/templates/wheels.httpd.conf.j2 @@ -0,0 +1,7 @@ +Alias /wheels {{ wheelhost_store_dir }} + + + Require all granted + Options +Indexes + IndexOptions -FancyIndexing -HTMLTable + diff --git a/wheelhost.yml b/wheelhost.yml index cf4b320..815619f 100644 --- a/wheelhost.yml +++ b/wheelhost.yml @@ -1,4 +1,4 @@ - hosts: wheelhost roles: - - web + - apache - wheelhost