Skip to content

Commit

Permalink
disable turbovnc repo and don't run installs if repo exists
Browse files Browse the repository at this point in the history
  • Loading branch information
sjpb committed Nov 29, 2023
1 parent ea3155a commit a0bcf7a
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ansible/portal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,17 @@
become: yes
gather_facts: yes
tasks:
# Temporary workaround for https://github.com/TurboVNC/turbovnc/issues/387
# Assumes that if the repo exists, host is using a fat image, in which case
# vnc_compute.yml has already run
- name: Check for TurboVNC repo
stat:
path: /etc/yum.repos.d/TurboVNC.repo
register: _turbovnc_repo
- import_role:
name: openondemand
tasks_from: vnc_compute.yml
when: not _turbovnc_repo.stat.exists

- hosts: openondemand_jupyter
tags:
Expand Down
2 changes: 2 additions & 0 deletions ansible/site.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---

- import_playbook: turbovnc_bug.yml

- name: Run pre.yml hook
vars:
# hostvars not available here, so have to recalculate environment root:
Expand Down
19 changes: 19 additions & 0 deletions ansible/turbovnc_bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Temporary workaround for https://github.com/TurboVNC/turbovnc/issues/387

- hosts: all
become: yes
gather_facts: no
tasks:
- name: Check for TurboVNC repo
stat:
path: /etc/yum.repos.d/TurboVNC.repo
register: _turbovnc_repo
- name: Disable TurboVNC repo
community.general.ini_file:
path: /etc/yum.repos.d/TurboVNC.repo
section: TurboVNC
option: enabled
value: '0'
no_extra_spaces: true
create: false
when: _turbovnc_repo.stat.exists

0 comments on commit a0bcf7a

Please sign in to comment.