From 6ad56b14cd4afd56f7ef2aea6e2935ac87eb295f Mon Sep 17 00:00:00 2001 From: Maxim Likhachev Date: Thu, 21 Oct 2021 20:50:20 +0300 Subject: [PATCH] macos: adjust applications --- Makefile | 16 ++++++------- README.md | 48 ++++++++++++++++----------------------- roles/macos/tasks/install-dmg.yml | 4 +++- roles/macos/tasks/main.yml | 6 +++++ roles/macos/vars/main.yml | 28 ++++++++++++----------- 5 files changed, 52 insertions(+), 50 deletions(-) diff --git a/Makefile b/Makefile index 5667d4c..0418bf2 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,10 @@ help: ## Display this help. all: doc_silent ## Apply all roles. $(ANSIBLE) playbook.yml +requirements: ## Install requirements. + ansible-galaxy install -r requirements.yml + pip3 install --user -r requirements.txt + readme: doc doc: ## Generate README.md. scripts/doc.sh | tee README.md @@ -30,13 +34,9 @@ hosts: ## Update /etc/hosts files. fonts: ## Install fonts. $(ANSIBLE) -t fonts playbook.yml -gentoo: hosts ## Configure Calculate Linux. - $(ANSIBLE) -t gentoo playbook.yml +gentoo: ## Configure Calculate Linux. + $(ANSIBLE) -t hosts,gentoo playbook.yml -macos: hosts ## Configure MacOS. - HOMEBREW_CASK_OPTS=$(HOMEBREW_CASK_OPTS) $(ANSIBLE) -t macos playbook.yml - -requirements: ## Install requirements. - ansible-galaxy install -r requirements.yml - pip3 install --user -r requirements.txt +macos: ## Configure MacOS. + $(ANSIBLE) -t hosts,macos playbook.yml diff --git a/README.md b/README.md index e2da447..7087cba 100644 --- a/README.md +++ b/README.md @@ -38,8 +38,8 @@ $ make - [findutils](https://www.gnu.org/software/findutils/) - Collection of GNU find, xargs, and locate. - [gawk](https://www.gnu.org/software/gawk/) - GNU awk utility. - [ghostscript](https://www.ghostscript.com/) - Interpreter for PostScript and PDF. -- [git-delta](https://github.com/dandavison/delta) - Syntax-highlighting pager for git and diff output. - [git](https://git-scm.com) - Distributed revision control system. +- [git-delta](https://github.com/dandavison/delta) - Syntax-highlighting pager for git and diff output. - [go](https://golang.org) - Programming language to build simple/reliable/efficient software. - [haskell-stack](https://haskellstack.org/) - The Haskell Tool Stack. - [hstr](https://github.com/dvorka/hstr) - Bash and zsh history suggest box. @@ -57,6 +57,7 @@ $ make - [tcl-tk](https://tcl.tk) - GUI Toolkit for TCL Programming language. - [tree](http://mama.indstate.edu/users/ice/tree/) - Display directories as trees (with optional color/HTML output). - [vifm](https://vifm.info/) - Ncurses based file manager with vi like keybindings. +- [vivaldi](https://vivaldi.com) - A web browser which works without pulse-audio. - [w3m](https://w3m.sourceforge.io/) - Pager/text based browser. - [webp](https://developers.google.com/speed/webp/) - Image format providing lossless and lossy compression for web images. - [wget](https://www.gnu.org/software/wget/) - Internet file retriever. @@ -65,6 +66,9 @@ $ make ### Applications +- ~~[geeqie](http://www.geeqie.org/) - lightweight image viewer for Linux, BSDs and compatibles.~~ +- ~~[ripgrep](https://github.com/BurntSushi/ripgrep) - Search tool like grep and The Silver Searcher.~~ +- [xapian-1.2.25](https://www.xapian.org/) - Xapian Probabilistic Information Retrieval library. - [perl-cleaner](https://www.gentoo.org/proj/en/perl/) - User land tool for cleaning up old perl installs. - [buildah](https://github.com/containers/buildah) - A tool that facilitates building OCI images. - [podman](https://github.com/containers/libpod/) - Library and podman tool for running OCI-based containers in Pods. @@ -74,12 +78,10 @@ $ make - [portage-utils](https://wiki.gentoo.org/wiki/Portage-utils) - Small and fast Portage helper tools written in C. - [tesseract](https://github.com/tesseract-ocr) - An OCR Engine, originally developed at HP, now open source. - [zathura](https://pwmt.org/projects/zathura/) - A document viewer. -- [xapian-1.2.25](https://www.xapian.org/) - Xapian Probabilistic Information Retrieval library. - [pip](https://pip.pypa.io/) - Installs python packages. - [ccache](https://ccache.dev/) - Fast compiler cache. - [mutt](http://www.mutt.org/) - A small but very powerful text-based mail client. - [procmail](http://www.procmail.org/) - Mail delivery agent. -- ~~[geeqie](http://www.geeqie.org/) - lightweight image viewer for Linux, BSDs and compatibles.~~ - [sxiv](https://github.com/muennich/sxiv) - Simple X Image Viewer. - [libwebp](https://developers.google.com/speed/webp/download) - A lossy image compression format. - [mutagen](https://github.com/quodlibet/mutagen) - Audio metadata tag reader and writer implemented in pure Python. @@ -90,11 +92,9 @@ $ make - [sshfs](https://github.com/libfuse/sshfs) - A network filesystem client to connect to SSH servers. - [fetchmail](https://www.fetchmail.info) - Full-featured, robust, well-documented remote-mail retrieval and forwarding utility. - [connman](https://01.org/connman) - Internet connection daemon. -- ~~[ripgrep](https://github.com/BurntSushi/ripgrep) - Search tool like grep and The Silver Searcher.~~ - [ntfs3g](https://www.tuxera.com/community/open-source-ntfs-3g/) - Read-write NTFS driver for FUSE. - [linux-firmware](https://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git) - Linux firmware files. - [acpi_call](https://github.com/teleshoes/acpi_call) - A kernel module that enables you to call ACPI methods. -- [vivaldi](https://vivaldi.com) - A web browser which works without pulse-audio. - [dmenu](https://tools.suckless.org/dmenu/) - Fast and lightweight dynamic menu for X. - [polybar](https://polybar.github.io/) - A fast and easy-to-use status bar. - [rofi](https://github.com/davatorium/rofi) - A window switcher, application launcher and dmenu replacement. @@ -109,58 +109,50 @@ $ make ### Applications +- ~~[joplin](https://joplinapp.org/) - An open source note taking and to-do application.~~ +- ~~[k3d](https://k3d.io/) - Little helper to run Rancher Lab's k3s in Docker.~~ +- ~~[min](https://github.com/minbrowser/min) - Minimal browser that protects privacy.~~ +- ~~[pdftotext](https://www.bluem.net/en/mac/) - PDF to text convertor.~~ +- ~~[quicklook-json](http://www.sagtau.com/quicklookjson.html) - QuickLook plugin to preview JSON files.~~ +- ~~[ripgrep](https://github.com/BurntSushi/ripgrep) - Search tool like grep and The Silver Searcher.~~ +- ~~[sshfs](https://github.com/libfuse/sshfs) - File system client based on SSH File Transfer Protocol.~~ +- ~~[terraform](https://www.terraform.io/) - Tool to build, change, and version infrastructure.~~ +- ~~[terraform-docs](https://github.com/terraform-docs/terraform-docs) - Tool to generate documentation from Terraform modules.~~ +- ~~[terraform-ls](https://github.com/hashicorp/terraform-ls) - Terraform Language Server.~~ +- ~~[terragrunt](https://terragrunt.gruntwork.io/) - Thin wrapper for Terraform.~~ +- ~~[vagrant](https://www.vagrantup.com/) - Development environment.~~ +- ~~[virtualbox](https://www.virtualbox.org/) - Free and open-source hosted hypervisor for x86 virtualization.~~ +- ~~[virtualbox-extension-pack](https://www.virtualbox.org/) - AMD64/Intel64 and x86 virtualization.~~ +- ~~[xmind-zen](https://www.xmind.net/zen/) - Mind-mapping tool.~~ - [android-file-transfer](https://www.android.com/filetransfer/) - Android File Transfer. -- [ansible](https://www.ansible.com/) - Automate deployment, configuration, and upgrading. -- [ansible-lint](https://github.com/ansible/ansible-lint/) - Checks ansible playbooks for practices and behaviour. -- [azure-cli](https://docs.microsoft.com/cli/azure/overview) - Microsoft Azure CLI. - [brave-browser](https://brave.com/) - Brave web browser. -- [dive](https://github.com/wagoodman/dive) - Tool for exploring each layer in a docker image. - [djvu2pdf](https://0x2a.at/site/projects/djvu2pdf/) - Small tool to convert Djvu files to PDF files. - [firefox](https://www.mozilla.org/ru/firefox/) - Mozilla Firefox. - [git-cal](https://github.com/k4rthik/git-cal) - GitHub-like contributions calendar but on the command-line. - [glow](https://github.com/charmbracelet/glow) - Render markdown on the CLI. - [hadolint](https://github.com/hadolint/hadolint) - Smarter Dockerfile linter to validate best practices. - [hlint](https://github.com/ndmitchell/hlint) - Haskell source code suggestions. -- [htop](https://hisham.hm/htop/) - Improved top (interactive process viewer). - [hyperfine](https://github.com/sharkdp/hyperfine) - Command-line benchmarking tool. - [iterm2](https://www.iterm2.com/) - Terminal emlator. -- ~~[joplin](https://joplinapp.org/) - An open source note taking and to-do application.~~ -- ~~[k3d](https://k3d.io/) - Little helper to run Rancher Lab's k3s in Docker.~~ - [k9s](https://k9scli.io/) - Kubernetes CLI To Manage Clusters. - [kubernetes-cli](https://kubernetes.io/) - Kubernetes command-line interface. -- [min](https://github.com/minbrowser/min) - Minimal browser that protects privacy. - [osxfuse](https://osxfuse.github.io/) - FUSE for MacOS. - [p7zip](https://p7zip.sourceforge.io/) - 7-Zip (high compression file archiver) implementation. -- [pandoc](https://pandoc.org/) - Swiss-army knife of markup format conversion. -- ~~[pdftotext](https://www.bluem.net/en/mac/) - PDF to text convertor.~~ - [qlcolorcode](https://github.com/anthonygelibert/QLColorCode) - QuickLook plugin for source code with syntax highlighting. - [qlmarkdown](https://github.com/toland/qlmarkdown) - QuickLook generator for Markdown files. - [qlstephen](https://whomwah.github.io/qlstephen/) - QuickLook plugin to view plain text files without a file extension. - [qlvideo](https://github.com/Marginal/QLVideo) - QuickLook plugin to preview video files. -- ~~[quicklook-json](http://www.sagtau.com/quicklookjson.html) - QuickLook plugin to preview JSON files.~~ -- ~~[ripgrep](https://github.com/BurntSushi/ripgrep) - Search tool like grep and The Silver Searcher.~~ -- [rlwrap](https://github.com/hanslub42/rlwrap) - Readline wrapper: adds readline support to tools that lack it. Dependency of cheat.sh. - [skype](https://www.skype.com/) - Video chat, voice call and instant messaging application. -- ~~[sshfs](https://github.com/libfuse/sshfs) - File system client based on SSH File Transfer Protocol.~~ -- ~~[tcl](https://tcl.tk) - TCL Programming language.~~ - [telegram](https://macos.telegram.org/) - Telegram for MacOS. -- [terraform-docs](https://github.com/terraform-docs/terraform-docs) - Tool to generate documentation from Terraform modules. -- [terraform](https://www.terraform.io/) - Tool to build, change, and version infrastructure. -- [terraform-ls](https://github.com/hashicorp/terraform-ls) - Terraform Language Server. -- ~~[terragrunt](https://terragrunt.gruntwork.io/) - Thin wrapper for Terraform.~~ - [tflint](https://github.com/terraform-linters/tflint) - Linter for Terraform files. - [tfsec](https://tfsec.dev/) - Static analysis security scanner for your terraform code. - [transmission](https://transmissionbt.com/) - BitTorrent client. - [tunnelblick](https://www.tunnelblick.net/) - Graphic user interface for OpenVPN. - [ugrep](https://github.com/Genivia/ugrep) - Ultra fast grep with query UI, fuzzy search, archive search, and more. -- ~~[vagrant](https://www.vagrantup.com/) - Development environment.~~ - [viddy](https://github.com/sachaos/viddy) - Modern watch command. -- ~~[virtualbox-extension-pack](https://www.virtualbox.org/) - AMD64/Intel64 and x86 virtualization.~~ -- ~~[virtualbox](https://www.virtualbox.org/) - Free and open-source hosted hypervisor for x86 virtualization.~~ - [vlc](https://www.videolan.org/vlc/) - VLC media player. - [watch](https://gitlab.com/procps-ng/procps) - Executes a program periodically, showing output fullscreen. - [webpquicklook](https://github.com/emin/WebPQuickLook) - QuickLook plugin for WebP image files. -- [xmind-zen](https://www.xmind.net/zen/) - Mind-mapping tool. - [xnviewmp](https://www.xnview.com/) - Image viewer. - [youtube-dl](https://youtube-dl.org/) - Download YouTube videos from the command-line. diff --git a/roles/macos/tasks/install-dmg.yml b/roles/macos/tasks/install-dmg.yml index d556b36..683df96 100644 --- a/roles/macos/tasks/install-dmg.yml +++ b/roles/macos/tasks/install-dmg.yml @@ -5,7 +5,9 @@ register: app_exists - name: Install {{ app_name }} - when: app_exists.stat.exists == False + when: + - app_exists is defined + - app_exists.stat.exists == False block: - name: Set dmg url diff --git a/roles/macos/tasks/main.yml b/roles/macos/tasks/main.yml index ac55c66..9d20fd9 100644 --- a/roles/macos/tasks/main.yml +++ b/roles/macos/tasks/main.yml @@ -28,6 +28,12 @@ name: "{{ apps_brew_cask }}" ignore_errors: yes +- name: Install Python packages + pip: + name: "{{ pip_packages }}" + state: latest + + - name: Get default shell shell: dscl . -read ~/ UserShell | cut -d ' ' -f 2- register: current_shell diff --git a/roles/macos/vars/main.yml b/roles/macos/vars/main.yml index fc9d8c7..0c8690e 100644 --- a/roles/macos/vars/main.yml +++ b/roles/macos/vars/main.yml @@ -13,17 +13,17 @@ apps_brew_taps: apps_brew: - aria2 # https://aria2.github.io/ Download with resuming and segmented downloading. - - ansible # https://www.ansible.com/ Automate deployment, configuration, and upgrading. - - ansible-lint # https://github.com/ansible/ansible-lint/ Checks ansible playbooks for practices and behaviour. + #- ansible # https://www.ansible.com/ Automate deployment, configuration, and upgrading. + #- ansible-lint # https://github.com/ansible/ansible-lint/ Checks ansible playbooks for practices and behaviour. #- antiword # http://www.winfield.demon.nl/ Utility to read Word (.doc) files. - - azure-cli # https://docs.microsoft.com/cli/azure/overview Microsoft Azure CLI. + #- azure-cli # https://docs.microsoft.com/cli/azure/overview Microsoft Azure CLI. - bat # https://github.com/sharkdp/bat Clone of cat(1) with syntax highlighting and Git integration. - bash # https://www.gnu.org/software/bash/ Bourne-Again SHell, a UNIX command interpreter. - coreutils # https://www.gnu.org/software/coreutils GNU File, Shell, and Text utilities. - curl # https://curl.haxx.se/ Get a file from an HTTP, HTTPS or FTP server. - dfc # https://projects.gw-computing.net/projects/dfc Display graphs and colors of file system space/usage. - djvu2pdf # https://0x2a.at/site/projects/djvu2pdf/ Small tool to convert Djvu files to PDF files. - - dive # https://github.com/wagoodman/dive Tool for exploring each layer in a docker image. + #- dive # https://github.com/wagoodman/dive Tool for exploring each layer in a docker image. #- docker # https://www.docker.com/ Pack, ship and run any application as a lightweight container. #- docx2txt # https://docx2txt.sourceforge.io/ Converts Microsoft Office docx documents to equivalent text documents. - exiftool # https://www.sno.phy.queensu.ca/~phil/exiftool/index.html Perl lib for reading and writing EXIF metadata. @@ -41,7 +41,7 @@ apps_brew: - haskell-stack # https://haskellstack.org/ The Haskell Tool Stack. - hlint # https://github.com/ndmitchell/hlint Haskell source code suggestions. - hstr # https://github.com/dvorka/hstr Bash and zsh history suggest box. - - htop # https://hisham.hm/htop/ Improved top (interactive process viewer). + #- htop # https://hisham.hm/htop/ Improved top (interactive process viewer). - hyperfine # https://github.com/sharkdp/hyperfine Command-line benchmarking tool. - imagemagick # https://www.imagemagick.org/ Tools and libraries to manipulate images in many formats. #- ipcalc # http://jodies.de/ipcalc Calculate various network masks, etc. from a given IP address. @@ -53,20 +53,18 @@ apps_brew: - nodejs # https://nodejs.org Platform built on V8 to build network applications. #- ntfs-3g # https://www.tuxera.com/community/open-source-ntfs-3g/ Read-write NTFS driver for FUSE. #- odt2txt # https://github.com/dstosberg/odt2txt/ Convert OpenDocument files to plain text. - - pandoc # https://pandoc.org/ Swiss-army knife of markup format conversion. + #- pandoc # https://pandoc.org/ Swiss-army knife of markup format conversion. - p7zip # https://p7zip.sourceforge.io/ 7-Zip (high compression file archiver) implementation. # - ripgrep # https://github.com/BurntSushi/ripgrep Search tool like grep and The Silver Searcher. - - rlwrap # https://github.com/hanslub42/rlwrap Readline wrapper: adds readline support to tools that lack it. Dependency of cheat.sh. - shellcheck # https://www.shellcheck.net/ Static analysis and lint tool, for (ba)sh scripts. - skopeo # https://github.com/containers/skopeo Work with remote images registries. # - sshfs # https://github.com/libfuse/sshfs File system client based on SSH File Transfer Protocol. - sdcv # https://dushistov.github.io/sdcv/ StarDict Console Version. - # - tcl # https://tcl.tk TCL Programming language. - jimtcl # http://jim.tcl.tk/index.html Small footprint implementation of Tcl. - tcl-tk # https://tcl.tk GUI Toolkit for TCL Programming language. - - terraform # https://www.terraform.io/ Tool to build, change, and version infrastructure. - - terraform-docs # https://github.com/terraform-docs/terraform-docs Tool to generate documentation from Terraform modules. - - terraform-ls # https://github.com/hashicorp/terraform-ls Terraform Language Server. + # - terraform # https://www.terraform.io/ Tool to build, change, and version infrastructure. + # - terraform-docs # https://github.com/terraform-docs/terraform-docs Tool to generate documentation from Terraform modules. + # - terraform-ls # https://github.com/hashicorp/terraform-ls Terraform Language Server. # - terragrunt # https://terragrunt.gruntwork.io/ Thin wrapper for Terraform. - tflint # https://github.com/terraform-linters/tflint Linter for Terraform files. - tfsec # https://tfsec.dev/ Static analysis security scanner for your terraform code. @@ -92,7 +90,7 @@ apps_brew_cask: # - joplin # https://joplinapp.org/ An open source note taking and to-do application. # - k3d # https://k3d.io/ Little helper to run Rancher Lab's k3s in Docker. - lagrange # https://gmi.skyjake.fi/lagrange/ Desktop GUI client for browsing Geminispace. - - min # https://github.com/minbrowser/min Minimal browser that protects privacy. + # - min # https://github.com/minbrowser/min Minimal browser that protects privacy. - osxfuse # https://osxfuse.github.io/ FUSE for MacOS. # - pdftotext # https://www.bluem.net/en/mac/ PDF to text convertor. - rar # https://www.rarlab.com/ Pack, extract, view, and test RAR archives. @@ -100,8 +98,9 @@ apps_brew_cask: - telegram # https://macos.telegram.org/ Telegram for MacOS. - transmission # https://transmissionbt.com/ BitTorrent client. - tunnelblick # https://www.tunnelblick.net/ Graphic user interface for OpenVPN. + - vivaldi # https://vivaldi.com A web browser which works without pulse-audio. - vlc # https://www.videolan.org/vlc/ VLC media player. - - xmind-zen # https://www.xmind.net/zen/ Mind-mapping tool. + # - xmind-zen # https://www.xmind.net/zen/ Mind-mapping tool. - xnviewmp # https://www.xnview.com/ Image viewer. # Finder preview @@ -147,3 +146,6 @@ apps_binary: - name: resmushit-cli url: "https://raw.githubusercontent.com/charlyie/resmushit-cli/master/resmushit-cli.sh" +pip_packages: + - pynvim +