/ansible-pelican

An ansible role for pelican installation and deployment

Role Name

This role installs pelican in a virtual environment, and generates html into a web root directory. The role doesn’t install a webserver, and expects there to be another role to manage the webserver. The role expectes the pelican application to be in a git repository such as Github or Bitbucket. We generate HTML output using publishconf.py.

Please note: Currently only supports Debian Jessie and Wheezy. This should work just fine on Ubuntu as well. With hopes of support on CentOS/RHEL as soon as I get more free time. Probably early fall '15

All enhancements and features are tracked in Github Issues.

Requirements

This role expect keys for deployment to be utilized via an ssh agent forwarded or already existing for the remote_user. This role requires publishconf.py to generate the HTML from Pelican. The role does not utilize a template to generate the file so it must live in the repository. Additionally the role requires requirments.txt to live in the root directory and for it to include Pelican and it's dependencies because they are install via pip.

Role Variables

Variables with Defaults:

  • build_path_prefix: '/home' This should probably not be changed, instead if you wish to not use the build_user home directory, then override build_path
  • build_path: "{{ build_path_prefix }}/{{ build_user }}" This is where the pelican app will be installed. It will be installed in build_path/pelicanapp.name/application
  • web_root: "/var/www" This dir will be concatenated with pelicanapp.name HTML will live here.
  • git_version: "master" This is the version that's checked out.

Usage notes

  • vars/main.yml contains application but is set to pelicanapp. Don't mess with that.
  • Also note at the moment we do support multiple sites, but the need to deploy the same tag or branch from git.

Dependencies

You should have a role to handle the webserver.

Example Playbook

Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:

  roles:
    - { role: ansible-pelican, domain: foo.bar, repo: foo.bar/user/repo }

License

GPLv3

Author Information

Writen by Max Resnick a software engineer and ex-project manager in Portland, OR.