ylogx / dotfiles Goto Github PK
View Code? Open in Web Editor NEWFully automated dev environment setup with dotfiles
Home Page: https://shubham.chaudhary.xyz/dotfiles
Fully automated dev environment setup with dotfiles
Home Page: https://shubham.chaudhary.xyz/dotfiles
➜ dotfiles git:(include_tasks) ./install.sh
Running playbook for osx os.
[DEPRECATION WARNING]: The use of 'include' for tasks has been deprecated. Use 'import_tasks' for static inclusions or 'include_tasks' for dynamic inclusions. This feature will be removed in a future release. Deprecation warnings can be
disabled by setting deprecation_warnings=False in ansible.cfg.
[DEPRECATION WARNING]: include is kept for backwards compatibility but usage is discouraged. The module documentation details page may explain more about this rationale.. This feature will be removed in a future release. Deprecation
warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
[WARNING]: Could not match supplied host pattern, ignoring: fleet_osx
PLAY [fleet_osx] *****************************************************************************************************************************************************************************************************************************
skipping: no hosts matched
PLAY RECAP ***********************************************************************************************************************************************************************************************************************************
Please update git credential to your email address now
Run
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
TASK [common : Install Tmux Plugins] *******************************************
fatal: [localhost]: FAILED! => {
"changed": true,
"cmd": "tmux source ~/.tmux.conf && ~/.tmux/plugins/tpm/bin/install_plugins", "delta": "0:00:00.108082", "end": "2017-11-25 14:35:35.310036", "failed": true,
"msg": "non-zero return code", "rc": 1, "start": "2017-11-25 14:35:35.201954",
"stderr": "unknown variable: TMUX_PLUGIN_MANAGER_PATH\nFATAL: Tmux Plugin Manager not configured in tmux.conf\nAborting.", "stderr_lines": ["unknown variable: TMUX_PLUGIN_MANAGER_PATH", "FATAL: Tmux Plugin Manager not configured in tmux.conf", "Aborting."], "stdout": "set option: prefix -> \\\nset option: mode-mouse -> on\nset option: mouse-resize-pane -> on\nset option: mouse-select-pane -> on\nset option: mouse-select-window -> on\nset option: allow-rename -> off\nset option: history-limit -> 8192\nset option: base-index -> 1\nset option: escape-time -> 0\nset option: status-bg -> black\nset option: status-fg -> white\nset option: status-left -> \"\"\nset option: status-right -> \"#[fg=green]#H\"\nset option: aggressive-resize -> off\nset option: window-status-current-bg -> red\nset option: status-right -> \"Battery: #{battery_icon} #{battery_percentage} #{battery_remain} | %a %h-%d %H:%M \"\nset option: mode-keys -> vi\nset option: @shell_mode -> vi\nset option: @plugin -> tmux-plugins/tpm\nset option: @plugin -> tmux-plugins/tmux-resurrect\nset option: @plugin -> tmux-plugins/tmux-continuum\nset option: @plugin -> tmux-plugins/tmux-copycat\nset option: @plugin -> tmux-plugins/tmux-yank\nset option: @plugin -> tmux-plugins/tmux-pain-control\nset option: @plugin -> tmux-plugins/tmux-cpu\nset option: @plugin -> tmux-plugins/tmux-battery\nset option: mode-keys -> vi", "stdout_lines": ["set option: prefix -> \\", "set option: mode-mouse -> on", "set option: mouse-resize-pane -> on", "set option: mouse-select-pane -> on", "set option: mouse-select-window -> on", "set option: allow-rename -> off", "set option: history-limit -> 8192", "set option: base-index -> 1", "set option: escape-time -> 0", "set option: status-bg -> black", "set option: status-fg -> white", "set option: status-left -> \"\"", "set option: status-right -> \"#[fg=green]#H\"", "set option: aggressive-resize -> off", "set option: window-status-current-bg -> red", "set option: status-right -> \"Battery: #{battery_icon} #{battery_percentage} #{battery_remain} | %a %h-%d %H:%M \"", "set option: mode-keys -> vi", "set option: @shell_mode -> vi", "set option: @plugin -> tmux-plugins/tpm", "set option: @plugin -> tmux-plugins/tmux-resurrect", "set option: @plugin -> tmux-plugins/tmux-continuum", "set option: @plugin -> tmux-plugins/tmux-copycat", "set option: @plugin -> tmux-plugins/tmux-yank", "set option: @plugin -> tmux-plugins/tmux-pain-control", "set option: @plugin -> tmux-plugins/tmux-cpu", "set option: @plugin -> tmux-plugins/tmux-battery", "set option: mode-keys -> vi"]}
to retry, use: --limit @/home/chaudhary/.homesick/repos/dotfiles/playbooks/unix.retry
PLAY RECAP *********************************************************************
localhost : ok=18 changed=9 unreachable=0 failed=1
Lines 3 to 5 in 6a69075
Installation of non-cask brew package on mac not working with M1 processor and an arm64
shell.
Error: Cannot install in Homebrew on ARM processor in Intel default prefix (/usr/local)!
Please create a new installation in /opt/homebrew using one of the
"Alternative Installs" from:
https://docs.brew.sh/Installation
You can migrate your previously installed formula list with:
brew bundle dump
dotfiles
should still be pulled to latest master in fresh install. Currently, it check existence of folder and skips cloning.
This error shouldn't show up unless user has gpg/.gnupg setup.
mkdir ~/.gnupg
Currently, it processes items one by one due to with_items
clause.
Error:
TASK [osx : Tap fonts] ********************************************************************************************
Monday 11 July 2022 20:54:49 -0400 (0:00:02.251) 0:00:04.963 ***********
fatal: [localhost]: FAILED! => {"changed": false, "msg": "added: 0, unchanged: 0, error: failed to tap: caskroom/fonts due to Error: caskroom/fonts was moved. Tap homebrew/cask-fonts instead.\n"}
User's shell should change to zsh after install
Rerun the ansible job once again. Error doesn't show up next time
TASK [common : Add ohmyzsh] ****************************************************************************************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {
"changed": true,
"cmd": [
"bash", "-c", "bash -c \"$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)\""], "delta": "0:00:05.503343", "end": "2017-07-14 04:24:41.391479", "failed": true, "rc": 1,
"start": "2017-07-14 04:24:35.888136", "stderr": "--2017-07-14 04:24:35-- https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh\nResolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.128.133, 151.101.0.133, 151.101.192.133, ...\nConnecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.128.133|:443... connected.\nHTTP request sent, awaiting response... 200 OK\nLength: 4018 (3.9K) [text/plain]\nSaving to: ‘STDOUT’\n\n 0K ... 100% 47.5M=0s\n\n2017-07-14 04:24:36 (47.5 MB/s) - written to stdout [4018/4018]\n\n
Cloning into '/home/sud/.oh-my-zsh'...\nPassword: chsh: PAM: Authentication failure", "stderr_lines": ["--2017-07-14 04:24:35-- https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh", "Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.128.133, 151.101.0.133, 151.101.192.133, ...", "Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.128.133|:443... connected.", "HTTP request sent, awaiting response... 200 OK", "Length: 4018 (3.9K) [text/plain]", "Saving to: ‘STDOUT’", "", " 0K ... 100% 47.5M=0s", "", "2017-07-14 04:24:36 (47.5 MB/s) - written to stdout [4018/4018]", "", "Cloning into '/home/sud/.oh-my-zsh'...",
"Password: chsh: PAM: Authentication failure"], "stdout": "Cloning Oh My Zsh...\nLooking for an existing zsh config...\nUsing the Oh My Zsh template file and adding it to ~/.zshrc\nTime to change your default shell to zsh!",
"stdout_lines": ["Cloning Oh My Zsh...", "Looking for an existing zsh config...",
"Using the Oh My Zsh template file and adding it to ~/.zshrc",
"Time to change your default shell to zsh!"
]}
to retry, use: --limit @/home/sud/dotfiles/playbooks/unix.retry
Following message appears on logging into ubuntu in fresh tty:
Welcome to Ubuntu 14.04.5 LTS (GNU/Linux 3.13.0-74-generic x86_64)
* Documentation: https://help.ubuntu.com/
System information as of Tue Oct 24 15:04:12 IST 2017
System load: 0.0
Usage of /home: 68.5% of 98.30GB
Memory usage: 11%
Swap usage: 0%
Processes: 164
Users logged in: 2
IP address for eth0: 10.0.240.143
IP address for docker0: 172.17.0.1
IP address for docker_gwbridge: 172.18.0.1
IP address for ov-001000-u46vc: 10.255.0.1
Graph this data and manage this system at:
https://landscape.canonical.com/
Get cloud support with Ubuntu Advantage Cloud Guest:
http://www.ubuntu.com/business/services/cloud
136 packages can be updated.
101 updates are security updates.
New release '16.04.3 LTS' available.
Run 'do-release-upgrade' to upgrade to it.
We can use this in home/.bash_functions:welcome_message
TASK [common : Installl Tmux Plugins] ********************************************************************************************************************************************************************************************************
task path: /Users/aktech/dotfiles/playbooks/roles/common/tasks/main.yml:14
Using module file /Users/aktech/anaconda3/lib/python3.6/site-packages/ansible/modules/commands/command.py
<localhost> ESTABLISH LOCAL CONNECTION FOR USER: aktech
<localhost> EXEC /bin/sh -c '/usr/bin/python && sleep 0'
fatal: [localhost]: FAILED! => {
"changed": true,
"cmd": [
"~/.tmux/plugins/tpm/bin/install_plugins"
],
"delta": "0:00:00.027179",
"end": "2017-11-19 22:19:13.641447",
"failed": true,
"invocation": {
"module_args": {
"_raw_params": "~/.tmux/plugins/tpm/bin/install_plugins",
"_uses_shell": false,
"chdir": null,
"creates": null,
"executable": null,
"removes": null,
"stdin": null,
"warn": true
}
},
"msg": "non-zero return code",
"rc": 1,
"start": "2017-11-19 22:19:13.614268",
"stderr": "unknown variable: TMUX_PLUGIN_MANAGER_PATH\nFATAL: Tmux Plugin Manager not configured in tmux.conf\nAborting.",
"stderr_lines": [
"unknown variable: TMUX_PLUGIN_MANAGER_PATH",
"FATAL: Tmux Plugin Manager not configured in tmux.conf",
"Aborting."
],
"stdout": "",
"stdout_lines": []
}
to retry, use: --limit @/Users/aktech/dotfiles/playbooks/osx.retry
Losing months of commands from ~/.zsh_history
is not a fun thing.
Setup a cron to create backups in location that are autouploaded to cloud storage e.g. Google Drive folder.
hs pull
might fail because the initial ansible script was running as root
user.
Error:
$ hs pull
pull dotfiles
pull homeshick
error Unable to pull /home/chaudhary/.homesick/repos/homeshick. Git says:
error: cannot open .git/FETCH_HEAD: Permission denied
sudo chown -R ${USER}:${USER} ~/.homesick/repos/homeshick/.git/
Create a markdown document describing different features.
Setup an env variable at the very beginning and use that across all configs.
Related: #19
Mouse Mode should work out of the box
Mouse Mode won't work until fixed by editing file as shown below
Current work around is to edit the .tmux.conf
file and un-string line 12.
i.e. Convert
to
set -g mode-mouse on; set -g mouse-resize-pane on; set -g mouse-select-pane on; set -g mouse-select-window on
Update homebrew should run after installing brew, if it doesn't exist.
TASK [osx : Update Homebrew] ********************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Failed to find required executable brew in paths: /usr/local/bin:/Users/kumara/anaconda3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"}
to retry, use: --limit @/Users/kumara/.homesick/repos/dotfiles/playbooks/osx.retry
It is known that chsh fails when done by ohmyz.sh as pointed by #3, but chsh also fails when ansible is doing it.
Run following command and re-login (ssh)/restart terminal(local)
sudo chsh username -s /bin/zsh
Probably the lint plugin. Due to this plugin, when you edit a code file like .py, on exit it tries to run lint operation and it hangs a lot of times.
TASK [ubuntu : Install libraries using package manager] ************************
ok: [localhost] => (item=ack-grep)
failed: [localhost] (item=bash) => {"cache_update_time": 1511572167, "cache_updated": false, "changed": false, "failed": true, "item": "bash", "msg": "'/usr/bin/apt-get -y -o \"Dpkg::Options::=--force-confdef\" -o \"Dpkg::Options::=--force-confold\" install 'bash'' failed: E: There are problems and -y was used without --force-yes\n", "rc": 100, "stderr": "E: There are problems and -y was used without --force-yes\n", "stderr_lines": ["E: There are problems and -y was used without --force-yes"], "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nSuggested packages:\n bash-doc\nThe following packages will be upgraded:\n bash\n1 upgraded, 0 newly installed, 0 to remove and 134 not upgraded.\nNeed to get 575 kB of archives.\nAfter this operation, 0 B of additional disk space will be used.\nWARNING: The following packages cannot be authenticated!\n bash\n", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...", "Suggested packages:", " bash-doc", "The following packages will be upgraded:", " bash", "1 upgraded, 0 newly installed, 0 to remove and 134 not upgraded.", "Need to get 575 kB of archives.", "After this operation, 0 B of additional disk space will be used.", "WARNING: The following packages cannot be authenticated!", " bash"]}
failed: [localhost] (item=curl) => {"cache_update_time": 1511572167, "cache_updated": false, "changed": false, "failed": true, "item": "curl", "msg": "'/usr/bin/apt-get -y -o \"Dpkg::Options::=--force-confdef\" -o \"Dpkg::Options::=--force-confold\" install 'curl'' failed: E: There are problems and -y was used without --force-yes\n", "rc": 100, "stderr": "E: There are problems and -y was used without --force-yes\n", "stderr_lines": ["E: There are problems and -y was used without --force-yes"], "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nThe following extra packages will be installed:\n libcurl3\nThe following packages will be upgraded:\n curl libcurl3\n2 upgraded, 0 newly installed, 0 to remove and 133 not upgraded.\nNeed to get 296 kB of archives.\nAfter this operation, 2048 B of additional disk space will be used.\nWARNING: The following packages cannot be authenticated!\n curl libcurl3\n", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...", "The following extra packages will be installed:", " libcurl3", "The following packages will be upgraded:", " curl libcurl3", "2 upgraded, 0 newly installed, 0 to remove and 133 not upgraded.", "Need to get 296 kB of archives.", "After this operation, 2048 B of additional disk space will be used.", "WARNING: The following packages cannot be authenticated!", " curl libcurl3"]}
ok: [localhost] => (item=git)
ok: [localhost] => (item=htop)
ok: [localhost] => (item=nmap)
ok: [localhost] => (item=python3)
^C [ERROR]: User interrupted execution
On manual apt install
recsys% sudo apt-get install bash
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
bash-doc
The following packages will be upgraded:
bash
1 upgraded, 0 newly installed, 0 to remove and 134 not upgraded.
Need to get 575 kB of archives.
After this operation, 0 B of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
bash
Install these packages without verification? [y/N]
Manually run sudo apt update
, then rerun installation.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.