How to setup nextcloud witch s3 as primary storage scripted?

I want to extend my ansible playbooks to give the user the choice to select s3 as primary storage.

The problem:
If I just put "objectstore": {"class": "OC\\Files\\ObjectStore\\S3",... into the config.php after I create the nextcloud with php occ maintenance:install the default admin user can’t login anymore because his “home folder” isn’t found anymore.

Is there a way to migrate the folder to s3 automatically?
Is there a way to define s3 primary storage already with php occ maintenance:install?