Compare commits
18 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f8816c62f5 | ||
![]() |
57636880ba | ||
![]() |
6a8d5c01c6 | ||
![]() |
e9236730eb | ||
![]() |
2f254e348f | ||
![]() |
ad3fdc4e9c | ||
![]() |
38726fbe39 | ||
![]() |
3440685ee5 | ||
710c2a572f | |||
044f17d163 | |||
cf38b683ae | |||
b44e17ebbc | |||
a187c3e039 | |||
cff62f5f2a | |||
9ce8855f51 | |||
8297d853e9 | |||
8354403c41 | |||
![]() |
55b09c0b44 |
@ -23,7 +23,8 @@ nextcloud_admin_user: admin
|
||||
nextcloud_admin_password: password
|
||||
|
||||
# space separated trusted domains
|
||||
nextcloud_trusted_domains: ""
|
||||
nextcloud_trusted_domains:
|
||||
- "{{ nextcloud_domain }}"
|
||||
|
||||
# The install and update script is only triggered when a default command
|
||||
# is used (apache-foreground or php-fpm). If you use a custom command
|
||||
@ -46,12 +47,36 @@ nextcloud_smtp_authtype: LOGIN
|
||||
nextcloud_smtp_user: ""
|
||||
nextcloud_smtp_password: ""
|
||||
nextcloud_mail_from_address: ""
|
||||
nextcloud_mail_domain: ""
|
||||
nextcloud_mail_domain: "{{ nextcloud_domain }}"
|
||||
|
||||
# ldap
|
||||
nextcloud_ldap_enable: false
|
||||
nextcloud_ldap_host: "{{ ldap_uri | default('openldap') | regex_replace(':[0-9]+$') }}"
|
||||
nextcloud_ldap_port: "389"
|
||||
#nextcloud_ldap_backup_host: ""
|
||||
nextcloud_ldap_backup_port: "389"
|
||||
#nextcloud_ldap_agent_name: ""
|
||||
#nextcloud_ldap_agent_password: ""
|
||||
nextcloud_ldap_base: "dc={{ openldap_domain | default('example.com') | replace('.', ',dc=') }}"
|
||||
#nextcloud_ldap_base_users: ""
|
||||
#nextcloud_ldap_base_groups: ""
|
||||
#nextcloud_ldap_user_filter_objectclass: ""
|
||||
#nextcloud_ldap_user_filter: ""
|
||||
#nextcloud_ldap_login_filter: ""
|
||||
#nextcloud_ldap_group_filter_objectclass: ""
|
||||
#nextcloud_ldap_group_filter: ""
|
||||
#nextcloud_ldap_gid_number: ""
|
||||
#nextcloud_ldap_user_display_name: ""
|
||||
#nextcloud_ldap_user_display_name_2: ""
|
||||
#nextcloud_ldap_group_display_name: ""
|
||||
#nextcloud_ldap_email_attribute: ""
|
||||
#nextcloud_ldap_group_member_assoc_attr: ""
|
||||
#nextcloud_ldap_expert_username_attr: ""
|
||||
|
||||
# container
|
||||
nextcloud_image: nextcloud
|
||||
nextcloud_image: eumau/nextcloud
|
||||
nextcloud_container: nextcloud
|
||||
nextcloud_volume: nextcloud
|
||||
|
||||
# definido por rol docker
|
||||
docker_network_name: dockernet
|
||||
docker_network: dockernet
|
||||
|
@ -28,6 +28,7 @@
|
||||
login_port: "{{ mariadb_port }}"
|
||||
login_user: root
|
||||
login_password: "{{ mariadb_root_password }}"
|
||||
when: nextcloud_db_engine in ('mariadb','mysql')
|
||||
|
||||
- name: create nextcloud db user
|
||||
mysql_user:
|
||||
@ -40,6 +41,7 @@
|
||||
login_port: "{{ mariadb_port }}"
|
||||
login_user: root
|
||||
login_password: "{{ mariadb_root_password }}"
|
||||
when: nextcloud_db_engine in ('mariadb','mysql')
|
||||
|
||||
- name: start nextcloud container
|
||||
docker_container:
|
||||
@ -69,7 +71,7 @@
|
||||
NEXTCLOUD_TABLE_PREFIX: "{{ nextcloud_table_prefix }}"
|
||||
NEXTCLOUD_ADMIN_USER: "{{ nextcloud_admin_user }}"
|
||||
NEXTCLOUD_ADMIN_PASSWORD: "{{ nextcloud_admin_password }}"
|
||||
NEXTCLOUD_TRUSTED_DOMAINS: "{{ nextcloud_trusted_domains }}"
|
||||
NEXTCLOUD_TRUSTED_DOMAINS: "{{ nextcloud_trusted_domains | join(' ')}}"
|
||||
NEXTCLOUD_UPDATE: "{{ nextcloud_update }}"
|
||||
REDIS_HOST: "{{ nextcloud_redis_host }}"
|
||||
REDIS_HOST_PORT: "{{ nextcloud_redis_port }}"
|
||||
@ -81,28 +83,44 @@
|
||||
SMTP_PASSWORD: "{{ nextcloud_smtp_password }}"
|
||||
MAIL_FROM_ADDRESS: "{{ nextcloud_mail_from_address }}"
|
||||
MAIL_DOMAIN: "{{ nextcloud_mail_domain }}"
|
||||
LDAP_ENABLE: "{{ 'true' if nextcloud_ldap_enable else 'false' }}"
|
||||
LDAP_HOST: "{{ nextcloud_ldap_host }}"
|
||||
LDAP_PORT: "{{ nextcloud_ldap_port | string }}"
|
||||
LDAP_BACKUP_HOST: "{{ nextcloud_ldap_backup_host | default(omit) }}"
|
||||
LDAP_BACKUP_PORT: "{{ nextcloud_ldap_backup_port | string }}"
|
||||
LDAP_AGENT_NAME: "{{ nextcloud_ldap_agent_name | default(omit) }}"
|
||||
LDAP_AGENT_PASSWORD: "{{ nextcloud_ldap_agent_password | default(omit) }}"
|
||||
LDAP_BASE: "{{ nextcloud_ldap_base }}"
|
||||
LDAP_BASE_USERS: "{{ nextcloud_ldap_base_users | default(omit) }}"
|
||||
LDAP_BASE_GROUPS: "{{ nextcloud_ldap_base_groups | default(omit) }}"
|
||||
LDAP_USER_FILTER_OBJECTCLASS: "{{ nextcloud_ldap_user_filter_objectclass | default(omit) }}"
|
||||
LDAP_USER_FILTER: "{{ nextcloud_ldap_user_filter | default(omit) }}"
|
||||
LDAP_LOGIN_FILTER: "{{ nextcloud_ldap_login_filter | default(omit) }}"
|
||||
LDAP_GROUP_FILTER_OBJECTCLASS: "{{ nextcloud_ldap_group_filter_objectclass | default(omit) }}"
|
||||
LDAP_GROUP_FILTER: "{{ nextcloud_ldap_group_filter | default(omit) }}"
|
||||
LDAP_GID_NUMBER: "{{ nextcloud_ldap_gid_number | default(omit) }}"
|
||||
LDAP_USER_DISPLAY_NAME: "{{ nextcloud_ldap_user_display_name | default(omit) }}"
|
||||
LDAP_USER_DISPLAY_NAME_2: "{{ nextcloud_ldap_user_display_name_2 | default(omit) }}"
|
||||
LDAP_GROUP_DISPLAY_NAME: "{{ nextcloud_ldap_group_display_name | default(omit) }}"
|
||||
LDAP_EMAIL_ATTRIBUTE: "{{ nextcloud_ldap_email_attribute | default(omit) }}"
|
||||
LDAP_GROUP_MEMBER_ASSOC_ATTR: "{{ nextcloud_ldap_group_member_assoc_attr | default(omit) }}"
|
||||
LDAP_EXPERT_USERNAME_ATTR: "{{ nextcloud_ldap_expert_username_attr | default(omit) }}"
|
||||
networks:
|
||||
- name: "{{ docker_network_name }}"
|
||||
- name: "{{ docker_network }}"
|
||||
ports:
|
||||
|
||||
- name: template nginx config
|
||||
copy:
|
||||
content: |
|
||||
|
||||
location {{ nextcloud_web_root }} {
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_pass http://{{ nextcloud_container }};
|
||||
}
|
||||
dest: "{{ nginx_location_mountpoint }}/nextcloud.conf"
|
||||
register: ngconf
|
||||
|
||||
- name: restart frontend
|
||||
docker_container:
|
||||
name: "{{ nginx_container_name }}"
|
||||
restart: yes
|
||||
when: ngconf is changed
|
||||
- name: export nginx config
|
||||
set_fact:
|
||||
nginx_config: >-
|
||||
{{ nginx_config | default({}) | combine({
|
||||
nextcloud_domain: {
|
||||
"locations": {
|
||||
'/': {
|
||||
"proxy_pass": "https://{}:9010".format(nextcloud_container)
|
||||
}
|
||||
}
|
||||
}
|
||||
}, recursive=True) }}
|
||||
|
||||
- name: inspect nextcloud volume
|
||||
docker_volume_info:
|
||||
|
Loading…
x
Reference in New Issue
Block a user