- hosts: localhost
  connection: local
  vars_files:
    - vars/pip.yml
  vars_prompt:
    - name: "hostname"
      prompt: "Computer Hostname"
      private: no
  tasks:
    - name: set computer hostname
      command: "{{ item }}"
      become: yes
      with_items:
       - scutil --set ComputerName "{{ hostname }}"
       - scutil --set HostName "{{ hostname }}"
       - scutil --set LocalHostName "{{ hostname }}"
       - defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "{{ hostname }}"
    - name: install homebrew
      shell: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
      args:
        creates: /usr/local/bin/brew
    - name: install XQuartz
      homebrew_cask: name=xquartz state=installed
    - name: install binaries
      command: brew bundle --file files/Brewfile
    - name: install apps
      command: brew bundle --file files/Brewfile.apps
    - name: install mas apps
      command: brew bundle --file files/Brewfile.mas
    - name: install fonts
      command: brew bundle --file files/Brewfile.fonts
    - name: install python packages
      pip:
        name: "{{ item }}"
        state: latest
      with_items: "{{ python_packages }}"
    - name: set macos defaults
      script: files/.macos
    - debug:
        msg: "Now just setup DropBox, run 'mackup restore', and reboot"

- hosts: localhost
  connection: local
  vars_files:
    - vars/pip.yml
  vars_prompt:
    - name: "hostname"
      prompt: "Computer Hostname"
      private: no
  tasks:
    - name: set computer hostname
      command: "{{ item }}"
      become: yes
      with_items:
       - scutil --set ComputerName "{{ hostname }}"
       - scutil --set HostName "{{ hostname }}"
       - scutil --set LocalHostName "{{ hostname }}"
       - defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "{{ hostname }}"
    - name: install homebrew
      shell: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
      args:
        creates: /usr/local/bin/brew
    - name: install XQuartz
      homebrew_cask: name=xquartz state=installed
    - name: install binaries
      command: brew bundle --file files/Brewfile
    - name: install apps
      command: brew bundle --file files/Brewfile.apps
    - name: install mas apps
      command: brew bundle --file files/Brewfile.mas
    - name: install fonts
      command: brew bundle --file files/Brewfile.fonts
    - name: install python packages
      pip:
        name: "{{ python_packages }}"
        state: latest
    - name: set macos defaults
      script: files/.macos
    - debug:
        msg: "Now just setup DropBox, run 'mackup restore', and reboot"

Fix ansible pip deprecation warning
Fix ansible pip deprecation warning
