<commit_before>---
  # setup directories
  - name: create directory for certificates
    file:
      path: "{{ kubernetes_certificates_dir }}"
      state: directory

  # copy CA certificate
  - name: copy {{ kubernetes_certificates_ca_file_name }}
    copy:
      src: "{{ tls_directory }}/ca.pem"
      dest: "{{ kubernetes_certificates.ca }}"
      owner: "{{ kubernetes_certificates_owner }}"
      group: "{{ kubernetes_certificates_group }}"
      mode: "{{ kubernetes_certificates_mode }}"
    
  # copy kubernetes control plane certificates
  - name: copy master node TLS assets
    copy:
      src: "{{ tls_directory }}/{{ item.src }}"
      dest: "{{ item.dest }}"
      owner: "{{ kubernetes_certificates_owner }}"
      group: "{{ kubernetes_certificates_group }}"
      mode: "{{ kubernetes_certificates_mode }}"
    when: "'master' in group_names"
    with_items:
      - src: "etcd-client.pem"
        dest: "{{ kubernetes_certificates.etcd_client }}"
      - src: "etcd-client-key.pem"
        dest: "{{ kubernetes_certificates.etcd_client_key }}"
      - src: "{{ inventory_hostname }}-apiserver.pem"
        dest: "{{ kubernetes_certificates.api_server }}"
      - src: "{{inventory_hostname}}-apiserver-key.pem"
        dest: "{{ kubernetes_certificates.api_server_key }}"
      - src: "kube-scheduler.pem"
        dest: "{{ kubernetes_certificates.scheduler }}"
      - src: "kube-scheduler-key.pem"
        dest: "{{ kubernetes_certificates.scheduler_key }}"
      - src: "kube-controller-manager.pem"
        dest: "{{ kubernetes_certificates.controller_manager }}"
      - src: "kube-controller-manager-key.pem"
        dest: "{{ kubernetes_certificates.controller_manager_key }}"
      - src: "service-account.pem"
        dest: "{{ kubernetes_certificates.service_account }}"
      - src: "service-account-key.pem"
        dest: "{{ kubernetes_certificates.service_account_key }}"

  # copy kubelet and kube-proxy certificates
  - name: deploy kubernetes node client certificates
    copy:
      src: "{{ tls_directory }}/{{ item.src }}"
      dest: "{{ item.dest }}"
      owner: "{{ kubernetes_certificates_owner }}"
      group: "{{ kubernetes_certificates_group }}"
      mode: "{{ kubernetes_certificates_mode }}"
    when: "['master','worker','ingress','storage'] | intersect(group_names) | length > 0"
    with_items:
      - src: "{{ inventory_hostname }}-kubelet.pem"<commit_msg>Fix task names in kubenode-cert<commit_after>---
  # setup directories
  - name: create directory for certificates
    file:
      path: "{{ kubernetes_certificates_dir }}"
      state: directory

  # copy CA certificate
  - name: copy ca.pem
    copy:
      src: "{{ tls_directory }}/ca.pem"
      dest: "{{ kubernetes_certificates.ca }}"
      owner: "{{ kubernetes_certificates_owner }}"
      group: "{{ kubernetes_certificates_group }}"
      mode: "{{ kubernetes_certificates_mode }}"
    
  # copy kubernetes control plane certificates
  - name: copy master node TLS assets
    copy:
      src: "{{ tls_directory }}/{{ item.src }}"
      dest: "{{ item.dest }}"
      owner: "{{ kubernetes_certificates_owner }}"
      group: "{{ kubernetes_certificates_group }}"
      mode: "{{ kubernetes_certificates_mode }}"
    when: "'master' in group_names"
    with_items:
      - src: "etcd-client.pem"
        dest: "{{ kubernetes_certificates.etcd_client }}"
      - src: "etcd-client-key.pem"
        dest: "{{ kubernetes_certificates.etcd_client_key }}"
      - src: "{{ inventory_hostname }}-apiserver.pem"
        dest: "{{ kubernetes_certificates.api_server }}"
      - src: "{{inventory_hostname}}-apiserver-key.pem"
        dest: "{{ kubernetes_certificates.api_server_key }}"
      - src: "kube-scheduler.pem"
        dest: "{{ kubernetes_certificates.scheduler }}"
      - src: "kube-scheduler-key.pem"
        dest: "{{ kubernetes_certificates.scheduler_key }}"
      - src: "kube-controller-manager.pem"
        dest: "{{ kubernetes_certificates.controller_manager }}"
      - src: "kube-controller-manager-key.pem"
        dest: "{{ kubernetes_certificates.controller_manager_key }}"
      - src: "service-account.pem"
        dest: "{{ kubernetes_certificates.service_account }}"
      - src: "service-account-key.pem"
        dest: "{{ kubernetes_certificates.service_account_key }}"

  # copy kubelet and kube-proxy certificates
  - name: copy kubernetes node client certificates
    copy:
      src: "{{ tls_directory }}/{{ item.src }}"
      dest: "{{ item.dest }}"
      owner: "{{ kubernetes_certificates_owner }}"
      group: "{{ kubernetes_certificates_group }}"
      mode: "{{ kubernetes_certificates_mode }}"
    when: "['master','worker','ingress','storage'] | intersect(group_names) | length > 0"
    with_items:
      - src: "{{ inventory_hostname }}-kubelet.pem"
{'fraction_non_alphanumeric': 0.14523512276321265, 'fraction_numerical': 0.0004161464835622139, 'mean_word_length': 3.12618025751073, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2129003', 'n_tokens_mistral': 1559, 'n_tokens_neox': 1541, 'n_words': 267}