main.yml 548 B

123456789101112131415161718192021222324
  1. ---
  2. - name: Ensure permission on crazytrace directory
  3. become: true
  4. file:
  5. path: /etc/crazytrace
  6. state: directory
  7. mode: 0755
  8. - name: Install configurations
  9. become: true
  10. template:
  11. src: templates/config.yaml.j2
  12. dest: "/etc/crazytrace/{{ item.interface }}.yaml"
  13. mode: 0644
  14. loop: "{{ crazytrace | flatten(levels=1) }}"
  15. - name: Enable crazytrace
  16. become: true
  17. systemd:
  18. name: "crazytrace@{{ item.interface }}"
  19. masked: false
  20. enabled: true
  21. state: restarted
  22. loop: "{{ crazytrace | flatten(levels=1) }}"