Lecture: Roles - Using Notification Playbook fails

When new notification added to the webservers role.  Complains about the "debug" statement.

  • post-author-pic
    Stosh O
    10-04-2018

    Hi there,

    Can you provide your role definition?

    Thanks!

  • post-author-pic
    Ted G
    10-04-2018

    webservers



  • post-author-pic
    Ted G
    10-04-2018

    been going through the roles lectures section in order.  All works well till this lecture and they have us add a extra notification to install telnet and a debug statement in tasks/main.yml


  • post-author-pic
    Terrence C
    10-04-2018

    The role definition is important, but the exact error message may be more instructive to know...

  • post-author-pic
    Ted G
    10-04-2018

    ERROR! this task 'debug' has extra params, which is only allowed in the following modules: shell, win_shell, include_vars, add_host, raw, .....etc


    THe error appears to have been in '/home/ansible/playbooks/Roles/roles/webservers/tasks/main.yml: line 11, column 3, but may be somewhere else in the file depending on the exact syntax problem.

    the offending line appears to be:

      ignore_errors: yes
    - debug: Need to install Telnet
       ^ here

  • post-author-pic
    Terrence C
    10-05-2018

    Thanks!


    The issue stems from the text you have on the line after the 'debug:' statement. Nothing else goes on that line. You can add some text you want to display, but it goes on the next line behind "msg:". See the Ansible documentation right here on debug.

  • post-author-pic
    Ted G
    10-08-2018

    Funny as it worked for the instructor when he did it on the lecture.  I vaughly remember useing msg: to go with debug statements on some earlier playbooks.

Looking For Team Training?

Learn More