main.yml 825 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. ---
  2. - name: Install dependencies
  3. apt:
  4. pkg: "{{item}}"
  5. state: present
  6. with_items:
  7. - python3-pip
  8. - name: Install python dependencies
  9. pip:
  10. name: "{{ item }}"
  11. state: present
  12. executable: pip3
  13. with_items:
  14. - psutil
  15. - netifaces
  16. - name: create systemd files
  17. template:
  18. src: py-respondd.service.j2
  19. dest: /lib/systemd/system/py-respondd.service
  20. notify: systemctl reload
  21. - name: Clone py-respondd repo
  22. git:
  23. repo: https://github.com/descilla/py-respondd.git
  24. dest: /opt/py-respondd/
  25. clone: yes
  26. update: yes
  27. notify: restart respondd
  28. - name: create config.json files
  29. template:
  30. src: config.json.j2
  31. dest: /opt/py-respondd/config.json
  32. notify: restart respondd
  33. - name: enable py-respondd service
  34. service:
  35. name: py-respondd.service
  36. enabled: yes