Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task expects missing directory #1

Open
0xErnie opened this issue May 11, 2018 · 1 comment
Open

Task expects missing directory #1

0xErnie opened this issue May 11, 2018 · 1 comment

Comments

@0xErnie
Copy link

0xErnie commented May 11, 2018

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

@0xErnie
Copy link
Author

0xErnie commented May 11, 2018

Seems like

- name: ensure pki folder is created
file:
dest: /etc/icinga2/pki
state: directory
mode: 0700
owner: "{{icinga2_user[ansible_os_family]}}"
group: "{{icinga2_group[ansible_os_family]}}"
creates just an empty directory, which is not used. Maybe this needs to be changed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant