forked from antony-wilson/doi_site
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Play book installs needed dependencies and the python virtual environment
- Loading branch information
Showing
1 changed file
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
- name: Playbook to install the doi_site software | ||
hosts: 127.0.0.1 | ||
become: yes | ||
connection: local | ||
tasks: | ||
- name: Install python-virtualenv is installed | ||
yum: | ||
name: virtualenv | ||
state: latest | ||
|
||
- name: Install the correct verison of gcc | ||
yum: | ||
name: gcc | ||
state: latest | ||
|
||
- name: Install the correct verison of mod_ssl.x86_64 | ||
yum: | ||
name: mod_ssl.x86_64 | ||
state: latest | ||
|
||
- name: Ensure we have the correct verison of Apache | ||
yum: | ||
name: httpd | ||
state: latest | ||
|
||
- name: Install the correct verison of mod_wsgi.x86_64 | ||
yum: | ||
name: python3-mod_wsgi.x86_64 | ||
state: latest | ||
|
||
- name: Install the correct verison of openldap-devel | ||
yum: | ||
name: openldap-devel | ||
state: latest | ||
|
||
- name: Create the directory for static files | ||
file: | ||
path: /var/www/html/doi | ||
state: directory | ||
mode: '0755' | ||
|
||
- name: Create the directory for sqlite database | ||
file: | ||
path: /var/doi | ||
state: directory | ||
mode: '0755' | ||
|
||
- name: Create the python virtual environment | ||
command: | ||
cmd: virtualenv /opt/doi | ||
creates: "/opt/doi" | ||
|
||
- name: Finish creating the virual environment | ||
shell: "source /opt/doi/bin/activate; export DJANGO_PROJECT_STATIC_FILES=/var/www/html/doi/; pip install doi_site" |