manage-hosts.yaml 536 B

12345678910111213141516171819202122
  1. ---
  2. - name: "Manage Checkmk hosts"
  3. hosts: localhost
  4. gather_facts: false
  5. vars_files:
  6. - secrets.yaml
  7. vars:
  8. server_url: "checkmk.home.arpa"
  9. site: "cmk"
  10. tasks:
  11. - name: "Create host"
  12. checkmk.general.host:
  13. server_url: "{{ server_url }}"
  14. site: "{{ site }}"
  15. automation_user: "{{ automation_user }}"
  16. automation_secret: "{{ automation_secret }}"
  17. name: "your-host-name"
  18. attributes:
  19. ipaddress: "host-ip-address"
  20. folder: "/"
  21. state: "present"