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

Update ansible-lint.yml #2425

Open
wants to merge 48 commits into
base: pub/new_architecture
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
e84ed7f
Update ansible-lint.yml
Aditya-DP Jan 29, 2025
a939d45
Update omnia.yml
Aditya-DP Jan 29, 2025
a90d859
Update ansible-lint.yml
Aditya-DP Jan 29, 2025
2b6cfec
Update ansible-lint.yml
Aditya-DP Jan 29, 2025
52b840c
Update ansible-lint.yml
Aditya-DP Jan 29, 2025
188f840
Update ansible-lint.yml
Aditya-DP Jan 29, 2025
19e6e57
Update ansible-lint.yml
Aditya-DP Jan 29, 2025
21525d6
Update ansible-lint.yml
Aditya-DP Jan 29, 2025
8189887
Ansible lint workflow
Aditya-DP Jan 29, 2025
9378bfe
Update ansible-lint.yml
Aditya-DP Jan 29, 2025
0a2e6bb
Update .ansible-lint.yml
Aditya-DP Jan 29, 2025
fa5620a
Update .ansible-lint.yml
Aditya-DP Jan 29, 2025
7910ba5
Update .ansible-lint.yml
Aditya-DP Jan 29, 2025
9784214
Update .ansible-lint.yml
Aditya-DP Jan 29, 2025
5903c05
Update ansible-lint.yml
Aditya-DP Jan 29, 2025
2b319d3
Update ansible-lint.yml
Aditya-DP Jan 29, 2025
b8513a1
Lint fix
Aditya-DP Jan 29, 2025
af666b7
Update omnia.yml
Aditya-DP Jan 29, 2025
fe95b47
Update .ansible-lint.yml
Aditya-DP Jan 29, 2025
35298d2
Update .ansible-lint.yml
Aditya-DP Jan 29, 2025
af693c8
Update .ansible-lint.yml
Aditya-DP Jan 29, 2025
c6a4612
Update .ansible-lint.yml
Aditya-DP Jan 29, 2025
e820ca6
Update ansible-lint.yml
Aditya-DP Jan 29, 2025
4ccbe9f
Update ansible-lint.yml
Aditya-DP Jan 29, 2025
26f7583
Update ansible-lint.yml
Aditya-DP Jan 29, 2025
c25e4b0
Update ansible-lint.yml
Aditya-DP Jan 29, 2025
7ed8de1
Update ansible-lint.yml
Aditya-DP Jan 29, 2025
3bb2cb2
OIM Omnia container startup script
Aditya-DP Jan 29, 2025
e855042
Update ansible-lint.yml
Aditya-DP Jan 29, 2025
1de3425
Update ansible-lint.yml
Aditya-DP Jan 29, 2025
5e162d3
Update ansible-lint.yml
Aditya-DP Jan 29, 2025
335ca0f
lint fix
Aditya-DP Jan 30, 2025
03c0a2e
Update ansible-lint.yml
Aditya-DP Jan 30, 2025
6eac3d0
Update ansible-lint.yml
Aditya-DP Jan 30, 2025
61fbfed
Update ansible-lint.yml
Aditya-DP Jan 30, 2025
2dfb68f
Update ansible-lint.yml
Aditya-DP Jan 30, 2025
d770e54
Update ansible-lint.yml
Aditya-DP Jan 30, 2025
3cd61aa
Update ansible-lint.yml
Aditya-DP Jan 30, 2025
e0d10a0
Update ansible-lint.yml
Aditya-DP Jan 30, 2025
4b24ff5
Update ansible-lint.yml
Aditya-DP Jan 30, 2025
d0e3298
Update ansible-lint.yml
Aditya-DP Jan 30, 2025
d49284d
Update ansible-lint.yml
Aditya-DP Jan 30, 2025
a6f1477
Update ansible-lint.yml
Aditya-DP Jan 30, 2025
eb8a7f4
Update ansible-lint.yml
Aditya-DP Jan 30, 2025
92c1dd6
Update ansible-lint.yml
Aditya-DP Jan 30, 2025
a7db6bc
Update ansible-lint.yml
Aditya-DP Jan 30, 2025
57af672
Update ansible-lint.yml
Aditya-DP Jan 30, 2025
1a4af55
Update ansible-lint.yml
Aditya-DP Jan 31, 2025
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
36 changes: 36 additions & 0 deletions .config/ansible-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
exclude_paths:
- .git/
- .github/
- accelerator/tests/
- network/
- provision/tests/
- scheduler/
- security/tests/
- storage/tests/
- test/
- utils/test/
- utils/obsolete/
- utils/cluster/
- utils/k8s-upgrade/
- docs/
- test/
- input/
- platforms/
- examples/
- .ansible-lint.yml
- .readthedocs.yaml

warn_list:
- yaml
- meta-no-info
- meta-incorrect
- fqcn-builtins

skip_list:
- var-naming[no-role-prefix]
- fqcn[action-core]
- unresolved-module

verbosity: 1
profile: production
25 changes: 25 additions & 0 deletions .config/requirements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
collections:
- name: ansible.utils
version: 5.1.1
- name: community.crypto
version: 2.22.0
- name: community.docker
version: 3.12.1
- name: community.general
version: 9.4.0
- name: community.grafana
version: 2.1.0
- name: community.mysql
version: 3.10.3
- name: community.postgresql
version: 3.5.0
- name: dellemc.os10
version: 1.1.1
- name: dellemc.openmanage
version: 9.6.0
- name: kubernetes.core
version: 5.0.0
- name: https://github.com/kubernetes-sigs/kubespray
type: git
version: v2.25.0
89 changes: 18 additions & 71 deletions .github/workflows/ansible-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,80 +15,27 @@ on:
- release-1.5.1
- release-1.6
- release-1.7
- staging
- release-1.7.1
- pub/new_architecture

jobs:
ansible-lint:

build:
name: Ansible Lint # Naming the build is important to use it as a status check
runs-on: ubuntu-latest

steps:
# Important: This sets up your GITHUB_WORKSPACE environment variable
- uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Ansible collections
run: |
python3 -m pip install --upgrade pip
pip install ansible

- name: ansible-lint
# replace "master" with any valid ref
uses: ansible/ansible-lint-action@c37fb7b4bda2c8cb18f4942716bae9f11b0dc9bc
with:
# [required]
# Paths to ansible files (i.e., playbooks, tasks, handlers etc..)
# or valid Ansible directories according to the Ansible role
# directory structure.
# If you want to lint multiple ansible files, use the following syntax
# targets: |
# playbook_1.yml
# playbook_2.yml
targets: |
/github/workspace/omnia.yml
/github/workspace/discovery_provision.yml
/github/workspace/local_repo/local_repo.yml
/github/workspace/server_spec_update/server_spec_update.yml
/github/workspace/scheduler/job_based_user_access.yml
/github/workspace/security/user_passwordless_ssh.yml
/github/workspace/storage/nfs_sas.yml
/github/workspace/storage/powervault.yml
/github/workspace/telemetry/add_node_idrac.yml
/github/workspace/tools/jupyterhub.yml
/github/workspace/tools/kserve.yml
/github/workspace/tools/kubeflow.yml
/github/workspace/tools/pytorch.yml
/github/workspace/tools/tensorflow.yml
/github/workspace/tools/vllm.yml
/github/workspace/utils/control_plane_cleanup.yml
/github/workspace/utils/delete_node.yml
/github/workspace/utils/remove_node_configuration.yml
/github/workspace/utils/reset_cluster_configuration.yml
/github/workspace/utils/update_user_repo.yml
/github/workspace/utils/servicetag_host_mapping.yml
/github/workspace/utils/software_update/software_update.yml
/github/workspace/utils/timescaledb_utility/timescaledb_utility.yml
/github/workspace/utils/ip_rule_assignment/ip_rule_assignment.yml
/github/workspace/utils/nodeinfo_db/nodeinfo_db.yml
# [optional]
# Arguments to override a package and its version to be set explicitly.
# Must follow the example syntax.
override-deps: |
ansible==6.7.0
ansible-lint==6.13.1
# [optional]
# Arguments to be passed to the ansible-lint
# - name: Install Ansible collections
# run: ansible-galaxy collection install -r .config/requirements.yml

# Options:
# -q quieter, although not silent output
# -p parseable output in the format of pep8
# --parseable-severity parseable output including severity of rule
# -r RULESDIR specify one or more rules directories using one or
# more -r arguments. Any -r flags override the default
# rules in ansiblelint/rules, unless -R is also used.
# -R Use default rules in ansiblelint/rules in addition to
# any extra
# rules directories specified with -r. There is no need
# to specify this if no -r flags are used
# -t TAGS only check rules whose id/tags match these values
# -x SKIP_LIST only check rules whose id/tags do not match these
# values
# --nocolor disable colored output
# --exclude=EXCLUDE_PATHS
# path to directories or files to skip. This option is
# repeatable.
# -c C Specify configuration file to use. Defaults to ".ansible-lint"
args: "-x 305"
- name: Run ansible-lint
uses: ansible/[email protected]
with:
args: --config=.config/ansible-lint.yml
8 changes: 4 additions & 4 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ sphinx:

# If using Sphinx, optionally build your docs in additional formats such as PDF
formats:
- pdf
- epub
- htmlzip
- pdf
- epub
- htmlzip

# Optionally declare the Python requirements required to build your docs
python:
install:
- requirements: docs/source/requirements.txt
- requirements: docs/source/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
- name: Create bring_up_ports.sh
when: not check_bring_up_script.stat.exists
ansible.builtin.blockinfile:
path: "{{ intel_bring_up_ports_script_path }}"

Check failure on line 43 in accelerator/roles/intel/tasks/make_sure_scale_out_interfaces_up.yml

View workflow job for this annotation

GitHub Actions / Ansible Lint

jinja[spacing]

Jinja2 spacing could be improved: #!/bin/bash
create: true
mode: "{{ file_permissions }}"
block: |
Expand Down Expand Up @@ -76,4 +76,3 @@
name: "Bring up Gaudi ports"
special_time: reboot
job: "{{ intel_bring_up_ports_script_path }}"

4 changes: 2 additions & 2 deletions accelerator/roles/nvidia/tasks/install_cuda_redhat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
changed_when: true

- name: Enable EPEL Repo
ansible.builtin.yum:
ansible.builtin.yum: # noqa fqcn[action-core]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add in .ansible_lint file with skip list

name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
state: present
disable_gpg_check: true
Expand All @@ -39,7 +39,7 @@
when: hostvars['localhost']['local_installer']
block:
- name: Install packages from cuda rpm file
ansible.builtin.yum:
ansible.builtin.yum: # noqa fqcn[action-core]
name: "{{ cuda_filepath }}"
state: present
disable_gpg_check: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
dest: "{{ omnia_common_xcat_repo }}"
mode: "{{ file_permission }}"
rescue:
- name: Warning - Failed to download racadm package
- name: Warning - Failed to download racadm package
ansible.builtin.pause:
prompt: "{{ download_racadm_warning_msg }}"
seconds: "{{ warning_time }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
until: download_racadm is not failed
retries: "{{ max_retries }}"
rescue:
- name: Warning - Failed to download racadm package
- name: Warning - Failed to download racadm package
ansible.builtin.pause:
prompt: "{{ download_racadm_warning_msg }}"
seconds: "{{ warning_time }}"
3 changes: 1 addition & 2 deletions discovery/roles/configure_xcat/ubuntu/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ racadm_tar_url: "https://dl.dell.com/FOLDER08952875M/1/Dell-iDRACTools-Web-LX-11
tarball_path: "{{ repo_store_path }}/cluster/tarball/"
racadm_tar_dest: "{{ tarball_path }}/racadm.tar.gz"
max_retries: 10
download_racadm_warning_msg: "[WARNING] Failed to download racadm package {{ racadm_tar_url }}. This can be due to internet connectivity issue. Please verify the connectivity and try again.
Skipping racadm configuration in the cluster."
download_racadm_warning_msg: "[WARNING] Failed to download racadm package {{ racadm_tar_url }}. This can be due to internet connectivity issue. Please verify the connectivity and try again. Skipping racadm configuration in the cluster." # noqa yaml[line-length]
warning_time: 30

# Usage: configure_kernel.yml
Expand Down
2 changes: 1 addition & 1 deletion discovery/roles/discovery_mechanism/common/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ dns_config_warning_msg: "[WARNING] makedns -n command is not successful. Error:"
xcat_sbin_path: /opt/xcat/sbin

# Usage: remove_old_ssh_key.yml
empty_discover_node_msg: |
empty_discover_node_msg: |
"Failed. No nodes were discovered. Please ensure the input related to discovery details is correct inside provision_config.yml and network_spec.yml
and check if IPMI is enabled on the nodes if using BMC discovery mechanism."
2 changes: 1 addition & 1 deletion discovery/roles/os_update/tasks/set_kernel_params.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
when: cmdline_value != ""
block:
- name: Servicetag Host mapping and run chdef command
ansible.builtin.command: "{{ python_version }} {{ servicetag_node_mapping_script }} {{ role_path }} {{ file_path }} {{ inventory_hostname_short }} {{ cmdline_value | quote }}"
ansible.builtin.command: "{{ python_version }} {{ servicetag_node_mapping_script }} {{ role_path }} {{ file_path }} {{ inventory_hostname_short }} {{ cmdline_value | quote }}" # noqa yaml[line-length]
register: chdef_result
changed_when: true

Expand Down
2 changes: 1 addition & 1 deletion discovery/roles/postscripts/common/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ ubuntu_reboot_script_path:

# Usage: configure_postsctipts_ntp.yml
setup_ntp_warning_msg: "[WARNING] Failed to setup NTP server in Omnia Infrastructure Manager. This can be due to public NTP pools blocked via ICMP.
Skipping NTP configuration in the cluster. If public NTP pools not reachable from Omnia Infrastructure Manager, set ntp_support to false in provison_config.yml."
Skipping NTP configuration in the cluster. If public NTP pools not reachable from Omnia Infrastructure Manager, set ntp_support to false in provison_config.yml." # noqa yaml[line-length]
warning_time: 30
async_time: 300
poll_time: 15
2 changes: 1 addition & 1 deletion discovery_provision.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
- name: Set flag to indicate check_package_lock.yml has been executed
ansible.builtin.set_fact:
apt_lock_status: true

- name: Set inventory_status
ansible.builtin.set_fact:
inventory_status: true
Expand All @@ -43,7 +43,7 @@

- name: Validate inventory file
include_role:
name: utils/server_spec_update/roles/server_spec_validation

Check failure on line 46 in discovery_provision.yml

View workflow job for this annotation

GitHub Actions / Ansible Lint

role-name[path]

Avoid using paths when importing roles. (utils/server_spec_update/roles/server_spec_validation)
when: inventory_status | default(false) | bool

- name: Validate discovery parameters # noqa:role-name[path]
Expand Down
25 changes: 25 additions & 0 deletions requirements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
collections:
- name: ansible.utils
version: 5.1.1
- name: community.crypto
version: 2.22.0
- name: community.docker
version: 3.12.1
- name: community.general
version: 9.4.0
- name: community.grafana
version: 2.1.0
- name: community.mysql
version: 3.10.3
- name: community.postgresql
version: 3.5.0
- name: dellemc.os10
version: 1.1.1
- name: dellemc.openmanage
version: 9.6.0
- name: kubernetes.core
version: 5.0.0
- name: https://github.com/kubernetes-sigs/kubespray
type: git
version: v2.25.0
Loading