- hosts: all become: true tasks: - name: ensure repository key is installed apt_key: url: https://download.docker.com/linux/ubuntu/gpg state: present - name: ensure docker registry is available apt_repository: repo='deb https://download.docker.com/linux/ubuntu bionic stable' state=present - name: ensure docker and dependencies are installed apt: pkg: - docker-ce - docker-ce-cli - containerd.io - docker-buildx-plugin - docker-compose-plugin - python3-docker - python3-pip update_cache: yes - service: name=docker state=started - name: Install docker-compose python package ansible.builtin.pip: name: docker-compose - name: clone repository ansible.builtin.git: repo: https://git.flokaiser.com/DHBW/Cloud_Computing_II.git dest: /home/adminuser/Cloud_Computing_II single_branch: yes version: main - name: deploy docker compose stack community.docker.docker_compose: project_src: /home/adminuser/Cloud_Computing_II files: - docker-compose.yml environment: CERTBOT_EMAIL: "{{ CERTBOT_EMAIL }}" DATABASE_URL: "{{ DATABASE_URL }}" AZURE_KEY: "{{ AZURE_KEY }}" AZURE_LOCATION: "{{ AZURE_LOCATION }}" AZURE_ENDPOINT: "https://api.cognitive.microsofttranslator.com" ENV: "dev"