You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

82 lines
2.3 KiB

  1. ---
  2. ##
  3. ##
  4. ## Role to install xymon client or xymon server on host depending what is needed
  5. ##
  6. ## Tags :
  7. ## - xymon-server : binaries and configuration server side
  8. ## - xymon-client : binaries and configuration client side (need a working server)
  9. ## - client-configuration : used to configure client only (no binaries)
  10. ## - client-packages : used only install client binaries (no configuration)
  11. ## - server-configuration : used to configure server only (no binaries)
  12. ## - server-packages : used to only install server binaries (no configuration)
  13. ########
  14. ##Check vars
  15. - name: check xymon_server
  16. fail: msg="Missing variable xymon_server"
  17. tags:
  18. - xymon-client
  19. - xymon-server
  20. when: xymon_server is not defined
  21. - name: check xymon_checks
  22. fail: msg="Missing variable xymon_checks"
  23. tags:
  24. - xymon-client
  25. - client-configuration
  26. when: xymon_checks is not defined
  27. - name: check monitoring_ip
  28. fail: msg="Missing variable monitoring_ip"
  29. tags:
  30. - xymon-client
  31. - client-configuration
  32. when: monitoring_ip is not defined
  33. - name: check server htpasswd name
  34. fail: msg="Missing variable xymon_htname"
  35. tags:
  36. - xymon-server
  37. - server-configuration
  38. when: xymon_htname is not defined
  39. - name: check server htpasswd password
  40. fail: msg="Missing variable xymon_htpasswd"
  41. tags:
  42. - xymon-server
  43. - server-configuration
  44. when: xymon_htpasswd is not defined
  45. ## Custom Facts
  46. - name: Set Facts Debian
  47. set_fact:
  48. xymon_cfg_path: "/usr/lib/hobbit/client/etc/clientlaunch.d"
  49. xymon_ext_path: "/usr/lib/hobbit/client/ext"
  50. xymon_binary: "/usr/lib/hobbit/client/bin/bb"
  51. client_name: "hobbit"
  52. client_name_cfg: "$HOBBITCLIENTHOME"
  53. client_name_logs: "$BBCLIENTLOGS"
  54. tags:
  55. - xymon-client
  56. - xymon-server
  57. - configuration
  58. when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
  59. - name: Set Facts CentOs
  60. set_fact:
  61. xymon_cfg_path: "/etc/xymon-client/client.d"
  62. xymon_ext_path: "/etc/xymon-client/ext"
  63. xymon_binary: "/usr/share/xymon-client/bin/xymon"
  64. client_name: "xymon"
  65. client_name_cfg: "$XYMONCLIENTHOME"
  66. client_name_logs: "$XYMONCLIENTLOGS"
  67. tags:
  68. - xymon-client
  69. - xymon-server
  70. - configuration
  71. when: ansible_distribution == 'CentOS' or ansible_distribution == 'CloudLinux'
  72. ##Main tasks
  73. - include: client.yml