Files
fedora-infra_ansible/roles/fedocal/tasks/main.yml
Aurélien Bompard 1c0dc1f560 fedocal: update package command to not use items
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2019-06-11 17:56:22 +02:00

75 lines
2.0 KiB
YAML

---
# Configuration for the fedocal webapp
- name: install needed packages
package:
state: present
name:
- fedocal
- python-psycopg2
- python-openid-cla
- python-openid-teams
- python-memcached
- libsemanage-python
tags:
- packages
- name: copy sundry fedocal configuration
template: src={{ item.file }}
dest={{ item.location }}/{{ item.dest }}
owner=apache group=apache mode=0600
with_items:
- { file: fedocal.cfg, location: /etc/fedocal, dest: fedocal.cfg }
- { file: alembic.ini, location: /etc/fedocal, dest: alembic.ini }
changed_when: "1 != 1"
tags:
- config
notify:
- restart apache
#- name: create the database scheme
# command: /usr/bin/python2 /usr/share/fedocal/fedocal_createdb.py
# environment:
# FEDOCAL_CONFIG: /etc/fedocal/fedocal.cfg
- name: Install all the configuration file of fedocal
template: src={{ item.file }}
dest={{ item.location }}/{{ item.file }}
owner=apache group=apache mode=0600
with_items:
- { file: fedocal.cfg, location: /etc/fedocal }
- { file: alembic.ini, location: /etc/fedocal }
- { file: fedocal.conf, location: /etc/httpd/conf.d }
- { file: fedocal.wsgi, location: /var/www/ }
tags:
- config
notify:
- restart apache
- name: Install the reminder cron job
when: inventory_hostname.startswith('fedocal02')
template: src={{ item.file }}
dest={{ item.location }}/{{ item.file }}
with_items:
- { file: 'fedocal-reminder.cron', location: /etc/cron.d }
tags:
- config
- name: set sebooleans so fedocal can talk to the db
seboolean: name=httpd_can_network_connect_db
state=true
persistent=true
- name: Install the SAR script for GDPR
when: inventory_hostname.startswith('fedocal02')
template: src={{ item.file }}
dest={{ item.location }}/{{ item.file }}
owner=apache group=apache mode=0700
with_items:
- { file: 'fedocal_sar.py', location: /usr/local/bin/ }
tags:
- config
- GDPR
- SAR