--- - name: snackpot | server hosts: all vars: nextcloud_db_password: "{{lookup('passwordstore', 'servers/snackpot/nextcloud_db.password')}}" postgres_password: "{{lookup('passwordstore', 'servers/snackpot/postgres_db.password')}}" postgres_db_user: postgres nextcloud_hostname: nc.noodlefactory.co.uk nextcloud_base_dir: /var/www/html nextcloud_data_dir: /var/www/data nextcloud_db_user: nextcloud nextcloud_db: nextcloud letsencrypt_email: webmaster@noodlefactory.co.uk docker_compose_base_dir: /opt/docker-compose tasks: - include_role: name: docker_compose apply: { tags: docker_compose } tags: docker_compose vars: docker_compose_version: 1.27.4 - name: ensure directory exists file: path: "{{ docker_compose_base_dir }}/{{ item.path }}" state: directory with_filetree: templates/docker-compose when: item.state == "directory" - name: configure docker compose files template: dest: "{{ docker_compose_base_dir }}/{{ item.path }}" src: "docker-compose/{{ item.path }}" owner: root group: root mode: 0440 backup: yes notify: restart docker compose services with_filetree: templates/docker-compose when: item.state == "file" and not item.path.endswith("~") - name: ensure directory exists file: path: "{{ docker_compose_base_dir }}/bin" state: directory - name: install binaries template: dest: "{{ docker_compose_base_dir }}/bin/{{ item.path }}" src: "bin/{{ item.path }}" owner: root group: root mode: 0550 with_filetree: templates/bin when: item.state == "file" and not item.path.endswith("~") tags: test # config nextcloud # hide pg password