Skip to content
Snippets Groups Projects
Commit 493227e3 authored by jurgenhaas's avatar jurgenhaas
Browse files

ansible-playbooks/general#85 Linting [skip-ci]

parent 34235f9a
Branches
No related tags found
No related merge requests found
......@@ -11,7 +11,7 @@
group: root
mode: 0664
notify:
- "Apache | Restart Apache"
- "Restart Apache"
- name: Apache Configuration File for Collabora
template:
......@@ -21,17 +21,21 @@
group: root
mode: 0664
notify:
- "Apache | Restart Apache"
- "Restart Apache"
- name: Apache enable our new site(s)
command: a2ensite nextcloud-{{ nextcloud.id }} creates=/etc/apache2/sites-enabled/nextcloud-{{ nextcloud.id }}{{ apache_conf_ext }}
command: a2ensite nextcloud-{{ nextcloud.id }}
args
creates: /etc/apache2/sites-enabled/nextcloud-{{ nextcloud.id }}{{ apache_conf_ext }}
notify:
- "Apache | Restart Apache"
- "Restart Apache"
- name: Apache enable our new Collabora site(s)
command: a2ensite docs-{{ nextcloud.id }} creates=/etc/apache2/sites-enabled/docs-{{ nextcloud.id }}{{ apache_conf_ext }}
command: a2ensite docs-{{ nextcloud.id }}
args:
creates: /etc/apache2/sites-enabled/docs-{{ nextcloud.id }}{{ apache_conf_ext }}
notify:
- "Apache | Restart Apache"
- "Restart Apache"
- include_tasks: apache_auth.yml
when: nextcloud.apache_auth is defined and nextcloud.apache_auth.active|default(true)
......
......@@ -5,20 +5,20 @@
- name: Ensure Password Directory
file:
path='{{ dataRoot }}/passwords'
state='directory'
owner='{{ apacheUser }}'
group='{{ apacheUser }}'
mode='755'
path: '{{ dataRoot }}/passwords'
state: directory
owner: '{{ apacheUser }}'
group: '{{ apacheUser }}'
mode: 0755
- name: Setup AuthType Basic
htpasswd:
path='{{ dataRoot }}/passwords/{{ nextcloud.apache_auth.user }}'
name='{{ nextcloud.apache_auth.user }}'
password='{{ nextcloud.apache_auth.password }}'
owner='{{ apacheUser }}'
group='{{ apacheUser }}'
mode='640'
path: '{{ dataRoot }}/passwords/{{ nextcloud.apache_auth.user }}'
name: '{{ nextcloud.apache_auth.user }}'
password: '{{ nextcloud.apache_auth.password }}'
owner: '{{ apacheUser }}'
group: '{{ apacheUser }}'
mode: 0640
tags:
- ApacheConfig
......@@ -18,4 +18,4 @@
- name: Download latest Docker image
docker_image:
name: collabora/code
when: false
when: no
......@@ -3,18 +3,18 @@
- block:
- set_fact:
installed='{{ nextcloud.config.instanceid != "" }}'
installed: '{{ nextcloud.config.instanceid != "" }}'
- set_fact:
webRoot='/var/www/nextcloud/{{ nextcloud.id }}'
dataRoot='{{ nextcloud_data_dir|default("/var/www/nextcloud/_data") }}/{{ nextcloud.id }}'
apacheUser='www-data'
apacheLogDir='/var/log/apache2'
webRoot: /var/www/nextcloud/{{ nextcloud.id }}
dataRoot: '{{ nextcloud_data_dir|default("/var/www/nextcloud/_data") }}/{{ nextcloud.id }}'
apacheUser: www-data
apacheLogDir: /var/log/apache2
when: nextcloud.jail is not defined
- set_fact:
webRoot='{{ jailroot }}/{{ nextcloud.id }}/var/www/nextcloud'
dataRoot='{{ jailroot }}/{{ nextcloud.id }}/var/www/datanextcloud'
apacheUser='{{ nextcloud.id }}'
apacheLogDir='{{ jailroot }}/{{ nextcloud.id }}/var/log/apache2'
webRoot: '{{ jailroot }}/{{ nextcloud.id }}/var/www/nextcloud'
dataRoot: '{{ jailroot }}/{{ nextcloud.id }}/var/www/datanextcloud'
apacheUser: '{{ nextcloud.id }}'
apacheLogDir: '{{ jailroot }}/{{ nextcloud.id }}/var/log/apache2'
when: nextcloud.jail is defined
tags:
- always
......@@ -119,7 +119,7 @@
command: '{{ webRoot }}/occ app:list --no-interaction --no-warnings --output=json'
register: plugin_versions_collect
become_user: '{{ apacheUser }}'
ignore_errors: true
ignore_errors: yes
tags:
- deploy
- plugins
......@@ -214,7 +214,7 @@
- name: Enable Plugins
command: '{{ webRoot }}/occ app:enable {{ item.id }} --no-interaction --no-warnings'
become_user: '{{ apacheUser }}'
ignore_errors: true
ignore_errors: yes
with_items: '{{ nextcloud_plugins_public }}'
when: item.latest_release.version != plugin_versions[item.id]|default('0.0.0')
tags:
......@@ -224,7 +224,7 @@
- name: Run Upgrade
command: '{{ webRoot }}/occ upgrade --no-interaction --no-warnings'
become_user: '{{ apacheUser }}'
ignore_errors: true
ignore_errors: yes
tags:
- deploy
- plugins
......@@ -232,7 +232,7 @@
- name: Enable Plugins
command: '{{ webRoot }}/occ app:enable {{ item.id }} --no-interaction --no-warnings'
become_user: '{{ apacheUser }}'
ignore_errors: true
ignore_errors: yes
with_items: '{{ nextcloud_plugins_public }}'
when: item.latest_release.version != plugin_versions[item.id]|default('0.0.0')
tags:
......@@ -246,6 +246,3 @@
when: nextcloud.spreed is defined
tags:
- deploy
# N2YV6o!%@s$IFqhIvmlL
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment