Vit Dolphin
Vit Dolphin

Reputation: 83

ERROR: block is not a legal parameter in an Ansible task or handler

I have a simple block test playbook but i keep getting the error trying to execute it.

    ---
- hosts: webservers
  sudo: yes
  tasks:
    - block:
        - name:  this is a test
          debug: msg="blabla"
      when: ansible_fqdn.split('.')[1]=='dev'

Not sure at the moment what is causing this... please help!

Upvotes: 1

Views: 2487

Answers (1)

MillerGeek
MillerGeek

Reputation: 3137

As @ydaetskcoR pointed out, you need to install Ansible 2.0 to use blocks.

Repeating this here so there can be an accepted answer.

Upvotes: 3

Related Questions