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
67356345
Commit
67356345
authored
5 years ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
ansible-playbooks/general#85 Linting
parent
4ddf9ce8
No related branches found
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
defaults/main.yml
+2
-0
2 additions, 0 deletions
defaults/main.yml
tasks/apache.yml
+1
-1
1 addition, 1 deletion
tasks/apache.yml
tasks/install.yml
+41
-41
41 additions, 41 deletions
tasks/install.yml
tasks/main.yml
+76
-76
76 additions, 76 deletions
tasks/main.yml
with
120 additions
and
118 deletions
defaults/main.yml
+
2
−
0
View file @
67356345
---
nextcloud_version
:
16.0.1
nextcloud_plugins
:
-
announcementcenter
...
...
This diff is collapsed.
Click to expand it.
tasks/apache.yml
+
1
−
1
View file @
67356345
...
...
@@ -25,7 +25,7 @@
-
name
:
Apache enable our new site(s)
command
:
a2ensite nextcloud-{{ nextcloud.id }}
args
args
:
creates
:
/etc/apache2/sites-enabled/nextcloud-{{ nextcloud.id }}{{ apache_conf_ext }}
notify
:
-
Restart Apache
...
...
This diff is collapsed.
Click to expand it.
tasks/install.yml
+
41
−
41
View file @
67356345
...
...
@@ -2,20 +2,20 @@
# file: roles/nextcloud/tasks/install.yml
-
block
:
-
set_fact
:
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
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'
when
:
nextcloud.jail is defined
-
set_fact
:
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
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'
when
:
nextcloud.jail is defined
tags
:
-
always
...
...
@@ -211,33 +211,33 @@
-
block
:
-
name
:
Enable Plugins
command
:
'
{{
webRoot
}}/occ
app:enable
{{
item.id
}}
--no-interaction
--no-warnings'
become_user
:
'
{{
apacheUser
}}'
ignore_errors
:
yes
with_items
:
'
{{
nextcloud_plugins_public
}}'
when
:
item.latest_release.version != plugin_versions[item.id]|default('0.0.0')
tags
:
-
deploy
-
plugins
-
name
:
Run Upgrade
command
:
'
{{
webRoot
}}/occ
upgrade
--no-interaction
--no-warnings'
become_user
:
'
{{
apacheUser
}}'
ignore_errors
:
yes
tags
:
-
deploy
-
plugins
-
name
:
Enable Plugins
command
:
'
{{
webRoot
}}/occ
app:enable
{{
item.id
}}
--no-interaction
--no-warnings'
become_user
:
'
{{
apacheUser
}}'
ignore_errors
:
yes
with_items
:
'
{{
nextcloud_plugins_public
}}'
when
:
item.latest_release.version != plugin_versions[item.id]|default('0.0.0')
tags
:
-
deploy
-
plugins
-
name
:
Enable Plugins
command
:
'
{{
webRoot
}}/occ
app:enable
{{
item.id
}}
--no-interaction
--no-warnings'
become_user
:
'
{{
apacheUser
}}'
ignore_errors
:
yes
with_items
:
'
{{
nextcloud_plugins_public
}}'
when
:
item.latest_release.version != plugin_versions[item.id]|default('0.0.0')
tags
:
-
deploy
-
plugins
-
name
:
Run Upgrade
command
:
'
{{
webRoot
}}/occ
upgrade
--no-interaction
--no-warnings'
become_user
:
'
{{
apacheUser
}}'
ignore_errors
:
yes
tags
:
-
deploy
-
plugins
-
name
:
Enable Plugins
command
:
'
{{
webRoot
}}/occ
app:enable
{{
item.id
}}
--no-interaction
--no-warnings'
become_user
:
'
{{
apacheUser
}}'
ignore_errors
:
yes
with_items
:
'
{{
nextcloud_plugins_public
}}'
when
:
item.latest_release.version != plugin_versions[item.id]|default('0.0.0')
tags
:
-
deploy
-
plugins
when
:
installed
...
...
This diff is collapsed.
Click to expand it.
tasks/main.yml
+
76
−
76
View file @
67356345
...
...
@@ -8,95 +8,95 @@
-
always
-
block
:
-
name
:
Install Certs
include_tasks
:
../../letsencrypt/tasks/cert.yml
with_items
:
'
{{
nextcloud_settings|default([])
}}'
loop_control
:
loop_var
:
domain
when
:
domain.protocol|default("https") == "https" and domain.letsencrypt|default(true)
-
name
:
Install Certs
include_tasks
:
../../letsencrypt/tasks/cert.yml
with_items
:
'
{{
nextcloud_settings|default([])
}}'
loop_control
:
loop_var
:
domain
when
:
domain.protocol|default("https") == "https" and domain.letsencrypt|default(true)
when
:
not excluded_roles or "letsencrypt" not in excluded_roles and groups.proxyserver is not defined
-
block
:
-
name
:
Ensure Download Directory
file
:
path
:
/opt/nextcloud-downloads
state
:
directory
tags
:
-
always
-
name
:
Ensure Download Directory
file
:
path
:
/opt/nextcloud-downloads
state
:
directory
tags
:
-
always
-
name
:
List Downlaods
shell
:
ls /opt/nextcloud-downloads -1
register
:
download_list
tags
:
-
always
-
name
:
List Downlaods
shell
:
ls /opt/nextcloud-downloads -1
register
:
download_list
tags
:
-
always
-
name
:
Lookup Plugins
set_fact
:
nextcloud_plugins_public
:
'
{{
lookup("nextcloud_plugins",
"{{
nextcloud_version
}}")
}}'
run_once
:
true
delegate_to
:
localhost
tags
:
-
always
-
name
:
Lookup Plugins
set_fact
:
nextcloud_plugins_public
:
'
{{
lookup("nextcloud_plugins",
"{{
nextcloud_version
}}")
}}'
run_once
:
yes
delegate_to
:
localhost
tags
:
-
always
-
name
:
Download Archive
get_url
:
url
:
https://download.nextcloud.com/server/releases/nextcloud-{{ nextcloud_version }}.zip
dest
:
/opt/nextcloud-downloads/nextcloud-{{ nextcloud_version }}.zip
when
:
download_list and ['nextcloud-', nextcloud_version, '.zip']|join('') not in download_list.stdout_lines
tags
:
-
deploy
-
name
:
Download Archive
get_url
:
url
:
https://download.nextcloud.com/server/releases/nextcloud-{{ nextcloud_version }}.zip
dest
:
/opt/nextcloud-downloads/nextcloud-{{ nextcloud_version }}.zip
when
:
download_list and ['nextcloud-', nextcloud_version, '.zip']|join('') not in download_list.stdout_lines
tags
:
-
deploy
-
name
:
Download Plugins
get_url
:
url
:
'
{{
item.latest_release.download
}}'
dest
:
/opt/nextcloud-downloads/{{ item.id }}-{{ item.latest_release.version }}.tar.gz
with_items
:
'
{{
nextcloud_plugins_public
}}'
when
:
item.needs_download
tags
:
-
deploy
-
plugins
-
name
:
Download Plugins
get_url
:
url
:
'
{{
item.latest_release.download
}}'
dest
:
/opt/nextcloud-downloads/{{ item.id }}-{{ item.latest_release.version }}.tar.gz
with_items
:
'
{{
nextcloud_plugins_public
}}'
when
:
item.needs_download
tags
:
-
deploy
-
plugins
-
name
:
Ensure Log Directory
file
:
path
:
/var/log/nextcloud
state
:
directory
owner
:
www-data
group
:
www-data
mode
:
0775
tags
:
-
ApacheConfig
-
name
:
Ensure Log Directory
file
:
path
:
/var/log/nextcloud
state
:
directory
owner
:
www-data
group
:
www-data
mode
:
0775
tags
:
-
ApacheConfig
-
name
:
Install logrotate script
template
:
src
:
etc-logrotate-nextcloud
dest
:
/etc/logrotate.d/nextcloud
owner
:
root
group
:
root
mode
:
0644
tags
:
-
ApacheConfig
-
logrotate
-
name
:
Install logrotate script
template
:
src
:
etc-logrotate-nextcloud
dest
:
/etc/logrotate.d/nextcloud
owner
:
root
group
:
root
mode
:
0644
tags
:
-
ApacheConfig
-
logrotate
-
name
:
Install NextCloud
include_tasks
:
install.yml
with_items
:
'
{{
nextcloud_settings|default([])
}}'
loop_control
:
loop_var
:
nextcloud
when
:
limit_site is not defined or limit_site == 'no' or nextcloud.id is not defined or limit_site == nextcloud.id
tags
:
-
ApacheConfig
-
cron
-
deploy
-
plugins
-
name
:
Install NextCloud
include_tasks
:
install.yml
with_items
:
'
{{
nextcloud_settings|default([])
}}'
loop_control
:
loop_var
:
nextcloud
when
:
limit_site is not defined or limit_site == 'no' or nextcloud.id is not defined or limit_site == nextcloud.id
tags
:
-
ApacheConfig
-
cron
-
deploy
-
plugins
-
name
:
Install Collabora server
include_tasks
:
collabora.yml
-
name
:
Install Collabora server
include_tasks
:
collabora.yml
-
name
:
Install TURN server
include_tasks
:
turn.yml
-
name
:
Install TURN server
include_tasks
:
turn.yml
-
name
:
Install tesseract
include_tasks
:
tesseract.yml
-
name
:
Install tesseract
include_tasks
:
tesseract.yml
when
:
not excluded_roles or "nextcloud" not in excluded_roles
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