---
- hosts: workstation
  connection: local

  pre_tasks:
    - name: Ensure homebrew is updated
      homebrew:
        update_homebrew: yes

    - name: Ensure required packages are installed
      homebrew:
        name: "{{ item }}"
        state: present
      with_items:
        - python@3
        - tmux
        - neovim
        - fzf
        - wget
        - the_silver_searcher
        - reattach-to-user-namespace
        - shellcheck
        - npm
        # - homebrew/php/php71-xdebug
        # - homebrew/php/composer
        # - homebrew/php/phpmd

  roles:
    - dotfiles
    - vim
    - ssh-keys
    - ssh-client

# https://github.com/daemonza/setupmac
# https://github.com/herrbischoff/awesome-osx-command-line
# - Disable Creation of Metadata Files on Network Volumes
#   - defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
# - Disable Creation of Metadata Files on USB Volumes
#   - defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true

---
- hosts: workstation
  connection: local

  pre_tasks:
    - name: Ensure homebrew is updated
      homebrew:
        update_homebrew: yes

    - name: Ensure required packages are installed
      homebrew:
        name: "{{ item }}"
        state: present
      with_items:
        - python@3
        - tmux
        - neovim
        - fzf
        - wget
        - the_silver_searcher
        - reattach-to-user-namespace
        - shellcheck
        - npm
        # - homebrew/php/php71-xdebug
        # - homebrew/php/composer
        # - homebrew/php/phpmd

    - name: Set hostname
      become: yes
      command: scutil --set HostName "workstation"

  roles:
    - dotfiles
    - vim
    - ssh-keys
    - ssh-client

# https://github.com/daemonza/setupmac
# https://github.com/herrbischoff/awesome-osx-command-line
# - Disable Creation of Metadata Files on Network Volumes
#   - defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
# - Disable Creation of Metadata Files on USB Volumes
#   - defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true

Change hostname using scutils on macos
Change hostname using scutils on macos
