Owasp ZAP installation errors

31 views
Skip to first unread message

rebecca acheampong

unread,
Apr 22, 2021, 8:55:44 AM4/22/21
to Ansible Project
I need help to install Owasp ZAP on Kali. I have this errors and I don't know what to do to fix it. Thank you.

ERROR! Syntax Error while loading YAML.
  could not find expected ':'

The error appears to be in '/home/ansible/ansible-demo/kali_ansible/owas_zap.yml': line 34, column 23, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

        api.disablekey=true -config api.addrs.addr.name=.* -config
                      ^ here

There appears to be both 'k=v' shorthand syntax and YAML in this task. Only one syntax may be used.


This is my playbook:

--
- name: setting up owasp zap container
  hosts: zap
  remote_user: "{{ remote_user_name }}"
  gather_facts: no
  become: yes
  vars:
    remote_user_name: ubuntu
    owasp_zap_image_name: owasp/zap2docker-weekly
  vars_files:
     - var_zap.yml

  tasks:
    - vmware_guest:
        hostname: "{{ VMWARE_HOST}}"
        username: "{{ VMWARE_USER }}"
        password: "{{ VMWARE_PASSWORD }}"
        validate_certs: no
        folder: ha-datacenter/vm/
        name: "{{ item }}"
      with_items:
        - my_vm_06
    - name: pulling {{ owasp_zap_image_name }} container
      docker_image:
        name: "{{ owasp_zap_image_name }}"
    - name: running owasp zap container
      docker_container:
        name: owasp-zap
        image: "{{ owasp_zap_image_name }}"
        interactive: yes
        state: started
user: zap
        command: zap.sh -daemon -host 127.0.0.1 -port 8090 -config
    api.disablekey=true -config api.addrs.addr.name=.* -config
    api.addrs.addr.regex=true
        ports:
          - "8090:8090"



vad...@gmail.com

unread,
Apr 22, 2021, 9:00:19 AM4/22/21
to ansible...@googlegroups.com
I would put the command in one line and run again. It looks like ansible thinks there are two lines and confusing it with a YAML definition.

--
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 ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/e9980b1e-44b6-4d52-be0f-30c401217aa7n%40googlegroups.com.


--
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

rebecca acheampong

unread,
Apr 22, 2021, 9:11:33 AM4/22/21
to ansible...@googlegroups.com
Hello Vadud, Please like what? How do i put the command in one line?
I am sorry I don't quite understand 

You received this message because you are subscribed to a topic in the Google Groups "Ansible Project" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/vBcFIWk4inI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAOHBbgUUA4FUucBEnCLC9%2BpM2Zc0HGRHE58%2BC1v7D9SNKFoSTA%40mail.gmail.com.

rebecca acheampong

unread,
Apr 22, 2021, 9:19:13 AM4/22/21
to ansible...@googlegroups.com
Thanks I have been able to work it out

Mike Eggleston

unread,
Apr 22, 2021, 9:22:27 AM4/22/21
to ansible...@googlegroups.com

rebecca acheampong

unread,
Apr 22, 2021, 9:54:02 AM4/22/21
to ansible...@googlegroups.com
I put all the command on one line like Vadud recommended.

Reply all
Reply to author
Forward
0 new messages