Skip to content

Instantly share code, notes, and snippets.

@EntropyWorks
Created March 22, 2019 00:12
Show Gist options
  • Select an option

  • Save EntropyWorks/c84fddf22456c8f0856ae2a823d51528 to your computer and use it in GitHub Desktop.

Select an option

Save EntropyWorks/c84fddf22456c8f0856ae2a823d51528 to your computer and use it in GitHub Desktop.

Revisions

  1. EntropyWorks created this gist Mar 22, 2019.
    530 changes: 530 additions & 0 deletions restore-brew-2019032100.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,530 @@
    #!/usr/bin/env ANSIBLE_HOSTS="" ANSIBLE_CONNECTION=local ansible-playbook
    # vim:ft=yaml

    ---
    - name: Homebrew Restore from Thu Mar 21 12:37:16 PDT 2019
    hosts: 127.0.0.1
    connection: local

    tasks:
    - name: check for xcode
    command: xcode-select --print-path
    register: xcode_select_result

    - name: check to see if xcode has been run
    command: xcodebuild -checkFirstLaunchStatus
    register: xcodebuild_launch_result
    when: ( xcode_select_result.rc == 69 ) or ( xcode_select_result.rc == 0 )
    ignore_errors: true

    # - name: accept xcode license
    # command: xcodebuild -license accept
    # when: xcodebuild_launch_result.rc != 0
    # sudo: true
    #
    # - name: install xcode cli
    # command: xcode-select --install
    # when: xcodebuild_launch_result.changed

    - name: Check if homebrew installed
    stat:
    path: /usr/local/bin/brew
    follow: true
    register: brew_stat_result

    - name: Install homerew if brew is not found
    raw: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    register: homebrew_result
    failed_when: homebrew_result.rc != 0 and "Homebrew is already installed" not in homebrew_result.stderr
    when: brew_stat_result.stat.exists == False

    - name: update brew
    homebrew:
    update_homebrew: yes
    upgrade_all: yes

    - name: Tap some casks
    homebrew_tap:
    name: "{{ item }}"
    state: present
    with_items:
    - azure/draft
    - grammarly/tap
    - homebrew/bundle
    - homebrew/cask
    - homebrew/cask-drivers
    - homebrew/cask-fonts
    - homebrew/cask-versions
    - homebrew/completions
    - homebrew/core
    - homebrew/dupes
    - homebrew/fuse
    - homebrew/games
    - homebrew/python
    - homebrew/science
    - homebrew/services
    - homebrew/versions
    - jlhonora/lsusb
    - justwatchcom/gopass
    - minio/stable
    - neovim/neovim
    - tylerbrock/saw
    - wata727/tflint

    - name: Install homebrew items
    homebrew:
    name={{ item.name }}
    state=present
    install_options={{ item.options }}
    with_items:
    - { name: 'ack', options: '' }
    - { name: 'adns', options: '' }
    - { name: 'amazon-ecs-cli', options: '' }
    - { name: 'ansible', options: '' }
    - { name: 'ansible-cmdb', options: '' }
    - { name: 'ant', options: '' }
    - { name: 'aptly', options: '' }
    - { name: 'argp-standalone', options: '' }
    - { name: 'arp-scan', options: '' }
    - { name: 'asciinema', options: '' }
    - { name: 'aspcud', options: '' }
    - { name: 'atk', options: '' }
    - { name: 'augeas', options: '' }
    - { name: 'auto-scaling', options: '' }
    - { name: 'autoconf', options: '' }
    - { name: 'autoconf-archive', options: '' }
    - { name: 'automake', options: '' }
    - { name: 'aws-shell', options: '' }
    - { name: 'awscli', options: '' }
    - { name: 'awslogs', options: '' }
    - { name: 'bash', options: '' }
    - { name: 'bash-completion', options: '' }
    - { name: 'bash-git-prompt', options: '' }
    - { name: 'bazel', options: '' }
    - { name: 'bdw-gc', options: '' }
    - { name: 'berkeley-db', options: '' }
    - { name: 'bfg', options: '' }
    - { name: 'boost', options: '' }
    - { name: 'brew-cask-completion', options: '' }
    - { name: 'byobu', options: '' }
    - { name: 'cabextract', options: '' }
    - { name: 'cairo', options: '' }
    - { name: 'camlp4', options: '' }
    - { name: 'carthage', options: '' }
    - { name: 'certbot', options: '' }
    - { name: 'cfssl', options: '' }
    - { name: 'checkbashisms', options: '' }
    - { name: 'clasp', options: '' }
    - { name: 'clingo', options: '' }
    - { name: 'cloud-watch', options: '' }
    - { name: 'cmake', options: '' }
    - { name: 'cmatrix', options: '' }
    - { name: 'consul', options: '' }
    - { name: 'consul-backinator', options: '' }
    - { name: 'coreutils', options: '' }
    - { name: 'cppunit', options: '' }
    - { name: 'crystal', options: '' }
    - { name: 'cscope', options: '' }
    - { name: 'dcraw', options: '' }
    - { name: 'dep', options: '' }
    - { name: 'dfu-programmer', options: '' }
    - { name: 'dfu-util', options: '' }
    - { name: 'dialog', options: '' }
    - { name: 'diff-so-fancy', options: '' }
    - { name: 'diffoscope', options: '' }
    - { name: 'diffuse', options: '' }
    - { name: 'dirmngr', options: '' }
    - { name: 'dnsmasq', options: '' }
    - { name: 'docbook', options: '' }
    - { name: 'docker-machine', options: '' }
    - { name: 'docker-machine-driver-hyperkit', options: '' }
    - { name: 'docker-machine-driver-xhyve', options: '' }
    - { name: 'dos2unix', options: '' }
    - { name: 'doxygen', options: '' }
    - { name: 'draft', options: '' }
    - { name: 'duplicity', options: '' }
    - { name: 'duti', options: '' }
    - { name: 'envconsul', options: '' }
    - { name: 'ffmpeg', options: '' }
    - { name: 'fftw', options: '' }
    - { name: 'flac', options: '' }
    - { name: 'flex', options: '' }
    - { name: 'fontconfig', options: '' }
    - { name: 'freetype', options: '' }
    - { name: 'fribidi', options: '' }
    - { name: 'gawk', options: '' }
    - { name: 'gcc', options: '' }
    - { name: 'gd', options: '' }
    - { name: 'gdbm', options: '' }
    - { name: 'gdk-pixbuf', options: '' }
    - { name: 'gettext', options: '' }
    - { name: 'gist', options: '' }
    - { name: 'git', options: '' }
    - { name: 'git-cola', options: '' }
    - { name: 'git-extras', options: '' }
    - { name: 'git-fixup', options: '' }
    - { name: 'git-flow', options: '' }
    - { name: 'git-imerge', options: '' }
    - { name: 'git-lfs', options: '' }
    - { name: 'git-secrets', options: '' }
    - { name: 'git-town', options: '' }
    - { name: 'glew', options: '' }
    - { name: 'glfw', options: '' }
    - { name: 'glib', options: '' }
    - { name: 'gmp', options: '' }
    - { name: 'gnome-doc-utils', options: '' }
    - { name: 'gnu-getopt', options: '' }
    - { name: 'gnu-sed', options: '' }
    - { name: 'gnu-tar', options: '' }
    - { name: 'gnupg', options: '' }
    - { name: 'gnuplot', options: '' }
    - { name: 'gnutls', options: '' }
    - { name: 'go', options: '' }
    - { name: 'gobject-introspection', options: '' }
    - { name: 'gperf', options: '' }
    - { name: 'gpg-agent', options: '' }
    - { name: 'graphite2', options: '' }
    - { name: 'graphviz', options: '' }
    - { name: 'gringo', options: '' }
    - { name: 'grsync', options: '' }
    - { name: 'gsettings-desktop-schemas', options: '' }
    - { name: 'gsl', options: '' }
    - { name: 'gtk+', options: '' }
    - { name: 'gtk+3', options: '' }
    - { name: 'gts', options: '' }
    - { name: 'harfbuzz', options: '' }
    - { name: 'hicolor-icon-theme', options: '' }
    - { name: 'highlight', options: '' }
    - { name: 'hilite', options: '' }
    - { name: 'htop', options: '' }
    - { name: 'htop-osx', options: '' }
    - { name: 'hub', options: '' }
    - { name: 'icdiff', options: '' }
    - { name: 'ice', options: '' }
    - { name: 'icu4c', options: '' }
    - { name: 'imagemagick', options: '' }
    - { name: 'intltool', options: '' }
    - { name: 'ipcalc', options: '' }
    - { name: 'ipv6calc', options: '' }
    - { name: 'isl', options: '' }
    - { name: 'itpp', options: '' }
    - { name: 'jack', options: '' }
    - { name: 'jansson', options: '' }
    - { name: 'jasper', options: '' }
    - { name: 'jemalloc', options: '' }
    - { name: 'jpeg', options: '' }
    - { name: 'jq', options: '' }
    - { name: 'json-c', options: '' }
    - { name: 'kops', options: '' }
    - { name: 'kubernetes-cli', options: '' }
    - { name: 'kubernetes-helm', options: '' }
    - { name: 'lame', options: '' }
    - { name: 'legit', options: '' }
    - { name: 'libarchive', options: '' }
    - { name: 'libassuan', options: '' }
    - { name: 'libbladerf', options: '' }
    - { name: 'libcroco', options: '' }
    - { name: 'libepoxy', options: '' }
    - { name: 'libev', options: '' }
    - { name: 'libevent', options: '' }
    - { name: 'libffi', options: '' }
    - { name: 'libgcrypt', options: '' }
    - { name: 'libgeotiff', options: '' }
    - { name: 'libgit2', options: '' }
    - { name: 'libgpg-error', options: '' }
    - { name: 'libgphoto2', options: '' }
    - { name: 'libicns', options: '' }
    - { name: 'libidn2', options: '' }
    - { name: 'libksba', options: '' }
    - { name: 'libmagic', options: '' }
    - { name: 'libmpc', options: '' }
    - { name: 'libogg', options: '' }
    - { name: 'libpcap', options: '' }
    - { name: 'libpng', options: '' }
    - { name: 'librsvg', options: '' }
    - { name: 'librsync', options: '' }
    - { name: 'libsamplerate', options: '' }
    - { name: 'libsndfile', options: '' }
    - { name: 'libssh2', options: '' }
    - { name: 'libtasn1', options: '' }
    - { name: 'libtermkey', options: '' }
    - { name: 'libtiff', options: '' }
    - { name: 'libtool', options: '' }
    - { name: 'libunistring', options: '' }
    - { name: 'libusb', options: '' }
    - { name: 'libusb-compat', options: '' }
    - { name: 'libuv', options: '' }
    - { name: 'libvorbis', options: '' }
    - { name: 'libvpx', options: '' }
    - { name: 'libvterm', options: '' }
    - { name: 'libxml2', options: '' }
    - { name: 'libxmlsec1', options: '' }
    - { name: 'libyaml', options: '' }
    - { name: 'libyubikey', options: '' }
    - { name: 'little-cms', options: '' }
    - { name: 'little-cms2', options: '' }
    - { name: 'lldpd', options: '' }
    - { name: 'llvm', options: '' }
    - { name: 'llvm@5', options: '' }
    - { name: 'llvm@6', options: '' }
    - { name: 'lmdb', options: '' }
    - { name: 'logstash', options: '' }
    - { name: 'lrzsz', options: '' }
    - { name: 'lsusb', options: '' }
    - { name: 'lua', options: '' }
    - { name: 'luajit', options: '' }
    - { name: 'lzlib', options: '' }
    - { name: 'makedepend', options: '' }
    - { name: 'mc', options: '' }
    - { name: 'mcpp', options: '' }
    - { name: 'md5sha1sum', options: '' }
    - { name: 'memcached', options: '' }
    - { name: 'mercurial', options: '' }
    - { name: 'mono', options: '' }
    - { name: 'mpfr', options: '' }
    - { name: 'msgpack', options: '' }
    - { name: 'mtr', options: '' }
    - { name: 'mysql', options: '' }
    - { name: 'ncdu', options: '' }
    - { name: 'ncurses', options: '' }
    - { name: 'neovim', options: '' }
    - { name: 'net-snmp', options: '' }
    - { name: 'netpbm', options: '' }
    - { name: 'nettle', options: '' }
    - { name: 'newt', options: '' }
    - { name: 'nmap', options: '' }
    - { name: 'npth', options: '' }
    - { name: 'oath-toolkit', options: '' }
    - { name: 'ocaml', options: '' }
    - { name: 'ocamlbuild', options: '' }
    - { name: 'oniguruma', options: '' }
    - { name: 'opam', options: '' }
    - { name: 'open-completion', options: '' }
    - { name: 'openblas', options: '' }
    - { name: 'openconnect', options: '' }
    - { name: 'openjpeg', options: '' }
    - { name: 'openssh', options: '' }
    - { name: 'openssl', options: '' }
    - { name: '[email protected]', options: '' }
    - { name: 'opus', options: '' }
    - { name: 'ossp-uuid', options: '' }
    - { name: 'otto', options: '' }
    - { name: 'p11-kit', options: '' }
    - { name: 'p7zip', options: '' }
    - { name: 'packer', options: '' }
    - { name: 'pandoc', options: '' }
    - { name: 'pango', options: '' }
    - { name: 'parallel', options: '' }
    - { name: 'patchutils', options: '' }
    - { name: 'pcre', options: '' }
    - { name: 'pcre2', options: '' }
    - { name: 'perl', options: '' }
    - { name: 'phantomjs', options: '' }
    - { name: 'pinentry', options: '' }
    - { name: 'pinentry-mac', options: '' }
    - { name: 'pixman', options: '' }
    - { name: 'pkg-config', options: '' }
    - { name: 'poco', options: '' }
    - { name: 'popt', options: '' }
    - { name: 'postgresql', options: '' }
    - { name: 'pre-commit', options: '' }
    - { name: 'proj', options: '' }
    - { name: 'protobuf', options: '' }
    - { name: 'pstree', options: '' }
    - { name: 'pth', options: '' }
    - { name: 'putty', options: '' }
    - { name: 'pwgen', options: '' }
    - { name: 'py2cairo', options: '' }
    - { name: 'pyenv', options: '' }
    - { name: 'pyenv-virtualenv', options: '' }
    - { name: 'pygobject', options: '' }
    - { name: 'pygtk', options: '' }
    - { name: 'pyqt', options: '' }
    - { name: 'python', options: '' }
    - { name: 'python3', options: '' }
    - { name: 'python@2', options: '' }
    - { name: 'qemu', options: '' }
    - { name: 'qrencode', options: '' }
    - { name: 'qt', options: '' }
    - { name: 'qt5', options: '' }
    - { name: '[email protected]', options: '' }
    - { name: 'qwt', options: '' }
    - { name: 'rarian', options: '' }
    - { name: 'rclone', options: '' }
    - { name: 'readline', options: '' }
    - { name: 'reattach-to-user-namespace', options: '' }
    - { name: 'rlog', options: '' }
    - { name: 'rocker', options: '' }
    - { name: 'ruby', options: '' }
    - { name: 's-lang', options: '' }
    - { name: 'salt', options: '' }
    - { name: 'saltstack', options: '' }
    - { name: 'sane-backends', options: '' }
    - { name: 'saw', options: '' }
    - { name: 'sdl', options: '' }
    - { name: 'sdl2', options: '' }
    - { name: 'shared-mime-info', options: '' }
    - { name: 'shellcheck', options: '' }
    - { name: 'shfmt', options: '' }
    - { name: 'shyaml', options: '' }
    - { name: 'sip', options: '' }
    - { name: 'sipcalc', options: '' }
    - { name: 'snappy', options: '' }
    - { name: 'socat', options: '' }
    - { name: 'sphinx-doc', options: '' }
    - { name: 'splint', options: '' }
    - { name: 'sqlite', options: '' }
    - { name: 'squid', options: '' }
    - { name: 'ssh-copy-id', options: '' }
    - { name: 'ssh-vault', options: '' }
    - { name: 'sshpass', options: '' }
    - { name: 'sslscan', options: '' }
    - { name: 'stormssh', options: '' }
    - { name: 'stormssh-completion', options: '' }
    - { name: 'swaks', options: '' }
    - { name: 'swig', options: '' }
    - { name: 'terraform', options: '' }
    - { name: 'terraform-docs', options: '' }
    - { name: 'terraform-inventory', options: '' }
    - { name: 'terraforming', options: '' }
    - { name: 'tflint', options: '' }
    - { name: 'the_silver_searcher', options: '' }
    - { name: 'theora', options: '' }
    - { name: 'tig', options: '' }
    - { name: 'tmux', options: '' }
    - { name: 'tree', options: '' }
    - { name: 'ttyrec', options: '' }
    - { name: 'ufraw', options: '' }
    - { name: 'uhd', options: '' }
    - { name: 'uncrustify', options: '' }
    - { name: 'unibilium', options: '' }
    - { name: 'unrar', options: '' }
    - { name: 'utf8proc', options: '' }
    - { name: 'vagrant-completion', options: '' }
    - { name: 'vault', options: '' }
    - { name: 'vault-cli', options: '' }
    - { name: 'vde', options: '' }
    - { name: 'vim', options: '' }
    - { name: 'watch', options: '' }
    - { name: 'webp', options: '' }
    - { name: 'wemux', options: '' }
    - { name: 'wget', options: '' }
    - { name: 'wxmac', options: '' }
    - { name: 'wxpython', options: '' }
    - { name: 'x264', options: '' }
    - { name: 'x265', options: '' }
    - { name: 'xhyve', options: '' }
    - { name: 'xvid', options: '' }
    - { name: 'xz', options: '' }
    - { name: 'yajl', options: '' }
    - { name: 'yaml-cpp', options: '' }
    - { name: 'ykpers', options: '' }
    - { name: 'yubico-piv-tool', options: '' }
    - { name: 'zbar', options: '' }
    - { name: 'zenity', options: '' }
    - { name: 'zeromq', options: '' }
    - { name: 'zlib', options: '' }

    - name: install osx brew cask software
    homebrew_cask:
    name={{ item }}
    state=present
    with_items:
    - amazon-drive
    - android-file-transfer
    - apache-directory-studio
    - appcleaner
    - applepi-baker
    - audiomate
    - bartender
    - betterzipql
    - box-sync
    - boxcryptor
    - cord
    - cyberduck
    - dbeaver-community
    - dbglass
    - diffmerge
    - discord
    - disk-inventory-x
    - docker-beta
    - dropbox
    - easyfind
    - etcher
    - firefox
    - fission
    - flycut
    - font-awesome-terminal-fonts
    - font-source-code-pro
    - font-source-code-pro-for-powerline
    - font-stardos-stencil
    - force-paste
    - gimp
    - gitup
    - go2shell
    - google-chrome
    - google-cloud-sdk
    - google-drive
    - google-earth
    - google-play-music-desktop-player
    - gpgtools-beta
    - inkscape
    - java
    - jiggler
    - keeweb
    - keybase
    - krita
    - logitech-control-center
    - logitech-unifying
    - macvim
    - meld
    - mkchromecast
    - mouse-locator
    - pallotron-yubiswitch
    - pencil
    - pgadmin4
    - postman
    - psequel
    - pycharm-ce
    - qlcolorcode
    - qlimagesize
    - qlmarkdown
    - qlprettypatch
    - qlstephen
    - qlvideo
    - quicklook-csv
    - quicklook-json
    - quicklookase
    - revisions
    - ripit
    - semaphor
    - sequel-pro
    - shiba
    - sitesucker
    - soundflower
    - sourcetree
    - spideroakone
    - squidman
    - suspicious-package
    - synergy
    - telegram
    - the-unarchiver
    - thunderbird
    - typora
    - vagrant
    - valentina-studio
    - vimr
    - virtualbox
    - virtualbox-extension-pack
    - visual-studio-code
    - webpquicklook
    - wineskin-winery
    - wireshark
    - xquartz
    - yed
    - yubico-authenticator
    - yubico-yubikey-manager
    - yubico-yubikey-personalization-gui
    - yubico-yubikey-piv-manager
    - yubikey-neo-manager
    - yubikey-personalization-gui