#### Option A: upload otree project directly into ansible project
1. If no git-repository ``app_repo``-value with your otree configuration is provided, you have to place a copy of the project files (with scp) in ``files/<otree_username>/``.
#### Option B: clone via git and provide ssh keys
1. If git-repository ``app_repo`` is provided and the repo is private you have to setup key authentication.
2. Generate a public-private key pair in the ansible project ``keys/<otree_instance_name>/`` with ``ssh-keygen -f id -t ed25519 -N '' -a 100``
3. Upload public key in your git provider (GitLab: User Settings->SSH Keys) and make sure you have access to the specified project in ``app_repo``
And now run the playbook.
## change the configuration
1. Adapt your inventory-config again with ``nano ~/otree-ansible/group_vars/otree_servers.yml`` and run the playbook.
## setup ssh keys
1. Generate a public-private key pair in the ansible project ``keys/<otree_instance_name>/`` with ``ssh-keygen -f id -t ed25519 -N '' -a 100``
2. Upload public key in your git provider (GitLab: User Settings->SSH Keys) and make sure you have access to the specified project in ``app_repo``
## run the playbook
1. Change directory: ``cd ~/otree-ansible/``
2. Run: ``ansible-playbook site.yml``
\ No newline at end of file
2. Run: ``ansible-playbook site.yml``
## FAQ
### There is an error with redis in apt installation
Solution: Disable ipv6 in ``/etc/redis/redis.conf``