Move ansible lint config to standard config file and fix few warnings#273
Move ansible lint config to standard config file and fix few warnings#273
Conversation
99c6e4e to
c9e5aca
Compare
4714506 to
2d988ec
Compare
| - ansible/playbooks/registration_role.yaml | ||
| - ansible/playbooks/vars/hana_media.yaml | ||
| - ansible/playbooks/vars/hana_vars.yaml | ||
| warn_list: |
There was a problem hiding this comment.
I decided to ignore this one for the moment. Problem is qe-sap-deployment has a role folder in ansible/role and maybe it should be in ansible/playbook/role. As soon as we not fix this folder structure, we cannot use named roles and we need to use path.
| rules: | ||
| line-length: disable No newline at end of file | ||
| line-length: disable | ||
| comments: |
There was a problem hiding this comment.
There was an error message running ansible-lint listing them. ansible-lint also internally run yamllint, but Ansible likes its rules. The ansible-lint warning was suggesting to remove this file or tune it to match the Ansible rules
|
|
||
| - name: Download PTF files recursively with wget | ||
| command: "wget --no-directories --recursive --reject 'index.html*' --user={{ ptf_user }} --password={{ ptf_password }} --no-parent {{ ptf_url }}" | ||
| - name: Download PTF files recursively with wget # noqa: command-instead-of-module |
There was a problem hiding this comment.
here using wget was intentional. # noqa: is the way to add local exeptions
| - name: Execute hana system replication role | ||
| ansible.builtin.include_role: | ||
| role: ../roles/sap_ha_install_hana_hsr | ||
| name: ../roles/sap_ha_install_hana_hsr |
There was a problem hiding this comment.
The change in the .ansiblelint demote this from fatal error to warning. The github workflow does not fails but the message is there and github annotate the file. It is good as we will not forget about it.
211f080 to
be6cf07
Compare
Remove no more used playbook, fix ansible-lint version used in the github workflow, tune the yamllint to be compliant with Ansible (remove warning about it reported by ansible-lint), add global exception about role-name[path] as it require project folder structure change, and last but not least fix some warnings.
Move them from the Makefile to the specific lint config file. In this way they are applied also when not running the lint ad make target, but directly calling ansible-lint.
Ticket: https://jira.suse.com/browse/TEAM-7184
Verification
Azure
sle-15-SP6-Qesap-Azure-Byos-x86_64-BuildLATEST_AZURE_SLE15_6_BYOS-qesap_azure_saptune_test
sle-15-SP6-HanaSr-Azure-Byos-x86_64-Build15-SP6_2025-06-24T02:03:18Z-hanasr_azure_test_sapconf_sbd az_Standard_E4s_v3
GCP
sle-15-SP5-Qesap-Gcp-Byos-x86_64-BuildLATEST_GCE_SLE15_5_BYOS-qesap_gcp_sbd_test
sle-15-SP6-Qesap-Gcp-Payg-x86_64-BuildLATEST_GCE_SLE15_6_PAYG-qesap_gcp_angi_test
AWS
sle-15-SP6-Qesap-Aws-Byos-x86_64-BuildLATEST_AWS_SLE15_6_BYOS-qesap_aws_angi_test
sle-15-SP6-Qesap-Aws-Byos-x86_64-BuildLATEST_AWS_SLE15_6_BYOS-qesap_aws_ibsmirror_peering_test