From 17e9627b0cb915e03a3eba41449b0d7dacdc1829 Mon Sep 17 00:00:00 2001 From: vincent Date: Sat, 6 Feb 2021 10:26:14 +0100 Subject: [PATCH] add PHP7 for compatibility tt-rss and nextcloud --- tasks/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index ada5ef5..e6c1ed6 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -66,7 +66,7 @@ - name: installation - ensure nextcloud config command: > - php {{ nextcloud_web_root }}/occ maintenance:install --database "{{ 'pgsql' if nextcloud_DB_type == 'postgres' else nextcloud_DB_type }}" --database-name "{{ nextcloud_db_name}}" + php7 {{ nextcloud_web_root }}/occ maintenance:install --database "{{ 'pgsql' if nextcloud_DB_type == 'postgres' else nextcloud_DB_type }}" --database-name "{{ nextcloud_db_name}}" --database-user "{{ nextcloud_db_user }}" --database-pass "{{ nextcloud_db_password }}" --admin-user "{{ nextcloud_admin_user }}" --admin-pass "{{ nextcloud_admin_password }}" --data-dir "{{ nextcloud_datadirectory }}" become: true @@ -86,7 +86,7 @@ when: nextcloud_config_options is defined - name: installation - ensure trusted domains are set - command: 'php {{ nextcloud_web_root }}/occ config:system:set trusted_domains {{ item.0 }} --value "{{ item.1 }}"' + command: 'php7 {{ nextcloud_web_root }}/occ config:system:set trusted_domains {{ item.0 }} --value "{{ item.1 }}"' become: true become_user: http changed_when: true @@ -118,7 +118,7 @@ - name: create cron for nextcloud cron: - job: "sudo -u http /usr/bin/php -f {{nextcloud_web_root}}/cron.php" + job: "sudo -u http /usr/bin/php7 -f {{nextcloud_web_root}}/cron.php" user: root # not required. The specific user whose crontab should be modified. minute: 0,15,30,45 # not required. Minute when the job should run ( 0-59, *, */2, etc ) name: "nextcloud recuring cron job" # not required. Description of a crontab entry or, if env is set, the name of environment variable. Required if state=absent. Note that if name is not set and state=present, then a new crontab entry will always be created, regardless of existing ones. @@ -126,7 +126,7 @@ - name: create cron for file scan cron: - job: "sudo -u http /usr/bin/php /usr/share/webapps/nextcloud/occ files:scan --all > /dev/null" + job: "sudo -u http /usr/bin/php7 /usr/share/webapps/nextcloud/occ files:scan --all > /dev/null" user: root # not required. The specific user whose crontab should be modified. minute: "00" # not required. Minute when the job should run ( 0-59, *, */2, etc ) hour: "4"