# Unsupported parameters for (debug) module:

**URL:** <https://forum.ansible.com/t/unsupported-parameters-for-debug-module/4415>\
**Category:** Get Help\
**Tags:** playbook\
**Created:** [March 17, 2024, 3:20pm UTC](https://forum.ansible.com/t/unsupported-parameters-for-debug-module/4415 "2024-03-17T15:20:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![halavehzadeh](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/halavehzadeh/32/2608_2.png) [@halavehzadeh](https://forum.ansible.com/u/halavehzadeh)\
**Post date:** [March 17, 2024, 3:20pm UTC](https://forum.ansible.com/t/unsupported-parameters-for-debug-module/4415/1 "2024-03-17T15:20:46Z")

</div>

Hi everyone , I am pretty new to Ansible and new learner.  
I have an issue with one of my playbook. here is my playbook yml file:

1 —  
2 - name: “React with Change Example”  
3 hosts: webservers  
4 serial: 1  
5  
6 tasks:  
7  
8 - name: “Install nginx”  
9 debug:  
10 msg: “Install nginx on : {{ inventory\_hostname }}”  
11  
12 - name: “Upgrade nginx”  
13 debug:  
14 msg: “Upgrade nginx on : {{ inventory\_hostname }}”  
15  
16 - name: “Configure nignx”  
17 debug:  
18 msg: “Start {{ inventory\_hostname }}”  
19 notify: restart nginx  
20 # changed\_when: True  
21  
22 - name: “Verify nginx”  
23 debug:  
24 msg: “Verify: {{ inventory\_hostname }}”  
25  
26 handlers:  
27 - name: restart nginx  
28 debug:  
29 msg: “CALLED HANDLER FOR RESTART”

after I run the playbook I face this issue ,

TASK [Verify nginx] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
task path: /home/andrew/ansible/change.yml:22  
The full traceback is:  
NoneType: None  
fatal: [server1]: FAILED! =\>  
msg: ‘Unsupported parameters for (debug) module: handlers. Supported parameters include: msg, var, verbosity.’

any one have same experience issue?

---

<div class="post-metadata">

**Author:** ![kurokobo](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kurokobo/32/182_2.png) [@kurokobo](https://forum.ansible.com/u/kurokobo)\
**Post date:** [March 17, 2024, 3:55pm UTC](https://forum.ansible.com/t/unsupported-parameters-for-debug-module/4415/2 "2024-03-17T15:55:18Z")

</div>

@halavehzadeh

> msg: ‘Unsupported parameters for (debug) module: handlers. Supported parameters include: msg, var, verbosity.’

Perhaps this is indentation issue in your playbook. Indentation in YAML file is very important because it represents the structure of the data.  
I guess the excessive indentation of `handlers` on line 26 causes it to be treated as a parameter to `debug` on line 23.

The text you pasted is a bit broken and it is difficult to see actual indentation for each lines to identify the lines that should be modified, so could you please provide the contents of the complete YAML file in one of the following ways?

- Fornat pasted text with the code block
  - ![image](https://us1.discourse-cdn.com/ansible/original/2X/4/48cbbab1e245bcbdc84ba51eada126979fcda407.png)

- Paste screenshot of your YAML file
- Upload actual YAML file

---

<div class="post-metadata">

**Author:** ![halavehzadeh](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/halavehzadeh/32/2608_2.png) [@halavehzadeh](https://forum.ansible.com/u/halavehzadeh)\
**Post date:** [March 17, 2024, 4:03pm UTC](https://forum.ansible.com/t/unsupported-parameters-for-debug-module/4415/3 "2024-03-17T16:03:19Z")

</div>

```auto
---
  - name: "React with Change Example"
    hosts: webservers
    serial: 1

    tasks:

     - name: "Install nginx"
       debug:
        msg: "Install nginx on : {{ inventory_hostname }}"

     - name: "Upgrade nginx"
       debug:
        msg: "Upgrade nginx on : {{ inventory_hostname }}"

     - name: "Configure nignx"
       debug:
        msg: "Start {{ inventory_hostname }}"
       notify: restart nginx
# changed_when: True

     - name: "Verify nginx"
       debug:
        msg: "Verify: {{ inventory_hostname }}"

        handlers:
          - name: restart nginx
            debug:
              msg: "CALLED HANDLER FOR RESTART"

```

---

<div class="post-metadata">

**Author:** ![kurokobo](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kurokobo/32/182_2.png) [@kurokobo](https://forum.ansible.com/u/kurokobo)\
**Post date:** [March 17, 2024, 4:25pm UTC](https://forum.ansible.com/t/unsupported-parameters-for-debug-module/4415/4 "2024-03-17T16:25:45Z")

</div>

@halavehzadeh  
Thanks for updating, `handlers` should be the same level as `tasks`. Also, to increase indentation, two or four spaces are recommended instead of one, to make playbooks easy to read. I usualy use two spaces.

Example:

```yaml
---
- name: "React with Change Example"
  hosts: localhost
  serial: 1

  tasks:

    - name: "Install nginx"
      debug:
        msg: "Install nginx on : {{ inventory_hostname }}"

    - name: "Upgrade nginx"
      debug:
        msg: "Upgrade nginx on : {{ inventory_hostname }}"

    - name: "Configure nignx"
      debug:
        msg: "Start {{ inventory_hostname }}"
      notify: restart nginx
      #changed_when: True

    - name: "Verify nginx"
      debug:
        msg: "Verify: {{ inventory_hostname }}"

  handlers:
    - name: restart nginx
      debug:
        msg: "CALLED HANDLER FOR RESTART"

```

---

<div class="post-metadata">

**Author:** ![halavehzadeh](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/halavehzadeh/32/2608_2.png) [@halavehzadeh](https://forum.ansible.com/u/halavehzadeh)\
**Post date:** [March 17, 2024, 5:05pm UTC](https://forum.ansible.com/t/unsupported-parameters-for-debug-module/4415/5 "2024-03-17T17:05:59Z")

</div>

Thanks it is worked for me with no error . 😊

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [April 16, 2024, 5:06pm UTC](https://forum.ansible.com/t/unsupported-parameters-for-debug-module/4415/6 "2024-04-16T17:06:08Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
