diff --git a/defaults/main.yml b/defaults/main.yml index c8ef8a8..a86921e 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -3,7 +3,7 @@ my_context: minikube storage_manual: true storage_localpath: true -storage_localpath_version: "v0.0.21" +storage_localpath_version: "v0.0.20" storage_localpath_default_path: "/mnt/local" storage_localpath_namespace: "local-path-storage" diff --git a/tasks/local-path.yml b/tasks/local-path.yml index e4b1c03..ac3d536 100644 --- a/tasks/local-path.yml +++ b/tasks/local-path.yml @@ -16,30 +16,30 @@ when: - not storage_localpath|bool -# - name: namespace -# kubernetes.core.k8s: -# state: present -# context: "{{ my_context }}" -# merge_type: merge -# definition: -# api_version: v1 -# kind: Namespace -# metadata: -# name: "{{ storage_localpath_namespace }}" -# labels: -# namespace: '{{ storage_localpath_namespace }}' -# when: -# - storage_localpath|bool -# -# - name: local-path-storage need to be {{ storage_localpath_state }} -# kubernetes.core.k8s: -# state: "{{ storage_localpath_state }}" -# context: "{{ my_context }}" -# namespace: "{{ storage_localpath_namespace }}" -# apply: true -# resource_definition: "{{ lookup('file', 'local-path/' + item) | from_yaml }}" -# with_items: -# - "{{ storage_localpath_files_list }}" + - name: namespace + k8s: + state: present + context: "{{ my_context }}" + merge_type: merge + definition: + api_version: v1 + kind: Namespace + metadata: + name: "{{ storage_localpath_namespace }}" + labels: + namespace: '{{ storage_localpath_namespace }}' + when: + - storage_localpath|bool + + - name: local-path-storage need to be {{ storage_localpath_state }} + k8s: + state: "{{ storage_localpath_state }}" + context: "{{ my_context }}" + namespace: "{{ storage_localpath_namespace }}" + apply: true + resource_definition: "{{ lookup('file', 'local-path/' + item) | from_yaml }}" + with_items: + - "{{ storage_localpath_files_list }}" # https://github.com/rancher/local-path-provisioner/tree/master/deploy/chart - name: Downloal Local-path repository @@ -59,11 +59,11 @@ release_namespace: "{{ storage_localpath_namespace }}" create_namespace: true values: -# rbac: -# create: false -# serviceAccount: -# create: false -# name: local-path-provisioner + rbac: + create: false + serviceAccount: + create: false + name: local-path-provisioner nodePathMap: - node: DEFAULT_PATH_FOR_NON_LISTED_NODES paths: ["{{ storage_localpath_default_path }}"]