Member-only story

Ansible troubleshooting — Error 203: No Tabs

How to Solve the Ansible Error 203: no-tabs No Tabs

Luca Berton
4 min readOct 31, 2023

Introduction

Ansible, a versatile automation tool, empowers users to manage configurations, deploy software, and automate tasks with ease and efficiency. However, to maintain consistency and readability in your Ansible playbooks, it’s essential to adhere to best practices. In this article, we will explore Ansible Error 203, “no-tabs,” which draws attention to the use of tab characters (\t) in playbooks. We’ll delve into why using tabs can lead to unexpected display or formatting issues and how opting for spaces over tabs is the key to ensuring clean and reliable Ansible code.

The Problem: Tab Characters in Playbooks

Ansible Error 203, “no-tabs,” is designed to prevent the use of tab characters (\t) in playbooks. Tab characters can lead to unexpected formatting and display issues. Spaces are the recommended choice for maintaining consistent formatting and readability.

Problematic Code Example:

---
- name: Example playbook
hosts: all
tasks:
- name: Trigger the rule with a debug message
ansible.builtin.debug:
msg: "Using the \t character can cause formatting issues." # <- Includes the tab character.

--

--

Luca Berton
Luca Berton

Written by Luca Berton

I help creative Automation DevOps, Cloud Engineer, System Administrator, and IT Professional to succeed with Ansible Technology to automate more things everyday

No responses yet