The main Bubble source repository. Contains the Bubble API server, the web UI, documentation and utilities. https://getbubblenow.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

66 line
2.2 KiB

  1. #
  2. # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/
  3. #
  4. - name: Unzip algo master.zip
  5. unarchive:
  6. src: master.zip
  7. dest: /root/ansible/roles/algo
  8. - name: Write algo config.cfg.hbs
  9. copy:
  10. src: config.cfg.hbs
  11. dest: /root/ansible/roles/algo/algo/config.cfg.hbs
  12. - name: Install algo_refresh_users script and monitor
  13. copy:
  14. src: "{{ item }}"
  15. dest: "/usr/local/bin/{{ item }}"
  16. owner: root
  17. group: root
  18. mode: 0500
  19. with_items:
  20. - "algo_refresh_users.sh"
  21. - "algo_refresh_users_monitor.sh"
  22. - name: Install algo_refresh_users_monitor supervisor conf file
  23. copy:
  24. src: supervisor_algo_refresh_users_monitor.conf
  25. dest: /etc/supervisor/conf.d/algo_refresh_users_monitor.conf
  26. - name: Write install_algo.sh template
  27. template:
  28. src: install_algo.sh.j2
  29. dest: /root/ansible/roles/algo/algo/install_algo.sh
  30. owner: root
  31. group: root
  32. mode: 0500
  33. - name: Install wg_monitor_connections script
  34. copy:
  35. src: wg_monitor_connections.sh
  36. dest: "/usr/local/sbin/wg_monitor_connections.sh"
  37. owner: root
  38. group: root
  39. mode: 0500
  40. - name: Install wg_monitor_connections supervisor conf file
  41. copy:
  42. src: supervisor_wg_monitor_connections.conf
  43. dest: /etc/supervisor/conf.d/wg_monitor_connections.conf
  44. # Don't setup algo when in restore mode, bubble_restore_monitor.sh will set it up after the CA key has been restored
  45. - name: Run algo playbook to install algo
  46. shell: /root/ansible/roles/algo/algo/install_algo.sh
  47. when: restore_key is not defined
  48. # Don't start monitors when in restore mode, bubble_restore_monitor.sh will start it after algo is installed
  49. - name: Run algo playbook to install algo
  50. shell: bash -c "supervisorctl reload && sleep 5s && supervisorctl restart algo_refresh_users_monitor && supervisorctl restart wg_monitor_connections"
  51. when: restore_key is not defined
  52. - name: Run algo playbook to install algo
  53. shell: bash -c "supervisorctl reload && sleep 5s && supervisorctl stop algo_refresh_users_monitor && supervisorctl stop wg_monitor_connections"
  54. when: restore_key is defined
  55. - include: algo_firewall.yml