Compare commits
1 Commits
b77d148e6e
...
28806de6e4
Author | SHA1 | Date | |
---|---|---|---|
28806de6e4 |
@ -44,8 +44,9 @@ traefik:
|
||||
|
||||
# nextcloud
|
||||
nextcloud:
|
||||
DB_NAME: nextcloud
|
||||
DB_USER: nextcloud
|
||||
DB_PASSWD: password
|
||||
ADMIN_PASSWD: password
|
||||
|
||||
# nextcloud
|
||||
#nextcloud_version: stable
|
||||
|
@ -5,17 +5,17 @@
|
||||
|
||||
- name: Create Nextcloud database
|
||||
community.mysql.mysql_db:
|
||||
name: "{{ nextcloud.DB_NAME | default('nextcloud') }}"
|
||||
name: "{{ nextcloud.DB_NAME }}"
|
||||
state: present
|
||||
login_unix_socket: /var/run/mysqld/mysqld.sock
|
||||
|
||||
- name: Create Nextcloud database user
|
||||
community.mysql.mysql_user:
|
||||
name: "{{ nextcloud.DB_USER | default('nextcloud') }}"
|
||||
name: "{{ nextcloud.DB_USER }}"
|
||||
password: "{{ nextcloud.DB_PASSWD }}"
|
||||
host: '%'
|
||||
state: present
|
||||
priv: "{{ nextcloud.DB_NAME | default('nextcloud') }}.*:ALL"
|
||||
priv: "{{ nextcloud.DB_NAME }}.*:ALL"
|
||||
login_unix_socket: /var/run/mysqld/mysqld.sock
|
||||
|
||||
- name: Start Nextcloud service and enable on boot
|
||||
@ -32,8 +32,9 @@
|
||||
|
||||
- name: Wait for Nextcloud to become available
|
||||
ansible.builtin.wait_for:
|
||||
host: "{{ nextcloud_info.container.NetworkSettings.Networks.traefik.IPAddress }}"
|
||||
delay: 10
|
||||
#debug:
|
||||
#host: "{{ nextcloud_info.container.NetworkSettings.Networks.traefik.IPAddress }}"
|
||||
#var: nextcloud_info.container.NetworkSettings
|
||||
port: 80
|
||||
|
||||
- name: Check Nextcloud status
|
||||
@ -42,16 +43,20 @@
|
||||
register: nextcloud_status
|
||||
changed_when: false
|
||||
|
||||
- name: Check status return
|
||||
debug:
|
||||
var: nextcloud_status.stderr[:26]
|
||||
|
||||
- name: Install Nextcloud
|
||||
ansible.builtin.command: 'docker exec --user www-data {{ nextcloud_name }}
|
||||
php occ maintenance:install
|
||||
--database "mysql"
|
||||
--database-host "{{ nextcloud.DB_HOST | default(''host.docker.internal'') }}"
|
||||
--database-name "{{ nextcloud.DB_NAME | default(''nextcloud'') }}"
|
||||
--database-user "{{ nextcloud.DB_USER | default(''nextcloud'') }}"
|
||||
--database-pass "{{ nextcloud.DB_PASSWD }}"
|
||||
--admin-user "{{ nextcloud.ADMIN_USER | default(''admin'') }}"
|
||||
--admin-pass "{{ nextcloud.ADMIN_PASSWD }}"'
|
||||
--database-host "{{ nextcloud_dbcontainer }}"
|
||||
--database-name "{{ nextcloud_dbname }}"
|
||||
--database-user "{{ nextcloud_dbuser }}"
|
||||
--database-pass "{{ nextcloud_dbpass }}"
|
||||
--admin-user "{{ nextcloud_admin }}"
|
||||
--admin-pass "{{ nextcloud_pass }}"'
|
||||
register: nextcloud_install
|
||||
when: nextcloud_status.stderr[:26] == "Nextcloud is not installed"
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
cached_dhparams_pem: /vagrant/scratch/dhparams.pem
|
@ -10,19 +10,6 @@
|
||||
state: started
|
||||
enabled: true
|
||||
|
||||
- name: Check for cached dhparams.pem file
|
||||
ansible.builtin.stat:
|
||||
path: "{{ cached_dhparams_pem }}"
|
||||
register: dhparams_file
|
||||
|
||||
- name: Copy cached dhparams.pem to /etc/ssl/
|
||||
ansible.builtin.copy:
|
||||
src: "{{ cached_dhparams_pem }}"
|
||||
dest: /etc/ssl/dhparams.pem
|
||||
mode: "600"
|
||||
remote_src: true
|
||||
when: dhparams_file.stat.exists
|
||||
|
||||
- name: Generate DH Parameters
|
||||
community.crypto.openssl_dhparam:
|
||||
path: /etc/ssl/dhparams.pem
|
||||
|
Loading…
Reference in New Issue
Block a user