diff --git a/meta/main.yml b/meta/main.yml index 93299b3..9a4eacd 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -6,6 +6,6 @@ galaxy_info: galaxy_tags: [] license: GPL2 platforms: - - name: kubernetes - version: - - all + - name: kubernetes + version: + - all diff --git a/tasks/main.yml b/tasks/main.yml index 621b8b5..b224e99 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,39 +1,39 @@ --- - name: calico setup block: - - name: Include vars - include_vars: "calico-files.yaml" + - name: Include vars + ansible.builtin.include_vars: "calico-files.yaml" - - name: calico install - k8s: - state: present - context: "{{ my_context }}" - merge_type: merge - resource_definition: "{{ lookup('template', item) | from_yaml }}" - with_items: - - "{{ calico_files }}" - register: calico_changed + - name: calico install + kubernetes.core.k8s: + state: present + context: "{{ my_context }}" + merge_type: merge + resource_definition: "{{ lookup('template', item) | from_yaml }}" + with_items: + - "{{ calico_files }}" + register: calico_changed - - name: delete pods calicoctl - k8s: - state: absent - context: "{{ my_context }}" - kind: Pod - name: calicoctl - namespace: kube-system -# when: -# - calico_changed is changed -# -# - name: calicoctl install -# k8s: -# state: present -# context: "{{ my_context }}" -# apply: yes -# resource_definition: "{{ lookup('file', item) | from_yaml }}" -# with_items: -# - "{{ calicoctl_files }}" -# when: -# - calico_changed is changed + - name: delete pods calicoctl + kubernetes.core.k8s: + state: absent + context: "{{ my_context }}" + kind: Pod + name: calicoctl + namespace: kube-system +# when: +# - calico_changed is changed +# +# - name: calicoctl install +# kubernetes.core.k8s: +# state: present +# context: "{{ my_context }}" +# apply: true +# resource_definition: "{{ lookup('file', item) | from_yaml }}" +# with_items: +# - "{{ calicoctl_files }}" +# when: +# - calico_changed is changed when: