|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- - name: Unzip algo master.zip
- unarchive:
- src: master.zip
- dest: /root/ansible/roles/algo
-
- - name: Write algo config.cfg.hbs
- copy:
- src: config.cfg.hbs
- dest: /root/ansible/roles/algo/algo-master/config.cfg.hbs
-
- - name: Install algo_refresh_users script and monitor
- copy:
- src: "{{ item }}"
- dest: "/usr/local/bin/{{ item }}"
- owner: root
- group: root
- mode: 0500
- with_items:
- - "algo_refresh_users.sh"
- - "algo_refresh_users_monitor.sh"
-
- - name: Install algo_refresh_users_monitor supervisor conf file
- copy:
- src: supervisor_algo_refresh_users_monitor.conf
- dest: /etc/supervisor/conf.d/algo_refresh_users_monitor.conf
-
- - name: Write install_algo.sh template
- template:
- src: install_algo.sh.j2
- dest: /root/ansible/roles/algo/algo-master/install_algo.sh
- owner: root
- group: root
- mode: 0500
-
- # Don't setup algo when in restore mode, bubble_restore_monitor.sh will set it up after the CA key has been restored
- - name: Run algo playbook to install algo
- shell: /root/ansible/roles/algo/algo-master/install_algo.sh
- when: restore_key is not defined
-
- # Don't start algo_refresh_users_monitor when in restore mode, bubble_restore_monitor.sh will start it after algo is installed
- - name: Run algo playbook to install algo
- shell: bash -c "supervisorctl reload && sleep 5s && supervisorctl restart algo_refresh_users_monitor"
- when: restore_key is not defined
-
- - include: algo_firewall.yml
-
|