Skip to content

Commit

Permalink
role runonce: start runonce in desktop workspaces
Browse files Browse the repository at this point in the history
  • Loading branch information
dometto committed Jul 2, 2024
1 parent 83eb228 commit f76ace3
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
10 changes: 10 additions & 0 deletions playbooks/roles/runonce/files/uu-runonce.desktop
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions playbooks/roles/runonce/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
dependencies:
- fact_regular_users
- fact_workspace_info
7 changes: 7 additions & 0 deletions playbooks/roles/runonce/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit f76ace3

Please sign in to comment.