mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-03-25 22:41:53 +08:00
105 lines
2.7 KiB
YAML
105 lines
2.7 KiB
YAML
---
|
|
# Configuration for the pkgdb2 webapp
|
|
|
|
- name: install needed packages
|
|
yum: pkg={{ item }} state=present
|
|
with_items:
|
|
- pkgdb2
|
|
- python-psycopg2
|
|
- python-openid-cla
|
|
- python-openid-teams
|
|
- python-memcached
|
|
- libsemanage-python
|
|
- pyliblzma
|
|
- python-bunch
|
|
tags:
|
|
- packages
|
|
- pkgdb
|
|
|
|
# HOTFIX: adjust bugzilla overrides
|
|
- name: HOTFIX - adjust bugzilla overrides
|
|
copy: src=fas2.py dest=/usr/lib/python2.7/site-packages/fedora/client/fas2.py
|
|
tags:
|
|
- config
|
|
- pkgdb
|
|
- fas
|
|
- hotfix
|
|
- hotfixfas
|
|
|
|
- name: copy sundry pkgdb configuration
|
|
template: src={{ item.file }}
|
|
dest={{ item.location }}/{{ item.dest }}
|
|
owner=apache group=apache mode=0600
|
|
with_items:
|
|
- { file: pkgdb2_admin.cfg, location: /etc/pkgdb2, dest: pkgdb2.cfg }
|
|
- { file: alembic.ini, location: /etc/pkgdb2, dest: alembic.ini }
|
|
changed_when: "1 != 1"
|
|
tags:
|
|
- config
|
|
- pkgdb
|
|
notify:
|
|
- restart apache
|
|
|
|
- name: create the database scheme
|
|
command: /usr/bin/python2 /usr/share/pkgdb2/pkgdb2_createdb.py
|
|
changed_when: "1 != 1"
|
|
environment:
|
|
PKGDB2_CONFIG: /etc/pkgdb2/pkgdb2.cfg
|
|
tags: pkgdb
|
|
|
|
- name: Install all the configuration file of pkgdb2
|
|
template: src={{ item.file }}
|
|
dest={{ item.location }}/{{ item.file }}
|
|
owner=apache group=apache mode=0600
|
|
with_items:
|
|
- { file: pkgdb2.cfg, location: /etc/pkgdb2 }
|
|
- { file: pkgdb2.conf, location: /etc/httpd/conf.d }
|
|
- { file: pkgdb2.wsgi, location: /var/www/, dest: pkgdb2.wsgi }
|
|
tags:
|
|
- config
|
|
- pkgdb
|
|
notify:
|
|
- restart apache
|
|
|
|
- name: Install the pkgdb cron jobs - sync bugzilla, update pkg info
|
|
when: inventory_hostname.startswith('pkgdb02')
|
|
template: src={{ item.file }}
|
|
dest={{ item.location }}/{{ item.file }}
|
|
with_items:
|
|
- { file: 'pkgdb-sync-bugzilla.cron', location: /etc/cron.d }
|
|
- { file: 'pkgdb_update_package_info.cron', location: /etc/cron.d }
|
|
tags:
|
|
- config
|
|
- pkgdb
|
|
|
|
- name: update the base_url in update_package_info
|
|
command: sed -i -e 's|https://dl.fedoraproject.org|http://dl.phx2.fedoraproject.org|' /usr/bin/update_package_info.py
|
|
changed_when: "1 != 1"
|
|
tags:
|
|
- config
|
|
- pkgdb
|
|
|
|
- name: set sebooleans so pkgdb2 can talk to the db
|
|
seboolean: name=httpd_can_network_connect_db
|
|
state=true
|
|
persistent=true
|
|
tags:
|
|
- selinux
|
|
- pkgdb
|
|
|
|
- name: set sebooleans so apache can send emails
|
|
seboolean: name=httpd_can_sendmail
|
|
state=true
|
|
persistent=true
|
|
tags:
|
|
- selinux
|
|
- pkgdb
|
|
|
|
- name: set sebooleans so apache can talk to memcached0*
|
|
seboolean: name=httpd_can_network_memcache
|
|
state=true
|
|
persistent=true
|
|
tags:
|
|
- selinux
|
|
- pkgdb
|