k8s module - TypeError: argument of type 'NoneType' is not iterable

Hello,

Trying to apply a yaml definition using the k8s module to my cluster. I’ve never used this module before so i’m trying to work out if i’m just doing something wrong or is this a bug?

playbook:

`

I figured it out. I had the path to my kubeconfig set wrong and i was missing ‘context’ and namespace parameters. What finally worked:

`

  • hosts: kube-master[0]
    become: no
    tasks:
  • name: Install simple app
    k8s:
    definition: ‘{{ item }}’
    kubeconfig: ~/.kube/config-dev
    context: dev
    namespace: default
    state: absent
    with_items: ‘{{ lookup(“url”, “https://k8s.io/examples/application/guestbook/redis-master-deployment.yaml”, split_lines=False) | from_yaml_all | list }}’
    when: item is not none
    delegate_to: localhost

`