Skip to content

Commit

Permalink
Add basic playbook #4
Browse files Browse the repository at this point in the history
Play book installs needed dependencies and the python virtual environment
  • Loading branch information
Piersman authored Jul 27, 2020
1 parent e59f45f commit d60f080
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions playbook.yaml
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"

0 comments on commit d60f080

Please sign in to comment.