Open 0xErnie opened 6 years ago
The playbook:
--- - hosts: monitoring.hostname.tld roles: - geerlingguy.mysql - chrnie.icinga2 vars: - icinga2_role: master
The failing task:
TASK [chrnie.icinga2 : create cert] ** fatal: [monitoring.hostname.tld]: FAILED! => { "changed": true, "cmd": "/usr/sbin/icinga2 pki new-cert --cn monitoring --key '/var/lib/icinga2/certs/monitoring.key' --cert '/var/lib/icinga2/certs/monitoring.crt'", "delta": "0:00:02.024617", "end": "2018-05-09 13:53:21.146083", "rc": 1, "start": "2018-05-09 13:53:19.121466" } STDOUT: [2018-05-09 13:53:19 +0000] warning/icinga-app: Sysconfig file '/etc/sysconfig/icinga2' cannot be read. Using default values. information/base: Writing private key to '/var/lib/icinga2/certs/monitoring.key'. critical/SSL: Error while opening private RSA key file '/var/lib/icinga2/certs/monitoring.key': 33558530, "error:02001002:system library:fopen:No such file or directory" MSG: non-zero return code
TASK [chrnie.icinga2 : create cert] ** fatal: [monitoring.hostname.tld]: FAILED! => { "changed": true, "cmd": "/usr/sbin/icinga2 pki new-cert --cn monitoring --key '/var/lib/icinga2/certs/monitoring.key' --cert '/var/lib/icinga2/certs/monitoring.crt'", "delta": "0:00:02.024617", "end": "2018-05-09 13:53:21.146083", "rc": 1, "start": "2018-05-09 13:53:19.121466" }
STDOUT:
[2018-05-09 13:53:19 +0000] warning/icinga-app: Sysconfig file '/etc/sysconfig/icinga2' cannot be read. Using default values. information/base: Writing private key to '/var/lib/icinga2/certs/monitoring.key'. critical/SSL: Error while opening private RSA key file '/var/lib/icinga2/certs/monitoring.key': 33558530, "error:02001002:system library:fopen:No such file or directory"
MSG:
non-zero return code
Seems like https://github.com/chrnie/ansible-role-icinga2/blob/5662241968641b49b4bcf4daf03ec0814de2bdd6/tasks/pki.yml#L18-L24 creates just an empty directory, which is not used. Maybe this needs to be changed?
The playbook:
The failing task: