added a check for the serial cert file in the registry setup
notify:
- restart openshift master services
+- name: Check that the serial file exists
+ stat:
+ path: /etc/origin/master/ca.serial.txt
+ register: serial_stat_result
+
+- name: Create the serial file, if it doesnt exist already
+ file:
+ path: /etc/origin/master/ca.serial.txt
+ state: touch
+ when: not serial_stat_result.stat.exists
+
- name: Create a self-signed cert
oadm_ca:
cmd: create-server-cert
