Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,3 @@ build_ignore: []
# 'omit_default_directives' is a boolean that controls whether the default directives are used. Mutually exclusive
# with 'build_ignore'
# manifest: null
# Test message
2 changes: 1 addition & 1 deletion roles/create_pvcs/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

- name: Define anchor for OpenShift/Kubernetes API login info
ansible.builtin.set_fact:
k8s_auth: &k8s_auth
create_pvcs_k8s_auth: &k8s_auth
host: "{{ create_pvcs_oc_api_url | default(omit) }}"
api_key: "{{ create_pvcs_oc_api_token | default(omit) }}"
validate_certs: "{{ create_pvcs_validate_certs | default(false) }}"
Expand Down
2 changes: 1 addition & 1 deletion roles/create_storageclass/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

- name: Define anchor for OpenShift/Kubernetes API login info
ansible.builtin.set_fact:
k8s_auth: &k8s_auth
create_storageclass_k8s_auth: &k8s_auth
host: "{{ create_storageclass_oc_api_url | default(omit) }}"
api_key: "{{ create_storageclass_oc_api_token | default(omit) }}"
validate_certs: "{{ create_storageclass_validate_certs | default(false) }}"
Expand Down
2 changes: 1 addition & 1 deletion roles/create_storageclass/tests/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@
sc_reclaim_policy: Delete
sc_volume_binding_mode: Immediate
roles:
- create_storageclass
- create_storageclass
2 changes: 1 addition & 1 deletion roles/create_volume_snapshotclass/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

- name: Define anchor for OpenShift/Kubernetes API login info
ansible.builtin.set_fact:
k8s_auth: &k8s_auth
create_volume_snapshotclass_k8s_auth: &k8s_auth
host: "{{ create_volume_snapshotclass_oc_api_url | default(omit) }}"
api_key: "{{ create_volume_snapshotclass_oc_api_token | default(omit) }}"
validate_certs: "{{ create_volume_snapshotclass_validate_certs | default(false) }}"
Expand Down
16 changes: 8 additions & 8 deletions roles/create_volume_snapshots/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

- name: Define anchor for OpenShift/Kubernetes API login info
ansible.builtin.set_fact:
k8s_auth: &k8s_auth
create_volume_snapshots_k8s_auth: &k8s_auth
host: "{{ create_volume_snapshots_oc_api_url | default(omit) }}"
api_key: "{{ create_volume_snapshots_oc_api_token | default(omit) }}"
validate_certs: "{{ create_volume_snapshots_validate_certs | default(false) }}"
Expand Down Expand Up @@ -44,7 +44,7 @@
kind: PersistentVolumeClaim
namespace: "{{ create_volume_snapshots_pvc_namespace | default('') }}"
api_version: v1
register: existing_pvcs
register: create_volume_snapshots_existing_pvcs
tags:
- k8s_create_volume_snapshots

Expand All @@ -67,9 +67,9 @@
when:
- item.snapshot_name is defined and item.snapshot_name != ""
- item.pvc_name is defined and item.pvc_name != ""
- existing_pvcs is defined
- existing_pvcs.resources is defined
- item.pvc_name in (existing_pvcs.resources | map(attribute='metadata.name') | list)
- create_volume_snapshots_existing_pvcs is defined
- create_volume_snapshots_existing_pvcs.resources is defined
- item.pvc_name in (create_volume_snapshots_existing_pvcs.resources | map(attribute='metadata.name') | list)
tags:
- k8s_create_volume_snapshots

Expand All @@ -82,10 +82,10 @@
'{{ create_volume_snapshots_pvc_namespace | default('') }}'
loop: "{{ create_volume_snapshots_volume_snapshot_specs | default([]) }}"
when:
- existing_pvcs is defined
- existing_pvcs.resources is defined
- create_volume_snapshots_existing_pvcs is defined
- create_volume_snapshots_existing_pvcs.resources is defined
- item.snapshot_name is defined and item.snapshot_name != ""
- item.pvc_name is defined and item.pvc_name != ""
- item.pvc_name not in (existing_pvcs.resources | map(attribute='metadata.name') | list)
- item.pvc_name not in (create_volume_snapshots_existing_pvcs.resources | map(attribute='metadata.name') | list)
tags:
- k8s_create_volume_snapshots
2 changes: 1 addition & 1 deletion roles/delete_pvcs/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

- name: Define anchor for OpenShift/Kubernetes API login info
ansible.builtin.set_fact:
k8s_auth: &k8s_auth
delete_pvcs_k8s_auth: &k8s_auth
host: "{{ delete_pvcs_oc_api_url | default(omit) }}"
api_key: "{{ delete_pvcs_oc_api_token | default(omit) }}"
validate_certs: "{{ delete_pvcs_validate_certs | default(false) }}"
Expand Down
2 changes: 1 addition & 1 deletion roles/delete_storageclass/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

- name: Define anchor for OpenShift/Kubernetes API login info
ansible.builtin.set_fact:
k8s_auth: &k8s_auth
delete_storageclass_k8s_auth: &k8s_auth
host: "{{ delete_storageclass_oc_api_url | default(omit) }}"
api_key: "{{ delete_storageclass_oc_api_token | default(omit) }}"
validate_certs: "{{ delete_storageclass_validate_certs | default(false) }}"
Expand Down
2 changes: 1 addition & 1 deletion roles/delete_volume_snapshotclass/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

- name: Define anchor for OpenShift/Kubernetes API login info
ansible.builtin.set_fact:
k8s_auth: &k8s_auth
delete_volume_snapshotclass_k8s_auth: &k8s_auth
host: "{{ delete_volume_snapshotclass_oc_api_url | default(omit) }}"
api_key: "{{ delete_volume_snapshotclass_oc_api_token | default(omit) }}"
validate_certs: "{{ delete_volume_snapshotclass_validate_certs | default(false) }}"
Expand Down
2 changes: 1 addition & 1 deletion roles/delete_volume_snapshots/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

- name: Define anchor for OpenShift/Kubernetes API login info
ansible.builtin.set_fact:
k8s_auth: &k8s_auth
delete_volume_snapshots_k8s_auth: &k8s_auth
host: "{{ delete_volume_snapshots_oc_api_url | default(omit) }}"
api_key: "{{ delete_volume_snapshots_oc_api_token | default(omit) }}"
validate_certs: "{{ delete_volume_snapshots_validate_certs | default(false) }}"
Expand Down
6 changes: 3 additions & 3 deletions roles/set_default_storageclass/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

- name: Define anchor for OpenShift/Kubernetes API login info
ansible.builtin.set_fact:
k8s_auth: &k8s_auth
set_default_storageclass_k8s_auth: &k8s_auth
host: "{{ set_default_storageclass_oc_api_url | default(omit) }}"
api_key: "{{ set_default_storageclass_oc_api_token | default(omit) }}"
validate_certs: "{{ set_default_storageclass_validate_certs | default(false) }}"
Expand All @@ -38,7 +38,7 @@
<<: *k8s_auth
kind: StorageClass
api_version: storage.k8s.io/v1
register: existing_storage_classes
register: set_default_storageclass_existing_storage_classes
tags:
- k8s_set_default_storage_class

Expand All @@ -55,7 +55,7 @@
metadata:
annotations:
storageclass.kubernetes.io/is-default-class: "false"
loop: "{{ existing_storage_classes.resources | default([]) }}"
loop: "{{ set_default_storageclass_existing_storage_classes.resources | default([]) }}"
when:
- item.metadata.annotations is defined
- item.metadata.annotations['storageclass.kubernetes.io/is-default-class'] is defined
Expand Down
Loading