update_zabbix_inventory_details.yaml 946 B

1234567891011121314151617181920212223242526272829
  1. ---
  2. - name: Using Zabbix collection to manage Zabbix Server's elements with authentication key
  3. hosts: all
  4. collections:
  5. - community.zabbix
  6. roles:
  7. - role: zabbix_agent
  8. zabbix_agent_server: monitoring.***CONTENTS REDACTED***
  9. tasks:
  10. - name: Set API token
  11. ansible.builtin.set_fact:
  12. ansible_zabbix_auth_key: ***CONTENTS REDACTED***
  13. - name: add zabbixx
  14. vars:
  15. ansible_network_os: community.zabbix.zabbix
  16. ansible_connection: httpapi
  17. ansible_httpapi_port: 80
  18. ansible_httpapi_use_ssl: false # Set to true for HTTPS
  19. ansible_httpapi_validate_certs: false # For HTTPS set to true to validate server's certificate
  20. delegate_to: ***CONTENTS REDACTED***
  21. zabbix_host:
  22. host_name: ***CONTENTS REDACTED***
  23. inventory_zabbix:
  24. asset_tag: ***CONTENTS REDACTED***
  25. model: OptiPlex 9010