Changes framadate to version 1.1.10

certbot_on_virtu
_shirenn 2020-05-27 00:23:49 +02:00
parent 6c06f51e24
commit 17abd936c1
4 changed files with 29 additions and 27 deletions

View File

@ -0,0 +1,6 @@
---
- name: restart nginx
service:
name: nginx
state: restarted

View File

@ -1,6 +1,7 @@
--- ---
# Setup dependencies # Setup dependencies
- name: Install framadate APT dependencies - name: Install framadate APT dependencies
become: yes
apt: apt:
update_cache: true update_cache: true
name: name:
@ -10,6 +11,7 @@
- php-mbstring - php-mbstring
- php-pgsql - php-pgsql
- composer - composer
- python3-passlib # Necessary for htpasswd module
register: apt_result register: apt_result
retries: 3 retries: 3
until: apt_result is succeeded until: apt_result is succeeded
@ -20,11 +22,13 @@
dest: "{{ framadate.path }}" dest: "{{ framadate.path }}"
version: "{{ framadate.version }}" version: "{{ framadate.version }}"
# Cet item là raises forcement un changed à cause du recurse: true
- name: Set perms on framadate code - name: Set perms on framadate code
file: file:
path: "{{ framadate.path }}" path: "{{ framadate.path }}"
state: directory state: directory
owner: www-data owner: www-data
group: www-data
recurse: true recurse: true
- name: Install Framadate dependencies - name: Install Framadate dependencies
@ -41,31 +45,36 @@
file: file:
path: "{{ framadate.path }}/admin/stdout.log" path: "{{ framadate.path }}/admin/stdout.log"
owner: www-data owner: www-data
state: touch
mode: 0600 mode: 0600
- name: Configure framadate - name: Configure framadate
template: template:
src: config.php.j2 src: config.php.j2
dest: '{{ framadate.path }}/app/inc/config.php' dest: "{{ framadate.path }}/app/inc/config.php"
owner: www-data owner: www-data
mode: 0640 group: www-data
- name: Configure admin password - name: Configure admin password
copy: htpasswd:
content: "{{ framadate.admin_username }}:{{ framadate.admin_password_hash }}\n" path: /etc/nginx/.htpasswd
dest: /etc/nginx/.htpasswd name: "{{ framadate.admin_username }}"
password: "{{ framadate.admin_password }}"
owner: root
group: www-data
mode: 640
- name: Configure nginx site - name: Configure nginx site
template: template:
src: nginx-site.j2 src: nginx-site.j2
dest: /etc/nginx/sites-available/framadate dest: /etc/nginx/sites-available/framadate
notify: restart nginx
- name: Enable nginx site - name: Enable nginx site
file: file:
src: /etc/nginx/sites-available/framadate src: /etc/nginx/sites-available/framadate
dest: /etc/nginx/sites-enabled/framadate dest: /etc/nginx/sites-enabled/framadate
state: link state: link
notify: restart nginx
- name: Indicate role in motd - name: Indicate role in motd
template: template:

View File

@ -1,6 +1,4 @@
/**
{{ ansible_header | comment }} {{ ansible_header | comment }}
**/
<?php <?php
/** /**
@ -24,7 +22,7 @@
// Fully qualified domain name of your webserver. // Fully qualified domain name of your webserver.
// If this is unset or empty, the servername is determined automatically. // If this is unset or empty, the servername is determined automatically.
// You *have to set this* if you are running Framadate behind a reverse proxy. // You *have to set this* if you are running Framadate behind a reverse proxy.
const APP_URL = 'abyme.adh.crans.org'; // const APP_URL = 'framadate.crans.org';
// Application name // Application name
const NOMAPPLICATION = 'Framadate'; const NOMAPPLICATION = 'Framadate';
@ -35,24 +33,14 @@ const ADRESSEMAILADMIN = 'contact@crans.org';
// Email for automatic responses (you should set it to "no-reply") // Email for automatic responses (you should set it to "no-reply")
const ADRESSEMAILREPONSEAUTO = 'no-reply@crans.org'; const ADRESSEMAILREPONSEAUTO = 'no-reply@crans.org';
// Database driver // Database server name, leave empty to use a socket
const DB_DRIVER = 'pdo_pgsql'; const DB_CONNECTION_STRING = 'mysql:host=localhost;dbname=framadate;port=3306';
// Database name
const DB_NAME = 'framadate';
// Database host
const DB_HOST = 'thot.crans.org';
// Database port
const DB_PORT = '5432';
// Database user // Database user
const DB_USER = 'framadate'; const DB_USER= 'framadate';
// Database password // Database password
// À remplir avec crans_passwords const DB_PASSWORD = '{{ framadate.db_password }}';
const DB_PASSWORD = '{{ password_db }}';
// Table name prefix // Table name prefix
const TABLENAME_PREFIX = 'fd_'; const TABLENAME_PREFIX = 'fd_';
@ -73,7 +61,6 @@ $ALLOWED_LANGUAGES = [
'nl' => 'Dutch', 'nl' => 'Dutch',
'it' => 'Italiano', 'it' => 'Italiano',
'br' => 'Brezhoneg', 'br' => 'Brezhoneg',
'hu' => 'Magyar',
]; ];
// Path to image file with the title // Path to image file with the title
@ -108,7 +95,6 @@ $config = [
'password' => '', // SMTP password 'password' => '', // SMTP password
'secure' => '', // Enable encryption (false, tls or ssl) 'secure' => '', // Enable encryption (false, tls or ssl)
'port' => 25, // TCP port to connect to 'port' => 25, // TCP port to connect to
'use_sendmail' => false, // If you use a local email relay / mail server
], ],
/* home */ /* home */
'show_what_is_that' => true, // display "how to use" section 'show_what_is_that' => true, // display "how to use" section
@ -121,3 +107,4 @@ $config = [
'markdown_editor_by_default' => true, // The markdown editor for the description is enabled by default 'markdown_editor_by_default' => true, // The markdown editor for the description is enabled by default
'provide_fork_awesome' => true, // Whether the build-in fork-awesome should be provided 'provide_fork_awesome' => true, // Whether the build-in fork-awesome should be provided
]; ];

View File

@ -12,8 +12,8 @@
version: "77bf2aaa0c344fd25535e2d0543d9a76bf35b5fd" version: "77bf2aaa0c344fd25535e2d0543d9a76bf35b5fd"
path: /var/www/framadate path: /var/www/framadate
admin_username: framadate admin_username: framadate
admin_password_hash: "{{ vault_framadate_password_hash }}" admin_password: "{{ vault_framadate_password }}"
password_db: "{{ vault_framadate_password_db }}" db_password: "{{ vault_framadate_password_db }}"
roles: roles:
- framadate - framadate