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

- 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

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

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