diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d7c88b861811c263508d1b15b2ce3e11342537a1..cf5438fbede98f1b1c4fbad0ff495e7db9d90d2e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -8,7 +8,7 @@ ansible-lint:
     - python -m pip install jmespath
     - ansible-galaxy role install Juniper.junos
   script:
-    - ansible-lint --exclude .py -f codeclimate | python -m json.tool | tee "${CI_PROJECT_DIR}/codeclimate-results.json"
+    - ansible-lint --exclude *.py -f codeclimate | python -m json.tool | tee "${CI_PROJECT_DIR}/codeclimate-results.json"
   artifacts:
     name: "$CI_JOB_NAME artifacts from $CI_PROJECT_NAME on $CI_COMMIT_REF_SLUG"
     reports: