-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #73 from cradle8810/mac_20240421
Mac用Ansible playbook
- Loading branch information
Showing
6 changed files
with
169 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
--- | ||
|
||
brew_taps: | ||
- ansible | ||
- cmigemo | ||
- figlet | ||
- gnupg | ||
- 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: "$TMPDIR/../C/com.apple.quicklook.ThumbnailsAgent" | ||
owner: hayato | ||
group: staff | ||
|
||
symlinks_system: | ||
- src: /Volumes/RAMDisk/.logs | ||
dest: /private/var/logs | ||
owner: root | ||
group: wheel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,3 +18,6 @@ | |
|
||
[skylark] | ||
192.168.1.200 ansible_user=hayato | ||
|
||
[macbook] | ||
HayabookAir2023.hayaworld.local ansible_user=hayato |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
- hosts: macbook | ||
connection: local | ||
remote_user: hayato | ||
gather_facts: false | ||
|
||
vars_files: | ||
- inventories/host_vars/macbook.yml | ||
- inventories/host_vars/networks.yml | ||
|
||
handlers: | ||
- include: handlers/main.yml | ||
|
||
tasks: | ||
- name: Set Hostname | ||
ansible.builtin.hostname: | ||
name: "{{ network.macbook.hostname }}" | ||
become: true | ||
tags: | ||
- network | ||
|
||
- import_tasks: tasks/macbook/brew.yml | ||
- import_tasks: tasks/macbook/symlinks.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
- name: Install Macbook brew taps | ||
ansible.builtin.homebrew: | ||
name: "{{ item }}" | ||
state: present | ||
with_items: "{{ brew_taps }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|