#################### # - Check Variables #################### - name: "[Play] Check that mandatory variables are defined" assert: that: - "stack_name is defined" #################### # - Stack Deployment #################### - name: "Deploy Stack: {{ stack_name }}" community.docker.docker_stack: state: "present" prune: "true" name: "{{ stack_name }}" compose: - "{{ lookup('file', stack_dir ~ '/docker-compose.yml') | from_yaml }}"