Skip to content
Snippets Groups Projects
Verified Commit 4f19683e authored by Giancarlo Razzolini's avatar Giancarlo Razzolini
Browse files

roles/flyspray: Continuing the work on flyspray. We have the tasks.yml...

roles/flyspray: Continuing the work on flyspray. We have the tasks.yml installing and configuring flyspray with nginx, still left to do the php-fpm service.
parent 15b8edad
No related branches found
No related tags found
No related merge requests found
---
- name: daemon reload
command: systemctl daemon-reload
---
- name: install git
pacman: name=git state=present
- name: make flyspray user
user: name=flyspray shell=/bin/false home="{{ flyspray_dir }}" createhome=no
- name: fix home permissions
file: state=directory owner=flyspray group=flyspray path="{{ flyspray_dir }}"
- name: set up nginx
template: src=nginx.d.conf.j2 dest=/etc/nginx/nginx.d/flyspray.conf owner=root group=root mode=644
notify:
- reload nginx
- name: make nginx log dir
file: path=/var/log/nginx/{{ flyspray_domain }} state=directory owner=http group=log mode=755
- name: clone flyspray repo
git: repo=git://git.archlinux.org/vhosts/bugs.archlinux.org.git dest="{{ flyspray_dir }}"
become: true
become_user: flyspray
register: release
- name: fix home permissions
file: state=directory owner=flyspray group=flyspray path="{{ flyspray_dir }}"
- name: configure flyspray
template: src=flyspray.conf.php.j2 dest=/srv/http/flyspray/flyspray.conf.php owner=flyspray group=flyspray mode=0660
register: config
no_log: true
- name: create flyspray db
mysql_db: name="{{ flyspray_db }}" login_host="{{ flyspray_db_host }}" login_password="{{ mariadb_users.root }}"
register: db_created
- name: create flyspray db user
mysql_user: name={{ flyspray_db_user }} password={{ flyspray_db_password }}
login_host="{{ flyspray_db_host }}" login_password="{{ mariadb_users.root }}"
priv="{{ flyspray_db }}.*:ALL"
no_log: true
; <?php die( 'Do not access this page directly.' ); ?>
[general]
cookiesalt="{{ flyspray_cookie_salt }}"
output_buffering="on"
address_rewriting="1"
reminder_daemon="0"
passwdcrypt="md5"
doku_url="https://wiki.archlinux.org/"
syntax_plugin="none"
update_check="0"
[database]
dbtype="mysqli"
dbhost="{{ flyspray_db_host }}"
dbname="{{ flyspray_db }}"
dbuser="{{ flyspray_db_user }}"
dbpass="{{ flyspray_db_password }}"
dbprefix="flyspray_"
[attachments]
zip="application/zip"
tgz="application/x-gzip"
gz="application/x-gzip"
bz2="application/x-bzip2"
png="image/png"
gif="image/gif"
jpg="image/jpeg"
jpeg="image/jpeg"
html="text/html"
xml="application/xml"
upstream flyspray {
server unix:///run/php-fpm/flyspray.sock;
}
server {
listen 80;
listen [::]:80;
server_name {{ flyspray_domain }};
access_log /var/log/nginx/{{ flyspray_domain }}/access.log;
error_log /var/log/nginx/{{ flyspray_domain }}/error.log;
include snippets/letsencrypt.conf;
location / {
rewrite ^(.*) https://$server_name$1 permanent;
}
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name {{ flyspray_domain }};
access_log /var/log/nginx/{{ flyspray_domain }}/access.log;
error_log /var/log/nginx/{{ flyspray_domain }}/error.log;
ssl_certificate /etc/letsencrypt/live/{{ flyspray_domain }}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/{{ flyspray_domain }}/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/{{ flyspray_domain }}/chain.pem;
location /setup {
deny all;
}
location /attachments {
location ~ \.php$ {return 403;}
}
location /cache {
location ~ \.php$ {return 403;}
}
location / {
include fastcgi_params;
fastcgi_pass flyspray;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment