Fix linter errors

main
Guido Grazioli 2022-02-15 13:14:36 +01:00 committed by Pelisse Romain
parent bce963923d
commit 124c8ae0ad
8 changed files with 25 additions and 15 deletions

View File

@ -1,19 +1,25 @@
# .ansible-lint
exclude_paths:
- .cache/
- .github/
- molecule/
rulesdir: rulesdir:
- ../../rules/ - ../../ansible-lint-custom-rules/rules/
enable_list: enable_list:
- fqcn-builtins # opt-in - fqcn-builtins # opt-in
- no-log-password # opt-in - no-log-password # opt-in
warn_list: warn_list:
- role_vars_start_with_role_name # All role parameters must be named ^<role_name>_.* - role_vars_start_with_role_name
- vars_in_vars_files_have_valid_names # Variable in vars files must have valid name - vars_in_vars_files_have_valid_names
- vars_should_not_be_used # vars should not be used - vars_should_not_be_used
- experimental # all rules tagged as experimental - experimental
- ignore-errors # Use failed_when and specify error conditions instead of using ignore_errors - ignore-errors
- no-handler # Tasks that run when changed should likely be handlers - no-handler
- fqcn-builtins - fqcn-builtins
- no-log-password - no-log-password
use_default_rules: true use_default_rules: true
offline: false offline: true

View File

@ -33,7 +33,7 @@ jobs:
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
repository: ansible-middleware/ansible-lint-custom-rules repository: ansible-middleware/ansible-lint-custom-rules
path: ansible_collections/rules/ path: ansible_collections/ansible-lint-custom-rules/
- name: Create default collection path - name: Create default collection path
run: | run: |

View File

@ -5,7 +5,8 @@ dependency:
driver: driver:
name: docker name: docker
lint: | lint: |
ansible-lint roles/* ansible-lint --version
ansible-lint -vv
platforms: platforms:
- name: instance - name: instance
image: registry.access.redhat.com/ubi8/ubi-init:latest image: registry.access.redhat.com/ubi8/ubi-init:latest

View File

@ -8,7 +8,7 @@
changed_when: rpm_info.failed changed_when: rpm_info.failed
rescue: rescue:
- name: "If package {{ package_name }} is missing, add it to the yum install list." - name: "Add {{ package_name }} to the yum install list if missing"
set_fact: set_fact:
packages_to_install: "{{ packages_to_install + [ package_name ] }}" packages_to_install: "{{ packages_to_install + [ package_name ] }}"
when: rpm_info.failed when: rpm_info.failed

View File

@ -1,5 +1,6 @@
--- ---
- set_fact: - name: Set facts
set_fact:
update_cache: true update_cache: true
packages_to_install: [] packages_to_install: []

View File

@ -81,7 +81,7 @@
- not keycloak_rhsso_enable - not keycloak_rhsso_enable
- not keycloak_offline_install - not keycloak_offline_install
- name: Performing download from RHN - name: Perform download from RHN
redhat_csp_download: redhat_csp_download:
url: "{{ keycloak_rhsso_download_url }}" url: "{{ keycloak_rhsso_download_url }}"
dest: "{{ local_path.stat.path }}/{{ keycloak.bundle }}" dest: "{{ local_path.stat.path }}/{{ keycloak.bundle }}"

View File

@ -38,6 +38,7 @@
- "-rmaster" - "-rmaster"
- "-u{{ keycloak_admin_user }}" - "-u{{ keycloak_admin_user }}"
- "-p{{ keycloak_admin_password }}" - "-p{{ keycloak_admin_password }}"
changed_when: yes
become: yes become: yes
- name: "Restart {{ keycloak.service_name }}" - name: "Restart {{ keycloak.service_name }}"
include_tasks: tasks/restart_keycloak.yml include_tasks: tasks/restart_keycloak.yml

View File

@ -56,7 +56,8 @@
- keycloak_service_status is defined - keycloak_service_status is defined
- keycloak_service_status.stdout is defined - keycloak_service_status.stdout is defined
- meta: flush_handlers - name: Flush handlers
meta: flush_handlers
- name: "Wait until Keycloak becomes active {{ keycloak.health_url }}" - name: "Wait until Keycloak becomes active {{ keycloak.health_url }}"
uri: uri: