Add fedoauth
This commit is contained in:
parent
aa91fc61bb
commit
faaa683e40
4 changed files with 193 additions and 0 deletions
61
roles/fedoauth/tasks/main.yml
Normal file
61
roles/fedoauth/tasks/main.yml
Normal file
|
@ -0,0 +1,61 @@
|
|||
---
|
||||
# Configuration for the fedoauth webapp
|
||||
|
||||
- name: clean yum metadata
|
||||
command: yum clean all
|
||||
tags:
|
||||
- packages
|
||||
|
||||
- name: install needed packages
|
||||
yum: pkg={{ item }} state=installed
|
||||
with_items:
|
||||
- fedoauth
|
||||
- fedoauth-template-fedora
|
||||
- fedoauth-backend-fedora
|
||||
- python-psycopg2
|
||||
- libsemanage-python
|
||||
tags:
|
||||
- packages
|
||||
|
||||
- name: copy fedoauth configuration
|
||||
template: src=fedoauth.cfg
|
||||
dest=/etc/fedoauth/fedoauth.cfg
|
||||
owner=apache group=apache mode=0600
|
||||
when: env != "staging"
|
||||
tags:
|
||||
- config
|
||||
notify:
|
||||
- restart apache
|
||||
|
||||
- name: copy fedoauth STG configuration
|
||||
template: src=fedoauth.stg.cfg
|
||||
dest=/etc/fedoauth/fedoauth.cfg
|
||||
owner=apache group=apache mode=0600
|
||||
when: env == "staging"
|
||||
tags:
|
||||
- config
|
||||
notify:
|
||||
- restart apache
|
||||
|
||||
- name: copy fedoauth private key
|
||||
copy: src={{ private_files }}/fedoauth/persona.key
|
||||
when: env != "staging"
|
||||
|
||||
- name: copy fedoauth STG private key
|
||||
copy: src={{ private_files }}/fedoauth/persona.stg.key
|
||||
when: env == "staging"
|
||||
|
||||
- name: create the database scheme
|
||||
command: /usr/bin/python2 /usr/share/fedoauth/createdb.py
|
||||
environment:
|
||||
FEDOAUTH_CONFIG: /etc/fedoauth/fedoauth.cfg
|
||||
|
||||
- name: set sebooleans so fedoauth can talk to the db
|
||||
action: seboolean name=httpd_can_network_connect_db
|
||||
state=true
|
||||
persistent=true
|
||||
|
||||
- name: apply selinux type to the wsgi file
|
||||
file: >
|
||||
dest=/usr/share/fedoauth/fedoauth.wsgi
|
||||
setype=httpd_sys_content_t
|
Loading…
Add table
Add a link
Reference in a new issue