---

- name: celerity server install
  apt:
    force_apt_get: true
    install_recommends: false
    name: celerity-server

- name: config celerity server
  notify: restart celerity-server
  template:
    src: celerity-config.py.j2
    dest: /etc/celerity/config.py
    mode: 0644
    owner: celerity
    group: celerity

- name: ensure celerity server is running
  service:
    name: celerity-server
    enabled: true
    state: started

# FAIL2BAN

- name: fail2ban
  when: celerity_fail2ban_enabled
  vars:
    f2b_filter: "{{ celerity_f2b_filter }}"
    f2b_jail: "{{ celerity_f2b_jail }}"
  include_role:
    name: fail2ban

# FIREWALL

- name: firewall
  when: celerity_firewall_enabled
  vars:
    ferm_rules_filename: "{{ celerity_ferm_rules_filename }}"
    ferm_input_rules: "{{ celerity_ferm_input_rules }}"
    ferm_output_rules: "{{ celerity_ferm_output_rules }}"
    ferm_global_settings: "{{ celerity_ferm_global_settings }}"
  include_role:
    name: ferm-configure

- meta: flush_handlers

...
