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 On Wed, Jan 22, 2020, 2:31 PM Sandy Hung <[email protected]> wrote: > 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 > > -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/e1627701-aaa8-42ba-92ce-1703693173d7%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/e1627701-aaa8-42ba-92ce-1703693173d7%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAA420E9wvc%2BOxR52fzK1gW%2BRLkLSNnmB12G818dhqinZEezuOw%40mail.gmail.com.
