Skip to content

Commit 9b773dd

Browse files
authored
Merge pull request sap-linuxlab#1118 from marcelmamula/linting
collection: Update linting workflows and configuration to latest version
2 parents 0e71a4f + a2216a2 commit 9b773dd

41 files changed

Lines changed: 218 additions & 774 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.ansible-lint

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,26 @@
11
---
2-
# Collection wide lint-file
3-
# DO NOT CHANGE
2+
## Collection wide ansible-lint configuration file.
3+
# Changes for ansible-lint v25.7.0+
4+
# - Always executed from collection root using collection configuration.
5+
# - .ansible-lint-ignore can be used to ignore files, not folders.
6+
## Execution examples:
7+
# ansible-lint
8+
# ansible-lint roles/sap_swpm
9+
# ansible-lint roles/sap_install_media_detect -c roles/sap_install_media_detect/.ansible-lint
10+
411
exclude_paths:
512
- .ansible/
613
- .cache/
714
- .github/
8-
#- docs/
915
- changelogs/
1016
- playbooks/
11-
- roles/sap_anydb_install_oracle
12-
#- roles/sap_general_preconfigure
13-
#- roles/sap_ha_install_anydb_ibmdb2
14-
#- roles/sap_ha_install_hana_hsr
15-
#- roles/sap_ha_pacemaker_cluster
16-
#- roles/sap_hana_install
17-
#- roles/sap_hana_preconfigure
18-
#- roles/sap_hostagent
19-
#- roles/sap_install_media_detect
20-
#- roles/sap_netweaver_preconfigure
21-
#- roles/sap_storage_setup
22-
#- roles/sap_swpm
2317
- tests/
18+
# Roles which need to be excluded until their linting errors are resolved:
19+
- roles/sap_anydb_install_oracle
20+
2421
enable_list:
2522
- yaml
23+
2624
skip_list:
2725
# We don't want to enforce new Ansible versions for Galaxy:
2826
- meta-runtime[unsupported-version]

.ansible-lint-ignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# This file is replacement for role specific .ansible-lint files with skip_list and warn_list.
2+
# Path has to point to a file because folders or wildcards are not accepted.
3+
4+
# 'sap_install_media_detect' sets variables used by 'sap_swpm' and 'sap_hana_install'
5+
roles/sap_install_media_detect/tasks/set_global_vars.yml var-naming[no-role-prefix]
6+
roles/sap_install_media_detect/tasks/find_files_after_extraction.yml var-naming[no-role-prefix]
7+
8+
# 'sap_ha_pacemaker_cluster' sets variables used by LSR role 'ha_cluster'.
9+
roles/sap_ha_pacemaker_cluster/tasks/construct_final_hacluster_vars.yml var-naming[no-role-prefix]
Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
---
2-
3-
# Workflow for ansible-lint of a role, using reusable workflow
4-
5-
name: ansible-lint of the role sap_general_preconfigure
2+
name: Ansible Lint - sap_general_preconfigure
63

74
on:
85
push:
@@ -17,15 +14,23 @@ on:
1714
- dev
1815
paths:
1916
- 'roles/sap_general_preconfigure/**'
17+
2018
workflow_dispatch:
21-
branches:
22-
- main
23-
- dev
24-
paths:
25-
- 'roles/sap_general_preconfigure/**'
2619

2720
jobs:
28-
ansible-lint-exec:
29-
uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main
30-
with:
31-
role: sap_general_preconfigure
21+
ansible-lint:
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- uses: actions/checkout@v5
26+
27+
# Use @v25 to automatically track the latest release from the year 2025.
28+
# ansible-lint uses Calendar Versioning (e.g., v25.9.0 -> YYYY.MM.PATCH).
29+
# Avoid using @main, which can introduce breaking changes unexpectedly.
30+
- uses: ansible/ansible-lint@v25
31+
with:
32+
# v25.7.0 no longer uses 'working_directory' and role path is set in 'args'.
33+
# Role specific .ansible-lint can be added with argument '-c'.
34+
args: roles/sap_general_preconfigure
35+
# Use the shared requirements file from the collection root for dependency context.
36+
requirements_file: ./requirements.yml
Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
---
2-
3-
# Workflow for ansible-lint of a role, using reusable workflow
4-
5-
name: ansible-lint of the role sap_ha_install_hana_hsr
2+
name: Ansible Lint - sap_ha_install_hana_hsr
63

74
on:
85
push:
@@ -17,15 +14,23 @@ on:
1714
- dev
1815
paths:
1916
- 'roles/sap_ha_install_hana_hsr/**'
17+
2018
workflow_dispatch:
21-
branches:
22-
- main
23-
- dev
24-
paths:
25-
- 'roles/sap_ha_install_hana_hsr/**'
2619

2720
jobs:
28-
ansible-lint-exec:
29-
uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main
30-
with:
31-
role: sap_ha_install_hana_hsr
21+
ansible-lint:
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- uses: actions/checkout@v5
26+
27+
# Use @v25 to automatically track the latest release from the year 2025.
28+
# ansible-lint uses Calendar Versioning (e.g., v25.9.0 -> YYYY.MM.PATCH).
29+
# Avoid using @main, which can introduce breaking changes unexpectedly.
30+
- uses: ansible/ansible-lint@v25
31+
with:
32+
# v25.7.0 no longer uses 'working_directory' and role path is set in 'args'.
33+
# Role specific .ansible-lint can be added with argument '-c'.
34+
args: roles/sap_ha_install_hana_hsr
35+
# Use the shared requirements file from the collection root for dependency context.
36+
requirements_file: ./requirements.yml
Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
---
2-
3-
# Workflow for ansible-lint of a role, using reusable workflow
4-
5-
name: ansible-lint of the role sap_ha_pacemaker_cluster
2+
name: Ansible Lint - sap_ha_pacemaker_cluster
63

74
on:
85
push:
@@ -17,15 +14,23 @@ on:
1714
- dev
1815
paths:
1916
- 'roles/sap_ha_pacemaker_cluster/**'
17+
2018
workflow_dispatch:
21-
branches:
22-
- main
23-
- dev
24-
paths:
25-
- 'roles/sap_ha_pacemaker_cluster/**'
2619

2720
jobs:
28-
ansible-lint-exec:
29-
uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main
30-
with:
31-
role: sap_ha_pacemaker_cluster
21+
ansible-lint:
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- uses: actions/checkout@v5
26+
27+
# Use @v25 to automatically track the latest release from the year 2025.
28+
# ansible-lint uses Calendar Versioning (e.g., v25.9.0 -> YYYY.MM.PATCH).
29+
# Avoid using @main, which can introduce breaking changes unexpectedly.
30+
- uses: ansible/ansible-lint@v25
31+
with:
32+
# v25.7.0 no longer uses 'working_directory' and role path is set in 'args'.
33+
# Role specific .ansible-lint can be added with argument '-c'.
34+
args: roles/sap_ha_pacemaker_cluster
35+
# Use the shared requirements file from the collection root for dependency context.
36+
requirements_file: ./requirements.yml
Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
---
2-
3-
# Workflow for ansible-lint of a role, using reusable workflow
4-
5-
name: ansible-lint of the role sap_hana_install
2+
name: Ansible Lint - sap_hana_install
63

74
on:
85
push:
@@ -17,15 +14,23 @@ on:
1714
- dev
1815
paths:
1916
- 'roles/sap_hana_install/**'
17+
2018
workflow_dispatch:
21-
branches:
22-
- main
23-
- dev
24-
paths:
25-
- 'roles/sap_hana_install/**'
2619

2720
jobs:
28-
ansible-lint-exec:
29-
uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main
30-
with:
31-
role: sap_hana_install
21+
ansible-lint:
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- uses: actions/checkout@v5
26+
27+
# Use @v25 to automatically track the latest release from the year 2025.
28+
# ansible-lint uses Calendar Versioning (e.g., v25.9.0 -> YYYY.MM.PATCH).
29+
# Avoid using @main, which can introduce breaking changes unexpectedly.
30+
- uses: ansible/ansible-lint@v25
31+
with:
32+
# v25.7.0 no longer uses 'working_directory' and role path is set in 'args'.
33+
# Role specific .ansible-lint can be added with argument '-c'.
34+
args: roles/sap_hana_install
35+
# Use the shared requirements file from the collection root for dependency context.
36+
requirements_file: ./requirements.yml
Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
---
2-
3-
# Workflow for ansible-lint of a role, using reusable workflow
4-
5-
name: ansible-lint of the role sap_hana_preconfigure
2+
name: Ansible Lint - sap_hana_preconfigure
63

74
on:
85
push:
@@ -17,15 +14,23 @@ on:
1714
- dev
1815
paths:
1916
- 'roles/sap_hana_preconfigure/**'
17+
2018
workflow_dispatch:
21-
branches:
22-
- main
23-
- dev
24-
paths:
25-
- 'roles/sap_hana_preconfigure/**'
2619

2720
jobs:
28-
ansible-lint-exec:
29-
uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main
30-
with:
31-
role: sap_hana_preconfigure
21+
ansible-lint:
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- uses: actions/checkout@v5
26+
27+
# Use @v25 to automatically track the latest release from the year 2025.
28+
# ansible-lint uses Calendar Versioning (e.g., v25.9.0 -> YYYY.MM.PATCH).
29+
# Avoid using @main, which can introduce breaking changes unexpectedly.
30+
- uses: ansible/ansible-lint@v25
31+
with:
32+
# v25.7.0 no longer uses 'working_directory' and role path is set in 'args'.
33+
# Role specific .ansible-lint can be added with argument '-c'.
34+
args: roles/sap_hana_preconfigure
35+
# Use the shared requirements file from the collection root for dependency context.
36+
requirements_file: ./requirements.yml
Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
---
2-
3-
# Workflow for ansible-lint of a role, using reusable workflow
4-
5-
name: ansible-lint of the role sap_install_media_detect
2+
name: Ansible Lint - sap_install_media_detect
63

74
on:
85
push:
@@ -17,15 +14,23 @@ on:
1714
- dev
1815
paths:
1916
- 'roles/sap_install_media_detect/**'
17+
2018
workflow_dispatch:
21-
branches:
22-
- main
23-
- dev
24-
paths:
25-
- 'roles/sap_install_media_detect/**'
2619

2720
jobs:
28-
ansible-lint-exec:
29-
uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main
30-
with:
31-
role: sap_install_media_detect
21+
ansible-lint:
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- uses: actions/checkout@v5
26+
27+
# Use @v25 to automatically track the latest release from the year 2025.
28+
# ansible-lint uses Calendar Versioning (e.g., v25.9.0 -> YYYY.MM.PATCH).
29+
# Avoid using @main, which can introduce breaking changes unexpectedly.
30+
- uses: ansible/ansible-lint@v25
31+
with:
32+
# v25.7.0 no longer uses 'working_directory' and role path is set in 'args'.
33+
# Role specific .ansible-lint can be added with argument '-c'.
34+
args: roles/sap_install_media_detect
35+
# Use the shared requirements file from the collection root for dependency context.
36+
requirements_file: ./requirements.yml
Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
---
2-
3-
# Workflow for ansible-lint of a role, using reusable workflow
4-
5-
name: ansible-lint of the role sap_maintain_etc_hosts
2+
name: Ansible Lint - sap_maintain_etc_hosts
63

74
on:
85
push:
@@ -17,15 +14,23 @@ on:
1714
- dev
1815
paths:
1916
- 'roles/sap_maintain_etc_hosts/**'
17+
2018
workflow_dispatch:
21-
branches:
22-
- main
23-
- dev
24-
paths:
25-
- 'roles/sap_maintain_etc_hosts/**'
2619

2720
jobs:
28-
ansible-lint-exec:
29-
uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main
30-
with:
31-
role: sap_maintain_etc_hosts
21+
ansible-lint:
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- uses: actions/checkout@v5
26+
27+
# Use @v25 to automatically track the latest release from the year 2025.
28+
# ansible-lint uses Calendar Versioning (e.g., v25.9.0 -> YYYY.MM.PATCH).
29+
# Avoid using @main, which can introduce breaking changes unexpectedly.
30+
- uses: ansible/ansible-lint@v25
31+
with:
32+
# v25.7.0 no longer uses 'working_directory' and role path is set in 'args'.
33+
# Role specific .ansible-lint can be added with argument '-c'.
34+
args: roles/sap_maintain_etc_hosts
35+
# Use the shared requirements file from the collection root for dependency context.
36+
requirements_file: ./requirements.yml
Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
---
2-
3-
# Workflow for ansible-lint of a role, using reusable workflow
4-
5-
name: ansible-lint of the role sap_netweaver_preconfigure
2+
name: Ansible Lint - sap_netweaver_preconfigure
63

74
on:
85
push:
@@ -17,15 +14,23 @@ on:
1714
- dev
1815
paths:
1916
- 'roles/sap_netweaver_preconfigure/**'
17+
2018
workflow_dispatch:
21-
branches:
22-
- main
23-
- dev
24-
paths:
25-
- 'roles/sap_netweaver_preconfigure/**'
2619

2720
jobs:
28-
ansible-lint-exec:
29-
uses: sap-linuxlab/community.sap_install/.github/workflows/ansible-lint-sap_reusable_workflow.yml@main
30-
with:
31-
role: sap_netweaver_preconfigure
21+
ansible-lint:
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- uses: actions/checkout@v5
26+
27+
# Use @v25 to automatically track the latest release from the year 2025.
28+
# ansible-lint uses Calendar Versioning (e.g., v25.9.0 -> YYYY.MM.PATCH).
29+
# Avoid using @main, which can introduce breaking changes unexpectedly.
30+
- uses: ansible/ansible-lint@v25
31+
with:
32+
# v25.7.0 no longer uses 'working_directory' and role path is set in 'args'.
33+
# Role specific .ansible-lint can be added with argument '-c'.
34+
args: roles/sap_netweaver_preconfigure
35+
# Use the shared requirements file from the collection root for dependency context.
36+
requirements_file: ./requirements.yml

0 commit comments

Comments
 (0)