Fix failures of ansible-lint (#8401)

This fixes the following types of failures:
- empty-string-compare
- literal-compare
- risky-file-permissions
- risky-shell-pipe
- var-spacing

In addition, this changes .gitlab-ci/lint.yml to block the same issue
by using the same method at Kubespray CI.
This commit is contained in:
Kenichi Omichi
2022-01-11 00:45:16 -08:00
committed by GitHub
parent 642725efe7
commit 73c889eb10
8 changed files with 20 additions and 17 deletions

View File

@@ -14,7 +14,7 @@
- name: install
file: argocd-install.yml
namespace: "{{ argocd_namespace }}"
url: "https://raw.githubusercontent.com/argoproj/argo-cd/{{argocd_version}}/manifests/install.yaml"
url: "https://raw.githubusercontent.com/argoproj/argo-cd/{{ argocd_version }}/manifests/install.yaml"
when:
- "inventory_hostname == groups['kube_control_plane'][0]"
@@ -33,7 +33,7 @@
- name: Kubernetes Apps | Set ArgoCD namespace for remote manifests
become: yes
command: |
{{ bin_dir }}/yq eval-all -i '.metadata.namespace="{{argocd_namespace}}"' {{ kube_config_dir }}/{{ item.file }}
{{ bin_dir }}/yq eval-all -i '.metadata.namespace="{{ argocd_namespace }}"' {{ kube_config_dir }}/{{ item.file }}
with_items: "{{ argocd_templates | selectattr('url', 'defined') | list }}"
loop_control:
label: "{{ item.file }}"
@@ -67,10 +67,10 @@
- name: Kubernetes Apps | Set ArgoCD custom admin password
become: yes
shell: |
{{ bin_dir }}/kubectl --kubeconfig /etc/kubernetes/admin.conf -n {{argocd_namespace}} patch secret argocd-secret -p \
{{ bin_dir }}/kubectl --kubeconfig /etc/kubernetes/admin.conf -n {{ argocd_namespace }} patch secret argocd-secret -p \
'{
"stringData": {
"admin.password": "{{argocd_admin_password|password_hash('bcrypt')}}",
"admin.password": "{{ argocd_admin_password | password_hash('bcrypt') }}",
"admin.passwordMtime": "'$(date +%FT%T%Z)'"
}
}'