uwieuwe4
uwieuwe4

Reputation: 153

Ansible: ERROR! conflicting action statements

When I run my ansible file i get the following error: conflicting action statements: user, uri

- name: Post Install watcher
  hosts:  director.0
  gather_facts: no
  tasks:
- name: Wait for Elastic Cluster to be ready
uri:
  url: https://mlaascloudui.{{ lookup('env','ENV') }}.pre.mls.eu.gs.aws.cloud.vwgroup.com/api/v1/clusters/elasticsearch/{{elasticClusterDetails.elasticsea$
  method: GET
  user: admin
  password: "{{rootpw.stdout}}"
  force_basic_auth: yes
  register: result
  until: result['status']|default(0) == 412
  retries: 60
  delay: 10
- name: Install watcher

syntactically the code is correct. the user and password should be used for basic auth and I used similar code elsewhere and don't get any errors. What am I missing?

Upvotes: 0

Views: 1465

Answers (1)

Lewis M
Lewis M

Reputation: 548

Remember your spacing. YAML is concern with the alignment of the spacing with the commands. Your "uri:" action should be aligned under "- name:". Ansible is thinking there are multiple actions associated with the "- name:" task.

Hope this helps.

Upvotes: 1

Related Questions