Pages

Saturday 4 December 2021

Ansible skip lint

Recently I encountered an ansible error while running my playbooks. It was failing in ansible lint with YAML syntax error. It was a K8s descriptor file and it was working with kubectl. So I had to skip YAML lint for this file as below:


Skip lint

diff --git a/playbooks/k8s.yml b/playbooks/k8s.yml

index c412bcd..ed13f4d 100644

--- a/playbooks/k8s.yml

+++ b/playbooks/k8s.yml

@@ -171,13 +171,15 @@

loop:

         - api-crd.yml

         - target-type-crd.yml

-        - target-instance-crd.yml

+        - target-instance-crd.yml # noqa yaml

         - routing-crd.yml