- hosts: 127.0.0.1
  connection: local
  gather_facts: False
  roles:
  - pki-ca
  vars:
    cluster_dir: "clusters/{{ cluster }}"
    workspace: "{{ cluster_dir }}/tmp"
    ca_vars_file: "{{ cluster_dir }}/pki-{{ ca_name }}-ca.yml"
  vars_files:
  - "{{cluster_dir}}/main.yml"

- hosts: 127.0.0.1
  connection: local
  gather_facts: False
  roles:
  - pki-clients
  vars_files:
  - "clusters/{{ cluster }}/main.yml"
  vars:
    cluster_dir: "clusters/{{ cluster }}"
    workspace: "{{ cluster_dir }}/tmp"
    ca_vars_file: "{{ cluster_dir }}/pki-{{ ca_name }}-ca.yml"
    client_vars_file: "{{ cluster_dir }}/pki-{{ ca_name }}-clients.yml"
    clients:
    - name: admin
      profile: client
      hosts: []
    - name: apiserver
      profile: server
      hosts:
      - "{{ external_fqdn }}"
      - "{{ cluster_service_kubernetes_ip }}"

- hosts: 127.0.0.1
  connection: local
  gather_facts: False
  roles:
  - configure
  vars:
    cluster_dir: "clusters/{{ cluster }}"
    workspace: "{{ cluster_dir }}/tmp"
    ca_vars_file: "{{ cluster_dir }}/pki-{{ ca_name }}-ca.yml"
  vars_files:
  - "{{cluster_dir}}/main.yml"

- hosts: 127.0.0.1
  connection: local
  gather_facts: False
  roles:
  - pki-ca
  vars:
    cluster_dir: "clusters/{{ cluster }}"
    workspace: "{{ cluster_dir }}/tmp"
    ca_vars_file: "{{ cluster_dir }}/pki-{{ ca_name }}-ca.yml"
  vars_files:
  - "{{cluster_dir}}/main.yml"

- hosts: 127.0.0.1
  connection: local
  gather_facts: False
  roles:
  - pki-clients
  vars_files:
  - "clusters/{{ cluster }}/main.yml"
  vars:
    cluster_dir: "clusters/{{ cluster }}"
    workspace: "{{ cluster_dir }}/tmp"
    ca_vars_file: "{{ cluster_dir }}/pki-{{ ca_name }}-ca.yml"
    client_vars_file: "{{ cluster_dir }}/pki-{{ ca_name }}-clients.yml"
    clients:
    - name: admin
      profile: client
      hosts:
      - "admin"
    - name: apiserver
      profile: server
      hosts:
      - "{{ external_fqdn }}"
      - "{{ cluster_service_kubernetes_ip }}"

- hosts: 127.0.0.1
  connection: local
  gather_facts: False
  roles:
  - configure
  vars:
    cluster_dir: "clusters/{{ cluster }}"
    workspace: "{{ cluster_dir }}/tmp"
    ca_vars_file: "{{ cluster_dir }}/pki-{{ ca_name }}-ca.yml"
  vars_files:
  - "{{cluster_dir}}/main.yml"

Set a host for admin cert to work with cfssl 1.1
Set a host for admin cert to work with cfssl 1.1
