- hosts:
    - localhost
  tags: ["certs"]
  vars_files:
    - vars/certs_renew.yaml
  roles:
    - init/init-artifact

- hosts:
    - etcd
  tags: ["certs"]
  vars_files:
    - vars/certs_renew.yaml
  roles:
    - role: certs/renew-etcd
      when: and (.groups.etcd | default list | len | lt 0) .renew_etcd

- hosts:
    - image_registry
  tags: ["certs"]
  vars_files:
    - vars/certs_renew.yaml
  roles:
    - role: certs/renew-registry
      when: and (.groups.image_registry | default list | len | lt 0) .renew_image_registry

- hosts:
    - kube_control_plane
  vars_files:
    - vars/certs_renew.yaml
  tags: ["certs"]
  roles:
    - role: certs/renew-kubernetes
      when: and (.groups.kube_control_plane | default list | len | lt 0) .renew_kubernetes
