diff --git a/hosts b/hosts index b6fe881..f429ff4 100644 --- a/hosts +++ b/hosts @@ -117,3 +117,6 @@ zbx0.pyrocufflink.blue pyrocufflink [vm-hosts] + +[wheelhost] +file0.pyrocufflink.blue diff --git a/roles/wheelhost/files/wheels.httpd.conf b/roles/wheelhost/files/wheels.httpd.conf new file mode 100644 index 0000000..8a65b1a --- /dev/null +++ b/roles/wheelhost/files/wheels.httpd.conf @@ -0,0 +1,7 @@ +Alias /wheels /var/lib/wheels + + + Require all granted + Options +Indexes + IndexOptions -FancyIndexing -HTMLTable + diff --git a/roles/wheelhost/handlers/main.yml b/roles/wheelhost/handlers/main.yml new file mode 100644 index 0000000..09fd3c8 --- /dev/null +++ b/roles/wheelhost/handlers/main.yml @@ -0,0 +1,4 @@ +- name: reload httpd + service: + name=httpd + state=reloaded diff --git a/roles/wheelhost/tasks/main.yml b/roles/wheelhost/tasks/main.yml new file mode 100644 index 0000000..350b80f --- /dev/null +++ b/roles/wheelhost/tasks/main.yml @@ -0,0 +1,34 @@ +- name: ensure rsync is installed + package: + name=rsync + state=present + tags: + - install + +- name: ensure wheel storage directory exists + file: + path=/var/lib/wheels + owner=root + group=root + mode=0775 + state=directory + +- name: ensure jenkins can write to the wheel storage directory + acl: + path: /var/lib/wheels + etype: user + entity: jenkins + permissions: rwx + default: '{{ item == "default" }}' + state: present + with_items: + - default + - current + +- name: ensure apache is configured to serve wheel directory + copy: + src=wheels.httpd.conf + dest=/etc/httpd/conf.d/wheels.conf + mode=0644 + notify: + - reload httpd diff --git a/wheelhost.yml b/wheelhost.yml new file mode 100644 index 0000000..cf4b320 --- /dev/null +++ b/wheelhost.yml @@ -0,0 +1,4 @@ +- hosts: wheelhost + roles: + - web + - wheelhost