Skip to content

Commit 1078fa3

Browse files
committed
update roles
1 parent 8c83b4a commit 1078fa3

File tree

15 files changed

+84
-45
lines changed

15 files changed

+84
-45
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- name: Check out the codebase.
22-
uses: actions/checkout@v2
22+
uses: actions/checkout@v3
2323
with:
2424
path: ansible_collections/buluma/mac
2525

@@ -46,7 +46,7 @@ jobs:
4646

4747
steps:
4848
- name: Check out the codebase.
49-
uses: actions/checkout@v2
49+
uses: actions/checkout@v3
5050
with:
5151
path: ansible_collections/buluma/mac
5252

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020

2121
steps:
2222
- name: Check out the codebase.
23-
uses: actions/checkout@v2
23+
uses: actions/checkout@v3
2424
with:
2525
path: ansible_collections/buluma/mac
2626

galaxy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
namespace: buluma
33
name: mac
4-
version: "2.0.1"
4+
version: "2.0.2"
55
readme: README.md
66

77
authors:

meta/runtime.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
requires_ansible: ">=2.9"
2+
requires_ansible: ">=2.10"

roles/dock/README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,18 @@ dockitems_persist: []
2222
2323
Dock items to add. `pos` parameter is optional and will place the Dock item in a particular position in the Dock.
2424

25+
```yaml
26+
dockutil_homebrew_cask: hpedrorodrigues/tools/dockutil
27+
```
28+
29+
Which Homebrew cask to install for dockutil. See [this issue](https://github.com/kcrawford/dockutil/issues/127) to read more about why this cask is the default.
30+
31+
```yaml
32+
dockutil_install: true
33+
```
34+
35+
Whether to install dockutil or not. If set to false you'll need to have installed dockutil prior to the execution of this role. See [this issue](https://github.com/buluma/ansible-collection-mac/issues/42) for alternate installation methods, which may be necessary depending on your version of macOS.
36+
2537
## Dependencies
2638

2739
- (Soft dependency) `buluma.homebrew`
@@ -60,6 +72,7 @@ See the [Mac Development Ansible Playbook](https://github.com/buluma/mac-dev-pla
6072
Apache-2.0
6173

6274
## Author Information
75+
6376
This role was created in 2022 by [Michael Buluma](https://buluma.github.io)
6477

65-
The contents of this role were originally created by [Michael Buluma](https://buluma.github.io/).
78+
The contents of this role were originally created by [@dspolleke](https://github.com/dspolleke) as part of the [`mac-dev-playbook`](https://github.com/buluma/mac-dev-playbook).

roles/dock/defaults/main.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,9 @@ dockitems_persist: []
1212
# - name: "Sublime Text"
1313
# path: "/Applications/Sublime Text.app/"
1414
# pos: 5
15+
16+
# Which homebrew cask to install for dockutil
17+
dockutil_homebrew_cask: hpedrorodrigues/tools/dockutil
18+
19+
# Whether to install dockutil or not
20+
dockutil_install: true

roles/dock/requirements.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
collections:
3+
- name: community.general

roles/dock/tasks/dock-add.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,13 @@
88
changed_when: false
99
tags: ['dock']
1010

11-
- name: ensure dock item {{ item.name | default(item) }} exists.
11+
- name: ensure Dock item {{ item.name | default(item) }} exists.
1212
ansible.builtin.command: "dockutil --add '{{ item.path }}'"
1313
when: dockitem_exists.rc >0
1414
tags: ['dock']
15+
16+
- name: pause for 7 seconds between dock changes.
17+
ansible.builtin.pause:
18+
seconds: 7
19+
when: dockitem_exists.rc >0
20+
tags: ['dock']

roles/dock/tasks/dock-position.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
changed_when: false
88

99
- name: get current dock item position from output.
10-
set_fact:
10+
ansible.builtin.set_fact:
1111
current_position: "{{ dock_item_position | regex_replace('^.*slot (.*) in.*$', '\\1') }}"
1212

1313
- name: move dock item to the correct position.

roles/dock/tasks/dock-remove.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
- name: "check if {{ item }} is in the Dock."
2+
- name: "see if {{ item }} is in the Dock."
33
ansible.builtin.command:
44
cmd: dockutil --find '{{ item }}'
55
register: dockitem_exists
@@ -14,3 +14,9 @@
1414
cmd: dockutil --remove '{{ item }}'
1515
when: dockitem_exists.rc == 0
1616
tags: ['dock']
17+
18+
- name: pause for 7 seconds between dock changes.
19+
ansible.builtin.pause:
20+
seconds: 7
21+
when: dockitem_exists.rc == 0
22+
tags: ['dock']

0 commit comments

Comments
 (0)