diff --git a/ansible/roles/rad_setup_instructlab/files/antora.yml b/ansible/roles/rad_setup_instructlab/files/antora.yml new file mode 100644 index 00000000000..1a6cbc71ade --- /dev/null +++ b/ansible/roles/rad_setup_instructlab/files/antora.yml @@ -0,0 +1,18 @@ +name: modules +title: Red Hat AI Development Roadshow - Developer Track +version: main +nav: +- modules/ROOT/nav.adoc + +asciidoc: + attributes: + lab_name: Red Hat AI Development Roadshow - Developer Track + user: user1 + password: openshift + openshift_cluster_ingress_domain: app.example.sandbox.com + novnc_url: http://localhost:8443 + release-version: main + page-pagination: true + page-toclevels: 1 + experimental: "" + env-desktop: true \ No newline at end of file diff --git a/ansible/roles/rad_setup_instructlab/files/firefox-rad.desktop b/ansible/roles/rad_setup_instructlab/files/firefox-rad.desktop new file mode 100644 index 00000000000..c466ce2f2da --- /dev/null +++ b/ansible/roles/rad_setup_instructlab/files/firefox-rad.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Version=1.0 +Name=RAD AI Labs +Comment=Opens Firefox with a specific URL +Exec=firefox localhost:8443 +Icon=/usr/share/icons/hicolor/48x48/apps/firefox.png +Terminal=false +Type=Application +Categories=Network;WebBrowser; \ No newline at end of file diff --git a/ansible/roles/rad_setup_instructlab/tasks/50-dev-tools-setup.yml b/ansible/roles/rad_setup_instructlab/tasks/50-dev-tools-setup.yml index 31077f06981..d6295f69c25 100644 --- a/ansible/roles/rad_setup_instructlab/tasks/50-dev-tools-setup.yml +++ b/ansible/roles/rad_setup_instructlab/tasks/50-dev-tools-setup.yml @@ -108,24 +108,40 @@ dest: "/home/{{ setup_instructlab_user }}/.config/Code/User/settings.json" mode: u=rw,g=rw,o= + - name: Create a new directory [dev-guides] + file: + path: "/home/{{ setup_instructlab_user }}/dev-guides" + state: directory + mode: 0755 + - name: Clone dev-guides repository git: repo: https://github.com/rh-rad-ai-roadshow/dev-guides.git - dest: "/home/{{ setup_instructlab_user }}/" + dest: "/home/{{ setup_instructlab_user }}/dev-guides" - name: Change owner of the dev-guides directory file: path: "/home/{{ setup_instructlab_user }}/dev-guides" recurse: true mode: 0755 - + + - name: Update the naviagation config + ansible.builtin.copy: + src: antora.yml + dest: "/home/{{ setup_instructlab_user }}/dev-guides/content/antora.yml" + mode: u=rw,g=rw,o= + - name: Build and start the lab instructions for Desktop labs shell: "sh /home/{{ setup_instructlab_user }}/dev-guides/utilities/lab-desktop-start" - - - name: Set the env-desktop environment variable to true for Desktop labs - agnosticd_user_info: - data: - env-desktop: true + + - name: Add a firefox shortcut for the lab instructions + ansible.builtin.copy: + src: firefox-rad.desktop + dest: "/home/{{ setup_instructlab_user }}/.local/share/applications/firefox-rad.desktop" + mode: u=rw,g=rw,o= + + - name: Update the desktop database to make the new shortcut visible + shell: "sudo gtk-update-icon-cache -f -t /usr/share/icons/hicolor" become: true become_user: "{{ setup_instructlab_user }}"