From 8b072569e58f85c66ec73b16f13ea67272dc07c4 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Tue, 28 Nov 2023 10:35:08 +0100 Subject: [PATCH 1/2] sap_maintain_etc_hosts: Add missing ansible-lint config files Solves issue #541. --- roles/sap_maintain_etc_hosts/.ansible-lint | 30 ++++++++++++++++++++++ roles/sap_maintain_etc_hosts/.yamllint.yml | 21 +++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 roles/sap_maintain_etc_hosts/.ansible-lint create mode 100644 roles/sap_maintain_etc_hosts/.yamllint.yml diff --git a/roles/sap_maintain_etc_hosts/.ansible-lint b/roles/sap_maintain_etc_hosts/.ansible-lint new file mode 100644 index 000000000..40b321754 --- /dev/null +++ b/roles/sap_maintain_etc_hosts/.ansible-lint @@ -0,0 +1,30 @@ +--- +# Collection wide lint-file +# DO NOT CHANGE +exclude_paths: + - .cache/ + - .github/ + #- docs/ + - changelogs/ + - playbooks/ + - roles/sap_anydb_install_oracle + #- roles/sap_general_preconfigure + #- roles/sap_ha_install_hana_hsr + #- roles/sap_ha_pacemaker_cluster + #- roles/sap_hana_install + #- roles/sap_hana_preconfigure + - roles/sap_hostagent + - roles/sap_hypervisor_node_preconfigure + - roles/sap_install_media_detect + #- roles/sap_netweaver_preconfigure + #- roles/sap_storage_setup + #- roles/sap_swpm + - roles/sap_vm_preconfigure + +enable_list: + - yaml +skip_list: + - experimental + - ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable + - schema # We want to allow single digit version numbers in a role's meta/main.yml file. This is allowed as per https://galaxy.ansible.com/docs/contributing/creating_role.html and https://galaxy.ansible.com/api/v1/platforms/?page=6. + - name[template] # Allow templating inside name. During dev and qa, it should be possible to identify cases where it doesn't work diff --git a/roles/sap_maintain_etc_hosts/.yamllint.yml b/roles/sap_maintain_etc_hosts/.yamllint.yml new file mode 100644 index 000000000..57ef427c1 --- /dev/null +++ b/roles/sap_maintain_etc_hosts/.yamllint.yml @@ -0,0 +1,21 @@ +--- +# Based on ansible-lint config +extends: default + +rules: + braces: {max-spaces-inside: 1, level: error} + brackets: {max-spaces-inside: 1, level: error} +# colons: {max-spaces-after: -1, level: error} +# commas: {max-spaces-after: -1, level: error} + comments: disable + comments-indentation: disable +# document-start: disable +# empty-lines: {max: 3, level: error} +# hyphens: {level: error} +# indentation: disable +# key-duplicates: enable + line-length: disable +# new-line-at-end-of-file: disable +# new-lines: {type: unix} +# trailing-spaces: disable + truthy: disable From 1d300ca7db2f0f2eecab655c87b24351354da54a Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Tue, 28 Nov 2023 10:45:00 +0100 Subject: [PATCH 2/2] sap_maintain_etc_hosts: Use the correct file .ansible-lint --- roles/sap_maintain_etc_hosts/.ansible-lint | 23 ---------------------- 1 file changed, 23 deletions(-) diff --git a/roles/sap_maintain_etc_hosts/.ansible-lint b/roles/sap_maintain_etc_hosts/.ansible-lint index 40b321754..63122b8f9 100644 --- a/roles/sap_maintain_etc_hosts/.ansible-lint +++ b/roles/sap_maintain_etc_hosts/.ansible-lint @@ -1,30 +1,7 @@ --- -# Collection wide lint-file -# DO NOT CHANGE -exclude_paths: - - .cache/ - - .github/ - #- docs/ - - changelogs/ - - playbooks/ - - roles/sap_anydb_install_oracle - #- roles/sap_general_preconfigure - #- roles/sap_ha_install_hana_hsr - #- roles/sap_ha_pacemaker_cluster - #- roles/sap_hana_install - #- roles/sap_hana_preconfigure - - roles/sap_hostagent - - roles/sap_hypervisor_node_preconfigure - - roles/sap_install_media_detect - #- roles/sap_netweaver_preconfigure - #- roles/sap_storage_setup - #- roles/sap_swpm - - roles/sap_vm_preconfigure - enable_list: - yaml skip_list: - - experimental - ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable - schema # We want to allow single digit version numbers in a role's meta/main.yml file. This is allowed as per https://galaxy.ansible.com/docs/contributing/creating_role.html and https://galaxy.ansible.com/api/v1/platforms/?page=6. - name[template] # Allow templating inside name. During dev and qa, it should be possible to identify cases where it doesn't work