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

added first draft to add full compatibility for Debian #11

Merged
merged 2 commits into from
Jan 4, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions roles/icinga_agent/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@
when:
- icinga_agent_repositoryd_directory is defined

- name: create features-* folders in case it is missing
ansible.builtin.file:
path: "{{ item }}"
state: directory
mode: 0750
owner: "{{ icinga2_user[ansible_os_family] }}"
group: "{{ icinga2_group[ansible_os_family] }}"
loop:
- /etc/icinga2/features-available/
- /etc/icinga2/features-enabled/

- name: copy icinga configuration files
ansible.builtin.template:
src: "{{ item }}"
Expand Down Expand Up @@ -66,6 +77,14 @@
- icinga_agent_enable_features | length > 0

- block:
- name: create certs folder in case it is missing
ansible.builtin.file:
path: /var/lib/icinga2/certs/ca.crt
state: directory
mode: 0750
owner: "{{ icinga2_user[ansible_os_family] }}"
group: "{{ icinga2_group[ansible_os_family] }}"

- name: generate ticket and save it as a variable
ansible.builtin.shell: /usr/sbin/icinga2 pki ticket --cn {{ ansible_hostname }} --salt {{ icinga_agent_salt }}
environment:
Expand Down