How do I format a list of strings in the command paramater for Prometheus in Ansible for a Docker Swarm Service?

I'm struggling to deploy my Grafana stack with Ansible on Docker Swarm. I can not get the service to start and I believe the issue to be in the command section of the service config. I don't know how to wrap each string in the list of commands so that it is parsed correctly when I deploy the service. All of my configs are coming from a working environment where I just deployed Docker containers with Ansible on a single host. I've been moving everything to Docker Swarm.

Thank you in advance for any help.

- name: Deploy Prometheus Service
  when: inventory_hostname == groups['managers'][0]
    name: prometheus
    hostname: "{{prometheus_hostname}}"
    image: "{{prometheus_docker_image}}:{{grafana_stack_version}}"
      - "{{traefik_network}}"
    mode: replicated
    force_update: yes
      - --config.file=/etc/prometheus/prometheus.yml
      - --storage.tsdb.path=/prometheus
      - --web.console.libraries=/usr/share/prometheus/console_libraries
      - --web.console.templates=/usr/share/prometheus/consoles
      condition: on-failure
        - == {{manager_node_id}}
    replicas: 1
      - source: /yellowtalon/apps/grafana/prometheus/
        target: /etc/prometheus/
        type: bind
      - source: prometheus
        target: /prometheus
        type: volume
    state: present
  tags: prometheus
How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum