---
  - hosts: master:worker:ingress:storage
    any_errors_fatal: true
    name: Generate kubectl config file
    remote_user: root
    become_method: sudo
    vars_files:
      - group_vars/all.yaml

    roles:
      - kubeconfig

    post_tasks:
      # Remove old kubeconfig files from old installations during upgrades
      - name: Remove old kubectl config file
        file: 
          # Hard-coded to the right path in case we change kubelet_lib_dir
          path: /var/lib/kubelet/kubeconfig
          state: absent

---
  - hosts: master:worker:ingress:storage
    any_errors_fatal: true
    name: Generate Kubectl Config File
    remote_user: root
    become_method: sudo
    vars_files:
      - group_vars/all.yaml

    roles:
      - kubeconfig

    post_tasks:
      # Remove old kubeconfig files from old installations during upgrades
      - name: Remove old kubectl config file
        file: 
          # Hard-coded to the right path in case we change kubelet_lib_dir
          path: /var/lib/kubelet/kubeconfig
          state: absent

Format Kubectl Config play name
Format Kubectl Config play name
