2

I have a yaml file for ansible

 # role: common # # common tasks # --- # # # # create default mariadb Audit db users # # -name: common | setup impactGroup group group: name=group system=no gid=510 ignore_errors: yes ~ 

I also have the proper server list s defined in the inventory file

when i execute the ansible-playbook command i get the following error

 /usr/bin/ansible-playbook -D /tmp/eabinay/test.yml -i /tmp/eabinay/dbServerInventory ERROR: parse error: playbooks must be formatted as a YAML list, got <type 'dict'> 

1 Answer 1

7

review indentation. This code work for me.

- name: common | setup impactGroup group group: name=group system=no gid=510 ignore_errors: yes 

check first with --syntax-check options:

/usr/bin/ansible-playbook -D /tmp/eabinay/test.yml -i /tmp/eabinay/dbServerInventory --syntax-check 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.