How can I pass YAML array to `--extra-vars` in Ansible playbook?

I mean if I have a playbook:

```yaml
- hosts: "{{ hostName }}"
  remote_user: admin

```

Then I should call my playbook like

```bash
ansible-playbook DeployWar.yml \
  --extra-vars="hostName=tomcat-webApp"

```

But I want to run this playbook on two servers say `tomcat-webApp` and `tomcat-all`, and I want to control it from outside, i.e.: using `--extra-vars`.

What I have tried to do is:

```bash
ansible-playbook DeployWar.yml \
  --extra-vars="hostName=[tomcat-webApp, tomcat-all]"

ansible-playbook DeployWar.yml \
  --extra-vars="hostName={tomcat-webApp, tomcat-all}"

ansible-playbook DeployWar.yml \
  --extra-vars="[{hostName: tomcat-webApp}, {hostName: tomcat-all}]"

```

But in all cases my playbook fails declaring a syntax error in my call.