aboutsummaryrefslogtreecommitdiffstats
path: root/roles/mediagoblin/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/mediagoblin/tasks/main.yml')
-rw-r--r--roles/mediagoblin/tasks/main.yml88
1 files changed, 1 insertions, 87 deletions
diff --git a/roles/mediagoblin/tasks/main.yml b/roles/mediagoblin/tasks/main.yml
index a5ce476..69ae650 100644
--- a/roles/mediagoblin/tasks/main.yml
+++ b/roles/mediagoblin/tasks/main.yml
@@ -1,87 +1 @@
- name: Install mediagoblin dependencies
- apt: name={{item}} state=installed
- with_items:
- - python3-dev
- - python3-lxml
- - python3-imaging
- - python3-virtualenv
- - automake
- tags:
- - dependencies
-
-- name: Create mediagoblin user
- user: name={{ mediagoblin_user }}
- createhome=yes
- groups=www-data
- system=yes
- home=/var/lib/mediagoblin
- state=present
-
-- name: Create deploy directory
- file: name={{ mediagoblin_basedir }}
- state=directory
- owner={{ mediagoblin_user }}
-
-- name: Create user data directory
- file: name={{ mediagoblin_basedir }}/data
- state=directory
- chmod=0750
- owner={{ mediagoblin_user }}
-
-- name: Checkout git
- git: repo={{ mediagoblin_git_uri }}
- dest={{ mediagoblin_basedir }}/src
- tag={{ mediagoblin_git_tag }}
- accept_hostkey=yes
- sudo: yes
- sudo_user: "{{ mediagoblin_user }}"
-
-- name: git submodules
- shell:
- git submodule update --init --recursive
- chdir="{{mediagoblin_basedir}}/src"
- creates="{{mediagoblin_basedir}}/src/.gitmodules"
- sudo: yes
- sudo_user: "{{ mediagoblin_user }}"
-
-
-- name: Create virtualenv
- shell:
- virtualenv --python=python3 --system-site-packages .
- chdir="{{mediagoblin_basedir}}/src"
- creates="{{mediagoblin_basedir}}/src/bin/python"
- sudo: yes
- sudo_user: "{{ mediagoblin_user }}"
-
-- name: Build mediagoblin
- shell:
- ./bootstrap.sh && ./configure –with-python3 && make
- chdir="{{mediagoblin_basedir }}/src"
- creates="{{mediagoblin_basedir}}/src/mediagoblin.egg-info"
- sudo: yes
- sudo_user: "{{ mediagoblin_user }}"
-
-- name: Install flup
- easy_install:
- name=flup
- virtualenv="{{ mediagoblin_basedir }}"
- sudo: yes
- sudo_user: "{{ mediagoblin_user }}"
-
-- name: Update DB
- shell:
- ./bin/gmg dbupdate
- chdir="{{ mediagoblin_basedir }}/src"
- sudo: yes
- sudo_user: "{{ mediagoblin_user }}"
-
-- name: Copy generic mediagoblin nginx site configuration
- template: src=etc_nginx_sites-available_mediagoblin.j2
- dest=/etc/nginx/sites-available/mediagoblin
-
-- name: Create nginx symlink for default
- file: state=link
- src=/etc/nginx/sites-available/mediagoblin
- dest=/etc/nginx/sites-enabled/mediagoblin
- notify: nginx restart # reload not sufficient?
-
+- include: mediagoblin.yml tags=mediagoblin