diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2022-01-21 15:51:57 +0100 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2022-01-21 15:51:57 +0100 |
commit | d2864ab4eb221007ce3647d22c1d3e334e6134cc (patch) | |
tree | 0eec37bb18f2bbe3ebcfb67703e00749f3934826 /roles/icinga2 | |
parent | cb690eada5141f9abade617157ecda9a4e4f0533 (diff) | |
download | ansible_collection-d2864ab4eb221007ce3647d22c1d3e334e6134cc.tar.gz |
icinga: modify
Diffstat (limited to 'roles/icinga2')
-rw-r--r-- | roles/icinga2/tasks/main.yml | 21 | ||||
-rw-r--r-- | roles/icinga2/tasks/postfix.yml | 2 |
2 files changed, 21 insertions, 2 deletions
diff --git a/roles/icinga2/tasks/main.yml b/roles/icinga2/tasks/main.yml index bcb702f..07f02d8 100644 --- a/roles/icinga2/tasks/main.yml +++ b/roles/icinga2/tasks/main.yml @@ -45,6 +45,8 @@ - python3-pymysql - git - mailutils + - libsasl2-modules + - sasl2-bin become: yes - name: Securing MariaDB installation @@ -81,6 +83,25 @@ become: yes register: icingaweb_api_password +- name: generate SSH folder + file: + state: directory + path: /var/lib/nagios/.ssh + become: yes + become_user: nagios + +- name: generate SSH-Key + community.crypto.openssh_keypair: + comment: 'monitor' + path: /var/lib/nagios/.ssh/id_rsa + become: yes + become_user: nagios + register: ssh_key + +- name: Print SSH-PubKey + debug: + var: ssh_key.public_key + - name: Configure Icinga2 include_tasks: icinga.yml diff --git a/roles/icinga2/tasks/postfix.yml b/roles/icinga2/tasks/postfix.yml index e71cc1d..c3b8eb1 100644 --- a/roles/icinga2/tasks/postfix.yml +++ b/roles/icinga2/tasks/postfix.yml @@ -26,7 +26,6 @@ become: yes when: bysender.changed -# sudo apt install libsasl2-modules sasl2-bin - name: postfix config lineinfile: path: /etc/postfix/main.cf @@ -46,4 +45,3 @@ - reg: '^smtp_sasl_security_options\w*=.*$' line: 'smtp_sasl_security_options = noanonymous' notify: Restart postfix - become: yes |