Skip to content
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: 12 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
profile: production

exclude_paths:
- tests/

skip_list:
- var-naming[no-role-prefix]
- galaxy[no-changelog]

mock_modules:
- agnosticd.core.agnosticd_user_info
34 changes: 0 additions & 34 deletions .github/workflows/static-checks-pr.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,34 +1,35 @@
---
name: Static Checks Push
name: Static Checks

on:
"on":
push:
branches:
- main
tags:
- v*
pull_request:
branches:
- main

jobs:
static-checks:
name: Run static tests using tox
name: Run yamllint and ansible-lint
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- '3.12'

steps:
- name: Get Repository Code
id: get_repo_code
uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Run static checks
run: |
pip install tox
tox -c tests/static
...
29 changes: 29 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
extends: default

ignore:
- .tox/
- .git/

rules:
braces:
min-spaces-inside: 0
max-spaces-inside: 1
brackets:
min-spaces-inside: 0
max-spaces-inside: 1
comments:
require-starting-space: false
min-spaces-from-content: 1
comments-indentation: disable
document-start: false
indentation:
spaces: 2
indent-sequences: consistent
line-length:
max: 150
allow-non-breakable-inline-mappings: false
new-line-at-end-of-file: false
octal-values:
forbid-implicit-octal: true
forbid-explicit-octal: true
4 changes: 2 additions & 2 deletions galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ license_file: ''

# A list of tags you want to associate with the collection for indexing/searching. A tag name has the same character
# requirements as 'namespace' and 'name'
tags: []
tags:
- cloud

# Collections that this collection requires to be installed for it to be usable. The key of the dict is the
# collection label 'namespace.name'. The value is a version range
Expand Down Expand Up @@ -66,4 +67,3 @@ build_ignore: []
# 'omit_default_directives' is a boolean that controls whether the default directives are used. Mutually exclusive
# with 'build_ignore'
# manifest: null

53 changes: 1 addition & 52 deletions meta/runtime.yml
Original file line number Diff line number Diff line change
@@ -1,53 +1,2 @@
#SPDX-License-Identifier: MIT-0
---
# Collections must specify a minimum required ansible version to upload
# to galaxy
# requires_ansible: '>=2.9.10'

# Content that Ansible needs to load from another location or that has
# been deprecated/removed
# plugin_routing:
# action:
# redirected_plugin_name:
# redirect: ns.col.new_location
# deprecated_plugin_name:
# deprecation:
# removal_version: "4.0.0"
# warning_text: |
# See the porting guide on how to update your playbook to
# use ns.col.another_plugin instead.
# removed_plugin_name:
# tombstone:
# removal_version: "2.0.0"
# warning_text: |
# See the porting guide on how to update your playbook to
# use ns.col.another_plugin instead.
# become:
# cache:
# callback:
# cliconf:
# connection:
# doc_fragments:
# filter:
# httpapi:
# inventory:
# lookup:
# module_utils:
# modules:
# netconf:
# shell:
# strategy:
# terminal:
# test:
# vars:

# Python import statements that Ansible needs to load from another location
# import_redirection:
# ansible_collections.ns.col.plugins.module_utils.old_location:
# redirect: ansible_collections.ns.col.plugins.module_utils.new_location

# Groups of actions/modules that take a common set of options
# action_groups:
# group_name:
# - module1
# - module2
requires_ansible: '>=2.16.0'
4 changes: 3 additions & 1 deletion roles/ocp4_workload_nvidia_gpu_operator/meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ galaxy_info:
license: MIT
min_ansible_version: "2.9"
platforms:
- linux
- name: EL
versions:
- all
galaxy_tags:
- ocp
- openshift
Expand Down
4 changes: 3 additions & 1 deletion roles/ocp4_workload_nvidia_gpu_operator/tasks/workload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@

- name: Fail if no NodeFeatureDiscovery objects found
ansible.builtin.fail:
msg: "No NodeFeatureDiscovery objects found. Please install and configure the Node Feature Discovery operator before installing the NVIDIA GPU operator."
msg: >-
No NodeFeatureDiscovery objects found. Please install and configure
the Node Feature Discovery operator before installing the NVIDIA GPU operator.
when: r_nfd_objects.resources | length == 0

- name: Install NVIDIA GPU operator
Expand Down
4 changes: 2 additions & 2 deletions roles/ocp4_workload_ols/tasks/install_ols_operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
_ocp4_workload_ols_namespace: "{{ ocp4_workload_ols_namespace }}"

- name: Install OpenShift LightSpeed Operator
include_role:
ansible.builtin.include_role:
name: install_operator
vars:
install_operator_action: install
Expand All @@ -16,7 +16,7 @@
install_operator_automatic_install_plan_approval: "{{ ocp4_workload_ols_automatic_install_plan_approval | default(true) }}"
install_operator_csv_nameprefix: "{{ ocp4_workload_ols_csv_nameprefix }}"
install_operator_starting_csv: "{{ ocp4_workload_ols_starting_csv }}"
install_operator_catalogsource_setup: "{{ ocp4_workload_ols_use_catalog_snapshot | default(false)}}"
install_operator_catalogsource_setup: "{{ ocp4_workload_ols_use_catalog_snapshot | default(false) }}"
install_operator_catalogsource_name: "{{ ocp4_workload_ols_catalogsource_name | default('') }}"
install_operator_catalogsource_namespace: "{{ ocp4_workload_ols_catalogsource_namespace | default('') }}"
install_operator_catalogsource_image: "{{ ocp4_workload_ols_catalog_snapshot_image | default('') }}"
Expand Down
2 changes: 1 addition & 1 deletion roles/ocp4_workload_ols/tasks/workload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
# Setup Azure AI Cognitive Services (Token-based authentication)
- name: Setup Azure AI Cognitive Services
when: ocp4_workload_ols_get_token | bool
include_tasks: setup_azure_token.yaml
ansible.builtin.include_tasks: setup_azure_token.yaml

# Create authentication secrets based on auth type
- name: Create authentication secret
Expand Down
4 changes: 3 additions & 1 deletion roles/ocp4_workload_openshift_ai/meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ galaxy_info:
license: MIT
min_ansible_version: "2.9"
platforms:
- linux
- name: EL
versions:
- all
galaxy_tags:
- ocp
- openshift
Expand Down
6 changes: 4 additions & 2 deletions roles/ocp4_workload_openshift_ai/tasks/workload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,16 @@
_ocp4_workload_openshift_ai_installed_operator_csv: ""

- name: Find CSV for the rhods operator
set_fact:
ansible.builtin.set_fact:
_ocp4_workload_openshift_ai_installed_operator_csv: "{{ item.metadata.name }}"
loop: "{{ r_csvs.resources }}"
when: "'rhods-operator' in item.metadata.name"

- name: Set Openshift AI Version 3 boolean
ansible.builtin.set_fact:
_ocp4_workload_openshift_ai_version_3: "{{ _ocp4_workload_openshift_ai_installed_operator_csv.startswith('rhods-operator.3.') if _ocp4_workload_openshift_ai_installed_operator_csv else false }}"
_ocp4_workload_openshift_ai_version_3: >-
{{ _ocp4_workload_openshift_ai_installed_operator_csv.startswith('rhods-operator.3.')
if _ocp4_workload_openshift_ai_installed_operator_csv else false }}

- name: Create OpenShift AI Data Science Cluster
when: ocp4_workload_openshift_ai_deploy_dsc | bool
Expand Down
6 changes: 4 additions & 2 deletions roles/ocp4_workload_s3_model_copy_to_minio/meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ galaxy_info:
description: |
Move data from S3 to minio storage on openshift
license: MIT
min_ansible_version: 2.9
min_ansible_version: '2.9'
platforms:
- linux
- name: EL
versions:
- all
galaxy_tags:
- ocp
- s3
Expand Down
4 changes: 3 additions & 1 deletion roles/ocp4_workload_toolhive/meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ galaxy_info:
license: MIT
min_ansible_version: "2.9"
platforms:
- linux
- name: EL
versions:
- all
galaxy_tags:
- ocp
- openshift
Expand Down
2 changes: 1 addition & 1 deletion roles/ocp4_workload_toolhive/tasks/remove_workload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
state: absent
name: toolhive-operator
release_namespace: "{{ ocp4_workload_toolhive_namespace }}"

- name: Delete toolhive-operator-crds Helm chart
kubernetes.core.helm:
state: absent
Expand Down
20 changes: 0 additions & 20 deletions tests/static/.coveragerc

This file was deleted.

5 changes: 0 additions & 5 deletions tests/static/.flake8

This file was deleted.

Loading
Loading