91 lines
2.6 KiB
YAML
91 lines
2.6 KiB
YAML
---
|
|
# Configuration for the nuancier webapp
|
|
|
|
- name: clean yum metadata
|
|
command: yum clean all
|
|
tags:
|
|
- packages
|
|
|
|
- name: install needed packages
|
|
yum: pkg={{ item }} state=installed
|
|
with_items:
|
|
- nuancier
|
|
- python-psycopg2
|
|
- python-openid-cla
|
|
- python-openid-teams
|
|
- python-memcached
|
|
- libsemanage-python
|
|
- python-alembic
|
|
tags:
|
|
- packages
|
|
|
|
- name: copy sundry nuancier configuration
|
|
template: src={{ item.file }}
|
|
dest={{ item.location }}/{{ item.dest }}
|
|
owner=apache group=apache mode=0600
|
|
with_items:
|
|
- { file: nuancier_admin.cfg, location: /etc/nuancier, dest: nuancier.cfg }
|
|
- { file: alembic.ini, location: /etc/nuancier, dest: alembic.ini }
|
|
tags:
|
|
- config
|
|
notify:
|
|
- restart apache
|
|
|
|
#- name: create pictures folder where we upload the pictures
|
|
# action: file state=directory
|
|
# path=/var/cache/nuancier/pictures
|
|
# owner=apache group=apache mode=0600
|
|
# tags:
|
|
# - setup
|
|
#
|
|
#- name: create the cache folder where nuancier creates the thumbnails
|
|
# action: file state=directory
|
|
# path=/var/cache/nuancier/cache
|
|
# owner=apache group=apache mode=0600
|
|
# tags:
|
|
# - setup
|
|
|
|
- name: create the database scheme
|
|
command: /usr/bin/python2 /usr/share/nuancier/nuancier_createdb.py
|
|
environment:
|
|
NUANCIER_CONFIG: /etc/nuancier/nuancier.cfg
|
|
|
|
- name: replace the nuancier configuration file by the one with the normal user
|
|
template: src={{ item.file }}
|
|
dest="{{ item.location }}/{{ item.file }}"
|
|
owner=apache group=apache mode=0600
|
|
with_items:
|
|
- { file: nuancier.cfg, location: /etc/nuancier }
|
|
- { file: nuancier.conf, location: /etc/httpd/conf.d }
|
|
- { file: nuancier.wsgi, location: /usr/share/nuancier }
|
|
tags:
|
|
- config
|
|
notify:
|
|
- restart apache
|
|
|
|
- name: set sebooleans so nuancier can talk to the db
|
|
action: seboolean name=httpd_can_network_connect_db
|
|
state=true
|
|
persistent=true
|
|
|
|
- name: apply selinux type to static files
|
|
file: >
|
|
dest=/usr/lib/python2.6/site-packages/nuancier/static/
|
|
setype=httpd_sys_content_t
|
|
state=directory
|
|
recurse=yes
|
|
|
|
- name: set sebooleans so apache can use glusterfs
|
|
action: seboolean name=httpd_use_fusefs
|
|
state=true
|
|
persistent=true
|
|
|
|
- name: set sebooleans so apache can send emails
|
|
action: seboolean name=httpd_can_sendmail
|
|
state=true
|
|
persistent=true
|
|
|
|
- name: apply selinux type to the wsgi file
|
|
file: >
|
|
dest=/usr/share/nuancier/nuancier.wsgi
|
|
setype=httpd_sys_content_t
|