Skip to content

Commit

Permalink
updating playbook
Browse files Browse the repository at this point in the history
  • Loading branch information
tosin2013 committed Sep 12, 2023
1 parent b0cdcb7 commit 1b28bbe
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions roles/kvmhost_setup/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,18 @@
ansible.builtin.include_tasks: rocky_linux.yml
when: enable_cockpit|bool and ansible_distribution == "Rocky"

- name: Check if GUID environment variable is set
command: echo ${GUID}
register: guid_result
changed_when: false
ignore_errors: true

- name: Run the next task if GUID is set
debug:
msg: "GUID is set and its value is {{ guid_result.stdout }}"
when: guid_result.stdout != ""
ansible.builtin.debug:
msg: "GUID is set and its value is {{ lookup('env', 'GUID', default='') }}"
when: lookup('env', 'GUID', default='') != ""

- name: Setup xRDP on RHPDS
ansible.builtin.include_tasks: rhpds_instance.yml
when: enable_cockpit|bool and guid_result.stdout != ""
when: enable_cockpit|bool and lookup('env', 'GUID', default='') != ""

- name: Setup Remote User for XRDP
ansible.builtin.include_tasks: configure_remote_user.yml
when: enable_cockpit|bool and guid_result.stdout != ""
when: enable_cockpit|bool and lookup('env', 'GUID', default='') != ""

- name: Setup Libvirt
ansible.builtin.include_tasks: libvirt_setup.yml
Expand Down

0 comments on commit 1b28bbe

Please sign in to comment.