---
#Switch over "localhost" or "SystemPushInstall"

# localhost is used when ansible-pull is used to play the playbook
# SystemPushInstall is used in PUSH mode and you have to set the device's IP in "hosts" file 

- hosts: localhost
# - hosts: SystemPushInstall

  roles:
    - systemInit
    - nginx
    - uwsgi
    - dnsmasq
    - hostapd
    - iptables
    - network-manager
    - ideascube
    - kiwix
    - tinc-static

  post_tasks:
    - name: Global install completed, let's reboot!
      command: reboot

---
#Switch over "localhost" or "SystemPushInstall"

# localhost is used when ansible-pull is used to play the playbook
# SystemPushInstall is used in PUSH mode and you have to set the device's IP in "hosts" file 

- hosts: localhost
# - hosts: SystemPushInstall

  roles:
    - systemInit
    - nginx
    - uwsgi
    - dnsmasq
    - hostapd
    - iptables
    - network-manager
    - ideascube
    - kiwix

    - role: tinc-static
      when: sync_log|bool == True

  post_tasks:
    - name: Global install completed, let's reboot!
      command: reboot

Install Tinc only when we want to sync with the central server, it means also that the device is owned by BSF thus we need Tinc too
Install Tinc only when we want to sync with the central server, it means also that the device is owned by BSF thus we need Tinc too
