checkmk_deploy_agent/tasks/Suse.yml

57 lines
2 KiB
YAML
Raw Permalink Normal View History

2025-12-01 11:50:37 +01:00
---
- name: "{{ ansible_os_family }} Derivatives: Install host-specific {{ checkmk_agent_edition | upper }} Agent."
become: true
community.general.zypper:
name: "{{ __checkmk_agent_agent.file.host }}"
force: "{{ checkmk_agent_force_install | bool }}"
state: present
disable_gpg_check: true
when: |
checkmk_agent_edition | lower != "cre"
and checkmk_agent_host_specific | bool
tags:
- install-package
- name: "{{ ansible_os_family }} Derivatives: Install GENERIC or folder-specific {{ checkmk_agent_edition | upper }} Agent."
become: true
community.general.zypper:
name: "{{ __checkmk_agent_agent.file.cee }}"
force: "{{ checkmk_agent_force_install | bool }}"
state: present
disable_gpg_check: true
when: |
checkmk_agent_edition | lower != "cre"
and not checkmk_agent_host_specific | bool
tags:
- install-package
- name: "{{ ansible_os_family }} Derivatives: Transfer Vanilla agent."
ansible.builtin.copy:
src: "{{ __checkmk_agent_agent.file.cre }}"
dest: "{{ __checkmk_agent_agent.file.cre }}"
mode: "0644"
when: |
checkmk_agent_edition | lower == "cre"
and checkmk_agent_delegate_download != inventory_hostname
tags:
- download-package
- name: "{{ ansible_os_family }} Derivatives: Install Vanilla agent."
become: true
community.general.zypper:
name: "{{ __checkmk_agent_agent.file.cre }}"
force: "{{ checkmk_agent_force_install | bool }}"
state: present
disable_gpg_check: true
when: checkmk_agent_edition | lower == "cre"
tags:
- install-package
- name: "{{ ansible_os_family }} Derivatives: Allow access to the Checkmk agent on port {{ checkmk_agent_port }}/tcp."
when: checkmk_agent_configure_firewall | bool and "firewalld.service" in ansible_facts.services
ansible.posix.firewalld:
permanent: true
immediate: "{% if ansible_facts['services']['firewalld.service']['state'] == 'running' %}true{% else %}false{% endif %}"
port: "{{ checkmk_agent_port }}/tcp"
state: "enabled"
become: true