From 17abd936c181f7a3fc5a3371498aae7331ad57de Mon Sep 17 00:00:00 2001 From: shirenn Date: Wed, 27 May 2020 00:23:49 +0200 Subject: [PATCH] Changes framadate to version 1.1.10 --- roles/framadate/handlers/main.yml | 6 ++++++ roles/framadate/tasks/main.yml | 21 +++++++++++++++------ roles/framadate/templates/config.php.j2 | 25 ++++++------------------- services_web.yml | 4 ++-- 4 files changed, 29 insertions(+), 27 deletions(-) create mode 100644 roles/framadate/handlers/main.yml diff --git a/roles/framadate/handlers/main.yml b/roles/framadate/handlers/main.yml new file mode 100644 index 00000000..6240a811 --- /dev/null +++ b/roles/framadate/handlers/main.yml @@ -0,0 +1,6 @@ +--- +- name: restart nginx + service: + name: nginx + state: restarted + diff --git a/roles/framadate/tasks/main.yml b/roles/framadate/tasks/main.yml index 52b79d4a..45b31cdc 100644 --- a/roles/framadate/tasks/main.yml +++ b/roles/framadate/tasks/main.yml @@ -1,6 +1,7 @@ --- # Setup dependencies - name: Install framadate APT dependencies + become: yes apt: update_cache: true name: @@ -10,6 +11,7 @@ - php-mbstring - php-pgsql - composer + - python3-passlib # Necessary for htpasswd module register: apt_result retries: 3 until: apt_result is succeeded @@ -20,11 +22,13 @@ dest: "{{ framadate.path }}" version: "{{ framadate.version }}" +# Cet item là raises forcement un changed à cause du recurse: true - name: Set perms on framadate code file: path: "{{ framadate.path }}" state: directory owner: www-data + group: www-data recurse: true - name: Install Framadate dependencies @@ -41,31 +45,36 @@ file: path: "{{ framadate.path }}/admin/stdout.log" owner: www-data - state: touch mode: 0600 - name: Configure framadate template: src: config.php.j2 - dest: '{{ framadate.path }}/app/inc/config.php' + dest: "{{ framadate.path }}/app/inc/config.php" owner: www-data - mode: 0640 + group: www-data - name: Configure admin password - copy: - content: "{{ framadate.admin_username }}:{{ framadate.admin_password_hash }}\n" - dest: /etc/nginx/.htpasswd + htpasswd: + path: /etc/nginx/.htpasswd + name: "{{ framadate.admin_username }}" + password: "{{ framadate.admin_password }}" + owner: root + group: www-data + mode: 640 - name: Configure nginx site template: src: nginx-site.j2 dest: /etc/nginx/sites-available/framadate + notify: restart nginx - name: Enable nginx site file: src: /etc/nginx/sites-available/framadate dest: /etc/nginx/sites-enabled/framadate state: link + notify: restart nginx - name: Indicate role in motd template: diff --git a/roles/framadate/templates/config.php.j2 b/roles/framadate/templates/config.php.j2 index 63597256..2e6995e4 100644 --- a/roles/framadate/templates/config.php.j2 +++ b/roles/framadate/templates/config.php.j2 @@ -1,6 +1,4 @@ -/** {{ ansible_header | comment }} -**/ 'Dutch', 'it' => 'Italiano', 'br' => 'Brezhoneg', - 'hu' => 'Magyar', ]; // Path to image file with the title @@ -108,7 +95,6 @@ $config = [ 'password' => '', // SMTP password 'secure' => '', // Enable encryption (false, tls or ssl) 'port' => 25, // TCP port to connect to - 'use_sendmail' => false, // If you use a local email relay / mail server ], /* home */ '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 'provide_fork_awesome' => true, // Whether the build-in fork-awesome should be provided ]; + diff --git a/services_web.yml b/services_web.yml index e579b017..29752237 100755 --- a/services_web.yml +++ b/services_web.yml @@ -12,8 +12,8 @@ version: "77bf2aaa0c344fd25535e2d0543d9a76bf35b5fd" path: /var/www/framadate admin_username: framadate - admin_password_hash: "{{ vault_framadate_password_hash }}" - password_db: "{{ vault_framadate_password_db }}" + admin_password: "{{ vault_framadate_password }}" + db_password: "{{ vault_framadate_password_db }}" roles: - framadate