-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 1c39f40
Showing
9 changed files
with
205 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
language: python | ||
python: "2.7" | ||
|
||
# Use the new container infrastructure | ||
sudo: false | ||
|
||
# Install ansible | ||
addons: | ||
apt: | ||
packages: | ||
- python-pip | ||
|
||
install: | ||
# Install ansible | ||
- pip install ansible | ||
|
||
# Check ansible version | ||
- ansible --version | ||
|
||
# Create ansible.cfg with correct roles_path | ||
- printf '[defaults]\nroles_path=../' >ansible.cfg | ||
|
||
script: | ||
# Basic role syntax check | ||
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check | ||
|
||
notifications: | ||
webhooks: https://galaxy.ansible.com/api/v1/notifications/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# Ansible Role: Dockutil | ||
|
||
[![Build Status](https://travis-ci.org/fubarhouse/ansible-role-macdock.svg?branch=master)](https://travis-ci.org/fubarhouse/ansible-role-macdock) | ||
|
||
Install [Dockutil](https://github.com/kcrawford/dockutil) and remove, add and and rotate items on OSX's dock on macOS. | ||
|
||
## Requirements | ||
|
||
- Homebrew | ||
|
||
## Role Variables | ||
|
||
Dock items to remove: | ||
|
||
```` | ||
dockitems_disabled: | ||
- Launchpad | ||
- Safari | ||
- Contacts | ||
- Notes | ||
- Reminders | ||
- Maps | ||
- Photos | ||
- Messages | ||
- FaceTime | ||
- iTunes | ||
- iBooks | ||
- App Store | ||
- System Preferences | ||
- Calendar | ||
- Terminal | ||
```` | ||
|
||
Dock items to add, including name, path and weight/position: | ||
|
||
```` | ||
dockitems_enabled: | ||
- name: Google Chrome | ||
path: "/Applications/Google Chrome.app" | ||
pos: 1 | ||
- name: Tower | ||
path: "/Applications/Tower.app" | ||
pos: 2 | ||
- name: FirefoxDeveloperEdition | ||
path: "/Applications/FirefoxDeveloperEdition.app" | ||
pos: 3 | ||
- name: Sublime Text | ||
path: "/Applications/Sublime Text.app" | ||
pos: 4 | ||
- name: iTerm | ||
path: "/Applications/iTerm.app" | ||
pos: 5 | ||
- name: TeamViewer | ||
path: "/Applications/TeamViewer.app" | ||
pos: 6 | ||
```` | ||
|
||
## Dependencies | ||
|
||
None. | ||
|
||
## Example Playbook | ||
|
||
```` | ||
- hosts: localhost | ||
roles: | ||
- fubarhouse.macdock | ||
```` | ||
|
||
## License | ||
|
||
MIT / BSD | ||
|
||
## Author Information | ||
|
||
This role was created in 2016 by [Karl Hepworth](twitter.com/fubarhouse). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
|
||
# | ||
# Dockutil | ||
# | ||
# To manage dock items. | ||
# | ||
|
||
dockitems_disabled: | ||
- Launchpad | ||
- Safari | ||
- Contacts | ||
- Notes | ||
- Reminders | ||
- Maps | ||
- Photos | ||
- Messages | ||
- FaceTime | ||
- iTunes | ||
- iBooks | ||
- App Store | ||
- System Preferences | ||
- Calendar | ||
- Terminal | ||
|
||
dockitems_enabled: | ||
- name: Google Chrome | ||
path: "/Applications/Google Chrome.app" | ||
pos: 1 | ||
- name: Tower | ||
path: "/Applications/Tower.app" | ||
pos: 2 | ||
- name: FirefoxDeveloperEdition | ||
path: "/Applications/FirefoxDeveloperEdition.app" | ||
pos: 3 | ||
- name: Sublime Text | ||
path: "/Applications/Sublime Text.app" | ||
pos: 4 | ||
- name: iTerm | ||
path: "/Applications/iTerm.app" | ||
pos: 5 | ||
- name: TeamViewer | ||
path: "/Applications/TeamViewer.app" | ||
pos: 6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
# handlers file for fubarhouse.macdock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
galaxy_info: | ||
author: Karl Hepworth | ||
description: Installs and uses dockutil to remove, add and rearrange dock items | ||
# issue_tracker_url: http://example.com/issue/tracker | ||
license: MIT | ||
min_ansible_version: 2.1 | ||
platforms: | ||
- name: MacOSX | ||
versions: | ||
- all | ||
- 10.10 | ||
- 10.11 | ||
- 10.12 | ||
- 10.7 | ||
- 10.8 | ||
- 10.9 | ||
galaxy_tags: | ||
- mac | ||
- apple | ||
- dock | ||
- dockutil | ||
dependencies: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
|
||
- name: Dockutil | Ensure installed. | ||
homebrew: | ||
name: "dockutil" | ||
state: present | ||
|
||
- name: Dockutil | Remove all unwanted dock items | ||
shell: dockutil --remove "{{ item }}" | ||
ignore_errors: true | ||
with_items: "{{ dockitems_disabled }}" | ||
when: "{{ dockitems_disabled | length > 0 }}" | ||
|
||
- name: Dockutil | Adding items | ||
shell: dockutil --find "{{ item.name }}" || dockutil --add "{{ item.path }}" | ||
with_items: "{{ dockitems_enabled }}" | ||
when: "{{ dockitems_enabled | length > 0 }}" | ||
|
||
- name: Dockutil | Moving items | ||
shell: dockutil --move "{{ item.name }}" --position "{{ item.pos }}" | ||
with_items: "{{ dockitems_enabled }}" | ||
when: "{{ dockitems_enabled | length > 0 }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
localhost |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
- hosts: localhost | ||
remote_user: root | ||
roles: | ||
- fubarhouse.macdock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
# vars file for fubarhouse.macdock |