Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
caarlos0 committed May 1, 2016
1 parent 427f3b6 commit 4d110b9
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
main.retry
1 change: 1 addition & 0 deletions ansible.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[defaults]
hostfile = hosts
transport = local
roles_path = ./roles
3 changes: 1 addition & 2 deletions main.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
- hosts: localhost
become: ansible_distribution == 'Ubuntu'
connection: local
roles:
# -
tasks:
# essentials:
- include: tasks/homebrew.yml
when: ansible_os_family == 'Darwin'
- include: tasks/core.yml
- include: tasks/dotfiles.yml

Expand Down
9 changes: 7 additions & 2 deletions setup
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/bin/bash
set -x

if test "$(uname)" = "Darwin"; then
if test ! $(which gcc); then
echo "Installing xcode..."
Expand All @@ -20,6 +19,12 @@ elif test "$(uname)" = "Linux"; then
sudo apt-add-repository -y ppa:ansible/ansible
sudo apt-get update
sudo apt-get install -y ansible
cat <<EOF >> ./ansible.cfg
[privilege_escalation]
become = True
become_ask_pass = True
EOF
fi
fi

Expand All @@ -28,5 +33,5 @@ if test ! "$(which ansible)"; then
exit 1
fi

ansible-galaxy install -r requirements.yml -p roles
ansible-galaxy install -r requirements.yml
ansible-playbook main.yml
2 changes: 0 additions & 2 deletions tasks/homebrew.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
- name: Update Homebrew
command: brew update
when: ansible_os_family == 'Darwin'
- name: Add Homebrew taps
homebrew_tap: tap={{item}}
with_items:
- caskroom/cask
- caskroom/fonts
- caskroom/versions
- getantibody/homebrew-antibody
when: ansible_os_family == 'Darwin'

0 comments on commit 4d110b9

Please sign in to comment.