---
# this file included in a loop, called seperately for each community
# => configure fastd for one community here
#    make a difference between gates an meshing-only servers
# hash describing community expected as "mf_com"; also expected: "f_ssh_keyfile"

- name: ensure fastd config dir - {{mf_com.abbreviation}}
  file: path=/etc/fastd/{{mf_com.abbreviation}}VPN/peers
        state=directory mode=0750

#- debug: var=mf_com

#- debug: var=f_ssh_keyfile

- name: include either gate ...
  include: fastd-gate.yml
  when: fastd_config == 'gate'

- name: ... or meshing-only style
  include: fastd-meshonly.yml
  when: fastd_config == 'meshing-only'