Reputation: 83
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
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