Some checks reported errors
continuous-integration/drone/push Build encountered an error
40 lines
1.2 KiB
YAML
40 lines
1.2 KiB
YAML
---
|
|
# https://github.com/linode/linode-blockstorage-csi-driver
|
|
- name: Include file list
|
|
ansible.builtin.include_vars: "linode.yaml"
|
|
|
|
- name: Defined linode-storage state to present
|
|
ansible.builtin.set_fact:
|
|
storage_linode_state: present
|
|
when:
|
|
- storage_linode|bool
|
|
|
|
- name: find state of linode-storage
|
|
ansible.builtin.set_fact:
|
|
storage_linode_state: absent
|
|
when:
|
|
- not storage_linode|bool
|
|
|
|
- name: Add secret for Linode Access Key
|
|
kubernetes.core.k8s:
|
|
state: "{{ storage_linode_state }}"
|
|
context: "{{ my_context }}"
|
|
definition:
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: linode
|
|
namespace: kube-system
|
|
type: Opaque
|
|
stringData:
|
|
token: "{{ LINODE_TOKEN | default('token_missing') }}"
|
|
region: "{{ LINODE_REGION | default('token_missing') }}"
|
|
|
|
- name: linode-storage need to be {{ storage_linode_state }}
|
|
kubernetes.core.k8s:
|
|
state: "{{ storage_linode_state }}"
|
|
context: "{{ my_context }}"
|
|
merge_type: merge
|
|
resource_definition: "{{ lookup('file', item) | from_yaml }}"
|
|
with_items:
|
|
- "{{ storage_linode_files_list }}"
|