Skip to content

Commit

Permalink
Added a feature to disable updates for tuoni on subsequent deploys
Browse files Browse the repository at this point in the history
  • Loading branch information
AllRWeak committed Oct 3, 2024
1 parent cfa28b9 commit 4294e82
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion nova/core/galaxy.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace: nova
name: core
version: 3.4.30
version: 3.4.32
readme: README.md
authors:
- https://github.com/novateams
Expand Down
1 change: 1 addition & 0 deletions nova/core/roles/tuoni/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
tuoni_update_on_deploy: true # If set to false not to update exiting Tuoni version on subsequent deploys
tuoni_install_path: /srv/tuoni # The path where Tuoni will be installed currently cannot be changed
tuoni_payloads_path: /srv/payloads # The path where Tuoni payloads will be downloaded to

Expand Down
13 changes: 10 additions & 3 deletions nova/core/roles/tuoni/tasks/install.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
---
- name: Downloading Tuoni installer...
ansible.builtin.get_url:
url: https://tuoni.sh
dest: /tmp/tuoni.sh
mode: "0755"

- name: Installing Tuoni...
ansible.builtin.shell: |
export SILENT=1
curl -L https://tuoni.sh | bash
{{ '' if tuoni_update_on_deploy else 'NO_UPDATE=1' }} /tmp/tuoni.sh
cd /srv/tuoni
./tuoni update
./tuoni start
changed_when: true
become: true
become_user: "{{ ansible_user }}"

- name: Getting the Tuoni config file from {{ inventory_hostname }}...
Expand All @@ -25,7 +32,7 @@
method: POST
status_code: 200
return_content: true
force_basic_auth: yes
force_basic_auth: true
validate_certs: false # Because Tuoni uses self-signed certificate with an empty Subject Name
register: tuoni_api_token
until: tuoni_api_token.status == 200
Expand Down

0 comments on commit 4294e82

Please sign in to comment.