geoserver: basic mapproxy role.

This commit is contained in:
Andrea Dell'Amico 2017-10-26 23:44:14 +02:00
parent ffce67bb7b
commit 3aa7de0d40
3 changed files with 37 additions and 0 deletions

View File

@ -0,0 +1,19 @@
---
mapproxy_user: mapproxy
mapproxy_virtualenv_path: /srv/mapproxy
mapproxy_deb_deps:
- python-pip
- python-virtualenv
- python-imaging
- python-yaml
- libproj0
- libgeos-dev
- python-lxml
- libgdal-dev
- python-shapely
- python-yaml
- python-lxml
mapproxy_packages:
- MapProxy

View File

View File

@ -0,0 +1,18 @@
---
- block:
- name: Create the mapproxy user
become_user: root
user: name={{ mapproxy_user }} home={{ mapproxy_virtualenv_path }} createhome=yes shell=/usr/sbin/nologin system=yes
- name: Install the mapproxy deb dependencies
become_user: root
apt: pkg={{ item }} update_cache=yes cache_valid_time=3600
with_items: '{{ mapproxy_deb_deps }}'
- name: Install mapproxy inside a virtualenv. inherit the site packages
pip: name={{ item }} virtualenv={{ mapproxy_virtualenv_path }} virtualenv_site_packages=yes
with_items: '{{ mapproxy_packages }}'
become: True
become_user: '{{ mapproxy_user }}'
tags: [ 'mapproxy', 'geoserver' ]