Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
NextCloud
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ansible
Roles
NextCloud
Commits
493227e3
Commit
493227e3
authored
5 years ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
ansible-playbooks/general#85 Linting [skip-ci]
parent
34235f9a
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
tasks/apache.yml
+10
-6
10 additions, 6 deletions
tasks/apache.yml
tasks/apache_auth.yml
+11
-11
11 additions, 11 deletions
tasks/apache_auth.yml
tasks/collabora.yml
+1
-1
1 addition, 1 deletion
tasks/collabora.yml
tasks/install.yml
+13
-16
13 additions, 16 deletions
tasks/install.yml
with
35 additions
and
34 deletions
tasks/apache.yml
+
10
−
6
View file @
493227e3
...
...
@@ -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)
...
...
This diff is collapsed.
Click to expand it.
tasks/apache_auth.yml
+
11
−
11
View file @
493227e3
...
...
@@ -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
:
0
755
-
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
:
0
640
tags
:
-
ApacheConfig
This diff is collapsed.
Click to expand it.
tasks/collabora.yml
+
1
−
1
View file @
493227e3
...
...
@@ -18,4 +18,4 @@
-
name
:
Download latest Docker image
docker_image
:
name
:
collabora/code
when
:
false
when
:
no
This diff is collapsed.
Click to expand it.
tasks/install.yml
+
13
−
16
View file @
493227e3
...
...
@@ -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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment