---
#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

  roles: tinc-static
  when: send_to_central_server 

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

Install Tinc only if we want to connect with the central server
Install Tinc only if we want to connect with the central server
