Ansible yaml syntax failure

11,121

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
Share:
11,121
user_D_A__
Author by

user_D_A__

Updated on June 13, 2022

Comments

  • user_D_A__
    user_D_A__ almost 2 years

    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'>