firewall.yml 617 B

123456789101112131415161718192021222324252627282930
  1. - name: 'Get architecture using dpkg'
  2. command: dpkg --print-architecture
  3. register: dpkg_architecture
  4. changed_when: False
  5. check_mode: no
  6. tags:
  7. - 'firewall'
  8. - name: 'Install firewall package (ferm)'
  9. apt:
  10. pkg:
  11. - 'linux-image-{{ dpkg_architecture.stdout }}'
  12. - 'ferm'
  13. state: 'present'
  14. tags:
  15. - 'firewall'
  16. - name: 'Install firewall configuration (ferm.conf)'
  17. template:
  18. src: 'ferm/ferm.conf.j2'
  19. dest: '/etc/ferm/ferm.conf'
  20. owner: 'root'
  21. group: 'root'
  22. mode: '0644'
  23. notify:
  24. - 'Apply firewall rules (ferm)'
  25. tags:
  26. - 'firewall'
  27. # vim: ft=yaml.ansible