Skip to content

Commit

Permalink
Add make symlinks for macbook
Browse files Browse the repository at this point in the history
  • Loading branch information
cradle8810 committed Apr 21, 2024
1 parent b28c1df commit 47e0ddf
Show file tree
Hide file tree
Showing 4 changed files with 224 additions and 0 deletions.
109 changes: 109 additions & 0 deletions inventories/host_vars/macbook copy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
---

brew_taps:
- ansible
- cmigemo
- figlet
- htop
- imagemagick
- libaacs
- libde265
- libheif
- nkf
- p7zip
- pdftoipe
- toilet
- wget
- x264
- x265
- yt-dlp
- zsh

symlinks_user:
- src: /Volumes/RAMDisk
dest: ~/Downloads
owner: hayato
group: staff
- src: /Volumes/RAMDisk
dest: ~/RAMDisk
owner: hayato
group: staff
- src: "/Volumes/RAMDisk/.logs/"
dest: "~/Library/Logs"
owner: hayato
group: staff
- src: "/Volumes/RAMDisk/.Saved Application State"
dest: "~/Library/Saved Application State"
owner: hayato
group: staff
- src: "/Volumes/RAMDisk/.cache/com.overmacs.photosweeperpaddle/"
dest: "~/Library/Application Support/com.overmacs.photosweeperpaddle"
owner: hayato
group: staff
- src: "/Volumes/RAMDisk"
dest: "~/Library/Application Support/iMazing/Library/Apps"
owner: hayato
group: staff
- src: "/Volumes/RAMDisk/.cache/Chrome/Sync Data/"
dest: "~/Library/Application Support/Google/Chrome/Default/Sync Data"
owner: hayato
group: staff
- src: "/Volumes/RAMDisk/.cache/com.overmacs.photosweeperpaddle/"
dest: "~/Library/Application Support/PhotoSweeper X"
owner: hayato
group: staff
- src: "/Volumes/RAMDisk/.Saved Application State"
dest: "~/Library/Saved Application State"
owner: hayato
group: staff
- src: "/Volumes/RAMDisk/.logs/"
dest: "~/Library/Logs"
owner: hayato
group: staff
- src: "/Volumes/RAMDisk/.cache/QuickLook"
dest: "~/Library/Caches/QuickLook32"
owner: hayato
group: staff
- src: "/Volumes/RAMDisk/.cache/com.overmacs.photosweeperpaddle"
dest: "~/Library/Caches/com.overmacs.photosweeperpaddle"
owner: hayato
group: staff
- src: "/Volumes/RAMDisk/.cache/QuickLook"
dest: "~/Library/Caches/QuickLook"
owner: hayato
group: staff
- src: "/Volumes/RAMDisk/.cache/Chrome/"
dest: "~/Library/Caches/Google/Chrome"
owner: hayato
group: staff
- src: "/Volumes/RAMDisk/.cache/Homebrew/"
dest: "~/Library/Caches/Homebrew/downloads"
owner: hayato
group: staff
- src: "/Volumes/Home/Symlinks/BookMaker/"
dest: "~/Library/Application Support/Plustek/BookMaker"
owner: hayato
group: staff
- src: "/Volumes/Home/Symlinks/Sessions/"
dest: "~/Library/Application Support/Google/Chrome/Default/Sessions"
owner: hayato
group: staff
- src: "/Volumes/Home/Symlinks/CDAT/"
dest: "~/Documents/.CDAT"
owner: hayato
group: staff
- src: "/Volumes/RAMDisk/.cache/Homebrew/"
dest: "~/Library/Caches/Homebrew/Downloads"
owner: hayato
group: staff
- src: "/Volumes/RAMDisk/.cache/qlmanage/"
dest: "/var/folders/fj/c3srpxpx41q080qnz4s_p1400000gn/C/com.apple.quicklook.ThumbnailsAgent"
owner: hayato
group: staff

symlinks_system:
- src: /Volumes/RAMDisk/.logs
dest: /private/var/logs
owner: root
group: wheel

88 changes: 88 additions & 0 deletions inventories/host_vars/macbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,91 @@ brew_taps:
- x265
- yt-dlp
- zsh

symlinks_user:
- src: /Volumes/RAMDisk
dest: ~/Downloads
owner: hayato
group: staff
- src: /Volumes/RAMDisk
dest: ~/RAMDisk
owner: hayato
group: staff
- src: "/Volumes/RAMDisk/.logs/"
dest: "~/Library/Logs"
owner: hayato
group: staff
- src: "/Volumes/RAMDisk/.Saved Application State"
dest: "~/Library/Saved Application State"
owner: hayato
group: staff
- src: "/Volumes/RAMDisk/.cache/com.overmacs.photosweeperpaddle/"
dest: "~/Library/Application Support/com.overmacs.photosweeperpaddle"
owner: hayato
group: staff
- src: "/Volumes/RAMDisk"
dest: "~/Library/Application Support/iMazing/Library/Apps"
owner: hayato
group: staff
- src: "/Volumes/RAMDisk/.cache/Chrome/Sync Data/"
dest: "~/Library/Application Support/Google/Chrome/Default/Sync Data"
owner: hayato
group: staff
- src: "/Volumes/RAMDisk/.cache/com.overmacs.photosweeperpaddle/"
dest: "~/Library/Application Support/PhotoSweeper X"
owner: hayato
group: staff
- src: "/Volumes/RAMDisk/.Saved Application State"
dest: "~/Library/Saved Application State"
owner: hayato
group: staff
- src: "/Volumes/RAMDisk/.logs/"
dest: "~/Library/Logs"
owner: hayato
group: staff
- src: "/Volumes/RAMDisk/.cache/QuickLook"
dest: "~/Library/Caches/QuickLook32"
owner: hayato
group: staff
- src: "/Volumes/RAMDisk/.cache/com.overmacs.photosweeperpaddle"
dest: "~/Library/Caches/com.overmacs.photosweeperpaddle"
owner: hayato
group: staff
- src: "/Volumes/RAMDisk/.cache/QuickLook"
dest: "~/Library/Caches/QuickLook"
owner: hayato
group: staff
- src: "/Volumes/RAMDisk/.cache/Chrome/"
dest: "~/Library/Caches/Google/Chrome"
owner: hayato
group: staff
- src: "/Volumes/RAMDisk/.cache/Homebrew/"
dest: "~/Library/Caches/Homebrew/downloads"
owner: hayato
group: staff
- src: "/Volumes/Home/Symlinks/BookMaker/"
dest: "~/Library/Application Support/Plustek/BookMaker"
owner: hayato
group: staff
- src: "/Volumes/Home/Symlinks/Sessions/"
dest: "~/Library/Application Support/Google/Chrome/Default/Sessions"
owner: hayato
group: staff
- src: "/Volumes/Home/Symlinks/CDAT/"
dest: "~/Documents/.CDAT"
owner: hayato
group: staff
- src: "/Volumes/RAMDisk/.cache/Homebrew/"
dest: "~/Library/Caches/Homebrew/Downloads"
owner: hayato
group: staff
- src: "/Volumes/RAMDisk/.cache/qlmanage/"
dest: "/var/folders/fj/c3srpxpx41q080qnz4s_p1400000gn/C/com.apple.quicklook.ThumbnailsAgent"
owner: hayato
group: staff

symlinks_system:
- src: /Volumes/RAMDisk/.logs
dest: /private/var/logs
owner: root
group: wheel
1 change: 1 addition & 0 deletions macbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@
- network

- import_tasks: tasks/macbook/brew.yml
- import_tasks: tasks/macbook/symlinks.yml
26 changes: 26 additions & 0 deletions tasks/macbook/symlinks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
- name: Make symlinks for User
ansible.builtin.file:
src: "{{ item['src'] }}"
dest: "{{ item['dest'] }}"
owner: "{{ item['owner'] }}"
group: "{{ item['group'] }}"
state: link
follow: false
loop: "{{ symlinks_user }}"
tags:
- symlink

- name: Make symlinks for System (BECOME)
ansible.builtin.file:
src: "{{ item['src'] }}"
dest: "{{ item['dest'] }}"
owner: "{{ item['owner'] }}"
group: "{{ item['group'] }}"
state: link
follow: false
loop: "{{ symlinks_system }}"
become: true
tags:
- symlink

0 comments on commit 47e0ddf

Please sign in to comment.