Skip to content
Snippets Groups Projects
Commit 461a12a2 authored by Shahaan Ayyub's avatar Shahaan Ayyub
Browse files

Removing Centos 6.6 Support and setting apache_user

parent 470d6698
No related branches found
No related tags found
No related merge requests found
...@@ -33,14 +33,14 @@ ...@@ -33,14 +33,14 @@
when: ansible_os_family == "RedHat" when: ansible_os_family == "RedHat"
- -
name: Install the latest pip name: Install the latest pip
shell: source /root/.bash_profile; easy_install pip shell: easy_install pip
when: ansible_os_family == "RedHat" when: ansible_os_family == "RedHat"
- -
name: "Getting Karaage from Github" name: "Getting Karaage from Github"
git: repo="https://github.com/monash-merc/karaage.git" dest="/root/karaage3.1.7" git: repo="https://github.com/monash-merc/karaage.git" dest="/root/karaage3.1.7"
- -
name: "Installing Karaage Dependencies" name: "Installing Karaage Dependencies"
shell: source /root/.bash_profile; pip install {{ item }} pip: name={{ item }}
with_items: with_items:
- six - six
- MySQL-python - MySQL-python
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
replace: dest=/root/karaage3.1.7/setup.py regexp="Django >= 1.7" replace="Django == 1.7.8" replace: dest=/root/karaage3.1.7/setup.py regexp="Django >= 1.7" replace="Django == 1.7.8"
- -
name: "Installing Karaage from source" name: "Installing Karaage from source"
shell: "source /root/.bash_profile; env python setup.py install" shell: "env python setup.py install"
args: args:
chdir: /root/karaage3.1.7 chdir: /root/karaage3.1.7
creates: /root/karaage3.1.7/build/bdist.linux-x86_64 creates: /root/karaage3.1.7/build/bdist.linux-x86_64
...@@ -71,10 +71,6 @@ ...@@ -71,10 +71,6 @@
- -
name: "Change permissions for /var/www" name: "Change permissions for /var/www"
file: path=/var/www state=directory owner=root group={{ apache_user }} mode=0775 file: path=/var/www state=directory owner=root group={{ apache_user }} mode=0775
-
name: Create a symlink to mod_wsgi-py27.so
file: src=/opt/rh/python27/root/usr/lib64/python2.7/site-packages/mod_wsgi/server/mod_wsgi-py27.so dest=/usr/lib64/httpd/modules/mod_wsgi.so owner=root group=root state=link
when: ansible_os_family == "RedHat" and ansible_distribution_major_version < '7'
- -
name: "enabling Karaage configuration" name: "enabling Karaage configuration"
shell: a2enconf karaage3-wsgi shell: a2enconf karaage3-wsgi
...@@ -107,7 +103,7 @@ ...@@ -107,7 +103,7 @@
chdir: "/root/{{ item }}" chdir: "/root/{{ item }}"
creates: "/root/{{ item }}/build/bdist.linux-x86_64" creates: "/root/{{ item }}/build/bdist.linux-x86_64"
name: "Installing other packages RedHat" name: "Installing other packages RedHat"
shell: "source /root/.bash_profile ; env python setup.py install" shell: "env python setup.py install"
when: ansible_os_family == "RedHat" when: ansible_os_family == "RedHat"
with_items: with_items:
- numpy - numpy
...@@ -121,7 +117,7 @@ ...@@ -121,7 +117,7 @@
lineinfile: dest=/etc/karaage3/settings.py regexp="SECRET_KEY = ''" line="SECRET_KEY = 'imkaraage'" state=present lineinfile: dest=/etc/karaage3/settings.py regexp="SECRET_KEY = ''" line="SECRET_KEY = 'imkaraage'" state=present
- -
name: " Create DB tables" name: " Create DB tables"
shell: source /root/.bash_profile ; kg-manage migrate shell: kg-manage migrate
- -
name: "Restarting Celery" name: "Restarting Celery"
service: name=karaage3-celery state=restarted service: name=karaage3-celery state=restarted
......
--- ---
- include: prerequisitesDebian.yml - include: prerequisitesDebian.yml
when: ansible_os_family == "Debian" when: ansible_os_family == "Debian"
- include: prerequisitesRedHat.yml
when: ansible_os_family == 'RedHat' and ansible_distribution_major_version < '7'
- include: apacheDebian.yml - include: apacheDebian.yml
when: ansible_os_family == "Debian" when: ansible_os_family == "Debian"
- include: apacheRedHat.yml - include: apacheRedHat.yml
......
---
-
name: Installing SCLs for Centos
yum: name={{ item }} state=latest
with_items:
- centos-release-SCL
- python27
-
name: Setting the correct environment variables
template: src=.bash_profile.j2 dest={{ ansible_env.HOME }}/.bash_profile owner=ec2-user mode=0644
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PYTHONPATH=/opt/rh/python27/root/usr/lib/python2.7
export PATH=/opt/rh/python27/root/usr/bin:$PATH
export LD_LIBRARY_PATH=/opt/rh/python27/root/usr/lib:/opt/rh/python27/root/usr/lib64:$LD_LIBRARY_PATH
---
apache_user: "{% if ansible_os_family == 'RedHat' %}apache{% else %}www-data{% endif %}"
---
system_packages:
- openldap-servers
- openldap-clients
- openssl
ldapuser: ldap
ldapgroup: ldap
dbname: olcDatabase={2}bdb
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment