# code: language=ansible --- - hosts: all name: Collabora CODE container tasks: # - name: Create podman volumes # containers.podman.podman_volume: # state: present # name: "{{ item }}" # become_user: containers # become: true # loop: # - collabora-config - name: Create podman networks containers.podman.podman_network: name: "{{ item }}" recreate: false state: "present" become_user: containers become: true loop: - traefik-collabora - nextcloud-collabora - name: Pull container images become_user: containers become: true containers.podman.podman_image: name: docker.io/{{ item }} loop: - collabora/code:latest - name: Add a collabora container become_user: containers become: true containers.podman.podman_container: name: collabora image: docker.io/collabora/code:latest state: present cap_add: - MKNOD network: - traefik-collabora - nextcloud-collabora # volume: # - collabora-config:/etc/coolwsd:Z label: io.containers.autoupdate: "registry" traefik.enable: "true" traefik.http.routers.collabora.entrypoints: "https" traefik.http.routers.collabora.rule: "PathPrefix(`/collabora`)" traefik.http.routers.collabora.tls: "true" traefik.http.routers.collabora.tls.certresolver: "wildcard" traefik.http.routers.collabora.service: "collabora" traefik.http.routers.collabora.middlewares: "collabora-prefixstrip@docker" traefik.http.middlewares.collabora-prefixstrip.stripprefix.prefixes: "/collabora" traefik.http.services.collabora.loadbalancer.server.port: "9980" traefik.docker.network: "traefik-collabora" env: domain: "chef\\.heaplab\\.deib\\.polimi\\.it/cloud" aliasgroup1: "chef\\.heaplab\\.deib\\.polimi\\.it/cloud" username: "{{ vault_collabora_user }}" password: "{{ vault_collabora_password }}" extra_params: "--o:ssl.enable=false --o:ssl.termination=true" generate_systemd: path: /home/containers/.config/systemd/user/ restart_policy: on-failure names: true new: true - name: Start containers at boot become_user: containers become: true ansible.builtin.systemd: scope: user name: container-{{ item }}.service enabled: true state: started daemon_reload: true loop: - collabora