forked from kubesphere/kubespray
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Ansible-lint error [E502] (kubernetes-sigs#4743)
- Loading branch information
1 parent
13f225e
commit 73c2ff1
Showing
30 changed files
with
160 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,5 @@ skip_list: | |
- '305' | ||
- '306' | ||
- '404' | ||
- '502' | ||
- '503' | ||
- '701' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 11 additions & 3 deletions
14
contrib/network-storage/heketi/roles/provision/tasks/glusterfs/label.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,19 @@ | ||
--- | ||
- register: "label_present" | ||
- name: Get storage nodes | ||
register: "label_present" | ||
command: "{{ bin_dir }}/kubectl get node --selector=storagenode=glusterfs,kubernetes.io/hostname={{ node }} --ignore-not-found=true" | ||
changed_when: false | ||
|
||
- name: "Assign storage label" | ||
when: "label_present.stdout_lines|length == 0" | ||
command: "{{ bin_dir }}/kubectl label node {{ node }} storagenode=glusterfs" | ||
- register: "label_present" | ||
|
||
- name: Get storage nodes again | ||
register: "label_present" | ||
command: "{{ bin_dir }}/kubectl get node --selector=storagenode=glusterfs,kubernetes.io/hostname={{ node }} --ignore-not-found=true" | ||
changed_when: false | ||
- assert: { that: "label_present|length > 0", msg: "Node {{ node }} has not been assigned with label storagenode=glusterfs." } | ||
|
||
- name: Ensure the label has been set | ||
assert: | ||
that: "label_present|length > 0" | ||
msg: "Node {{ node }} has not been assigned with label storagenode=glusterfs." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 19 additions & 6 deletions
25
contrib/network-storage/heketi/roles/provision/tasks/secret.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,44 @@ | ||
--- | ||
- register: "clusterrolebinding_state" | ||
- name: Get clusterrolebindings | ||
register: "clusterrolebinding_state" | ||
command: "{{ bin_dir }}/kubectl get clusterrolebinding heketi-gluster-admin -o=name --ignore-not-found=true" | ||
changed_when: false | ||
|
||
- name: "Kubernetes Apps | Deploy cluster role binding." | ||
when: "clusterrolebinding_state.stdout == \"\"" | ||
command: "{{ bin_dir }}/kubectl create clusterrolebinding heketi-gluster-admin --clusterrole=edit --serviceaccount=default:heketi-service-account" | ||
- register: "clusterrolebinding_state" | ||
|
||
- name: Get clusterrolebindings again | ||
register: "clusterrolebinding_state" | ||
command: "{{ bin_dir }}/kubectl get clusterrolebinding heketi-gluster-admin -o=name --ignore-not-found=true" | ||
changed_when: false | ||
- assert: | ||
|
||
- name: Make sure that clusterrolebindings are present now | ||
assert: | ||
that: "clusterrolebinding_state.stdout != \"\"" | ||
msg: "Cluster role binding is not present." | ||
|
||
- register: "secret_state" | ||
- name: Get the heketi-config-secret secret | ||
register: "secret_state" | ||
command: "{{ bin_dir }}/kubectl get secret heketi-config-secret -o=name --ignore-not-found=true" | ||
changed_when: false | ||
|
||
- name: "Render Heketi secret configuration." | ||
become: true | ||
template: | ||
src: "heketi.json.j2" | ||
dest: "{{ kube_config_dir }}/heketi.json" | ||
|
||
- name: "Deploy Heketi config secret" | ||
when: "secret_state.stdout == \"\"" | ||
command: "{{ bin_dir }}/kubectl create secret generic heketi-config-secret --from-file={{ kube_config_dir }}/heketi.json" | ||
- register: "secret_state" | ||
|
||
- name: Get the heketi-config-secret secret again | ||
register: "secret_state" | ||
command: "{{ bin_dir }}/kubectl get secret heketi-config-secret -o=name --ignore-not-found=true" | ||
changed_when: false | ||
- assert: | ||
|
||
- name: Make sure the heketi-config-secret secret exists now | ||
assert: | ||
that: "secret_state.stdout != \"\"" | ||
msg: "Heketi config secret is not present." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
--- | ||
- set_fact: | ||
- name: set architecture_groups | ||
set_fact: | ||
architecture_groups: | ||
x86_64: amd64 | ||
aarch64: arm64 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.