Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ansible linter #6

Merged
merged 1 commit into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .ansible-lint
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
mock_roles:
- rhtelco.automation.hyperv
- rhtelco.automation.hv_provision

exclude_paths:
- playbooks/_*.yml
# - roles/
- roles/storage

skip_list:
- skip_this_tag

warn_list:
- fqcn[action-core]
- galaxy[no-changelog]
- var-naming[no-role-prefix]
- name[play]
2 changes: 1 addition & 1 deletion .github/workflows/ansible-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ jobs:
args: "-c .ansible-lint"
setup_python: "true"
working_directory: ""
requirements_file: ""
requirements_file: "ansible-requirements.yaml"
5 changes: 0 additions & 5 deletions ansible-requirements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,3 @@ collections:
version: 5.0.0
- name: kubevirt.core # Utilized in deploy_manager_vm role
version: 2.1.0

roles:
- name: storage # for managing storage on HV
src: https://github.com/linux-system-roles/storage
version: 1.8.1
3 changes: 3 additions & 0 deletions galaxy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace: rhtelco

Check warning on line 1 in galaxy.yml

View workflow job for this annotation

GitHub Actions / Ansible Lint

galaxy[no-changelog]

No changelog found. Please add a changelog file. Refer to the galaxy.md file for more info.
name: automation
readme: README.md
authors:
Expand All @@ -9,6 +9,9 @@
tags:
- automation
- telco
- infrastructure
- linux
- tools
dependencies: {}
repository: https://github.com/openshift-kni/telco-ci
documentation: https://github.com/openshift-kni/telco-ci
Expand Down
2 changes: 1 addition & 1 deletion meta/runtime.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
requires_ansible: ">=2.8"
requires_ansible: ">=2.15.0"
15 changes: 7 additions & 8 deletions playbooks/performance_profile.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
##
# This playbook applies performance profile configmap to
# hosted cluster nodes.
# Note: Currently this playbook assumes there is only one
Expand All @@ -10,13 +9,13 @@
# Provide
# kubeconfig path of the management clusters example: /home/kni/hcp-jobs/sno-cnfqe1/config/kubeconfig
#
#ansible-playbook -vv playbooks/performance_profile.yml -e kubeconfig=/home/kni/hcp-jobs/sno-cnfqe1/config/kubeconfig
##
# ansible-playbook -vv playbooks/performance_profile.yml -e kubeconfig=/home/kni/hcp-jobs/sno-cnfqe1/config/kubeconfig

- hosts: localhost

Check warning on line 14 in playbooks/performance_profile.yml

View workflow job for this annotation

GitHub Actions / Ansible Lint

name[play]

All plays should be named.
tasks:
- name: Apply performance profile
vars:
pp_kubeconfig: "{{ kubeconfig }}"
include_role:
name: performance_profile

- name: Apply performance profile

Check warning on line 17 in playbooks/performance_profile.yml

View workflow job for this annotation

GitHub Actions / Ansible Lint

fqcn[action-core]

Use FQCN for builtin module actions (include_role).
vars:
pp_kubeconfig: "{{ kubeconfig }}"

Check warning on line 19 in playbooks/performance_profile.yml

View workflow job for this annotation

GitHub Actions / Ansible Lint

var-naming[no-role-prefix]

Variables names from within roles should use performance_profile_ as a prefix. (vars: pp_kubeconfig)
include_role:
name: performance_profile
2 changes: 1 addition & 1 deletion roles/performance_profile/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
namespace: "{{ nodepool_namespace }}"
spec:
tuningConfig:
- name: "{{ performance_configmap_name }}"
- name: "{{ performance_configmap_name }}"

- name: Check if Nodepool is updating
kubernetes.core.k8s_info:
Expand Down
Loading