26 lines
846 B
YAML
26 lines
846 B
YAML
---
|
|
- name: Copy SSH authorized_keys for monitoring user
|
|
authorized_key:
|
|
user: "{{ monitored_user }}"
|
|
key: "{{ lookup('file', item) }}"
|
|
key_options: '{{ lookup("template", "ssh-key-options.j2") }}'
|
|
manage_dir: yes
|
|
loop: "{{ monitored_ssh_key_files }}"
|
|
|
|
- name: Copy SSH wrapper
|
|
copy:
|
|
src: "{{ monitored_ssh_key_wrapper_src }}"
|
|
dest: "{{ monitored_ssh_key_wrapper }}"
|
|
owner: "{{ monitored_ssh_key_wrapper_owner|default('root') }}"
|
|
group: "{{ monitored_group }}"
|
|
mode: "{{ monitored_ssh_key_wrapper_mode }}"
|
|
backup: yes
|
|
when: monitored_ssh_key_wrapper_src|default(False) and monitored_ssh_key_wrapper|default(False)
|
|
|
|
- name: Instal additional packages for SSH monitoring
|
|
package:
|
|
name: "{{ monitored_packages_additional_ss }}"
|
|
state: latest
|
|
when: monitored_packages_additional_ssh != []
|
|
|