설명 없음
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.

collectd.yml 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. - name: Install collectd dependencies
  2. apt: pkg={{ item }} state=installed
  3. with_items:
  4. - libcurl4-openssl-dev
  5. - librrd2-dev
  6. - python-dev
  7. - name: Download collectd
  8. get_url: url=http://collectd.org/files/collectd-{{collectd_version}}.tar.gz
  9. dest=/root/collectd-{{collectd_version}}.tar.gz
  10. - name: Extract collectd
  11. command: tar xzf collectd-{{collectd_version}}.tar.gz
  12. chdir=/root creates=/root/collectd-{{collectd_version}}
  13. - name: Build and install collectd
  14. shell: ./configure ; make all ; make install
  15. executable=/bin/bash
  16. chdir=/root/collectd-{{collectd_version}}
  17. creates=/opt/collectd/sbin/collectdmon
  18. - name: Copy collectd init file into place
  19. copy: src=etc_init.d_collectd dest=/etc/init.d/collectd mode=0755
  20. - name: Download collectd-librato plugin
  21. get_url: url=https://github.com/librato/collectd-librato/archive/v{{collectd_librato_version}}.tar.gz
  22. dest=/root/collectd-librato-{{collectd_librato_version}}.tar.gz
  23. when: collectd_librato_email|length > 0
  24. - name: Extract collectd-librato plugin
  25. command: tar xzf collectd-librato-{{collectd_librato_version}}.tar.gz
  26. chdir=/root creates=/root/collectd-librato-{{collectd_librato_version}}
  27. when: collectd_librato_email|length > 0
  28. - name: Install collectd-librato plugin
  29. command: make install
  30. chdir=/root/collectd-librato-{{collectd_librato_version}}
  31. creates=/opt/collectd-librato-{{collectd_librato_version}}
  32. when: collectd_librato_email|length > 0
  33. - name: Copy collectd configuration file into place
  34. template: src=opt_etc_collectd.conf.j2 dest=/opt/collectd/etc/collectd.conf
  35. notify: restart collectd
  36. - name: Ensure collectd is a system service
  37. service: name=collectd state=started enabled=true