---

- name: install celerity worker
  apt:
    force_apt_get: true
    install_recommends: false
    name: celerity-workers

- name: config celerity worker
  notify: restart celerity-workers
  template:
    src: celerity-config.py.j2
    dest: /etc/celerity/config.py

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

# FIREWALL

- name: firewall
  when: worker_firewall_enabled
  vars:
    ferm_rules_filename: "{{ worker_ferm_rules_filename }}"
    ferm_input_rules: "{{ worker_ferm_input_rules }}"
    ferm_output_rules: "{{ worker_ferm_output_rules }}"
    ferm_global_settings: "{{ worker_ferm_global_settings }}"
  include_role:
    name: ferm

- meta: flush_handlers

...
