---
- name: Check control node to see if htpasswd is installed
  local_action: command which htpasswd
  register: htpasswd_check
  failed_when: no
  changed_when: no
  become: false

- fail: msg="'htpasswd' is unavailable. Please install httpd-tools on the control node"
  when: htpasswd_check.rc  == 1

- name: Check control node to see if keytool is installed
  local_action: command which keytool
  register: keytool_check
  failed_when: no
  changed_when: no
  become: false

- fail: msg="'keytool' is unavailable. Please install java-1.8.0-openjdk-headless on the control node"
  when: keytool_check.rc  == 1

- include_tasks: generate_certificates.yaml
- include_tasks: generate_serviceaccounts.yaml
- include_tasks: generate_services.yaml
- include_tasks: generate_rolebindings.yaml
