Skip to content

after fixing yamllint reported issues, ansible-lint reports further issues #11

@sandrobonazzola

Description

@sandrobonazzola
$ ansible-lint  `find . -name "*.yml"|grep -v venv` 
WARNING  Overriding detected file kind 'yaml' with 'playbook' for given positional argument: ./install.yml
WARNING  Overriding detected file kind 'yaml' with 'playbook' for given positional argument: ./uninstall.yml
WARNING  Listing 87 violation(s) that are fatal
fqcn-builtins: Use FQCN for builtin actions.
install.yml:15 Task/Handler: Include platform variables

name: All names should start with an uppercase letter. (name[casing])
roles/hypershift-cleanup/tasks/main.yml:10 Task/Handler: clone e2e-benchmarking

name: All names should start with an uppercase letter. (name[casing])
roles/hypershift-cleanup/tasks/main.yml:16 Task/Handler: run hypershift cleanup

no-changed-when: Commands should not change things if nothing needs doing.
roles/hypershift-cleanup/tasks/main.yml:16 Task/Handler: run hypershift cleanup

risky-shell-pipe: Shells that use pipes should set the pipefail option.
roles/hypershift-cleanup/tasks/main.yml:16 Task/Handler: run hypershift cleanup

fqcn-builtins: Use FQCN for builtin actions.
roles/hypershift-install/tasks/main.yml:11 Task/Handler: Install dependencies

fqcn-builtins: Use FQCN for builtin actions.
roles/hypershift-install/tasks/main.yml:20 Task/Handler: Install awscli

name: All names should start with an uppercase letter. (name[casing])
roles/hypershift-install/tasks/main.yml:24 Task/Handler: clone e2e-benchmarking

name: All names should start with an uppercase letter. (name[casing])
roles/hypershift-install/tasks/main.yml:30 Task/Handler: run installer

no-changed-when: Commands should not change things if nothing needs doing.
roles/hypershift-install/tasks/main.yml:30 Task/Handler: run installer

risky-shell-pipe: Shells that use pipes should set the pipefail option.
roles/hypershift-install/tasks/main.yml:30 Task/Handler: run installer

fqcn-builtins: Use FQCN for builtin actions.
roles/openshift-cleanup/tasks/main.yml:3 Task/Handler: Install OCM client

command-instead-of-shell: Use shell only when shell functionality is required.
roles/openshift-cleanup/tasks/main.yml:9 Task/Handler: OCM login to connect to console.redhat.com

fqcn-builtins: Use FQCN for builtin actions.
roles/openshift-cleanup/tasks/main.yml:9 Task/Handler: OCM login to connect to console.redhat.com

no-changed-when: Commands should not change things if nothing needs doing.
roles/openshift-cleanup/tasks/main.yml:9 Task/Handler: OCM login to connect to console.redhat.com

command-instead-of-shell: Use shell only when shell functionality is required.
roles/openshift-cleanup/tasks/main.yml:12 Task/Handler: Check if cluster exists

fqcn-builtins: Use FQCN for builtin actions.
roles/openshift-cleanup/tasks/main.yml:12 Task/Handler: Check if cluster exists

no-changed-when: Commands should not change things if nothing needs doing.
roles/openshift-cleanup/tasks/main.yml:12 Task/Handler: Check if cluster exists

key-order: You can improve the task key order to: when, block (key-order[task])
roles/openshift-cleanup/tasks/main.yml:16 Task/Handler: block/always/rescue 

name: All tasks should be named. (name[missing])
roles/openshift-cleanup/tasks/main.yml:16 Task/Handler: block/always/rescue 

command-instead-of-shell: Use shell only when shell functionality is required.
roles/openshift-cleanup/tasks/main.yml:17 Task/Handler: Get cluster id

fqcn-builtins: Use FQCN for builtin actions.
roles/openshift-cleanup/tasks/main.yml:17 Task/Handler: Get cluster id

no-changed-when: Commands should not change things if nothing needs doing.
roles/openshift-cleanup/tasks/main.yml:17 Task/Handler: Get cluster id

command-instead-of-shell: Use shell only when shell functionality is required.
roles/openshift-cleanup/tasks/main.yml:21 Task/Handler: Cleanup cluster

fqcn-builtins: Use FQCN for builtin actions.
roles/openshift-cleanup/tasks/main.yml:21 Task/Handler: Cleanup cluster

no-changed-when: Commands should not change things if nothing needs doing.
roles/openshift-cleanup/tasks/main.yml:21 Task/Handler: Cleanup cluster

fqcn-builtins: Use FQCN for builtin actions.
roles/openshift-cleanup/tasks/main.yml:24 Task/Handler: Wait for 60 seconds for the API to initiate the deletion before checking the status

command-instead-of-shell: Use shell only when shell functionality is required.
roles/openshift-cleanup/tasks/main.yml:28 Task/Handler: Get cluster status and wait for the cluster to get deleted with a 30 minutes timeout

fqcn-builtins: Use FQCN for builtin actions.
roles/openshift-cleanup/tasks/main.yml:28 Task/Handler: Get cluster status and wait for the cluster to get deleted with a 30 minutes timeout

no-changed-when: Commands should not change things if nothing needs doing.
roles/openshift-cleanup/tasks/main.yml:28 Task/Handler: Get cluster status and wait for the cluster to get deleted with a 30 minutes timeout

fqcn-builtins: Use FQCN for builtin actions.
roles/openshift-install/tasks/main.yml:12 Task/Handler: Install OCM client and dependencies

command-instead-of-shell: Use shell only when shell functionality is required.
roles/openshift-install/tasks/main.yml:22 Task/Handler: OCM login to connect to console.redhat.com

fqcn-builtins: Use FQCN for builtin actions.
roles/openshift-install/tasks/main.yml:22 Task/Handler: OCM login to connect to console.redhat.com

no-changed-when: Commands should not change things if nothing needs doing.
roles/openshift-install/tasks/main.yml:22 Task/Handler: OCM login to connect to console.redhat.com

fqcn-builtins: Use FQCN for builtin actions.
roles/openshift-install/tasks/main.yml:25 Task/Handler: Setup cluster configuration

jinja: Jinja2 spacing could be improved: install-config-{{platform}}.json.j2 -> install-config-{{ platform }}.json.j2 (jinja[spacing])
roles/openshift-install/tasks/main.yml:25 Jinja2 template rewrite recommendation: `install-config-{{ platform }}.json.j2`.

risky-file-permissions: File permissions unset or incorrect.
roles/openshift-install/tasks/main.yml:25 Task/Handler: Setup cluster configuration

command-instead-of-shell: Use shell only when shell functionality is required.
roles/openshift-install/tasks/main.yml:30 Task/Handler: Create cluster

fqcn-builtins: Use FQCN for builtin actions.
roles/openshift-install/tasks/main.yml:30 Task/Handler: Create cluster

no-changed-when: Commands should not change things if nothing needs doing.
roles/openshift-install/tasks/main.yml:30 Task/Handler: Create cluster

command-instead-of-shell: Use shell only when shell functionality is required.
roles/openshift-install/tasks/main.yml:33 Task/Handler: Get cluster id

fqcn-builtins: Use FQCN for builtin actions.
roles/openshift-install/tasks/main.yml:33 Task/Handler: Get cluster id

no-changed-when: Commands should not change things if nothing needs doing.
roles/openshift-install/tasks/main.yml:33 Task/Handler: Get cluster id

command-instead-of-shell: Use shell only when shell functionality is required.
roles/openshift-install/tasks/main.yml:37 Task/Handler: Get cluster status and wait till it's installed with a 60 minutes timeout

fqcn-builtins: Use FQCN for builtin actions.
roles/openshift-install/tasks/main.yml:37 Task/Handler: Get cluster status and wait till it's installed with a 60 minutes timeout

no-changed-when: Commands should not change things if nothing needs doing.
roles/openshift-install/tasks/main.yml:37 Task/Handler: Get cluster status and wait till it's installed with a 60 minutes timeout

fqcn-builtins: Use FQCN for builtin actions.
roles/openshift-install/tasks/main.yml:44 Task/Handler: Capture kubeconfig and copy to desired location

no-changed-when: Commands should not change things if nothing needs doing.
roles/openshift-install/tasks/main.yml:44 Task/Handler: Capture kubeconfig and copy to desired location

risky-shell-pipe: Shells that use pipes should set the pipefail option.
roles/openshift-install/tasks/main.yml:44 Task/Handler: Capture kubeconfig and copy to desired location

fqcn-builtins: Use FQCN for builtin actions.
roles/thanos/tasks/main.yml:3 Task/Handler: Get cluster version

no-changed-when: Commands should not change things if nothing needs doing.
roles/thanos/tasks/main.yml:3 Task/Handler: Get cluster version

fqcn-builtins: Use FQCN for builtin actions.
roles/thanos/tasks/main.yml:10 Task/Handler: Get platform

no-changed-when: Commands should not change things if nothing needs doing.
roles/thanos/tasks/main.yml:10 Task/Handler: Get platform

fqcn-builtins: Use FQCN for builtin actions.
roles/thanos/tasks/main.yml:16 Task/Handler: setup agent template

name: All names should start with an uppercase letter. (name[casing])
roles/thanos/tasks/main.yml:16 Task/Handler: setup agent template

risky-file-permissions: File permissions unset or incorrect.
roles/thanos/tasks/main.yml:16 Task/Handler: setup agent template

command-instead-of-shell: Use shell only when shell functionality is required.
roles/thanos/tasks/main.yml:21 Task/Handler: deploy grafana agent

fqcn-builtins: Use FQCN for builtin actions.
roles/thanos/tasks/main.yml:21 Task/Handler: deploy grafana agent

name: All names should start with an uppercase letter. (name[casing])
roles/thanos/tasks/main.yml:21 Task/Handler: deploy grafana agent

no-changed-when: Commands should not change things if nothing needs doing.
roles/thanos/tasks/main.yml:21 Task/Handler: deploy grafana agent

jinja: Jinja2 spacing could be improved: {{ lookup('env', 'PUBLIC_KEY')|default('~/.ssh/id_rsa.pub', true) }} -> {{ lookup('env', 'PUBLIC_KEY') | default('~/.ssh/id_rsa.pub', true) }} (jinja[spacing])
vars/install-common-vars.yml:5 Jinja2 template rewrite recommendation: `{{ lookup('env', 'PUBLIC_KEY') | default('~/.ssh/id_rsa.pub', true) }}`.

jinja: Jinja2 spacing could be improved: {{ lookup('env', 'PRIVATE_KEY')|default('~/.ssh/id_rsa', true) }} -> {{ lookup('env', 'PRIVATE_KEY') | default('~/.ssh/id_rsa', true) }} (jinja[spacing])
vars/install-common-vars.yml:6 Jinja2 template rewrite recommendation: `{{ lookup('env', 'PRIVATE_KEY') | default('~/.ssh/id_rsa', true) }}`.

jinja: Jinja2 spacing could be improved: {{ lookup('env', 'ORCHESTRATION_USER')|default('root', true) }} -> {{ lookup('env', 'ORCHESTRATION_USER') | default('root', true) }} (jinja[spacing])
vars/install-common-vars.yml:8 Jinja2 template rewrite recommendation: `{{ lookup('env', 'ORCHESTRATION_USER') | default('root', true) }}`.

jinja: Jinja2 spacing could be improved: {{ lookup('env', 'OPENSHIFT_CLEANUP')|default(false, true) }} -> {{ lookup('env', 'OPENSHIFT_CLEANUP') | default(false, true) }} (jinja[spacing])
vars/install-common-vars.yml:13 Jinja2 template rewrite recommendation: `{{ lookup('env', 'OPENSHIFT_CLEANUP') | default(false, true) }}`.

jinja: Jinja2 spacing could be improved: {{ lookup('env', 'OPENSHIFT_INSTALL')|default(true, true) }} -> {{ lookup('env', 'OPENSHIFT_INSTALL') | default(true, true) }} (jinja[spacing])
vars/install-common-vars.yml:14 Jinja2 template rewrite recommendation: `{{ lookup('env', 'OPENSHIFT_INSTALL') | default(true, true) }}`.

jinja: Jinja2 spacing could be improved: {{ lookup('env', 'THANOS_ENABLE')|default('false', true) }} -> {{ lookup('env', 'THANOS_ENABLE') | default('false', true) }} (jinja[spacing])
vars/install-common-vars.yml:15 Jinja2 template rewrite recommendation: `{{ lookup('env', 'THANOS_ENABLE') | default('false', true) }}`.

jinja: Jinja2 spacing could be improved: {{ lookup('env', 'HYPERSHIFT_CLEANUP')|default(false, true) }} -> {{ lookup('env', 'HYPERSHIFT_CLEANUP') | default(false, true) }} (jinja[spacing])
vars/install-common-vars.yml:16 Jinja2 template rewrite recommendation: `{{ lookup('env', 'HYPERSHIFT_CLEANUP') | default(false, true) }}`.

jinja: Jinja2 spacing could be improved: {{ lookup('env', 'HYPERSHIFT_INSTALL')|default(true, true) }} -> {{ lookup('env', 'HYPERSHIFT_INSTALL') | default(true, true) }} (jinja[spacing])
vars/install-common-vars.yml:17 Jinja2 template rewrite recommendation: `{{ lookup('env', 'HYPERSHIFT_INSTALL') | default(true, true) }}`.

jinja: Jinja2 spacing could be improved: {{ lookup('env', 'OCM_URL')|default('https://api.stage.openshift.com/', true) }} -> {{ lookup('env', 'OCM_URL') | default('https://api.stage.openshift.com/', true) }} (jinja[spacing])
vars/install-common-vars.yml:20 Jinja2 template rewrite recommendation: `{{ lookup('env', 'OCM_URL') | default('https://api.stage.openshift.com/', true) }}`.

jinja: Jinja2 spacing could be improved: {{ lookup('env', 'CCS_ENABLED')|default('true', true) }} -> {{ lookup('env', 'CCS_ENABLED') | default('true', true) }} (jinja[spacing])
vars/install-common-vars.yml:24 Jinja2 template rewrite recommendation: `{{ lookup('env', 'CCS_ENABLED') | default('true', true) }}`.

jinja: Jinja2 spacing could be improved: {{ lookup('env', 'MANAGED')|default('true', true) }} -> {{ lookup('env', 'MANAGED') | default('true', true) }} (jinja[spacing])
vars/install-common-vars.yml:26 Jinja2 template rewrite recommendation: `{{ lookup('env', 'MANAGED') | default('true', true) }}`.

jinja: Jinja2 spacing could be improved: {{ lookup('env', 'MULTI_AZ')|default('true', true) }} -> {{ lookup('env', 'MULTI_AZ') | default('true', true) }} (jinja[spacing])
vars/install-common-vars.yml:27 Jinja2 template rewrite recommendation: `{{ lookup('env', 'MULTI_AZ') | default('true', true) }}`.

jinja: Jinja2 spacing could be improved: {{ lookup('env', 'COMPUTE_COUNT')|default(3, true) }} -> {{ lookup('env', 'COMPUTE_COUNT') | default(3, true) }} (jinja[spacing])
vars/install-common-vars.yml:28 Jinja2 template rewrite recommendation: `{{ lookup('env', 'COMPUTE_COUNT') | default(3, true) }}`.

jinja: Jinja2 spacing could be improved: {{ lookup('env', 'COMPUTE_MACHINE_TYPE')|default('m5.2xlarge', true) }} -> {{ lookup('env', 'COMPUTE_MACHINE_TYPE') | default('m5.2xlarge', true) }} (jinja[spacing])
vars/install-common-vars.yml:29 Jinja2 template rewrite recommendation: `{{ lookup('env', 'COMPUTE_MACHINE_TYPE') | default('m5.2xlarge', true) }}`.

jinja: Jinja2 spacing could be improved: {{ lookup('env', 'NETWORK_TYPE')|default('OVNKubernetes', true) }} -> {{ lookup('env', 'NETWORK_TYPE') | default('OVNKubernetes', true) }} (jinja[spacing])
vars/install-common-vars.yml:30 Jinja2 template rewrite recommendation: `{{ lookup('env', 'NETWORK_TYPE') | default('OVNKubernetes', true) }}`.

jinja: Jinja2 spacing could be improved: {{ lookup('env', 'OPENSHIFT_VERSION')|default('openshift-v4.11.0-rc.5-x86_64-candidate', true) }} -> {{ lookup('env', 'OPENSHIFT_VERSION') | default('openshift-v4.11.0-rc.5-x86_64-candidate', true) }} (jinja[spacing])
vars/install-common-vars.yml:31 Jinja2 template rewrite recommendation: `{{ lookup('env', 'OPENSHIFT_VERSION') | default('openshift-v4.11.0-rc.5-x86_64-candidate', true) }}`.

jinja: Jinja2 spacing could be improved: {{ lookup('env', 'KUBECONFIG')|default('/root/.kube/config', true) }} -> {{ lookup('env', 'KUBECONFIG') | default('/root/.kube/config', true) }} (jinja[spacing])
vars/install-common-vars.yml:32 Jinja2 template rewrite recommendation: `{{ lookup('env', 'KUBECONFIG') | default('/root/.kube/config', true) }}`.

jinja: Jinja2 spacing could be improved: {{ lookup('env', 'ROSA_ENVIRONMENT')|default(staging, true) }} -> {{ lookup('env', 'ROSA_ENVIRONMENT') | default(staging, true) }} (jinja[spacing])
vars/install-common-vars.yml:40 Jinja2 template rewrite recommendation: `{{ lookup('env', 'ROSA_ENVIRONMENT') | default(staging, true) }}`.

jinja: Jinja2 spacing could be improved: {{ lookup('env', 'NUMBER_OF_HOSTED_CLUSTER')|default(2, true) }} -> {{ lookup('env', 'NUMBER_OF_HOSTED_CLUSTER') | default(2, true) }} (jinja[spacing])
vars/install-common-vars.yml:41 Jinja2 template rewrite recommendation: `{{ lookup('env', 'NUMBER_OF_HOSTED_CLUSTER') | default(2, true) }}`.

jinja: Jinja2 spacing could be improved: {{ lookup('env', 'COMPUTE_WORKERS_NUMBER')|default(2, true) }} -> {{ lookup('env', 'COMPUTE_WORKERS_NUMBER') | default(2, true) }} (jinja[spacing])
vars/install-common-vars.yml:42 Jinja2 template rewrite recommendation: `{{ lookup('env', 'COMPUTE_WORKERS_NUMBER') | default(2, true) }}`.

jinja: Jinja2 spacing could be improved: {{ lookup('env', 'REPLICA_TYPE')|default('HighlyAvailable', true) }} -> {{ lookup('env', 'REPLICA_TYPE') | default('HighlyAvailable', true) }} (jinja[spacing])
vars/install-common-vars.yml:44 Jinja2 template rewrite recommendation: `{{ lookup('env', 'REPLICA_TYPE') | default('HighlyAvailable', true) }}`.

jinja: Jinja2 spacing could be improved: {{ lookup('env', 'RELEASE_IMAGE')|default('quay.io/openshift-release-dev/ocp-release:4.11.0-rc.1-x86_64', true) }} -> {{ lookup('env', 'RELEASE_IMAGE') | default('quay.io/openshift-release-dev/ocp-release:4.11.0-rc.1-x86_64', true) }} (jinja[spacing])
vars/install-common-vars.yml:45 Jinja2 template rewrite recommendation: `{{ lookup('env', 'RELEASE_IMAGE') | default('quay.io/openshift-release-dev/ocp-release:4.11.0-rc.1-x86_64', true) }}`.

jinja: Jinja2 spacing could be improved: {{ lookup('env', 'CPO_IMAGE')|default('', true) }} -> {{ lookup('env', 'CPO_IMAGE') | default('', true) }} (jinja[spacing])
vars/install-common-vars.yml:46 Jinja2 template rewrite recommendation: `{{ lookup('env', 'CPO_IMAGE') | default('', true) }}`.

jinja: Jinja2 spacing could be improved: {{ lookup('env', 'HYPERSHIFT_OPERATOR_IMAGE')|default('quay.io/hypershift/hypershift-operator:4.11', true) }} -> {{ lookup('env', 'HYPERSHIFT_OPERATOR_IMAGE') | default('quay.io/hypershift/hypershift-operator:4.11', true) }} (jinja[spacing])
vars/install-common-vars.yml:47 Jinja2 template rewrite recommendation: `{{ lookup('env', 'HYPERSHIFT_OPERATOR_IMAGE') | default('quay.io/hypershift/hypershift-operator:4.11', true) }}`.

jinja: Jinja2 spacing could be improved: {{ lookup('env', 'HYPERSHIFT_CLI_INSTALL')|default(true, true) }} -> {{ lookup('env', 'HYPERSHIFT_CLI_INSTALL') | default(true, true) }} (jinja[spacing])
vars/install-common-vars.yml:48 Jinja2 template rewrite recommendation: `{{ lookup('env', 'HYPERSHIFT_CLI_INSTALL') | default(true, true) }}`.

jinja: Jinja2 spacing could be improved: {{ lookup('env', 'HYPERSHIFT_CLI_VERSION')|default('release-4.11', true) }} -> {{ lookup('env', 'HYPERSHIFT_CLI_VERSION') | default('release-4.11', true) }} (jinja[spacing])
vars/install-common-vars.yml:49 Jinja2 template rewrite recommendation: `{{ lookup('env', 'HYPERSHIFT_CLI_VERSION') | default('release-4.11', true) }}`.

jinja: Jinja2 spacing could be improved: {{ lookup('env', 'HYPERSHIFT_CLI_FORK')|default('https://github.com/openshift/hypershift', true) }} -> {{ lookup('env', 'HYPERSHIFT_CLI_FORK') | default('https://github.com/openshift/hypershift', true) }} (jinja[spacing])
vars/install-common-vars.yml:50 Jinja2 template rewrite recommendation: `{{ lookup('env', 'HYPERSHIFT_CLI_FORK') | default('https://github.com/openshift/hypershift', true) }}`.

You can skip specific rules or tags by adding them to your configuration file:
# .config/ansible-lint.yml
warn_list:  # or 'skip_list' to silence them completely
  - command-instead-of-shell  # Use shell only when shell functionality is required.
  - experimental  # all rules tagged as experimental
  - fqcn-builtins  # Use FQCN for builtin actions.
  - name[missing]  # Rule for checking task and play names.
  - no-changed-when  # Commands should not change things if nothing needs doing.
  - risky-shell-pipe  # Shells that use pipes should set the pipefail option.

Finished with 50 failure(s), 37 warning(s) on 9 files.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions