# ansible playbook error

**URL:** <https://forum.ansible.com/t/ansible-playbook-error/32024>\
**Category:** Ansible Project\
**Created:** [January 22, 2020, 9:01am UTC](https://forum.ansible.com/t/ansible-playbook-error/32024 "2020-01-22T09:01:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sandy\_Hung](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@Sandy\_Hung](https://forum.ansible.com/u/Sandy_Hung)\
**Post date:** [January 22, 2020, 9:01am UTC](https://forum.ansible.com/t/ansible-playbook-error/32024/1 "2020-01-22T09:01:26Z")

</div>

ERROR! unexpected parameter type in action: \<class ‘ansible.parsing.yaml.objects.AnsibleSequence’\>

The error appears to be in ‘/home/sandy/phpldapadmin.yml’: line 8, column 6, but may  
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

- name: install phpopenldap  
^ here

sandy@test-VirtualBox:~$ sudo vi phpldapadmin.yml

- hosts: all  
remote\_user: sandy  
become: true

tasks:

- name: install phpopenldap  
apt:  
name: ‘{{item.name}}’  
state: ‘{{item.state | default(“present”)}}’  
purge: yes  
with\_items:

- name: phpldapadmin

- name: php

- name: libapache2-mod-php

- name: mcrypt

- name: php-mysql

# - name: Force certbot to use Python 3

# lineinfile:

# path: ‘{{ item }}’

# regexp: ‘^#!/usr/bin/python$’

# line: ‘#!/usr/bin/python3’

# with\_items:

# - /usr/bin/certbot

# ignore\_errors: yes

# failed\_when: no

# - name: stat phpldapadmin

# stat: path=/var/www/html/

# register: phpldapadmin\_stat

---

<div class="post-metadata">

**Author:** ![Vivek\_Kothawale](https://avatars.discourse-cdn.com/v4/letter/v/ea666f/32.png) [@Vivek\_Kothawale](https://forum.ansible.com/u/Vivek_Kothawale)\
**Post date:** [January 22, 2020, 9:14am UTC](https://forum.ansible.com/t/ansible-playbook-error/32024/2 "2020-01-22T09:14:56Z")

</div>

Hi Sandy,

The issue is with indentation  
Under tasks you have to give two white space to make it indent

Try following

tasks:

- name: something

Let me know if you have any issue.

Thanks,  
Vivek
