Skip to content

Commit

Permalink
Ensure ansible-lint validates roles as well
Browse files Browse the repository at this point in the history
Change-Id: Id8ef04567f585b274cddc582e28c9eb9604f2a49
  • Loading branch information
mhuin committed Nov 15, 2023
1 parent 187e239 commit f4322b5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions playbooks/ansible-dependencies.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
- hosts: "{{ hostname | default('controller') }}"
tasks:
- name: Ensure ansible-lint is installed
shell: type ansible-galaxy || pip install --user ansible-core
- name: install required collections
shell: ansible-galaxy collection install community.general community.crypto ansible.posix kubernetes.core
2 changes: 2 additions & 0 deletions zuul.d/jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,13 @@
name: sf-operator-ansible-lint
description: Lint Ansible playbooks located in playbooks directory
timeout: 900
pre-run: playbooks/ansible-dependencies.yaml
parent: ansible-lint
vars:
# NOTE(dpawlik): We don't need to add roles dir, due there is a symlink
# done in playbooks that is related to roles dir.
ansible_lint_playbooks_dir: playbooks
ansible_lint_roles_dir: roles
ansible_lint_check_all: false
nodeset:
nodes:
Expand Down

0 comments on commit f4322b5

Please sign in to comment.