Skip to content

Commit

Permalink
Merge pull request #432 from kylelaker/restore-stu-home
Browse files Browse the repository at this point in the history
Restore stu-home files
  • Loading branch information
ripleymj committed Jan 16, 2021
2 parents 7079bf2 + 6db2a34 commit 9a58f28
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
10 changes: 10 additions & 0 deletions roles/user/files/stu-home.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Desktop Entry]
Version=1.0
Name=Home on Stu
Exec=sh -c "nemo sftp://\${USER}@stu.cs.jmu.edu/cs/home/stu/\${USER}/"
Comment=Mount/umount your JMUCS NFS home directory
Terminal=false
Type=Application
Categories=System;
Icon=gnome-fs-ssh
Name[en_US]=Home on Stu
16 changes: 16 additions & 0 deletions roles/user/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,22 @@
group: "{{ item.gid }}"
state: directory
loop: "{{ real_users }}"
- name: Trust JMU CS student server SSH
known_hosts:
# Per ssh_config(5), this is the default value of GlobalKnownHostsFile
path: /etc/ssh/ssh_known_hosts
name: stu.cs.jmu.edu
key: "{{ stu_host_key }}"
hash_host: yes
state: present
- name: Copy stu-home desktop
copy:
src: stu-home.desktop
dest: '{{ item.homedir }}/Desktop'
owner: '{{ item.uid }}'
group: '{{ item.gid }}'
mode: 0750
with_items: "{{ real_users }}"
# dest becomes path in Ansible 2.3+
- name: Add profile to user bashrc
lineinfile:
Expand Down
2 changes: 2 additions & 0 deletions roles/user/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ user_dependencies:
- vim
- vim-gtk3
- zenity

stu_host_key: "stu.cs.jmu.edu ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILXS19kf1swKRC9GTTiUDyOzra0sYT+kt6Vxd4Q0H9uw"

0 comments on commit 9a58f28

Please sign in to comment.