Get started on the anitya roles for frontend and backend
This commit is contained in:
parent
68ffb83886
commit
c5e7536b4b
7 changed files with 201 additions and 0 deletions
41
roles/anitya/backend/tasks/main.yml
Normal file
41
roles/anitya/backend/tasks/main.yml
Normal file
|
@ -0,0 +1,41 @@
|
|||
---
|
||||
# Configuration for the anitya webapp
|
||||
|
||||
- name: clean yum metadata
|
||||
command: yum clean all
|
||||
tags:
|
||||
- packages
|
||||
|
||||
- name: install needed packages
|
||||
yum: pkg={{ item }} state=installed
|
||||
with_items:
|
||||
- anitya
|
||||
- python-psycopg2
|
||||
- libsemanage-python
|
||||
tags:
|
||||
- packages
|
||||
|
||||
- name: copy sundry anitya configuration
|
||||
template: src={{ item.file }}
|
||||
dest={{ item.location }}/{{ item.dest }}
|
||||
owner=root group=root mode=0600
|
||||
with_items:
|
||||
- { file: anitya_admin.cfg, location: /etc/anitya, dest: anitya.cfg }
|
||||
# - { file: alembic.ini, location: /etc/anitya, dest: alembic.ini }
|
||||
tags:
|
||||
- config
|
||||
|
||||
- name: create the database scheme
|
||||
command: /usr/bin/python2 /usr/share/anitya/anitya_createdb.py
|
||||
environment:
|
||||
ANITYA_WEB_CONFIG: /etc/anitya/anitya.cfg
|
||||
|
||||
- name: Install the configuration file of anitya
|
||||
template: src={{ item.file }}
|
||||
dest={{ item.location }}/{{ item.file }}
|
||||
owner=root group=root mode=0600
|
||||
with_items:
|
||||
- { file: anitya.cfg, location: /etc/anitya }
|
||||
tags:
|
||||
- config
|
||||
|
26
roles/anitya/backend/templates/anitya.cfg
Normal file
26
roles/anitya/backend/templates/anitya.cfg
Normal file
|
@ -0,0 +1,26 @@
|
|||
# Beware that the quotes around the values are mandatory
|
||||
|
||||
### Secret key for the Flask application
|
||||
SECRET_KEY='{{ anitya_secret_key }}'
|
||||
|
||||
### url to the database server:
|
||||
#DB_URL=mysql://user:pass@host/db_name
|
||||
#DB_URL=postgres://user:pass@host/db_name
|
||||
DB_URL='postgresql://{{ anitya_db_user }}:{{ anitya_db_pass }}@{{ anitya_db_host }}/{{ anitya_db_name }}'
|
||||
|
||||
# List of admins based on their openid
|
||||
CNUCNU_WEB_ADMINS = [
|
||||
'http://ralph.id.fedoraproject.org/',
|
||||
'http://pingou.id.fedoraproject.org/',
|
||||
]
|
||||
|
||||
# Fedora OpenID endpoint
|
||||
{% if env == 'staging' %}
|
||||
CNUCNU_WEB_FEDORA_OPENID = 'https://id.stg.fedoraproject.org'
|
||||
{% else %}
|
||||
CNUCNU_WEB_FEDORA_OPENID = 'https://id.fedoraproject.org'
|
||||
{% endif %}
|
||||
|
||||
|
||||
# This is required to fix login
|
||||
PREFERRED_URL_SCHEME='https'
|
26
roles/anitya/backend/templates/anitya_admin.cfg
Normal file
26
roles/anitya/backend/templates/anitya_admin.cfg
Normal file
|
@ -0,0 +1,26 @@
|
|||
# Beware that the quotes around the values are mandatory
|
||||
|
||||
### Secret key for the Flask application
|
||||
SECRET_KEY='{{ anitya_secret_key }}'
|
||||
|
||||
### url to the database server:
|
||||
#DB_URL=mysql://user:pass@host/db_name
|
||||
#DB_URL=postgres://user:pass@host/db_name
|
||||
DB_URL='postgresql://{{ anitya_db_admin }}:{{ anitya_db_admin_pass }}@{{ anitya_db_host }}/{{ anitya_db_name }}'
|
||||
|
||||
# List of admins based on their openid
|
||||
CNUCNU_WEB_ADMINS = [
|
||||
'http://ralph.id.fedoraproject.org/',
|
||||
'http://pingou.id.fedoraproject.org/',
|
||||
]
|
||||
|
||||
# Fedora OpenID endpoint
|
||||
{% if env == 'staging' %}
|
||||
CNUCNU_WEB_FEDORA_OPENID = 'https://id.stg.fedoraproject.org'
|
||||
{% else %}
|
||||
CNUCNU_WEB_FEDORA_OPENID = 'https://id.fedoraproject.org'
|
||||
{% endif %}
|
||||
|
||||
|
||||
# This is required to fix login
|
||||
PREFERRED_URL_SCHEME='https'
|
Loading…
Add table
Add a link
Reference in a new issue