From f9303ff3525f4d19db86cb480532e18286beaf09 Mon Sep 17 00:00:00 2001 From: Jakub Filo Date: Sat, 15 Apr 2023 18:42:51 +0000 Subject: [PATCH] zabbix role for windows --- production | 22 ++++++++++++++++++++++ roles/zabbixagent-win/tasks/main.yml | 10 ++++++++++ zabbixagent.yml | 4 ++++ 3 files changed, 36 insertions(+) create mode 100644 roles/zabbixagent-win/tasks/main.yml create mode 100644 zabbixagent.yml diff --git a/production b/production index 049aed1..3cd4997 100644 --- a/production +++ b/production @@ -1,3 +1,25 @@ +[mist] +mist.lan + +[mist:vars] +ansible_user=plantroon +ansible_ssh_private_key_file=/srv/vapps/hass/mist-key +ansible_connection=ssh +ansible_shell_type=cmd +ansible_ssh_common_args=-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null +ansible_become_method=runas + +[lotus] +lotus.lan + +[lotus:vars] +ansible_user=martahoralka +ansible_ssh_private_key_file=/srv/vapps/hass/mist-key +ansible_connection=ssh +ansible_shell_type=cmd +ansible_ssh_common_args=-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null +ansible_become_method=runas + [faiserver] 10.91.1.2 diff --git a/roles/zabbixagent-win/tasks/main.yml b/roles/zabbixagent-win/tasks/main.yml new file mode 100644 index 0000000..174998d --- /dev/null +++ b/roles/zabbixagent-win/tasks/main.yml @@ -0,0 +1,10 @@ +--- +- name: Save the result of 'whoami' in 'whoami_out' + ansible.windows.win_command: whoami + register: whoami_out + +- name: install packages + win_package: + path: "https://cdn.zabbix.com/zabbix/binaries/stable/6.2/6.2.2/zabbix_agent2-6.2.2-windows-amd64-openssl.msi" + state: present + arguments: "SERVER=10.91.1.2" diff --git a/zabbixagent.yml b/zabbixagent.yml new file mode 100644 index 0000000..7cb3d48 --- /dev/null +++ b/zabbixagent.yml @@ -0,0 +1,4 @@ +--- +- hosts: lotus + roles: + - zabbixagent-win