Hopefully someone here has been through the same scenario. I am trying to automate my Nextcloud deployment using ansible and a lot of custom configs. Everything is working well so fat, but a little caveat has me stumped.
During the install with a single APP server in the backend, I can run the following command and it works nicely
/bin/php /var/www/html/nextcloud/occ maintenance:install --database "mysql" --database-host "db_server_ip:3306" --database-name "nextcloud" --database-user "my_db_user" --database-pass "my_db_pass" --admin-user "admin" --admin-pass "admin_pass"
But, I won’t be able to run this command on the second app server, because the DB and the admin pass will already be existing, so it will error. How can I “install” the second app server to use the same admin password? My feeling is I can just copy and paste most of the config.php from the first app server over to the second one (if not the whole one?) and it should work? Can anyone maybe point me in the right direction?
Thanks for any help in advance!