aboutsummaryrefslogtreecommitdiffstats
path: root/roles/mediagoblin
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2016-04-10 01:46:48 -0400
committerbnewbold <bnewbold@robocracy.org>2016-04-10 01:46:48 -0400
commite79a42d63fe270875cab7773ecd7688870dfb829 (patch)
treeb1cc61d646b2cf41ccba7e90a31f502b6a706cf3 /roles/mediagoblin
parent39765739b2adb67a8f7c78d06b559e339fadfd15 (diff)
downloadinfra-e79a42d63fe270875cab7773ecd7688870dfb829.tar.gz
infra-e79a42d63fe270875cab7773ecd7688870dfb829.zip
clone/fork ansible-mediagoblin
Diffstat (limited to 'roles/mediagoblin')
-rw-r--r--roles/mediagoblin/.gitignore2
-rw-r--r--roles/mediagoblin/README.md1
-rw-r--r--roles/mediagoblin/defaults/main.yml4
-rw-r--r--roles/mediagoblin/tasks/main.yml63
-rw-r--r--roles/mediagoblin/tasks/ubuntu.yml0
5 files changed, 70 insertions, 0 deletions
diff --git a/roles/mediagoblin/.gitignore b/roles/mediagoblin/.gitignore
new file mode 100644
index 0000000..d8acd2e
--- /dev/null
+++ b/roles/mediagoblin/.gitignore
@@ -0,0 +1,2 @@
+.vagrant
+vagrant_ansible_inventory_default
diff --git a/roles/mediagoblin/README.md b/roles/mediagoblin/README.md
new file mode 100644
index 0000000..8825a78
--- /dev/null
+++ b/roles/mediagoblin/README.md
@@ -0,0 +1 @@
+Cloned/Forked from: https://github.com/ptisserand/ansible-mediagoblin
diff --git a/roles/mediagoblin/defaults/main.yml b/roles/mediagoblin/defaults/main.yml
new file mode 100644
index 0000000..351f58a
--- /dev/null
+++ b/roles/mediagoblin/defaults/main.yml
@@ -0,0 +1,4 @@
+top_directory: /srv/mediagoblin
+deploy_directory: "{{ top_directory }}/mediagoblin"
+user: mediagoblin
+git_uri: git://gitorious.org/mediagoblin/mediagoblin.git \ No newline at end of file
diff --git a/roles/mediagoblin/tasks/main.yml b/roles/mediagoblin/tasks/main.yml
new file mode 100644
index 0000000..caddf4d
--- /dev/null
+++ b/roles/mediagoblin/tasks/main.yml
@@ -0,0 +1,63 @@
+- name: Install mediagoblin dependencies
+ apt: name={{item}} state=installed
+ with_items:
+ - git-core
+ - python
+ - python-dev
+ - python-lxml
+ - python-imaging
+ - python-virtualenv
+ - nginx-full
+ tags:
+ - dependencies
+
+
+- NAME: create mediagoblin user
+ user: name={{ mediagoblin_user }} system=yes state=present
+
+- name: Create deploy directory
+ file: name={{deploy_directory}} state=directory owner={{user}}
+
+- name: Checkout git
+ git: repo={{git_uri}} dest={{deploy_directory}} accept_hostkey=yes
+ sudo: yes
+ sudo_user: "{{ user }}"
+
+- name: git submodules
+ shell:
+ git submodule update --init --recursive
+ chdir="{{deploy_directory}}"
+ creates="{{deploy_directory}}/.gitmodules"
+ sudo: yes
+ sudo_user: "{{ user }}"
+
+
+- name: Create virtualenv
+ shell:
+ virtualenv --python=python2 --system-site-packages .
+ chdir="{{deploy_directory}}"
+ creates="{{deploy_directory}}/bin/python"
+ sudo: yes
+ sudo_user: "{{ user }}"
+
+- name: Build mediagoblin
+ shell:
+ ./bin/python setup.py develop
+ chdir="{{deploy_directory}}"
+ creates="{{deploy_directory}}/mediagoblin.egg-info"
+ sudo: yes
+ sudo_user: "{{ user }}"
+
+- name: Install flup
+ easy_install:
+ name=flup
+ virtualenv="{{deploy_directory}}"
+ sudo: yes
+ sudo_user: "{{ user }}"
+
+- name: Update DB
+ shell:
+ ./bin/gmg dbupdate
+ chdir="{{deploy_directory}}"
+ sudo: yes
+ sudo_user: "{{ user }}"
diff --git a/roles/mediagoblin/tasks/ubuntu.yml b/roles/mediagoblin/tasks/ubuntu.yml
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/roles/mediagoblin/tasks/ubuntu.yml