From a7c1017d7455727529ad1731e85e72c5aaa98fb5 Mon Sep 17 00:00:00 2001 From: jegomez Date: Thu, 24 Oct 2024 14:11:48 -0500 Subject: [PATCH] [DEL] Removes templates tasks --- .../tasks/instalar_plantilla_extensiones.yml | 27 ---- roles/zabbix_server/tasks/templates.yml | 129 ------------------ 2 files changed, 156 deletions(-) delete mode 100644 roles/zabbix_server/tasks/instalar_plantilla_extensiones.yml delete mode 100644 roles/zabbix_server/tasks/templates.yml diff --git a/roles/zabbix_server/tasks/instalar_plantilla_extensiones.yml b/roles/zabbix_server/tasks/instalar_plantilla_extensiones.yml deleted file mode 100644 index 569e716..0000000 --- a/roles/zabbix_server/tasks/instalar_plantilla_extensiones.yml +++ /dev/null @@ -1,27 +0,0 @@ ---- -# Enlace git zabbix para templates 6.4 -# https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates?at=release%2F6.4 -# -# Se debe modificar con los nuevos templates -# Descarga e instala plantilla para OS Linux que corresponde a las extensiones -# de agente Zabbix instaladas por el rol zabbix_agent_extensions -# -# -# - -- name: Descargar plantilla en formato XML - get_url: - url: 'https://raw.githubusercontent.com/scoopex/zabbix-agent-extensions/master/zabbix_templates/5.2/custom-os-linux.xml' - dest: '{{ role_path }}/files/agent_extensions_5.2_custom_os_linux.xml' - mode: '0444' - delegate_to: ansible_server - -- name: Importar plantilla en servidor Zabbix usando API - zabbix_template: - server_url: "http://{{ hostvars['zabbix_server'].ansible_fqdn }}/zabbix" - login_user: "{{ zabbix_admin_user }}" - login_password: "{{ zabbix_admin_pass }}" - template_xml: "{{ lookup('file', 'agent_extensions_5.2_custom_os_linux.xml') }}" - state: present - delegate_to: ansible_server - diff --git a/roles/zabbix_server/tasks/templates.yml b/roles/zabbix_server/tasks/templates.yml deleted file mode 100644 index efb7f53..0000000 --- a/roles/zabbix_server/tasks/templates.yml +++ /dev/null @@ -1,129 +0,0 @@ -# github https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates?at=refs%2Fheads%2Frelease%2F6.4 ---- -- name: Crear la carpeta de destino si no existe - file: - path: /usr/share/agofer/repositorio_zabbix - state: directory - mode: '0755' - -#- name: Clonar el repositorio de GitHub con profundidad 1 -# command: git clone --depth=1 https://git.zabbix.com/scm/zbx/zabbix.git /home/sistemas/repositorio_zabbix -# args: -# creates: /home/sistemas/repositorio_zabbix/.git -# -#- name: Crear la carpeta de destino en el directorio del rol si no existe -# file: -# path: "{{ role_path }}/files" -# state: directory -# mode: '0755' -# -#- name: Mover el contenido del repositorio al directorio del rol -# copy: -# src: "{{ item }}" -# dest: "{{ role_path }}/files/" -# remote_src: yes -# with_fileglob: -# - "/home/sistemas/repositorio_zabbix/*" -# -#- name: Limpiar directorios temporales -# file: -# path: /home/sistemas/repositorio_zabbix -# state: absent - -#- name: Import Zabbix templates from JSON -# # set task level variables as we change ansible_connection plugin here -# vars: -# ansible_network_os: community.zabbix.zabbix -# ansible_connection: httpapi -# ansible_httpapi_port: 80 -# ansible_httpapi_use_ssl: false -# ansible_httpapi_validate_certs: false -# ansible_zabbix_url_path: '' -# become: False -# community.zabbix.zabbix_template: -# template_json: "{{ lookup('file', 'zabbix_apache2.json') }}" -# state: present - -#- name: Import Zabbix templates from XML -# set task level variables as we change ansible_connection plugin here -# vars: -# ansible_network_os: community.zabbix.zabbix -# ansible_connection: httpapi -# ansible_httpapi_port: 80 -# ansible_httpapi_use_ssl: false -# ansible_httpapi_validate_certs: false -# ansible_zabbix_url_path: '' -# become: False -# zabbix_template: -# template_xml: "{{ lookup('file', 'zabbix_apache2.xml') }}" -# state: present - -#- name: Import Zabbix template from Ansible dict variable -# set task level variables as we change ansible_connection plugin here -# vars: -# ansible_network_os: community.zabbix.zabbix -# ansible_connection: httpapi -# ansible_httpapi_port: 80 -# ansible_httpapi_use_ssl: false -# ansible_httpapi_validate_certs: false -# ansible_zabbix_url_path: '' -# become: False -# zabbix_template: -# template_json: -# zabbix_export: -# version: "3.2" -# templates: -# - name: Template for Testing -# description: "Testing template import" -# template: Test Template -# groups: -# - name: Templates -# state: present -# -#- name: Configure macros on the existing Zabbix template -# # set task level variables as we change ansible_connection plugin here -# vars: -# ansible_network_os: community.zabbix.zabbix -# ansible_connection: httpapi -# ansible_httpapi_port: 80 -# ansible_httpapi_use_ssl: false -# ansible_httpapi_validate_certs: false -# ansible_zabbix_url_path: '' -# become: False -# zabbix_template: -# template_name: Template -# macros: -# - macro: "{$TEST_MACRO}" -# value: "Example" -# state: present -# -#- name: Add tags to the existing Zabbix template -# set task level variables as we change ansible_connection plugin here -# vars: -# ansible_network_os: community.zabbix.zabbix -# ansible_connection: httpapi -# ansible_httpapi_port: 80 -# ansible_httpapi_use_ssl: false -# ansible_httpapi_validate_certs: false -# ansible_zabbix_url_path: '' -# become: False -# zabbix_template: -# template_name: Template -# tags: -# - tag: class -# value: application -# state: present -# -#- name: Delete Zabbix template -# set task level variables as we change ansible_connection plugin here -# vars: -# ansible_network_os: community.zabbix.zabbix -# ansible_connection: httpapi -# ansible_httpapi_port: 80 -# ansible_httpapi_use_ssl: false -# ansible_httpapi_validate_certs: false -# ansible_zabbix_url_path: '' -# become: False -# zabbix_template: -# template_name: Template -# state: absent