diff --git a/playbooks/roles/runonce/files/uu-runonce.desktop b/playbooks/roles/runonce/files/uu-runonce.desktop new file mode 100644 index 00000000..79321105 --- /dev/null +++ b/playbooks/roles/runonce/files/uu-runonce.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=UU Runonce +Comment=Run configured scripts for ResearchCloud at first login. +Exec=/bin/bash -l -i /etc/profile.d/runonce.sh +Type=Application +NoDisplay=true +Icon= +Path= +Terminal=false +StartupNotify=false \ No newline at end of file diff --git a/playbooks/roles/runonce/meta/main.yml b/playbooks/roles/runonce/meta/main.yml index 8f06b0ac..77e18c16 100644 --- a/playbooks/roles/runonce/meta/main.yml +++ b/playbooks/roles/runonce/meta/main.yml @@ -1,3 +1,4 @@ --- dependencies: - fact_regular_users + - fact_workspace_info diff --git a/playbooks/roles/runonce/tasks/main.yml b/playbooks/roles/runonce/tasks/main.yml index d66d29a2..9934ae31 100644 --- a/playbooks/roles/runonce/tasks/main.yml +++ b/playbooks/roles/runonce/tasks/main.yml @@ -34,6 +34,13 @@ owner: root group: root +- name: Add runonce to autostart for desktop environment + when: fact_desktop_workspace + copy: + src: uu-runonce.desktop + dest: /etc/xdg/autostart/uu-runonce.desktop + mode: "0644" + # NB: link needs "follow:no" otherwise owner/group would be applied to its src - name: Add link to /etc/runonce.d in /etc/skel file: