Files
configpolicy/roles/wheelhost/tasks/main.yml
Dustin C. Hatch c8d6bae093 wheelhost: Publish wheels built by Jenkins
The point of the "wheel host" is to serve as a repository of Python
packages (wheels) built by Jenkins for consumption by `pip` et al. For
applications and libraries that do not provide all of their dependencies
as binary packages, this makes a convenient way to install them without
requiring all of the build tools and dependencies on the destination
machine.

The idea here is that a Jenkins job runs `pip wheel` for a distribution
package name or `requirements.txt` file and then uploads the resulting
wheel files using `rsync`. Apache is configured to serve the upload
directory with an index compatible with `pip`'s `--find-links`.
2019-03-22 10:19:27 -05:00

35 lines
669 B
YAML

- 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